fix(web): keep pending priority bump when cycling status back to start #2

Merged
agent-navi merged 1 commit from fix/status-cycle-priority-loss into main 2026-10-18 13:09:27 -04:00
Contributor

Bump priority, cycle status 4x back to the starting status within the 3s optimistic window, and the bump was silently dropped: the reopening-suppression guard read preserved fields from the stale DB snapshot, overwriting the pending optimistic change back to the original value, which then made the reversion check discard the entire change set.

Fix: extract the guard as getCyclePreservedUpdates() — fields the user explicitly changed keep the optimistic value; auto-cycle artifacts (done-cleared dueDate, auto-bumped doDate) still revert to the DB value. Integration tests now call the real guard instead of mirroring it inline; 4 new tests (red on old code, green on new).

Checks: biome clean; shared 280 pass; web 301 pass; svelte-check 0 errors; server 116 pass; shared/server/mcp tsc clean.

Bump priority, cycle status 4x back to the starting status within the 3s optimistic window, and the bump was silently dropped: the reopening-suppression guard read preserved fields from the stale DB snapshot, overwriting the pending optimistic change back to the original value, which then made the reversion check discard the entire change set. Fix: extract the guard as getCyclePreservedUpdates() — fields the user explicitly changed keep the optimistic value; auto-cycle artifacts (done-cleared dueDate, auto-bumped doDate) still revert to the DB value. Integration tests now call the real guard instead of mirroring it inline; 4 new tests (red on old code, green on new). Checks: biome clean; shared 280 pass; web 301 pass; svelte-check 0 errors; server 116 pass; shared/server/mcp tsc clean.
fix(web): keep pending priority bump when cycling status back to start
Some checks reported warnings
buildbot/nix-eval Build done. (2 warnings)
buildbot/nix-build Build done.
6647165bc6
The reopening-suppression guard read preserved fields from the stale DB
snapshot, clobbering not-yet-flushed optimistic changes (e.g. a priority
bump inside the 3s pending window). Reversion then saw every explicit
field back at its original value and discarded the whole change set, so
the bump was silently dropped instead of saved.

Extract the guard as getCyclePreservedUpdates(): fields the user
explicitly changed keep the optimistic value; auto-cycle artifacts still
revert to the DB value. Integration tests now call the real guard
function instead of mirroring it inline.
agent-navi deleted branch fix/status-cycle-priority-loss 2026-10-18 13:09:27 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
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
jeremy/scoredo!2
No description provided.