Repository navigation
fix(ui): finish roster refreshes during session activity - #140459
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 5:41 PM ET / 21:41 UTC. ClawSweeper reviewWhat this changesRepairs Control UI session-list loading during conversation activity and preserves confirmed permission choices across delayed responses and failed refreshes. Merge readiness✅ Ready for maintainer review The fix remains necessary: current main and the latest release retain the request-invalidation path responsible for stalled loading. No blocking introduced defect was found, and this maintainer-authored PR should remain open for normal landing. Priority: P1 Review scores
Verification
How this fits togetherThe Control UI combines Gateway session lists, activity events, and permission-change acknowledgments into the sidebar and conversation controls. This change separates list completion from the ordering of permission values displayed for each session. flowchart TD
A[Agent selection] --> B[Session list request]
C[Gateway activity events] --> D[Session permission reconciliation]
E[Permission change acknowledgments] --> D
B --> D
D --> F[Sidebar and conversation controls]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +285, Tests +907, Docs +2. Total +1194 across 10 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Let the roster owner finish its requests while a single session-scoped owner reconciles confirmed permission values and retires them on connection or incarnation changes. Do we have a high-confidence way to reproduce the issue? Yes, from source: hold a roster request, deliver an active session message containing permissionMode, then complete the request; current main invalidates its publication without arranging a replacement. This review did not execute the scenario. Is this the best way to solve the issue? Yes. Separating permission-field ordering from whole-roster completion repairs the owning invariant while preserving query membership, existing request APIs, and connection fencing. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7921ec48f82d. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
fada22c to
7cf891f
Compare
|
Merged via squash.
|
* commit '294df333c58f2da104eccffc623ccb3c4d43d4d8': (1802 commits) fix: clear stale diagnostics after Gateway changes (#140426) fix: keep plugin catalogs intact after discovery timeouts (#140441) perf(tui): prepare session picker rows once per overlay (#140462) refactor(config): reuse environment substitution for write-back (#140460) refactor(discord): remove retired auto-presence templates (#140463) fix(ui): finish roster refreshes during session activity (#140459) fix(setup): match prepared credentials to the model provider (#140461) fix: keep MiniMax discovery on the selected credential (#140438) refactor(tests): remove unused parent context cache reset (#140456) fix: avoid repeated xAI OAuth refresh during discovery (#140434) perf(routing): reuse prepared event session targets (#140454) fix(media): keep deferred audio and extraction providers discoverable (#139231) refactor(codex): remove redundant app-server forwarding (#140451) fix(test): avoid false native polling timeouts (#140119) test(gateway): retain saved source in reload fixtures (#140453) fix(gateway): reduce repeated model work when listing sessions (#140414) fix(feishu): fall back to post mode over table limit (#136382) fix: use the bundle-compatible Proxyline runtime under Bun (#140411) refactor(trace): reuse the canonical usage counter type (#140444) refactor(node-host): share execution policy result fields (#140446) ...
What Problem This Solves
Fixes an issue where switching agents could leave the Control UI sidebar empty and loading when an active session message arrived during the roster request.
Why This Change Was Made
Ordinary session snapshots include a permission field. Processing that field invalidated the entire foreground roster request, including requests for other sessions, without necessarily scheduling a replacement.
Permission facts now stay scoped to their conversation and session ID while the roster owner finishes its read. The single permission owner replaces the prior claim map, preserves newer facts across older responses, and keeps permission-mutation errors separate from unrelated refreshes. Conflicting acknowledgments with equal timestamps use the patch's existing canonical read instead of guessing which value is newer. Query membership, other row fields, and polling behavior are preserved.
User Impact
Agent switching and roster refreshes complete during active conversations. Newer permission choices survive older responses, and a stale mutation outcome cannot replace a newer choice. Session replacement and reconnects retire the corresponding permission state.
Evidence
The screenshots below show the same synthetic agent-switch sequence before and after the fix.
Final qualification for commit
7cf891fc27371b7238930c73ad01d299b274dbb2: 671 tests pass after the documentation-only rebase; the unchanged native browser scenario passes both cases against the actual committed source, with tracked bytes and modes verified before and after the build. Exact-head CI passed. The current ClawSweeper review has no findings or pre-merge items. Its attachment retrieval was unavailable; the linked synthetic before/after images were separately inspected by the implementing and independent reviewers. This proof demonstrates roster completion during activity, not production latency.