Skip to content

fix(columns): bind mutation order to board visits - #3315

Open
Chris0Jeky wants to merge 5 commits into
mainfrom
codex/3314-column-mutation-ordering
Open

Chris0Jeky wants to merge 5 commits into
mainfrom
codex/3314-column-mutation-ordering

Conversation

@Chris0Jeky

@Chris0Jeky Chris0Jeky commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Summary

Hardens columnStore around the board's shared ordered-column set:

  • create/update/delete/reorder serialize per board so server commit order follows user intent despite no revision precondition;
  • the first intent starts transport immediately, while queued work rechecks the initiating board-visit generation before transport;
  • a failed predecessor does not cancel the next queued intent;
  • late settlements cannot patch another board, emit stale success/error UI, or filter another board's cards;
  • same-board detail refreshes remain patchable by a successful write;
  • a successful already-started write from an older A→B→A visit performs one bounded authoritative getColumns reconciliation;
  • stale-visit delete reconciliation also removes cards whose deleted column no longer exists;
  • a newer successful mutation invalidates an older reconciliation read.

Unrelated boards remain independent. No API, DTO, schema or route changes.

Test-first evidence

Deferred-promise regressions cover:

  1. overlapping reorder intent order;
  2. queued work after board/session replacement;
  3. late delete after navigation;
  4. same-board detail refresh before update settlement;
  5. A→B→A post-write reconciliation;
  6. continuation after a failed predecessor;
  7. deleted-column card cleanup after A→B→A reconciliation.

Exact head: a1264abc84708458b0d91b24e768d2f31ab68d1e.

Verification

  • Smart CI Self-Test, Required CI, CI Extended, and final Codex review are triggered by moving this exact head to review.
  • The repeated shadow-planner merge-ref lag encountered while the PR was newly opened is separately tracked in Smart CI planner exhausts merge-ref retries before GitHub updates a PR head #3316; ordinary product CI remains the exact-head qualification source.
  • No canonical-document or control-plane change is included.

Closes #3314

@Chris0Jeky
Chris0Jeky marked this pull request as ready for review September 20, 2026 22:16
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-20T22:19:48.226240Z a1264ab Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +33 to +37
watch(
() => state.currentBoard.value?.id ?? null,
(nextBoardId, previousBoardId) => {
if (nextBoardId !== previousBoardId) boardVisitGeneration++
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending

Development

Successfully merging this pull request may close these issues.

Column mutations lack board-visit and operation-order ownership

1 participant