Issue
Closes #12
@algora-pbc /claim #12
Summary
Adds a focused offline collaboration conflict resolver for the real-time collaborative research editor. This is distinct from the broader editor/governance submissions: it handles client-side offline operation queues, deterministic rebase over server operations, duplicate operation replay protection, section-lock conflict detection, safe suggestion/comment merging, audit reports, and restore-ready snapshots.
Demo
- Demo GIF:
offline-collaboration-conflict-resolver/docs/demo.gif
- Static diagram:
offline-collaboration-conflict-resolver/docs/demo.svg
- CLI demo:
cd offline-collaboration-conflict-resolver && npm run demo
The CLI demo shows 2 offline edits applied, 1 locked-section edit blocked for manual review, 1 stale-version warning, and a restore snapshot/audit hash.
Acceptance criteria mapping
- Rich scientific document blocks: supported through typed block metadata in the sample manuscript model.
- Multi-user collaboration: actor-scoped offline operations are rebased over server operations.
- Inline comments/suggestions: duplicate-safe merging plus audited suggestion resolution.
- Duplicate replay safety: repeated offline operation ids are skipped and reported instead of being applied twice.
- Section locks: conflicting offline edits are blocked when another collaborator owns the lock.
- Autosave/version history: restore-ready snapshots include block payloads and content hashes.
- Review workflow: conflict reports summarize blockers, warnings, skipped duplicate operations, audit hash, and restore snapshot id.
Detailed mapping: offline-collaboration-conflict-resolver/docs/issue-12-requirement-map.md
Verification
cd offline-collaboration-conflict-resolver
npm run check
npm test
npm run demo
cd ..
git diff --check origin/main...HEAD
Local results:
npm run check passed
npm test passed: 6 conflict resolver tests
npm run demo produced manual-review-required, applied 2 operations, blocked 1 section-lock conflict, warning count 1, skipped count 0, and audit hash 1384ab646144e6aa48dd5ec243bcbb7054c2f8a9728ee5dd0689badf0342c259
git diff --check origin/main...HEAD passed
AI-Assisted Disclosure
This contribution was produced with AI assistance and manually reviewed/verified before submission.