Repository navigation
fix(ui): show catalog failures across model choices - #142372
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 8, 2026, 5:10 PM ET / 21:10 UTC (Revision 6). ClawSweeper reviewWhat this changesThe PR makes model-choice consumers display shared catalog failure warnings while preserving returned choices, saved settings, automation drafts, and Settings-local Retry guidance. Merge readiness✅ Ready for maintainer review This PR remains useful: current main still misses catalog-wide failures in Automations and model search. No actionable introduced defect was found, and the merged Settings fix does not supersede this work. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway publishes model choices and catalog refresh status. The Control UI reads that publication for model pickers and search, while explicit Settings discovery requests fresh inventory. flowchart TD
A[Provider catalog acquisition] --> B[Gateway catalog publication]
B --> C[Shared UI catalog reader]
C --> D{Refresh failed?}
D -->|Yes| E[Returned choices with warning]
D -->|No| F[Returned choices without warning]
G[Settings first open or Retry] --> A
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -11, Tests +359, Docs +1. Total +349 across 18 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Use the Gateway’s published failure status consistently while retaining returned choices, saved settings, passive browsing, and local Retry guidance. Do we have a high-confidence way to reproduce the issue? Yes, from source: current-main Automations and search omit the warning when models.list returns refreshFailed=true without a failing provider outcome. This review did not execute a reproduction. Is this the best way to solve the issue? Yes. Reusing the existing catalog-wide failure result removes competing error decisions while preserving request ownership and the merged Settings discovery contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 97a9531ed0e0. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
landpr-approve-admin-merge |
|
landpr-approve-unrelated-red |
|
Landed as 34bdf6d. Contributor credit: Ayaan Zaidi (@obviyus), with the required co-author trailer verified in the merge commit.
|
## What Problem This Solves Fixes an issue where users browsing Automations, model search, or Models pickers received no warning when a catalog refresh failed internally without an individual provider error. ## Why This Change Was Made These consumers now use the shared published-catalog reader and its failure result. This removes prepared-read hints, the command palette's mandatory-method advertisement gate, and duplicate per-provider error decisions. Models settings retain first-open and Retry discovery, with passive completed reopens, from openclaw#142384. Settings use their local Retry guidance instead of a second "Open Models" warning. Initial page reads stay passive; explicit Refresh waits for credential-state publication before provider discovery. Current request ownership, cancellation, saved selections, drafts, and unrelated errors remain intact. ## User Impact A failed refresh shows a warning with the returned choices. An empty returned catalog stays empty, and successful recovery clears the warning. Search retains its other categories and existing connection-scoped cache. No account, credential, persistence, or inference behavior changes. ## Evidence - Four rendered caller cases fail on pinned main and pass with this correction: empty/nonempty internal failure and successful empty recovery in Automations and model search. - 69 distinct selected consumer controls are covered across the retained runs. The current 14 Models integration controls preserve first-open/reopen/Retry discovery, saved choices, cancellation and late-response ownership. An integration case reproduced the duplicate Settings warning before correction; 22 Settings/load controls and six default-message controls now pass. Two added Agents controls preserve the existing failed-result/recovery contract. Eight affected search controls pass after simplifying the request fixture. Repeated runs are not counted as additional cases. - Two real-browser/mock-Gateway cases passed in [CI job 102174612039](https://github.com/openclaw/openclaw/actions/runs/34259727043/job/102174612039). [The verified artifact](https://github.com/openclaw/openclaw/actions/runs/34259727043/artifacts/10069793308) contains eight inspected before/failure/recovery images and complete product observations. Both Automations and search show the warning, returned rows replace obsolete rows, successful empty recovery clears it, and the automation draft stays intact. The captured catalog requests remain passive and agent-scoped. - Browser proof used checkout `3c340575bb60c4c0187102a36af23103537b8da4`, the CI merge of `865993acc9efb27070aee2d4398120c94a68ab84`. Later changes correct test typing, add retained Agents assertions, integrate Settings-local guidance, and retire the temporary artifact-upload step. Six current controls confirm unchanged default messages for Agents, Automations and search; the captured browser evidence retains its original source/fixture identity. This is UI boundary proof with a mock Gateway, not a new real backend internal-failure run. - Earlier CI caught six unbound-method references in the test fixture and one mock-call tuple assertion; this revision corrects both. The exact-head run now passes the catalog, real-Gateway, lint and type lanes. Its remaining chat-image continuity failure is independent of these catalog execution paths; the full causal disposition and historical failure remain retained. Independent acceptance passed the original six browser clauses. The earlier local review requested the connected internal-failure proof below; a fresh review judges that changed evidence. - Additional matched real-Gateway/browser proof now completes the internal-failure path: a registered synthetic provider reads malformed catalog data, the real explicit refresh returns a task error, and subsequent browser reads return `refreshFailed: true` without a provider error. The baseline UI omits the warning; the candidate shows it in Automations and global model search. Both retain the returned anchor and draft, and recovery clears the candidate warnings. Eight lifecycle images and complete CLI, wire and UI observations are retained for local review. No response, flag or publication event was injected. - This matched pair uses the same retained Gateway build `07493b36def6c891c0d54697b2da16b1ef0fc22b` for both UIs. Baseline UI uses that build; candidate UI comes from CI build `92dac1774651d326c606855b3a1609e18a568e49` for the reviewed head. It is a UI consumer proof against the real retained Gateway, not a claim that the entire current backend was executed locally. Both Gateways exited normally and all consumers stopped. Background metadata/read bursts remain in the complete evidence; no quiet-cadence or throughput claim is made. Co-authored-by: Ayaan Zaidi <[email protected]>
…58207) Catalog publication treated every non-ready provider outcome as a refresh failure, including installed agent apps whose native sign-in was rejected. Keep auth-rejected outcomes as provider state and reserve refreshFailed for unavailable outcomes or recorded acquisition errors. Preserve incomplete native inventory as non-authoritative through publication and API renewals. Remove the CLI's duplicate outcome classification so models list consumes the same flag as Gateway models.list, chat metadata, /models, and the Control UI. Keep rejected model availability and installed-app sign-in guidance intact. Real partial refresh warnings, including the Automations behavior introduced in #142372, remain visible. Document the distinction in the Models CLI guide. Validation against base 53a0b85: - Before the fix, both reporter cases, three native renewal cases, and the auth-only models.list case failed on refreshFailed=true. The mixed auth-rejected plus unavailable models.list control passed. - After the fix, direct repository Vitest configs with one worker passed: agents 20 tests (94.23s), gateway 13 (76.38s), commands 20 (99.89s), UI catalog store/Automations/installed agents 51 (51.40s): 104 total. - Formatting and git diff --check pass. Independent Codex review found no actionable P0-P2 findings. Production LOC -1; tests +46; docs +5. - The normal test wrapper was stopped after cold subprocess preparation exceeded five minutes. Direct Vitest configs completed the focused proof. - node scripts/check-changed.mjs --base <base> hit a 600s host-load cap in assertion-safety (412.69s). Conflict markers, line-cap, max-lines and env count guards passed; typechecking, linting, and later guards were not reached. Follow-ups: restricted-role catalog presentation lacks scoped failure provenance, so a visible auth rejection can accompany a hidden provider's failure, and unscoped failures can be suppressed. Preserve its disclosure policy here. UI tests also emit obsolete Markdown optimizeDeps, duplicate Lit, and jsdom stylesheet warnings; all selected UI cases pass. Co-authored-by: Peter Steinberger <[email protected]>
…enclaw#158207) Catalog publication treated every non-ready provider outcome as a refresh failure, including installed agent apps whose native sign-in was rejected. Keep auth-rejected outcomes as provider state and reserve refreshFailed for unavailable outcomes or recorded acquisition errors. Preserve incomplete native inventory as non-authoritative through publication and API renewals. Remove the CLI's duplicate outcome classification so models list consumes the same flag as Gateway models.list, chat metadata, /models, and the Control UI. Keep rejected model availability and installed-app sign-in guidance intact. Real partial refresh warnings, including the Automations behavior introduced in openclaw#142372, remain visible. Document the distinction in the Models CLI guide. Validation against base 7f20f56: - Before the fix, both reporter cases, three native renewal cases, and the auth-only models.list case failed on refreshFailed=true. The mixed auth-rejected plus unavailable models.list control passed. - After the fix, direct repository Vitest configs with one worker passed: agents 20 tests (94.23s), gateway 13 (76.38s), commands 20 (99.89s), UI catalog store/Automations/installed agents 51 (51.40s): 104 total. - Formatting and git diff --check pass. Independent Codex review found no actionable P0-P2 findings. Production LOC -1; tests +46; docs +5. - The normal test wrapper was stopped after cold subprocess preparation exceeded five minutes. Direct Vitest configs completed the focused proof. - node scripts/check-changed.mjs --base <base> hit a 600s host-load cap in assertion-safety (412.69s). Conflict markers, line-cap, max-lines and env count guards passed; typechecking, linting, and later guards were not reached. Follow-ups: restricted-role catalog presentation lacks scoped failure provenance, so a visible auth rejection can accompany a hidden provider's failure, and unscoped failures can be suppressed. Preserve its disclosure policy here. UI tests also emit obsolete Markdown optimizeDeps, duplicate Lit, and jsdom stylesheet warnings; all selected UI cases pass. Co-authored-by: Peter Steinberger <[email protected]>
Related: #142384.
What Problem This Solves
Fixes an issue where Automations, model search and model pickers showed no warning when catalog refresh failed internally without a provider-specific error.
Why This Change Was Made
Use the shared published-catalog reader and its failure result. Remove duplicate error decisions and unnecessary discovery hints. Initial reads stay passive; explicit Refresh waits for authentication publication, while Models retains first-open and Retry discovery.
User Impact
Failed refresh shows a warning beside returned choices. Empty results remain empty and recovery clears warnings without losing drafts or saved selections.
Consumers: Automations, global model search and model settings share catalog-failure semantics.
Evidence
Four rendered regressions failed before the fix. Focused consumer controls and browser tests passed. A matched real-Gateway/browser pair used malformed catalog data to reproduce internal failure: the corrected UI showed warnings in Automations and search, retained choices/drafts and cleared warnings after recovery. The pair used a retained backend build.