Repository navigation
fix(ui): stabilize agent model selection on switch - #72328
Conversation
Greptile SummaryThis PR fixes the stale primary-model dropdown in the Agents Overview panel by wrapping Confidence Score: 4/5Safe to merge; the fix is minimal, correct, and covered by a new regression test. Only a P2 style observation about the No files require special attention. Prompt To Fix All With AIThis is a comment left during a code review.
Path: ui/src/ui/views/agents.test.ts
Line: 157
Comment:
**Single microtask tick may not flush Lit rendering**
`await Promise.resolve()` advances only one microtask. Lit's `render()` is synchronous in most jsdom setups, but if `renderAgentOverview` schedules any async work (e.g. via `scheduleUpdate` or reactive property callbacks), the DOM may not be fully settled before the `querySelector` call. The pattern is consistent with the existing suite, but if this test flakes, replacing both awaits with `await new Promise(r => setTimeout(r, 0))` (or a helper that drains microtasks + a 0-ms task) is the idiomatic fix for Lit tests.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix(ui): stabilize agent model selection..." | Re-trigger Greptile |
7b0815d to
ff30dcc
Compare
ff30dcc to
04d816e
Compare
|
ProjectClownfish follow-up pushed: 04d816e Fix:
Blacksmith validation:
|
* fix(ui): stabilize agent model selection on switch * docs(changelog): credit projectclownfish fixes
* fix(ui): stabilize agent model selection on switch * docs(changelog): credit projectclownfish fixes
* fix(ui): stabilize agent model selection on switch * docs(changelog): credit projectclownfish fixes
* fix(ui): stabilize agent model selection on switch * docs(changelog): credit projectclownfish fixes
* fix(ui): stabilize agent model selection on switch * docs(changelog): credit projectclownfish fixes
* fix(ui): stabilize agent model selection on switch * docs(changelog): credit projectclownfish fixes
Summary
Validation
Fixes #39392. Credits #39401.
ProjectClownfish replacement details: