Repository navigation
Closed
Labels
Description
Problem Statement
When the same node is edited in multiple viewers simultaneously, conflicts can occur. We need advanced conflict resolution UI that:
- Detects conflicting edits across viewers
- Provides visual indicators for conflicts
- Offers manual merge UI for complex cases
- Explores automatic merging strategies (field-level, OT, CRDTs)
Current State
What Exists:
- ✅ SharedNodeStore with basic conflict detection
- ✅ Real-time sync across viewers
What's Missing:
- ❌ Visual conflict indicators
- ❌ Manual merge UI
- ❌ Advanced merge strategies (field-level, OT, CRDT)
Proposed Solution
Build conflict resolution system:
- Detect conflicting edits at field level
- Show visual indicators for conflicted nodes
- Provide manual merge UI with diff view
- Explore Operational Transformation (OT) for text merging
- Consider CRDT implementation for future
Key Features
Conflict Detection:
- Field-level comparison (detect which fields conflict)
- Non-conflicting changes merge automatically
Visual Indicators:
- Highlight conflicted nodes in viewer
- Show conflict badge/icon
- Provide conflict resolution dialog
Manual Merge UI:
- Side-by-side diff view
- Select which version to keep
- Manual editing of merged result
Advanced Strategies (Research):
- Operational Transformation for text
- CRDT for conflict-free merging
- Evaluate libraries (Automerge, Yjs)
Main Components Affected
New Files:
/packages/desktop-app/src/lib/components/conflict-resolution-dialog.svelte- Merge UI/packages/desktop-app/src/lib/services/conflict-detector.ts- Conflict detection
Modified Files:
/packages/desktop-app/src/lib/services/shared-node-store.ts- Enhanced conflict handling/packages/desktop-app/src/lib/components/base-node.svelte- Conflict indicators
Acceptance Criteria
- Conflicted nodes show visual indicator
- Manual merge UI with diff view
- Non-conflicting field changes merge automatically
- User can choose version or manually edit merge result
- Conflict resolution preserves data integrity
Estimated Effort
8-10 hours
- Conflict detection: 2 hours
- Visual indicators: 2 hours
- Manual merge UI: 3 hours
- Testing and edge cases: 2-3 hours
- Research OT/CRDT: 1 hour (exploratory)
Dependencies
- Requires: Implement Tab/Pane Management UI (Phases 4-8) #206 (EPIC), Refactor Node Service Architecture for Multi-Tab Support (Phases 1-3: Foundation) #197 (SharedNodeStore)
- Related: Viewer Coordination: Focus, Scroll, and Cursor Management #301 (Viewer Coordination)
Priority
Low - Future consideration, not essential for MVP. Basic conflict handling already exists.
Notes
This is an advanced feature for power users. Start with simple manual merge UI, then explore automated strategies based on user feedback.
Activity
malibio commentedon May 29, 2026
Closing as a duplicate of #642 (newer, with concrete acceptance criteria and references to the actual
SharedNodeStoreconflict-detection mechanism). Consolidating conflict-resolution UI work there.Note for #642: per architectural audit #1228 (finding C5), conflict resolution currently lives in the frontend as hardcoded Last-Write-Wins (5s window, silently discards local). The audit recommends moving adjudication daemon-side (return version + conflict marker in the RPC error) so the UI reacts to an authoritative signal rather than guessing. Build the UI on that, not on the current frontend LWW.