Skip to content

Leave the previous board group on hub JoinBoard switch - #3375

Open
Chris0Jeky wants to merge 1 commit into
mainfrom
swarm/hub-switch-cleanup
Open

Chris0Jeky wants to merge 1 commit into
mainfrom
swarm/hub-switch-cleanup

Conversation

@Chris0Jeky

Copy link
Copy Markdown
Owner

Wave 2B realtime follow-up fix (swarm review). The presence tracker holds one board per connection and silently drops the old board on Join, but the hub never removed the connection from the old SignalR group nor republished the old snapshot, so a JoinBoard without a matching LeaveBoard left ghost presence and stray old-board mutations. JoinBoard now leaves the previous group and publishes the departure snapshot (new TryGetBoard lookup; leaving never requires permission, so revoked users are cleaned too). 4 new tests; BoardsHubSwitch + tracker 6/6, hub integration/concurrency regressions 27/27 pass.

Wave 2B realtime follow-up: tracker.Join already dropped old-board presence, but the connection stayed in the old SignalR group (ghost presence + stray mutations) when JoinBoard arrived without LeaveBoard. JoinBoard now removes the old group and republishes the old snapshot via a new TryGetBoard lookup. 4 new tests; switch/tracker 6/6, hub integration/concurrency regressions 27/27 pass.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 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-23T00:42:44.260422Z e9665e0 PR opened
ℹ️ 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.

@Chris0Jeky

Copy link
Copy Markdown
Owner Author

Estate ops — CI lane (eng supervisor bot) — 2026-09-23

Merge-next slot #3: leave prior board group on hub JoinBoard switch. Eng-ok shape if exact-head CI is green.

Asks

  1. Confirm realtime/hub tests cover switch A→B leaves group A (no duplicate membership / no ghost receives).
  2. Sequence: after fix(frontend): resolve late-loaded input-assist matches #3269 and Unify CanWrite null-auth stamp between board detail and list #3372; before CONFLICTING fix(board): isolate mutation settlements across logout #3358.
  3. Do not bundle logout session isolation (fix(board): isolate mutation settlements across logout #3358) into this PR.

UXQA: hub join chrome usability stays on #2901.

No merge from this bot.

@Chris0Jeky Chris0Jeky left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Coordinator verification: bug is real on main. Tracker Join already drops the old board mapping (InMemoryBoardPresenceTracker.cs lines 17-25) but BoardsHub.JoinBoard never removed the connection from the old SignalR group nor republished the old snapshot, so a switch without LeaveBoard strands group membership (stray old-board mutations) with stale presence. Fix ordering is right: permission check first (failed switch does not evict), then group-remove plus Leave plus old-snapshot publish before joining the new board; Leave is non-null so the publish call is safe; same-board rejoin and first join are no-ops for the leave path. Tests use the real tracker with mocked SignalR and assert group removal, old snapshot without the user, and new snapshot with the user. Full CI green. Recommend merge once mergeable resolves.

This branch has not been deployed

No deployments
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.

1 participant