Repository navigation
fix(ui): refresh selected agent roster immediately - #133133
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 7:08 AM ET / 11:08 UTC. ClawSweeper reviewWhat this changesThis PR refreshes the Control UI session roster after selecting a different global-chat agent and prevents older roster loads from publishing after a newer foreground selection. Merge readinessKeep open for maintainer review. Current main still lacks the selected-global roster refresh, and the branch adds it at the owner transition while fencing stale roster publications in the shared lifecycle; no introduced correctness defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI agent picker changes the active owner for a global chat. That owner determines the scoped session-list request and the roster subsequently displayed beside the chat. flowchart LR
A[Agent picker] --> B[Selected global chat]
B --> C[Owner transition]
C --> D[Scoped roster refresh]
D --> E[Roster publication guard]
E --> F[Visible session roster]
Decision needed
Why: The author association and maintainer label require explicit human handling, while the change deliberately alters shared asynchronous session-state publication order. Before merge
Agent review detailsSecurityNone. PR surfaceSource +23, Tests +164. Total +187 across 7 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain one roster-lifecycle publication boundary, land it only after exact-head checks are green, and have the Control UI owner confirm the shared ordering contract. Do we have a high-confidence way to reproduce the issue? Yes—source inspection gives a high-confidence path: select another agent in a selected-global chat and observe that current main transitions ownership without requesting the scoped roster. No code was executed because this is a read-only review. Is this the best way to solve the issue? Yes—the refresh uses the existing scoped roster helper and the stale-publication rule belongs in the shared roster owner rather than a chat-specific caller fence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 162c33ef55cc. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
999aa21 to
18b15eb
Compare
|
Merged via squash.
|
* fix(ui): refresh selected agent roster immediately * fix(ui): fence stale roster refresh publications
Related: #133132
What Problem This Solves
Fixes an issue where selecting a different agent for a global Control UI chat updated the visible owner but did not immediately refresh that agent's session roster. It also prevents an older in-flight roster request from publishing rows or errors after a newer foreground replacement is queued.
Why This Change Was Made
The agent-selection path now refreshes sessions immediately after the owner transition, when the selected agent is authoritative. The roster controller owns a foreground publication generation so queued replacements invalidate older publications without delaying their callers. Fixed-session, append, background, and event transitions remain unchanged.
The production growth is confined to the roster lifecycle owner: it replaces a caller-specific selection fence with one canonical publication boundary shared by bootstrap, queued refresh, reset, and dispose. No compatibility path or downstream fallback was added.
User Impact
The session list and agent-scoped state update immediately after switching agents instead of waiting for a later connection or identity event.
Evidence
chat-pane-identity.test.ts: 4/4 passing.chat-state.test.ts: 106/106 passing.pnpm tsgo:ui, changed-file gate, format, lint, and diff checks pass.Visual Proof
An isolated mock-Gateway browser run used the real agent selector and verified:
sessions.listrequested withagentId: "work".Command:
node --import tsx .artifacts/control-ui-e2e/selected-agent-roster-refresh/record.mtsCapture: three 1440x900 screenshots and a 5.44s video. The artifacts contain only synthetic data. Browser attachment is unavailable in this session, so the sanitized captures are retained locally and identified by SHA-256:
ac5fc16740cfcf7029d0780dd9de60743856a537384e8c7015179333d0c9b5792294923171af8c815fdcf9ee02dba68e3000447c320927dadeb32e144c5985c66d4393f966e3dbf6e986cab2bf7eb895f7fff3f3e0b0daf0712cce35a51b8a8cc79369f6f73b07f5e86f2c430c6771319ea923bf235267fa6bdc579e5c59278f