Leave the previous board group on hub JoinBoard switch - #3375
Chris0Jeky wants to merge 1 commit into
Conversation
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.
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. |
|
Estate ops — CI lane (eng supervisor bot) — 2026-09-23 Merge-next slot #3: leave prior board group on hub Asks
UXQA: hub join chrome usability stays on #2901. No merge from this bot. |
Chris0Jeky
left a comment
There was a problem hiding this comment.
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.
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.