Conversation
…yntaxError
The notes mutations imported @blocknote/core (a browser-oriented library)
at the module level, causing SyntaxError in Convex's V8 isolate when any
note mutation was loaded. This moves BlockNoteEditor usage to "use node"
actions that run in Node.js instead.
- Create convex/notes/nodeActions.ts ("use node") for persistNoteBlocks
and initializeNoteContent
- Create convex/notes/internalMutations.ts for saveNoteBlocksInternal
and pushYjsUpdateInternal
- Create convex/yjsSync/internalQueries.ts for getUpdatesInternal
- Remove @blocknote/core runtime imports from mutations.ts and createNote.ts
- persistNoteBlocks now schedules a Node.js action via ctx.scheduler
- createNote with content creates empty Yjs doc then schedules content init
https://claude.ai/code/session_01J9nErHs2JYcyBnj6zFY2Kv
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
wizard-archive | c6aa726 | Apr 04 2026, 05:47 PM |
|
Caution Review failedFailed to post review comments Warning Ignoring CodeRabbit configuration file changes. For security, only the configuration from the base branch is applied for open source repositories. 📝 WalkthroughWalkthroughThis PR introduces a collaborative canvas (drawing/diagramming) feature backed by Yjs real-time synchronization, replaces ProseMirror sync with Yjs for notes, adds comprehensive E2E testing for canvas and collaboration workflows, refactors CI/deployment GitHub Actions workflows (moving E2E tests to a separate workflow, adding a preview deployment workflow), updates dependencies (adds Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client (Browser)
participant Provider as ConvexYjsProvider
participant Convex as Convex<br/>(Backend)
participant YjsDoc as Y.Doc<br/>(Local)
Client->>YjsDoc: User edits (draw, type, etc.)
YjsDoc->>Provider: Local update event
Provider->>Provider: Buffer & debounce updates
Provider->>Convex: pushUpdate(documentId, update)
Convex->>Convex: Store update to yjsUpdates table
Convex-->>Provider: Return seq number
Convex->>Client: Fetch via getUpdates query
Client->>Provider: Apply remote updates
Provider->>YjsDoc: Y.applyUpdate()
YjsDoc->>Client: Sync state (render updates)
Client->>Provider: Awareness change (cursor, selection)
Provider->>Convex: pushAwareness(documentId, clientId, state)
Convex->>Convex: Store/update yjsAwareness row
Convex->>Client: Fetch via getAwareness query
Client->>Provider: Apply remote awareness
Provider->>Client: Update remote cursors/selections
sequenceDiagram
participant User1 as User 1<br/>(Canvas)
participant Canvas1 as React Flow<br/>Instance 1
participant Yjs1 as Y.Doc +<br/>Awareness 1
participant Convex as Convex<br/>(Server)
participant Yjs2 as Y.Doc +<br/>Awareness 2
participant Canvas2 as React Flow<br/>Instance 2
participant User2 as User 2<br/>(Canvas)
User1->>Canvas1: Draw stroke / Add node
Canvas1->>Yjs1: Update nodesMap / edgesMap
Yjs1->>Convex: pushUpdate (Yjs update bytes)
Convex->>Yjs2: Remote update fetched<br/>via getUpdates query
Yjs2->>Canvas2: Node change event observed
Canvas2->>User2: Re-render with new node
User2->>Canvas2: Cursor movement
Canvas2->>Yjs2: setLocalCursor awareness
Yjs2->>Convex: pushAwareness (cursor position)
Convex->>Yjs1: Remote awareness fetched<br/>via getAwareness query
Yjs1->>Canvas1: Apply awareness update
Canvas1->>User1: Render User2's cursor
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
Summary by CodeRabbit
New Features
Chores