Skip to content

fix(ui): show catalog failures across model choices - #142372

Merged
obviyus merged 4 commits into
mainfrom
refactor/ui-catalog-consumers
Sep 8, 2026
Merged

obviyus merged 4 commits into
mainfrom
refactor/ui-catalog-consumers

Conversation

@obviyus

@obviyus obviyus commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

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.

@obviyus obviyus self-assigned this Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: L maintainer Maintainer-authored PR labels Sep 8, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 8, 2026, 5:10 PM ET / 21:10 UTC (Revision 6).

ClawSweeper review

What this changes

The 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
Reviewed head: 57f152f5e9eefd19747f85d60cf7ffdf80b48481

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused production simplification with useful regression coverage and preserved accepted behavior proof; no blocking patch defect was found.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): Preserved accepted browser evidence exercises Automations and search through failed catalog responses and recovery, including returned choices and draft retention. The captured body adds matched real-Gateway observations; artifact access limitations are recorded without downgrading previously accepted proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): Preserved accepted browser evidence exercises Automations and search through failed catalog responses and recovery, including returned choices and draft retention. The captured body adds matched real-Gateway observations; artifact access limitations are recorded without downgrading previously accepted proof.
Evidence reviewed 9 items Current main still needs the correction: At fetched main, Automations checks only providerOutcomes for failures; command-palette search does likewise. A response with refreshFailed=true and no failing provider outcome therefore produces no warning.
Failure status has an existing production owner: The catalog attempt reporter derives refreshFailed from either an internal attempt error or failing provider outcomes, and clears the internal error after publication succeeds. The UI correction consumes this existing contract; it does not change provider execution or require a Codex-specific dependency contract.
Introduced production changes preserve ownership: The pinned merge-base-to-head diff replaces duplicate failure decisions with the shared formatter. Automations retains its latest-request and selected-agent checks; Settings retains cancellation, first-open discovery, passive reopens, and explicit Retry. Auth publication still precedes explicit catalog refresh.
Findings None None.
Security None None.

How this fits together

The 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
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -11, Tests +359, Docs +1. Total +349 across 18 files.

View PR surface stats
Area Files Added Removed Net
Source 5 33 44 -11
Tests 12 535 176 +359
Docs 1 2 1 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 18 570 221 +349

Review metrics

Metric Value Why it matters
Production versus test growth Production −11 net lines; tests and support +359 net lines The production path shrinks while added coverage protects rendered failure recovery and retained selections.

Technical review

Best 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.

Labels

Label justifications:

  • P2: This repairs missing model-catalog warnings with limited UI impact and preserves usable returned choices.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): Preserved accepted browser evidence exercises Automations and search through failed catalog responses and recovery, including returned choices and draft retention. The captured body adds matched real-Gateway observations; artifact access limitations are recorded without downgrading previously accepted proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. Preserved accepted browser evidence exercises Automations and search through failed catalog responses and recovery, including returned choices and draft retention. The captured body adds matched real-Gateway observations; artifact access limitations are recorded without downgrading previously accepted proof.

Evidence

What I checked:

  • Current main still needs the correction: At fetched main, Automations checks only providerOutcomes for failures; command-palette search does likewise. A response with refreshFailed=true and no failing provider outcome therefore produces no warning. (ui/src/pages/cron/cron-page.ts:298, 97a9531ed0e0)
  • Failure status has an existing production owner: The catalog attempt reporter derives refreshFailed from either an internal attempt error or failing provider outcomes, and clears the internal error after publication succeeds. The UI correction consumes this existing contract; it does not change provider execution or require a Codex-specific dependency contract. (src/agents/prepared-model-runtime.publication-events.ts:27, 57f152f5e9ee)
  • Introduced production changes preserve ownership: The pinned merge-base-to-head diff replaces duplicate failure decisions with the shared formatter. Automations retains its latest-request and selected-agent checks; Settings retains cancellation, first-open discovery, passive reopens, and explicit Retry. Auth publication still precedes explicit catalog refresh. (ui/src/pages/model-providers/catalog-discovery.ts:102, 57f152f5e9ee)
  • Rendered regression coverage: Added browser cases exercise empty and nonempty internal failures, removal of obsolete choices, successful empty recovery, warning removal, and preservation of the automation draft. Focused Agents and Settings controls protect sibling behavior and saved configuration. Tests were inspected, not executed during this read-only review. (ui/src/e2e/cron-agent-ownership.e2e.test.ts:35, 57f152f5e9ee)
  • Accepted proof and inspection limits: The captured body and previous review retain acceptance of the Automations/search browser artifact from UI checkout 3c340575bb60c4c0187102a36af23103537b8da4, built for branch head 865993a. GitHub confirms artifact 10069793308 remains unexpired. Reopening its archive was blocked at productionresultssa13.blob.core.windows.net, so prior acceptance is preserved without claiming fresh artifact inspection. The captured body additionally reports a matched real-Gateway internal-failure/recovery run using Gateway 07493b36def6c891c0d54697b2da16b1ef0fc22b and candidate UI 92dac1774651d326c606855b3a1609e18a568e49; those raw observations were not present in the prepared media manifest. (865993acc9ef)
  • Related Settings work is merged and preserved: GitHub verifies fix(ui): avoid repeated model discovery when reopening Settings pickers #142384 merged as 8128b41. Its three downloaded screenshots were inspected and show retained Settings choices and local Retry feedback. They support the related Settings contract, not the separate Automations/search internal-failure proof. (ui/src/pages/model-providers/catalog-discovery.ts:57, 8128b418f050)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (5 earlier review cycles)
  • reviewed 2026-09-08T17:35:54.528Z sha 364e163 :: blocked before merge. :: none
  • reviewed 2026-09-08T18:00:21.061Z sha 865993a :: blocked before merge. :: none
  • reviewed 2026-09-08T18:31:58.418Z sha 141d878 :: blocked before merge. :: none
  • reviewed 2026-09-08T19:08:24.894Z sha 57f152f :: needs maintainer review before merge. :: none
  • reviewed 2026-09-08T19:27:29.693Z sha 57f152f :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 8, 2026
@obviyus

obviyus commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-admin-merge
pr: 142372
head: 57f152f
scope: owner-review

@obviyus

obviyus commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-unrelated-red
pr: 142372
head: 57f152f
run: 34266508136 attempt: 1
failed: checks-ui-e2e (3/7) job=102197441885 conclusion=failure
check: openclaw/ci-gate

@obviyus
obviyus merged commit 34bdf6d into main Sep 8, 2026
140 of 144 checks passed
@obviyus
obviyus deleted the refactor/ui-catalog-consumers branch September 8, 2026 21:37
@obviyus

obviyus commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

Landed as 34bdf6d. Contributor credit: Ayaan Zaidi (@obviyus), with the required co-author trailer verified in the merge commit.

  • Bug: Automations and global model search omitted warnings when a catalog refresh failed internally without an individual provider error.
  • Fix: These consumers use the shared published-catalog reader and failure formatter. Returned choices remain authoritative, recovery clears the warning, and automation drafts remain intact. Models settings keep their existing first-open/Retry discovery and local Retry guidance.
  • Proof: 69 distinct selected consumer controls remain valid. The matched real CLI → Gateway → browser sequence produced an internal task error from malformed synthetic provider data, followed by passive responses with refreshFailed: true and no provider error. The baseline omitted the warning; the candidate showed it in Automations and search. Recovery cleared it while retaining the returned anchor and draft. Independent acceptance passed all five connected clauses; the six earlier mock-Gateway clauses remain separate supplemental proof.
  • Proof limits: Both runs used retained Gateway build 07493b36def6c891c0d54697b2da16b1ef0fc22b. Candidate UI build 92dac1774651d326c606855b3a1609e18a568e49 represents reviewed head 57f152f5e9eefd19747f85d60cf7ffdf80b48481. This does not claim a full current-head backend deployment, real account validity, inference, actual model selection, or persisted automation. Background reads and earlier failed inputs remain recorded. All owned product consumers stopped.
  • Review: Fresh exact-head local Claw review found no findings, cleared security, and rated proof A / patch B / overall B. The new connected proof resolves the earlier missing-product-proof finding. Exact owner-review approval covers the procedural owner-review hold only.
  • CI: Catalog, real-Gateway, lint and type lanes passed in run 34266508136, attempt 1. The remaining checks-ui-e2e (3/7) child failed on a detached image element at chat-flow.image-handoff.e2e.test.ts:148, called at229; the actual command ran shard3/6. Its aggregate failed as a consequence. Guarded dry-run and merge validated the exact unrelated-red approval.
  • CI causal limits: That Chat scenario never opens the changed catalog surfaces. The closed palette does not call the changed loader; the shared formatter's default branch is unchanged. Chat, API, app, image fixtures, browser helpers, dependencies and runner have no introduced changes, and cases use separate browser contexts. No contemporary main-push run was available, so no fresh main reproduction is claimed. The assertion comes from PR136072, commit 34fcc9cf30557bb8afb7430eba7beb0f6a4be580; the earlier slot policy is PR139323, commit de2c4b1768d9babd158c49d83aa91b67eff50dbc. Both are verified intake ancestors, not claimed regression introducers. The regression introduction remains unknown.
  • Integration: All 17 changed production/test files match the reviewed blobs. The documentation file also contains a separate mainline GitHub-preview paragraph update; the catalog documentation changes remain intact. No broader original-family or literal deletion credit is inferred from this landing.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 9, 2026
## 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]>
steipete added a commit that referenced this pull request Sep 25, 2026
…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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant