[codex] Fix WebChat agent default model label#77690
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Keep open: current main and the latest release still have the WebChat Default-label bug, and this PR is the linked candidate, but it has a blocking active-agent resolution gap and lacks real WebChat proof. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review. So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main builds the Default label from global session defaults while agents.list exposes per-agent model.primary data. I did not run a live browser scenario in this read-only review. Is this the best way to solve the issue? No. Selector state is the right layer, but the current patch only resolves agent-prefixed keys reliably and needs the same selected/default-agent mapping used by WebChat session controls plus real UI proof. Security review: Security review cleared: Security review cleared: the diff is limited to UI selector state, a colocated test, and a changelog line with no dependency, workflow, secret, or package execution changes. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against cf36cb915dd6. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
Superseded by #100719, landed as 5f3629e. The maintainer replacement keeps the valid intent, moves the selected agent's prepared default model through the existing Control UI state boundary, and adds real Chromium coverage for agent switching, session override, clearing, and restored labels. Final validation passed 12 focused state tests, all 25 chat Chromium flows, fresh autoreview, and exact-head hosted CI. I used a maintainer branch rather than rewriting the contributor fork's default |
Summary
Default (...)label from the active agent's configured primary model before falling back to session/global defaults.Root Cause
The selector-state helper built the default option label from
sessionsResult.defaults, so a default-selected session for an agent with its ownmodel.primaryrendered the global default label even though runtime execution used the agent default.Reproduction
Before the fix, a selector-state reproduction with a default-selected session, row model
openai/gpt-5-mini, and global defaultopenai/gpt-5returnedDefault (GPT-5). After the fix it returnsDefault (GPT-5 Mini).Verification
pnpm test ui/src/ui/chat-model-select-state.test.ts -- --reporter=verbosepnpm exec oxfmt --check --threads=1 ui/src/ui/chat-model-select-state.ts ui/src/ui/chat-model-select-state.test.tsgit diff --checkpnpm check:changedFixes #77440.