Skip to content

feat: adopt collaboration UI libraries and restore smooth cursors - #11

Merged
arjayby merged 12 commits into
mainfrom
feat/example-libraries
Sep 13, 2026
Merged

arjayby merged 12 commits into
mainfrom
feat/example-libraries

Conversation

@arjayby

@arjayby arjayby commented Sep 12, 2026 •

Copy link
Copy Markdown
Owner

Replace the custom controls in five collaboration examples with library integrations while keeping Synixir, Phoenix, and Yjs responsible for synchronization, permissions, and persistence.

Example Integration
Kanban dnd-kit pointer, touch, and keyboard sorting within and between columns
Whiteboard Excalidraw drawing tools with a field-level Yjs adapter and local font assets
Flowchart React Flow nodes, connection handles, resizing, pan/zoom, and minimap
Table react-data-grid navigation, resizing, and virtualization with Y.Text-bound CodeMirror cells
Project brief React Hook Form, Zod, and resolvers for local validation around the shared draft

Existing saved rooms remain readable, including legacy whiteboard scenes through a deterministic read-through adapter. CodeMirror, Tiptap, and the minimal shared-settings integration remain in place. Each library implementation has a separate commit.

Remote cursors in the whiteboard and flowchart interpolate between awareness updates. The whiteboard publishes the first movement after idle immediately and skips scene processing for cursor-only callbacks. Frame-by-frame browser tests cover intermediate positions, settling time, reduced motion, and the absence of cursor-triggered Yjs transactions. Browser test ports are configurable so separate worktrees can run independently.

Staging navigation retries transient Chromium ERR_NETWORK_CHANGED failures up to three attempts. Static Next.js chunk downloads no longer consume the API and WebSocket request budget. A 240-request asset burst checks that bundles load without HTTP 429 responses and leave the session API available.

Validation

  • Clean npm install, TypeScript checks, and static production build passed.
  • 44 JavaScript SDK/model/tooling tests passed, including seven navigation retry regression tests.
  • All 69 browser checks passed in CI, covering collaboration, permissions, offline merging, restart recovery, undo, presence, cursor motion, and mobile layout.
  • Native AMD64 Docker release and HTTPS staging rehearsal passed in CI, including asset bursts, replacement, retained sessions and documents, native libraries, and database recovery. The local ARM64 rehearsal also passed.
  • 58 backend tests and the Elixir formatting check passed.
  • Desktop and mobile screenshots inspected; flowchart styling now lives independently of the whiteboard.

Package constraints

  • react-data-grid is pinned to the prerelease 7.0.0-beta.61.
  • Whiteboard image insertion, embedded content, and scene-file import are disabled because the example has no attachment store. Local drawing export remains available.
  • Excalidraw's transitive dependencies retain nine npm audit findings, including two high and seven moderate. The whiteboard integration notes document these dependencies and the npm workspace override limitation.

The library adapters displayed cursors directly at awareness packet positions, dropping interpolation. Share a frame-based cursor interpolator, publish the first whiteboard movement immediately, and skip scene processing for presence-only callbacks. Add browser checks for intermediate positions, bounded settling time, reduced motion, and zero cursor-triggered Yjs transactions.
Retry only Chromium ERR_NETWORK_CHANGED navigation failures up to three attempts. Keep other navigation and HTTP failures visible, add regression coverage, and report browser diagnostics when the staging pilot fails.
Exclude GET and HEAD requests for immutable Next.js chunks from the shared request-rate bucket while retaining connection limits and limits on all dynamic routes. Reproduce the previous HTTP 429 failure with a 240-request staging asset burst and verify that the session API remains available.
@arjayby
arjayby merged commit 691887c into main Sep 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant