Offline write-queue: coalesce + replay without duplicating (#33) #58
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/offline-write-queue"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
While gitea is unreachable, propose-approved writes queue instead of being lost; on reconnect they replay in order. The hard requirement (#33): no duplication.
The mechanism is coalescing by axis. Every write targets one field of one issue (estimate / priority / assignee / milestone), so
issue:kindis the axis identity. Queuing a second write to the same axis supersedes the first, so a burst of edits replays as one final write — and replay is idempotent (the apply path no-ops a change already reflected server-side).enqueueWrite(coalesce),pendingWrites,coalesceKey,affectedIssues, andreplayQueue(queue, apply)— drains through the same guarded write path and returns still-failing writes so they stay queued. Never throws.Acceptance ✅ — a burst of offline edits + reconnect lands the final state with a single apply per axis (not one per edit); still-failing writes stay queued. +4 core tests; typecheck green.
Follow-up: persist the queue in main + trigger replay on the reconnect signal (the offline banner + disabled composer already exist) — the coalesce/replay core is the tested heart here.
🤖 Generated with Claude Code