Preserve both versions when synchronized Drafts diverge #853

Closed
opened 2026-08-14 22:22:01 +00:00 by timmy · 0 comments
Owner

Problem

Cross-device unfiled Draft sync treats the local copy as authoritative after every fetch. If a phone retains v1 while a desktop saves v2, the next phone sync uploads v1 over v2 and reports success. Collection revision checks do not detect edits made before the latest GET.

User impact

Operators can silently lose issue titles, descriptions, blockers, and screenshot evidence when switching devices.

Acceptance criteria

  • Track the last synchronized content per Draft on each signed-in device.
  • When local and remote copies of one Draft both diverged from that base, retain the remote Draft and save the local edit as a clearly identified conflict copy.
  • Synchronize both copies account-wide and show an explicit conflict-preserved status instead of a normal success message.
  • Remote-only edits replace an unchanged local copy; local-only edits continue to upload normally.
  • Concurrent edits to different Draft IDs merge without conflict copies.
  • Deletions and existing collection/evidence limits remain enforced.
  • Add a behavioral regression test reproducing phone v1 → desktop v2 → stale phone sync, observe RED, then implement and run the full suite.

Evidence / non-duplication

frontend/unfiled-draft-sync.js currently overlays local copies at lines 62–74 after fetching the newest collection revision. Historical issue #851 introduced synchronization but did not preserve divergent same-ID versions; #377 applies to Later plans, not unfiled Drafts. No open issue or PR covers this behavior.

## Problem Cross-device unfiled Draft sync treats the local copy as authoritative after every fetch. If a phone retains v1 while a desktop saves v2, the next phone sync uploads v1 over v2 and reports success. Collection revision checks do not detect edits made before the latest GET. ## User impact Operators can silently lose issue titles, descriptions, blockers, and screenshot evidence when switching devices. ## Acceptance criteria - Track the last synchronized content per Draft on each signed-in device. - When local and remote copies of one Draft both diverged from that base, retain the remote Draft and save the local edit as a clearly identified conflict copy. - Synchronize both copies account-wide and show an explicit conflict-preserved status instead of a normal success message. - Remote-only edits replace an unchanged local copy; local-only edits continue to upload normally. - Concurrent edits to different Draft IDs merge without conflict copies. - Deletions and existing collection/evidence limits remain enforced. - Add a behavioral regression test reproducing phone v1 → desktop v2 → stale phone sync, observe RED, then implement and run the full suite. ## Evidence / non-duplication `frontend/unfiled-draft-sync.js` currently overlays local copies at lines 62–74 after fetching the newest collection revision. Historical issue #851 introduced synchronization but did not preserve divergent same-ID versions; #377 applies to Later plans, not unfiled Drafts. No open issue or PR covers this behavior.
timmy self-assigned this 2026-08-14 22:22:01 +00:00
timmy closed this issue 2026-08-14 22:36:00 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#853
No description provided.