Skip to content

Advanced Conflict Resolution UI #303

Closed

Description

@malibio

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:

  1. Detect conflicting edits at field level
  2. Show visual indicators for conflicted nodes
  3. Provide manual merge UI with diff view
  4. Explore Operational Transformation (OT) for text merging
  5. 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

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

  1. malibio commented on May 29, 2026

    @malibio
    CollaboratorAuthor

    Closing as a duplicate of #642 (newer, with concrete acceptance criteria and references to the actual SharedNodeStore conflict-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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfrontendphase-7

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions