fix(web): keep pending priority bump when cycling status back to start #2
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/status-cycle-priority-loss"
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?
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.