fix prod deployment

This commit is contained in:
Jeff Emmett 2025-11-10 19:23:15 -08:00
parent 1b36b19c4d
commit f4e962fc45
1 changed files with 7 additions and 7 deletions

View File

@ -259,7 +259,7 @@ export function Board() {
if (storeShapesOnCurrentPage.length > 0 && editorShapes.length === 0) { if (storeShapesOnCurrentPage.length > 0 && editorShapes.length === 0) {
console.log(`🔍 DEBUG: Checking why ${storeShapesOnCurrentPage.length} shapes aren't visible...`) console.log(`🔍 DEBUG: Checking why ${storeShapesOnCurrentPage.length} shapes aren't visible...`)
const sampleShape = storeShapesOnCurrentPage[0] const sampleShape = storeShapesOnCurrentPage[0]
const shapeInEditor = editor.getShape(sampleShape.id) const shapeInEditor = editor.getShape(sampleShape.id as TLShapeId)
console.log(`🔍 DEBUG: Sample shape ${sampleShape.id} in editor:`, shapeInEditor ? 'EXISTS' : 'MISSING') console.log(`🔍 DEBUG: Sample shape ${sampleShape.id} in editor:`, shapeInEditor ? 'EXISTS' : 'MISSING')
if (shapeInEditor) { if (shapeInEditor) {
console.log(`🔍 DEBUG: Shape details:`, { console.log(`🔍 DEBUG: Shape details:`, {
@ -297,9 +297,9 @@ export function Board() {
}))) })))
// Try to get the shapes from the editor to see if they exist but aren't being returned // Try to get the shapes from the editor to see if they exist but aren't being returned
const missingShapeIds = missingShapes.map((s: any) => s.id) const missingShapeIds = missingShapes.map((s: any) => s.id as TLShapeId)
const shapesFromEditor = missingShapeIds const shapesFromEditor = missingShapeIds
.map((id: string) => editor.getShape(id)) .map((id: TLShapeId) => editor.getShape(id))
.filter((s): s is NonNullable<typeof s> => s !== undefined) .filter((s): s is NonNullable<typeof s> => s !== undefined)
if (shapesFromEditor.length > 0) { if (shapesFromEditor.length > 0) {
@ -324,11 +324,11 @@ export function Board() {
const shapesToRefresh = missingShapes.slice(0, 10) // Limit to first 10 to avoid performance issues const shapesToRefresh = missingShapes.slice(0, 10) // Limit to first 10 to avoid performance issues
const refreshedShapes = shapesToRefresh.map((s: any) => { const refreshedShapes = shapesToRefresh.map((s: any) => {
const shapeFromStore = currentStore.get(s.id) const shapeFromStore = currentStore.get(s.id)
if (shapeFromStore) { if (shapeFromStore && shapeFromStore.typeName === 'shape') {
return shapeFromStore return shapeFromStore
} }
return null return null
}).filter((s: TLRecord | null): s is TLRecord => s !== null) }).filter((s): s is TLRecord => s !== null && s.typeName === 'shape')
if (refreshedShapes.length > 0) { if (refreshedShapes.length > 0) {
console.log(`📊 Board: Refreshing ${refreshedShapes.length} shapes in store`) console.log(`📊 Board: Refreshing ${refreshedShapes.length} shapes in store`)
@ -438,11 +438,11 @@ export function Board() {
if (shapesOnNewPage.length > 0) { if (shapesOnNewPage.length > 0) {
// Try to manually add shapes that might have validation issues // Try to manually add shapes that might have validation issues
console.log(`📊 Board: Attempting to force visibility by selecting all shapes on page`) console.log(`📊 Board: Attempting to force visibility by selecting all shapes on page`)
const shapeIds = shapesOnNewPage.map((s: any) => s.id).filter((id: string): id is TLShapeId => id !== undefined) const shapeIds = shapesOnNewPage.map((s: any) => s.id as TLShapeId).filter((id): id is TLShapeId => id !== undefined)
if (shapeIds.length > 0) { if (shapeIds.length > 0) {
// Try to get shapes from editor to see if they exist // Try to get shapes from editor to see if they exist
const existingShapes = shapeIds const existingShapes = shapeIds
.map((id: string) => editor.getShape(id)) .map((id: TLShapeId) => editor.getShape(id))
.filter((s): s is NonNullable<typeof s> => s !== undefined) .filter((s): s is NonNullable<typeof s> => s !== undefined)
console.log(`📊 Board: ${existingShapes.length} of ${shapeIds.length} shapes exist in editor`) console.log(`📊 Board: ${existingShapes.length} of ${shapeIds.length} shapes exist in editor`)
if (existingShapes.length > 0) { if (existingShapes.length > 0) {