Repository navigation
fix: keep model pickers usable during provider sign-in - #158132
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 25, 2026, 10:27 AM ET / 14:27 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch changes Gateway model-selection notifications so Control UI and terminal pickers retain existing choices during provider sign-in refreshes, and updates documentation and regression tests. Merge readiness✅ Ready for maintainer review Current main still clears an open model picker during provider sign-in. The latest branch addresses that behavior, and its catalog-mode, documentation, and test changes resolve the concrete findings from the prior review. No introduced blocking defect was established. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway publishes model catalogs and selection-policy changes after provider and configuration updates. Control UI and terminal clients cache those results to populate chat and New Session model pickers. flowchart LR
A[Provider sign-in or config update] --> B[Gateway policy comparison]
B --> C[Selection change signal]
B --> D[Catalog refresh]
C --> E[Web and terminal caches]
D --> E
E --> F[Model pickers]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +64, Tests +38, Docs +2. Total +104 across 11 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep selection-policy retirement owned by the Gateway and let each client refresh ordinary catalog changes while preserving its last usable choices. Do we have a high-confidence way to reproduce the issue? Yes. The supplied baseline capture shows the loading state, and current-main Gateway and cache code provide a concrete path through Settings → Connect provider → API key → Save while discovery is delayed. Is this the best way to solve the issue? Yes. The Gateway determines whether selection policy changed, while web and terminal caches retain rows for ordinary refresh notices and clear them for an explicit retirement signal. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bdbe64d019ec. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
|
Landed as 9e5c2e2. Provider sign-in now retains existing choices in open web and terminal model pickers; restriction and catalog-mode changes still retire them. Built held-listing captures, the failing-before/passing-after regression, green CI, and exact-head review support the fix. Thanks for the clear reproduction. |
* commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (194 commits) feat(ui): listen to managed desktop audio in the panel (#157724) fix(ci): resume partially published preparation receipts (#158174) feat(release): one approval per release via an attested parent approval receipt (#157911) feat(desktop): advertise current managed desktop audio (#157723) fix(ui): retain delayed progress scroll gestures (#158153) refactor(ui): share sidebar mutation error feedback (#158173) test: await database verifier process lifecycle events (#158171) perf(update): avoid repeated retained-copy parent creation feat(desktop): bind audio streaming to screen authorization (#157722) refactor(gateway): split companion prompts and metadata fixtures (#158050) feat(desktop): isolate managed Linux application audio (#157720) fix(test): prepare catalog fixture modules before startup (#158157) fix: keep model pickers usable during provider sign-in (#158132) refactor(test): remove unused prompt scenario metadata (#158151) fix(ci): unblock Control UI targeted Crabbox gates (#158149) refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020) fix: bound stalled browser stream startup (#156323) fix(onnx): prevent worker fixture hangs after release (#158146) fix(models): preserve scoped provider discovery outcomes (#158139) fix(agents): report offline trash failures after agent delete (#158052) ...
* commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (175 commits) feat(ui): listen to managed desktop audio in the panel (#157724) fix(ci): resume partially published preparation receipts (#158174) feat(release): one approval per release via an attested parent approval receipt (#157911) feat(desktop): advertise current managed desktop audio (#157723) fix(ui): retain delayed progress scroll gestures (#158153) refactor(ui): share sidebar mutation error feedback (#158173) test: await database verifier process lifecycle events (#158171) perf(update): avoid repeated retained-copy parent creation feat(desktop): bind audio streaming to screen authorization (#157722) refactor(gateway): split companion prompts and metadata fixtures (#158050) feat(desktop): isolate managed Linux application audio (#157720) fix(test): prepare catalog fixture modules before startup (#158157) fix: keep model pickers usable during provider sign-in (#158132) refactor(test): remove unused prompt scenario metadata (#158151) fix(ci): unblock Control UI targeted Crabbox gates (#158149) refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020) fix: bound stalled browser stream startup (#156323) fix(onnx): prevent worker fixture hangs after release (#158146) fix(models): preserve scoped provider discovery outcomes (#158139) fix(agents): report offline trash failures after agent delete (#158052) ...
* fix(qa-lab): retain tab focus and scroll during polling * chore(qa-lab): merge main for tab navigation validation * fix(qa-lab): keep focused tabs visible after layout changes * fix(qa-lab): reconcile navigation retention with current app * chore: refresh main for QA Lab navigation validation * commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (194 commits) feat(ui): listen to managed desktop audio in the panel (#157724) fix(ci): resume partially published preparation receipts (#158174) feat(release): one approval per release via an attested parent approval receipt (#157911) feat(desktop): advertise current managed desktop audio (#157723) fix(ui): retain delayed progress scroll gestures (#158153) refactor(ui): share sidebar mutation error feedback (#158173) test: await database verifier process lifecycle events (#158171) perf(update): avoid repeated retained-copy parent creation feat(desktop): bind audio streaming to screen authorization (#157722) refactor(gateway): split companion prompts and metadata fixtures (#158050) feat(desktop): isolate managed Linux application audio (#157720) fix(test): prepare catalog fixture modules before startup (#158157) fix: keep model pickers usable during provider sign-in (#158132) refactor(test): remove unused prompt scenario metadata (#158151) fix(ci): unblock Control UI targeted Crabbox gates (#158149) refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020) fix: bound stalled browser stream startup (#156323) fix(onnx): prevent worker fixture hangs after release (#158146) fix(models): preserve scoped provider discovery outcomes (#158139) fix(agents): report offline trash failures after agent delete (#158052) ... Co-authored-by: Vincent Koc <[email protected]>
## What Problem This Solves Fixes: signing in to a provider briefly empties an already-open model picker and replaces its choices with “Loading models…” or “Checking models...”. ## User Impact Existing choices stay visible and usable in Control UI chat, New Session, and the terminal picker while provider discovery refreshes. Changes to model restrictions, operator roles, or catalog mode still retire the previous choices. This does not change how soon a newly connected provider's models are discovered. ## Why This Change Was Made Every config commit previously retired model choices, including the auth/provider config written during sign-in. The Gateway now compares selection policies before sending the existing retirement signal. The web and terminal catalog caches treat ordinary config notifications as refreshes; explicit selection-policy changes still clear them. The comparison reuses the model visibility and operator-policy preparation owners. No protocol, configuration, or persistence changes are required. ## Evidence Built baseline and candidate Gateways used isolated state and a task-owned provider whose HTTP model listing was held for eight seconds. The sign-in action was Settings → Connect provider → API key → Save, with chat and New Session pickers already open. - Baseline: the open chat picker lost its choices and displayed the blocking loading state; the captured transition began 309 ms after Save. - Candidate: neither web picker displayed “Loading models…”. The terminal PTY capture contained no “Checking models...” frame while sign-in and discovery ran. Existing choices remained visible, and discovered models appeared after publication. - The held-catalog web regression fails against the original invalidation behavior because its current model list becomes empty, and passes with the fix (four tests in that file; 3.52 s wall time). - Scoped lifecycle, terminal, and web suites: 65 tests passed; 34.50 s wall time. Permission-retirement assertions remain covered, including a real allowlist change after an auth-only config commit. - Review found older config-event expectations in chat, New Session, and command-palette tests. Those now expect retention; explicit policy-change and connection/identity retirement cases remain intact. All 110 tests in those three files passed (18.65 s wall time including the requested changed-lane dry run). - The existing operator-model-policy reload regression passed unchanged. The first CI run caught the obsolete UI expectations (UI shard: 230.38 s); they were corrected rather than rerun unchanged. - Catalog-mode coverage now verifies unrestricted merge-to-replace retirement while metadata is held. The added assertion failed before the comparison fix; all 65 lifecycle/web/terminal tests passed afterward (32.58 s). A built Gateway `config.patch` smoke observed `modelSelectionChanged: true` on that transition. - No real provider inference or paid API calls were made. This PR addresses retention of existing choices, not immediate publication of new provider rows. Before (blocking state; dark theme):  After (existing provider choices remain available; light theme):  Co-authored-by: Ayaan Zaidi <[email protected]>
) * fix(qa-lab): retain tab focus and scroll during polling * chore(qa-lab): merge main for tab navigation validation * fix(qa-lab): keep focused tabs visible after layout changes * fix(qa-lab): reconcile navigation retention with current app * chore: refresh main for QA Lab navigation validation * commit '0001f441f53712e44b2ca6edf2a6752b8abd6d1d': (194 commits) feat(ui): listen to managed desktop audio in the panel (openclaw#157724) fix(ci): resume partially published preparation receipts (openclaw#158174) feat(release): one approval per release via an attested parent approval receipt (openclaw#157911) feat(desktop): advertise current managed desktop audio (openclaw#157723) fix(ui): retain delayed progress scroll gestures (openclaw#158153) refactor(ui): share sidebar mutation error feedback (openclaw#158173) test: await database verifier process lifecycle events (openclaw#158171) perf(update): avoid repeated retained-copy parent creation feat(desktop): bind audio streaming to screen authorization (openclaw#157722) refactor(gateway): split companion prompts and metadata fixtures (openclaw#158050) feat(desktop): isolate managed Linux application audio (openclaw#157720) fix(test): prepare catalog fixture modules before startup (openclaw#158157) fix: keep model pickers usable during provider sign-in (openclaw#158132) refactor(test): remove unused prompt scenario metadata (openclaw#158151) fix(ci): unblock Control UI targeted Crabbox gates (openclaw#158149) refactor(agents): deslop subagents, sessions, worktrees, commands and auth (openclaw#158020) fix: bound stalled browser stream startup (openclaw#156323) fix(onnx): prevent worker fixture hangs after release (openclaw#158146) fix(models): preserve scoped provider discovery outcomes (openclaw#158139) fix(agents): report offline trash failures after agent delete (openclaw#158052) ... Co-authored-by: Vincent Koc <[email protected]>
* fix(ui): release failed avatar response bodies * test(ui): cover avatar response cancellation in Chromium * test(ui): assert retained image after avatar failure * test(ui): preserve window global type in avatar proof * test(ui): avoid shadowed avatar proof bindings * chore: refresh main for avatar lifecycle validation * commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (175 commits) feat(ui): listen to managed desktop audio in the panel (#157724) fix(ci): resume partially published preparation receipts (#158174) feat(release): one approval per release via an attested parent approval receipt (#157911) feat(desktop): advertise current managed desktop audio (#157723) fix(ui): retain delayed progress scroll gestures (#158153) refactor(ui): share sidebar mutation error feedback (#158173) test: await database verifier process lifecycle events (#158171) perf(update): avoid repeated retained-copy parent creation feat(desktop): bind audio streaming to screen authorization (#157722) refactor(gateway): split companion prompts and metadata fixtures (#158050) feat(desktop): isolate managed Linux application audio (#157720) fix(test): prepare catalog fixture modules before startup (#158157) fix: keep model pickers usable during provider sign-in (#158132) refactor(test): remove unused prompt scenario metadata (#158151) fix(ci): unblock Control UI targeted Crabbox gates (#158149) refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020) fix: bound stalled browser stream startup (#156323) fix(onnx): prevent worker fixture hangs after release (#158146) fix(models): preserve scoped provider discovery outcomes (#158139) fix(agents): report offline trash failures after agent delete (#158052) ... * test(ui): wait for settled avatar fallback * test(ui): wait for control UI before avatar handoff * fix(ui): preserve avatar cleanup across retry lifecycle updates Integrate current main while preserving retry exhaustion, auth restoration, and deferred response cleanup. Keep the real-stream test on real timers and drain loader cleanup before restoring shared test state. * fix(ui): integrate avatar response cleanup with current main * test(ui): align avatar cleanup proof with current harness * test(ui): qualify avatar cleanup harness types and formatting Co-authored-by: Vincent Koc <[email protected]>
* fix(ui): release failed avatar response bodies * test(ui): cover avatar response cancellation in Chromium * test(ui): assert retained image after avatar failure * test(ui): preserve window global type in avatar proof * test(ui): avoid shadowed avatar proof bindings * chore: refresh main for avatar lifecycle validation * commit '0001f441f53712e44b2ca6edf2a6752b8abd6d1d': (175 commits) feat(ui): listen to managed desktop audio in the panel (openclaw#157724) fix(ci): resume partially published preparation receipts (openclaw#158174) feat(release): one approval per release via an attested parent approval receipt (openclaw#157911) feat(desktop): advertise current managed desktop audio (openclaw#157723) fix(ui): retain delayed progress scroll gestures (openclaw#158153) refactor(ui): share sidebar mutation error feedback (openclaw#158173) test: await database verifier process lifecycle events (openclaw#158171) perf(update): avoid repeated retained-copy parent creation feat(desktop): bind audio streaming to screen authorization (openclaw#157722) refactor(gateway): split companion prompts and metadata fixtures (openclaw#158050) feat(desktop): isolate managed Linux application audio (openclaw#157720) fix(test): prepare catalog fixture modules before startup (openclaw#158157) fix: keep model pickers usable during provider sign-in (openclaw#158132) refactor(test): remove unused prompt scenario metadata (openclaw#158151) fix(ci): unblock Control UI targeted Crabbox gates (openclaw#158149) refactor(agents): deslop subagents, sessions, worktrees, commands and auth (openclaw#158020) fix: bound stalled browser stream startup (openclaw#156323) fix(onnx): prevent worker fixture hangs after release (openclaw#158146) fix(models): preserve scoped provider discovery outcomes (openclaw#158139) fix(agents): report offline trash failures after agent delete (openclaw#158052) ... * test(ui): wait for settled avatar fallback * test(ui): wait for control UI before avatar handoff * fix(ui): preserve avatar cleanup across retry lifecycle updates Integrate current main while preserving retry exhaustion, auth restoration, and deferred response cleanup. Keep the real-stream test on real timers and drain loader cleanup before restoring shared test state. * fix(ui): integrate avatar response cleanup with current main * test(ui): align avatar cleanup proof with current harness * test(ui): qualify avatar cleanup harness types and formatting Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Fixes: signing in to a provider briefly empties an already-open model picker and replaces its choices with “Loading models…” or “Checking models...”.
User Impact
Existing choices stay visible and usable in Control UI chat, New Session, and the terminal picker while provider discovery refreshes. Changes to model restrictions, operator roles, or catalog mode still retire the previous choices. This does not change how soon a newly connected provider's models are discovered.
Why This Change Was Made
Every config commit previously retired model choices, including the auth/provider config written during sign-in. The Gateway now compares selection policies before sending the existing retirement signal. The web and terminal catalog caches treat ordinary config notifications as refreshes; explicit selection-policy changes still clear them.
The comparison reuses the model visibility and operator-policy preparation owners. No protocol, configuration, or persistence changes are required.
Evidence
Built baseline and candidate Gateways used isolated state and a task-owned provider whose HTTP model listing was held for eight seconds. The sign-in action was Settings → Connect provider → API key → Save, with chat and New Session pickers already open.
config.patchsmoke observedmodelSelectionChanged: trueon that transition.Before (blocking state; dark theme):
After (existing provider choices remain available; light theme):