fix(columns): bind mutation order to board visits - #3315
Chris0Jeky wants to merge 5 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a1264abc84
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| watch( | ||
| () => state.currentBoard.value?.id ?? null, | ||
| (nextBoardId, previousBoardId) => { | ||
| if (nextBoardId !== previousBoardId) boardVisitGeneration++ | ||
| }, |
There was a problem hiding this comment.
Invalidate queued mutations when the route visit ends
The generation only advances when the cached currentBoard.id changes, but leaving BoardView does not clear currentBoard, and a switch to another board changes it only after that board's fetch commits. Therefore, if a column operation is queued behind an in-flight operation and the user navigates away (or the next board load fails), isCurrentVisit remains true and the queued write starts after the initiating board visit has ended; a late response can also patch the cached board and show a success toast on another screen. Bind the generation to the route/session lifecycle or explicitly invalidate it on board-view departure rather than observing the retained detail payload.
Useful? React with 👍 / 👎.
Summary
Hardens
columnStorearound the board's shared ordered-column set:getColumnsreconciliation;Unrelated boards remain independent. No API, DTO, schema or route changes.
Test-first evidence
Deferred-promise regressions cover:
Exact head:
a1264abc84708458b0d91b24e768d2f31ab68d1e.Verification
Closes #3314