Skip to content

feat: conflict resolution UI in TUI #3

Description

@gitcoder89431

Summary

Allow users to resolve .sync-conflict-* files directly inside the TUI instead of just flagging them with !.

Motivation

Conflicts are currently detected and badged but require manual filesystem intervention to resolve. This is the most frustrating part of the Syncthing UX and meshd can solve it elegantly.

Proposed UX

  • Pressing enter on a conflicted file (! badge) opens a Conflict Resolution pane
  • For text files: side-by-side diff view (current vs conflict version), k to keep current, K to keep conflict, m to open in $EDITOR for manual merge
  • For binary files (images, .kdbx, etc.): show metadata side-by-side (size, modified time, device origin), k/K to pick one
  • Special handling for KeePass .kdbx: show message "KeePass can merge this natively — open both versions in KeePass to merge" with a hint to use KeePass's sync feature
  • After resolution, automatically deletes the .sync-conflict-* file

CLI equivalent

meshd conflicts           # list all current conflicts
meshd conflicts --fix     # interactive resolution for each conflict

Implementation Notes

  • Conflict files follow the pattern: <name>.sync-conflict-<date>-<time>-<deviceid>.<ext>
  • Device ID in the filename can be resolved back to a device name via /rest/config/devices
  • Side-by-side diff: use github.com/sergi/go-diff or similar
  • Binary detection: check for null bytes in first 8KB of file

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions