Repository navigation
fix(ui): stabilize agent primary model selection on switch - #46275
thegoldenflow wants to merge 1 commit into
Conversation
Greptile SummaryThis PR stabilises the Primary Model The fix uses three complementary Lit techniques:
Issues found:
Confidence Score: 3/5
Prompt To Fix All With AIThis is a comment left during a code review.
Path: ui/src/ui/views/agents.ts
Line: 178-219
Comment:
**Encoding corruption introduced on two strings**
The Unicode characters `⋯` (U+22EF, midline horizontal ellipsis — used for the actions toggle button) and `…` (U+2026, horizontal ellipsis — used in the loading label) have been corrupted to mojibake sequences (`鈰?` and `鈥?` respectively). This appears to be a file-encoding mismatch during editing (e.g., the file was saved as GBK/GB2312 on a Windows machine instead of UTF-8).
Both strings need to be restored to their original Unicode characters:
Line 178 — actions button label:
```suggestion
>⋯</button>
```
Line 219 — loading text:
```suggestion
${props.loading ? "Loading…" : "Refresh"}
```
These will otherwise render as garbage characters in every user's browser.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: ui/src/ui/views/agents-panels-overview.ts
Line: 60
Comment:
**`effectivePrimary` is now a dead variable**
After this refactor, `effectivePrimary` is computed on this line but is no longer referenced anywhere in the template — `selectValue` and `optionCurrent` replaced all of its previous uses. Consider removing this line to avoid confusion for future readers.
```suggestion
// effectivePrimary removed — selectValue / optionCurrent used directly
```
Or simply delete the line.
How can I resolve this? If you propose a fix, please make it concise.Last reviewed commit: ee6dd70 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee6dd7095f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
24e7186 to
e23c841
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e23c841d73
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
e23c841 to
0ae0a89
Compare
0ae0a89 to
3983033
Compare
3983033 to
bf962ce
Compare
|
Local verification on this branch:
This PR only changes:
I also restored the existing actions-toggle button text/markup after a merge-time encoding/corruption issue; no actions-menu behavior was intentionally changed. This issue is user-visible and has been reproducible across both the older and newer Agents UI structure: when switching between agents, the Primary Model control could temporarily show the wrong default value or drift from the actual saved explicit override. Since this behavior has persisted across refactors, I wanted to get a focused fix and regression test in place. The currently failing format-check job points to If someone with permissions is able to re-run that failing job, that would help confirm whether it is an unrelated CI issue. If so, I’d appreciate this PR being considered on its own UI/test changes. |
|
Closing this as duplicate or superseded after Codex automated review. Close #46275 as superseded by the later open PR #54724. Current main does not appear to contain this select-state stabilization, but #54724 is by the same author, explicitly references #46275, and tracks the same Agents Overview Primary Model switching bug plus the related model-catalog hydration gap with broader tests. Best possible solution: Close #46275 as the older overlapping PR and keep review focused on the canonical follow-up, preferably #54724 or a reconciled newer PR, so the final landed change includes selected-agent remount/select synchronization, model-catalog hydration, and targeted browser/controller regression tests. What I checked:
So I’m closing this here and keeping the remaining discussion on the canonical linked item. Codex Review notes: model gpt-5.5, reasoning high; reviewed against 8bbb143ab87e. |
Summary
Describe the problem and fix in 2–5 bullets:
<select>DOM drift when a matching option exists.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
Environment
agents.defaults.model = 'openai/gpt-4.1-mini'qa.model = 'anthropic/claude-opus-4-6'ops.model = 'openai/gpt-4.1'Steps
dev,qa, andops.Expected
Actual
<select>selected state drifted away from the intended bound value.Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
dev -> qadev -> opsReview Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes)No)No)Failure Recovery (if this breaks)
ui/src/ui/views/agents.tsui/src/ui/views/agents-panels-overview.tsRisks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.<select>synchronization logic and selected-agent remount behavior in the Agents UI.