Repository navigation
fix(ui): discover models when default-model pickers open - #142105
Conversation
openclaw#141813) The Models page picker opened with only the prepared (configured) models and gave no signal that a fuller catalog was loading, so operators could mistake the initial choices for the complete model list. Discovery only happened as a side effect of a config mutation. Trigger demand-driven discovery through the shared catalog store when any default-model picker opens, and surface accessible progress/retry feedback without touching the saved selection. Initial navigation keeps the fast prepared snapshot (full discovery stays out of the initial page load).
|
🦞👀 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 8, 2026, 11:38 AM ET / 15:38 UTC. ClawSweeper reviewWhat this changesThe Models settings page discovers additional models when any default-model picker opens, displays progress and retry feedback, and preserves saved selections while retiring outdated requests. Merge readiness✅ Ready for maintainer review This remains a useful fix absent from current main. Earlier correctness findings are resolved, and the restored before/after captures satisfy the previous proof request. No blocking defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI’s Models page combines saved configuration with the Gateway’s model catalog. Picker-triggered discovery uses the shared catalog store to expand available choices without changing saved defaults. flowchart TD
A[Saved configuration] --> B[Models settings page]
C[Prepared catalog] --> B
B --> D[Default picker opens]
D --> E[Shared catalog discovery]
E --> F{Request still current?}
F -->|Yes| G[Updated choices or retry feedback]
F -->|No| H[Discard retired result]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +217, Tests +415. Total +632 across 11 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Retain fast initial catalog loading and use the existing shared discovery flow on picker open, with visible recovery and saved selections preserved. Do we have a high-confidence way to reproduce the issue? Yes, from source: open a Models-page picker after a prepared-only load on current main; no discovery callback runs. Supplied before/after browser evidence corroborates the symptom, but this review executed no runtime tests. Is this the best way to solve the issue? Yes. Wiring the existing picker-open callback to the shared catalog owner preserves the intentional fast-load contract and avoids a second discovery mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 37dbd0aac655. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
…e page controller The max-lines budget (700) was already at the limit on main; inline discovery logic and the page-shell template pushed model-providers-page.ts over it and broke check-lint-core-4. Move picker catalog discovery into a dedicated catalog-discovery.ts controller (same options-object pattern as the supplemental loader) and the page header/agent-scope/workspace shell into view.ts's renderModelProvidersPageShell. Behavior is unchanged; tests drive the controller API instead of private page methods.
CI caught three issues on the previous head that local runs could not reproduce: the model-providers page test-support type still declared the removed catalogDiscovering/catalogDiscoveryError/discoverPickerCatalog members, the view test's text() helper rejected undefined, and the two new picker tests queried wa-select by tag name, which is unreliable in the non-isolated CI shard once other suites register the custom element. - ModelProvidersPageTestElement now exposes the catalogDiscovery controller. - text() accepts Element | null | undefined. - Picker tests match the stable .picker-select class (the class on wa-select) and wrap the count assertion in vi.waitFor. - catalog-discovery options collapse getAgentId/getAgentEpoch into one getScope callback, keeping the page under the max-lines budget (oxlint's effective-line count).
Retire picker subscriptions when core data, agent, or connection ownership changes. Clear only the recovered catalog error and preserve saved selections and unrelated provider errors. Keep the contributor's demand-driven discovery and page extraction. Cover ordered stale replies, recovery, shared subscribers, and all three picker entrypoints through rendered controls.
Preserve the contributor's latest commit alongside the verified discovery repair. The current rendered-control tests replace its obsolete picker tests and private controller test surface, and the equivalent line-budget changes are already covered by the focused checks.
Move the unchanged message type out of the rendering view and update its type-only consumers. This removes the static import cycle introduced by profile toast extraction without changing emitted runtime behavior.
|
Thanks @xiaoguomeiyitian! Proof: Real Models-page browser and Gateway checks verified discovery, accessible progress, actual Retry recovery, preserved defaults, and stale-response handling. Independent review passed, and exact-head CI completed successfully.
Merged as |
* commit '04869ae4899ad0524c3287759798362b0d62fef8': (677 commits) fix(release): pin Kova census refresh (#142104) fix: doctor read-only database inspections time out on large agent databases (#142179) docs: align v2026.9.3 framing with release announcement (#142307) fix(ui): discover models when default-model pickers open (#142105) fix(ci): keep Docker upgrade seed baseline older than target (#142273) refactor(tests): reuse named OAuth credential fixtures (#142272) fix(ci): keep mobile release helpers out of source checks (#142115) chore(ui): refresh control ui locales (#142147) fix(active-memory): explain why recall was skipped (#138658) fix(media): preserve converted images with HEIC filenames (#142263) docs: add v2026.9.3 release notes (#142277) fix(ui): retire picker focus listeners together (#142258) fix(ui): keep menu hover colors consistent across themes (#142243) fix(release): keep changelog credits within verified history (#142261) fix: keep tool-finalizer placeholders private in message-only groups (#138645) perf(tui): carry prepared URL membership through rendering (#142262) test(ui): await activity cache imports before teardown (#142282) fix(qa): align auth and Workshop proofs with runtime contracts (#142280) feat(xai): use one curated catalog and concrete setup default (#142136) refactor(outbound): reuse prepared sendability facts (#142252) ...
…2105) Restore demand-driven discovery in the Models page's primary, utility, and fallback pickers. Preserve prepared choices and saved defaults, retire stale page subscriptions, and clear recovered catalog errors without hiding unrelated provider errors. Keep the shared mutation-message type with its producer to avoid a static import cycle. Verified with real browser/Gateway proof, independent acceptance and review, and focused UI checks. Co-authored-by: Ayaan Zaidi <[email protected]>
Closes #141813.
What Problem This Solves
Fixes an issue where users opening a default-model picker on the Models page saw only the prepared choices, with no indication that more models could be discovered.
Why This Change Was Made
All three pickers use the existing shared catalog discovery owner and show accessible progress. Discovery now retires its page subscription when core data, route, agent, or connection ownership changes. Success clears the catalog error while preserving unrelated errors and saved choices; a rejected request offers Retry.
The discovery and page-shell extraction keeps the page controller within its existing size limit. The contributor's three commits are preserved, including the latest test corrections; current rendered-control tests cover the same fixes against the current picker implementation.
User Impact
Owners can discover and select additional models without blocking initial navigation or losing their primary, utility, and fallback selections. Older picker replies cannot overwrite newer page data. Provider-level unavailable results keep their existing behavior.
Evidence
451a568c2e75showed three prepared choices and no picker discovery request. The corrected source showed expanded choices with the saved selection intact.657c878ade54passed a final real-browser expansion and saved-selection check. The contributor reconciliation preserved that tested source tree. A subsequent type-only ownership correction removes a static import cycle without changing runtime behavior.Image links are verified and expire on September 15, 2026.
Thanks @xiaoguomeiyitian for the original implementation. AI-assisted repair and verification.