Repository navigation
fix(ui): prevent account suffixes from leaking into chat labels - #125097
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 2:17 AM ET / 06:17 UTC. ClawSweeper reviewWhat this changesThe PR prevents the Control UI chat-pane rename field from treating an account-qualified display title as a persistable session label, and adds a focused browser regression case. Merge readinessKeep open: current main still seeds chat-pane rename from the account-decorated display title, while this PR moves the write producer to the same stored-label-or-empty contract used by the Sessions page and sidebar. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI renders Gateway session rows into decorated chat-pane titles, then lets operators rename the session through an inline field. The field submits its value back through the session patch API, where it becomes persistent user state. flowchart LR
A[Gateway session row] --> B[Display-name resolver]
B --> C[Decorated chat title]
A --> D[Inline rename seed]
D --> E[Session label update]
E --> A
C --> F[Visible chat pane]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -2, Tests +28. Total +26 across 3 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Mantis proof suggestionA short Control UI chat interaction capture would directly prove the visible title and editable-field separation. A maintainer can ask Mantis to capture proof by posting this exact PR comment: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the producer-side stored-label seed, retain display-only account decoration, and attach observed Control UI proof before merge. Do we have a high-confidence way to reproduce the issue? Yes—source reproducible with an account-qualified, unlabeled session: current main displays the suffix, seeds the input from that display title, and persists a partial edit. The PR's browser scenario encodes this path, but this read-only review did not execute it. Is this the best way to solve the issue? Yes. The patch fixes the write producer and follows the established sibling invariant that only stored user labels are editable; the display resolver remains responsible for account decoration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0af3b865d782. LabelsLabel 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 (1 earlier review cycle)
|
Closes #124307
What Problem This Solves
Fixes an issue where users renaming an unlabeled session from the chat pane could persist the rendered account suffix as part of the stored label. A later edit could then show a doubled or stale account discriminator.
Why This Change Was Made
The chat pane now follows the established Sessions page and sidebar contract: inline rename starts from the persisted user label, or an empty value when no label exists. It no longer treats the rendered pane title as editable user data, and the obsolete derived-title unchanged guard is removed.
User Impact
For account-qualified sessions such as
Alice · cards, opening inline rename starts empty when the session has no custom label. Account decoration remains display-only and cannot leak into stored session labels through this flow.Evidence
Added focused Control UI browser regression coverage for an account-qualified session with
displayName: Alice,accountId: cards, and no stored label. The test confirms the pane title renders asAlice · cardswhile the inline rename field opens empty.Executable proof was not run locally per task constraint; CI/external review will execute the regression.
Static inspection:
git diff --checkpassed. Production LOC: +5/-7 (net -2). Tests: +28/-0.