Compare commits
No commits in common. "7e391ed8f3edd5724925fcd1a98f1a318658d112" and "19b5356f3d7048123cca2f2d3ab1ef0e364d0664" have entirely different histories.
7e391ed8f3
...
19b5356f3d
|
|
@ -4,7 +4,7 @@ title: Set FAL_API_KEY and RUNPOD_API_KEY secrets in Cloudflare Worker
|
||||||
status: Done
|
status: Done
|
||||||
assignee: []
|
assignee: []
|
||||||
created_date: '2025-12-25 23:30'
|
created_date: '2025-12-25 23:30'
|
||||||
updated_date: '2025-12-26 01:26'
|
updated_date: '2025-12-25 23:33'
|
||||||
labels:
|
labels:
|
||||||
- security
|
- security
|
||||||
- infrastructure
|
- infrastructure
|
||||||
|
|
@ -43,6 +43,4 @@ wrangler deploy
|
||||||
|
|
||||||
<!-- SECTION:NOTES:BEGIN -->
|
<!-- SECTION:NOTES:BEGIN -->
|
||||||
Secrets set and deployed on 2025-12-25
|
Secrets set and deployed on 2025-12-25
|
||||||
|
|
||||||
Dec 25: Completed full client migration to server-side proxies. Pushed to dev branch.
|
|
||||||
<!-- SECTION:NOTES:END -->
|
<!-- SECTION:NOTES:END -->
|
||||||
|
|
|
||||||
|
|
@ -17,46 +17,6 @@ import throttle from "lodash.throttle"
|
||||||
import { applyAutomergePatchesToTLStore, sanitizeRecord } from "./AutomergeToTLStore.js"
|
import { applyAutomergePatchesToTLStore, sanitizeRecord } from "./AutomergeToTLStore.js"
|
||||||
import { applyTLStoreChangesToAutomerge } from "./TLStoreToAutomerge.js"
|
import { applyTLStoreChangesToAutomerge } from "./TLStoreToAutomerge.js"
|
||||||
|
|
||||||
// Default tldraw shape types (built into the library)
|
|
||||||
const DEFAULT_SHAPE_TYPES = [
|
|
||||||
'arrow', 'bookmark', 'draw', 'embed', 'frame', 'geo', 'group',
|
|
||||||
'highlight', 'image', 'line', 'note', 'text', 'video'
|
|
||||||
]
|
|
||||||
|
|
||||||
// Custom shape types registered in this application
|
|
||||||
// IMPORTANT: Keep this in sync with shapeUtils array inside useAutomergeSync
|
|
||||||
const CUSTOM_SHAPE_TYPES = [
|
|
||||||
'ChatBox',
|
|
||||||
'VideoChat',
|
|
||||||
'Embed',
|
|
||||||
'Markdown',
|
|
||||||
'MycrozineTemplate',
|
|
||||||
'MycroZineGenerator',
|
|
||||||
'Slide',
|
|
||||||
'Prompt',
|
|
||||||
'Transcription',
|
|
||||||
'ObsNote',
|
|
||||||
'FathomNote',
|
|
||||||
'Holon',
|
|
||||||
'ObsidianBrowser',
|
|
||||||
'FathomMeetingsBrowser',
|
|
||||||
'ImageGen',
|
|
||||||
'VideoGen',
|
|
||||||
'Multmux',
|
|
||||||
'MycelialIntelligence', // AI-powered collaborative intelligence shape
|
|
||||||
'Map', // Open Mapping - OSM map shape
|
|
||||||
'Calendar', // Calendar with view switching
|
|
||||||
'CalendarEvent', // Calendar individual events
|
|
||||||
'Drawfast', // Drawfast quick sketching
|
|
||||||
'HolonBrowser', // Holon browser
|
|
||||||
'PrivateWorkspace', // Private workspace for Google Export
|
|
||||||
'GoogleItem', // Individual Google items
|
|
||||||
'WorkflowBlock', // Workflow builder blocks
|
|
||||||
]
|
|
||||||
|
|
||||||
// Combined set of all known shape types for validation
|
|
||||||
const KNOWN_SHAPE_TYPES = new Set([...DEFAULT_SHAPE_TYPES, ...CUSTOM_SHAPE_TYPES])
|
|
||||||
|
|
||||||
// Helper function to safely extract plain objects from Automerge proxies
|
// Helper function to safely extract plain objects from Automerge proxies
|
||||||
// This handles cases where JSON.stringify fails due to functions or getters
|
// This handles cases where JSON.stringify fails due to functions or getters
|
||||||
function safeExtractPlainObject(obj: any, visited = new WeakSet()): any {
|
function safeExtractPlainObject(obj: any, visited = new WeakSet()): any {
|
||||||
|
|
@ -217,7 +177,7 @@ export function useAutomergeStoreV2({
|
||||||
ImageGenShape,
|
ImageGenShape,
|
||||||
VideoGenShape,
|
VideoGenShape,
|
||||||
MultmuxShape,
|
MultmuxShape,
|
||||||
MycelialIntelligenceShape, // AI-powered collaborative intelligence shape
|
MycelialIntelligenceShape, // Deprecated - kept for backwards compatibility
|
||||||
MapShape, // Open Mapping - OSM map shape
|
MapShape, // Open Mapping - OSM map shape
|
||||||
CalendarShape, // Calendar with view switching
|
CalendarShape, // Calendar with view switching
|
||||||
CalendarEventShape, // Calendar individual events
|
CalendarEventShape, // Calendar individual events
|
||||||
|
|
@ -228,9 +188,36 @@ export function useAutomergeStoreV2({
|
||||||
WorkflowBlockShape, // Workflow builder blocks
|
WorkflowBlockShape, // Workflow builder blocks
|
||||||
]
|
]
|
||||||
|
|
||||||
// Use the module-level CUSTOM_SHAPE_TYPES constant
|
// CRITICAL: Explicitly list ALL custom shape types to ensure they're registered
|
||||||
// This ensures schema registration stays in sync with the filtering logic
|
// This is a fallback in case dynamic extraction from shape utils fails
|
||||||
const knownCustomShapeTypes = CUSTOM_SHAPE_TYPES
|
const knownCustomShapeTypes = [
|
||||||
|
'ChatBox',
|
||||||
|
'VideoChat',
|
||||||
|
'Embed',
|
||||||
|
'Markdown',
|
||||||
|
'MycrozineTemplate',
|
||||||
|
'MycroZineGenerator',
|
||||||
|
'Slide',
|
||||||
|
'Prompt',
|
||||||
|
'Transcription',
|
||||||
|
'ObsNote',
|
||||||
|
'FathomNote',
|
||||||
|
'Holon',
|
||||||
|
'ObsidianBrowser',
|
||||||
|
'FathomMeetingsBrowser',
|
||||||
|
'ImageGen',
|
||||||
|
'VideoGen',
|
||||||
|
'Multmux',
|
||||||
|
'MycelialIntelligence', // Deprecated - kept for backwards compatibility
|
||||||
|
'Map', // Open Mapping - OSM map shape
|
||||||
|
'Calendar', // Calendar with view switching
|
||||||
|
'CalendarEvent', // Calendar individual events
|
||||||
|
'Drawfast', // Drawfast quick sketching
|
||||||
|
'HolonBrowser', // Holon browser
|
||||||
|
'PrivateWorkspace', // Private workspace for Google Export
|
||||||
|
'GoogleItem', // Individual Google items
|
||||||
|
'WorkflowBlock', // Workflow builder blocks
|
||||||
|
]
|
||||||
|
|
||||||
// Build schema with explicit entries for all custom shapes
|
// Build schema with explicit entries for all custom shapes
|
||||||
const customShapeSchemas: Record<string, any> = {}
|
const customShapeSchemas: Record<string, any> = {}
|
||||||
|
|
@ -475,30 +462,14 @@ export function useAutomergeStoreV2({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// Filter out unknown/unsupported shape types to prevent validation errors
|
// Filter out SharedPiano shapes since they're no longer supported
|
||||||
// This keeps the board functional even if some shapes can't be loaded
|
|
||||||
const unknownShapeTypes: string[] = []
|
|
||||||
const filteredRecords = allRecords.filter((record: any) => {
|
const filteredRecords = allRecords.filter((record: any) => {
|
||||||
if (record.typeName === 'shape') {
|
if (record.typeName === 'shape' && record.type === 'SharedPiano') {
|
||||||
const shapeType = record.type
|
return false
|
||||||
if (!KNOWN_SHAPE_TYPES.has(shapeType)) {
|
|
||||||
// Track unknown types for error logging
|
|
||||||
if (!unknownShapeTypes.includes(shapeType)) {
|
|
||||||
unknownShapeTypes.push(shapeType)
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
|
|
||||||
// Log errors for any unknown shape types that were filtered out
|
|
||||||
if (unknownShapeTypes.length > 0) {
|
|
||||||
console.error(`❌ Unknown shape types filtered out (shapes not loaded):`, unknownShapeTypes)
|
|
||||||
console.error(` These shapes exist in the document but are not registered in KNOWN_SHAPE_TYPES.`)
|
|
||||||
console.error(` To fix: Add these types to CUSTOM_SHAPE_TYPES in useAutomergeStoreV2.ts`)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (filteredRecords.length > 0) {
|
if (filteredRecords.length > 0) {
|
||||||
store.mergeRemoteChanges(() => {
|
store.mergeRemoteChanges(() => {
|
||||||
const pageRecords = filteredRecords.filter(r => r.typeName === 'page')
|
const pageRecords = filteredRecords.filter(r => r.typeName === 'page')
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ const customShapeUtils = [
|
||||||
VideoGenShape,
|
VideoGenShape,
|
||||||
DrawfastShape,
|
DrawfastShape,
|
||||||
MultmuxShape,
|
MultmuxShape,
|
||||||
MycelialIntelligenceShape, // AI-powered collaborative intelligence shape
|
MycelialIntelligenceShape, // Deprecated - kept for backwards compatibility
|
||||||
PrivateWorkspaceShape, // Private zone for Google Export data sovereignty
|
PrivateWorkspaceShape, // Private zone for Google Export data sovereignty
|
||||||
GoogleItemShape, // Individual items from Google Export with privacy badges
|
GoogleItemShape, // Individual items from Google Export with privacy badges
|
||||||
MapShape, // Open Mapping - OSM map shape
|
MapShape, // Open Mapping - OSM map shape
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue