Repository navigation
fix(usage): preserve the selected session owner in details - #143457
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 9, 2026, 7:24 PM ET / 23:24 UTC (Revision 2). ClawSweeper reviewWhat this changesThe Usage dashboard carries the selected session’s agent into detail requests and replaces retained details when an overview refresh changes that owner. Merge readiness✅ Ready for maintainer review This repair remains necessary on current main. The reviewed patch preserves qualified-key routing and fences replaced-owner responses; no actionable correctness or security finding was identified. Priority: P2 Review scores
Verification
How this fits togetherThe Usage dashboard turns Gateway session summaries into timelines, conversation logs, and context details. The selected key and agent identify which existing session store supplies those details. flowchart LR
A[Usage overview rows] --> B[Selected key and agent]
B --> C{Qualified session key?}
C -->|Yes| D[Key-only request]
C -->|No| E[Key and owner request]
D --> F[Gateway session resolver]
E --> F
F --> G[Existing session store]
G --> H[Owner-matched details]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +41, Tests +153, Docs +1. Total +195 across 8 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one key-and-agent detail identity throughout selection, refresh, and recovery while using the existing Gateway resolver and qualified-key contract. Do we have a high-confidence way to reproduce the issue? Yes, from source: select an unqualified session such as global in a multi-agent overview; current main drops its agent before resolving details. This review did not execute the application or tests. Is this the best way to solve the issue? Yes. Carrying the existing owner identity through the detail lifecycle repairs the producer and consumer together, preserves qualified system-session routing, and avoids a competing resolver. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e157c6b250b8. 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)
|
760464a to
495de05
Compare
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where users opening a session in the All-agent Usage view would see missing-owner errors instead of its timeline and conversation when the session used a raw key such as
global. An overview refresh could also keep details from the previous agent when another agent acquired that same raw key.Why This Change Was Made
The detail controller now carries the selected session's key and agent through requests, retained results, and recovery. Raw keys send their owner to the existing Gateway resolver. Qualified keys keep their existing key-only routing, including system sessions outside the configured roster. Automatic refresh retains matching details and replaces them when ownership changes; manual refresh still refreshes all details.
Both Gateway detail methods share key validation and owner resolution, and a single-use context-weight forwarding helper is removed. Existing authorization, key bytes, selection behavior, and storage semantics are preserved.
User Impact
Users can inspect the correct timeline, conversation, and available context weight for the selected agent's session, including system sessions. Stale responses cannot replace a successor owner's details.
Evidence
The original Gateway regression and three mounted UI regressions fail on the original production code. A separate system-session control proves why qualified requests must remain key-only. The final owner and sibling suites pass 94 distinct cases across six files, and all 32 selected validation stages pass. Independent review found no actionable issues through P2.
The before/after images use the same synthetic session and mock Gateway response policy in a source-built Control UI. Before, actual key-only detail requests produce missing-owner errors; after, the emitted owner-aware requests render the timeline and conversation. This is isolated browser and Gateway fixture proof, without live operator data. All full images were inspected before upload.