-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Description
Summary
Add a lightweight "collaboration session" feature that allows multiple users to share a diagram via a session ID and manually push/pull the diagram JSON. This is Phase 1 (manual sync) toward a future real-time collaboration feature.
Motivation
Currently users must export/import diagrams to collaborate. A manual session-based sync will allow quick team edits with minimal engineering changes and no WebSocket/OT/CRDT complexity.
Proposed behavior (MVP)
- Host clicks "Create Session" -> a session ID + shareable link is generated.
- Collaborators open the link -> diagram loads from the session (if present).
- Buttons available: "Pull Latest" (import session JSON) and "Push My Changes" (overwrite session JSON).
- Backend storage is a simple JSON blob store (Supabase / Firebase / serverless DB).
- "Last push wins" semantics for conflict resolution (no merges in Phase 1).
- Optional: auto-expire sessions after N hours/days.
Why this is incremental-friendly
- Uses existing export/import JSON functions.
- No canvas internals or cursor syncing changes.
- Provides tangible user value and paves way for future real-time features.
Implementation hints (for maintainers/contributors)
- Add a Collaboration modal in the toolbar.
- Create simple REST calls: POST /session, GET /session/:id, PUT /session/:id backed by Supabase or similar.
- Add URL param support:
?session=<id>for quick join. - UI should warn if Pull will overwrite local unsaved changes.
I can implement Phase 1 and open a PR if this seems acceptable. Thanks!
Metadata
Metadata
Assignees
Labels
No labels