Skip to content

refactor(ui): present model discovery with Solid readiness - #180484

Merged
steipete merged 3 commits into
mainfrom
solid2/w-s2-provider-discovery-replacement
Oct 22, 2026
Merged

steipete merged 3 commits into
mainfrom
solid2/w-s2-provider-discovery-replacement

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Whole-scope census: exact base 6271f490726501bc6514c67bc0d564f47bbe7616 → head 5af807faf485c9b97235624e40071644951b7595. Counts are pending patterns unless stated; adopted/pending/excepted read and mutation families keep the original resource denominator. Cron is owned by the recipes lane.

Wave-ten item New Session Model Providers Model Setup Channels Skills
1. Frozen intrinsic handlers 0→0 0→0 0→0 0→0 0→0
2. Component cleanup pending / allowed 0/2→0/2 0/0→0/0 1/1→1/1 0/0→0/0 0/0→0/0
3. Reads adopted / pending / excepted 9/0/0→9/0/0 7/1/0→8/0/0 2/0/1→2/0/1 2/0/3→2/0/3 4/3/0→4/3/0
4. Mutations adopted / pending / excepted 6/0/0→6/0/0 7/0/1→7/0/1 0/2/0→0/2/0 4/0/0→4/0/0 0/8/0→0/8/0
5. Manual component loaders 0→0 0→0 0→0 0→0 0→0
6. Copied editable collections / unkeyed interactive lists 0/0→0/0 0/0→0/0 0/0→0/0 0/0→0/0 0/0→0/0
7. Handwritten createComponent 0→0 0→0 0→0 0→0 0→0
8. Throw-only context wrappers 0→0 0→0 0→0 0→0 0→0
9. Uncoordinated sibling Loading 0→0; independent preview/composer 0→0; independent usage/cost retries 0→0 0→0 0→0
10. Escaped Solid owner APIs 0→0 0→0 0→0 0→0 0→0
Production files / physical LOC 99 / 19727→19727 28 / 7600→7670 23 / 4966→4966 15 / 3321→3321 14 / 3548→3548

179 production files, 39162→39232 lines (+70). Pending items: 15→14 (10 mutations, 4→3 reads, 1 cleanup). This head earns credit only after a verified merge. Exact committed blobs parsed in census-main-6271.json and census-provider-5af807.json; owner and exception semantics personally reviewed. Provider getOwner methods are plain discovery APIs; core.catalogLoading retains owner admission semantics, while read readiness is rendered through the receipt under Loading/Errored. Profile order/reset retains coalesced desired intent for retry rather than transient optimistic rollback.

What Problem This Solves

Model discovery needs Solid-owned readiness and retry feedback while keeping saved model controls mounted. This replaces the final manual read presentation in Model Providers and supersedes #179576 and #179838, which remain preserved until this replacement lands.

Why This Change Was Made

The existing plain TypeScript catalog owner exposes its admitted completion to one async memo. Loading and Errored own the feedback; isPending and latest keep progress accurate without holding the route update that retires an old request. Reset settles the retired completion before aborting transport, including transports that ignore abort. Saved model pickers remain outside the readiness slot and preserve DOM identity.

The error fallback has its own Loading region because Solid rc.16 retains an Errored fallback during retry. A failed provider and another provider's discovery backlog can appear together. No RPC, route, tag, class, config operation, dependency, or startup import is added. Usage and cost retain their independent retries; profile order/reset retain their coalesced desired-intent retry contract.

Touched production LOC: 1,389 → 1,459 (+70) across three files. Model Providers: 7,600 → 7,670; whole scope: 39,162 → 39,232. The two touched test files total 1,804 → 1,910 (+106). Growth covers the explicit retirement receipt and readiness/error boundaries, with no parallel implementation.

Evidence

Exact final head: 5af807faf485c9b97235624e40071644951b7595; paired base: 6271f490726501bc6514c67bc0d564f47bbe7616. Official main was merged once, including the separately reviewed sharing-fixture correction #180498. Full PR CI is enabled with ci:full.

Proof Result
Frozen install Passed on pinned Solid rc.16 and Node 24.22.1
UI typecheck Final head passed pnpm tsgo:ui (tsrs)
Touched view tests Final head passed all 31 tests in view.test.ts, pinned Bun and one worker
Catalog behavior Existing targeted retirement/retry corrections passed; full replacement-head CI passed
Full CI Exact-head run 39762918802 passed with ci:full
Formatting / diff Scoped formatting and lint passed; final diff hygiene passed
Production Knip Exact base/head both exit 1 with the same 13 unused heartbeat files; logs are byte-identical, no UI findings or new ignores
Review Independent source/correction review found no actionable P0–P2 issues; final merged diff personally reviewed
Build / strict budgets Both exact source seals passed; identical runtime, fixed build metadata, input hashes and seven-plugin inventories; all 7,032 emitted files per side hash-verified
Visual proof Eight inspected synthetic 1440×1400 frames on the exact sealed base/head: pending, error, recovered, and simultaneous backlog/error. Picker identity remains stable; no page errors. Only spinner phase differs
Surface Base Head Delta
Startup JS gzip 316,728 B 316,750 B +22 B
Startup CSS requests 1 1 0
Chat route JS gzip 1,438,869 B 1,438,887 B +18 B
New Session route JS gzip 1,015,909 B 1,015,918 B +9 B

All surfaces remain under their caps, including the 325,000 B startup cap. Locale deltas range from 0 to +2 B. Existing lazy boundaries remain intact.

The first CI run (39754687556) exposed renderModelProviders > keeps discovery failure recovery visible while another provider is pending: its assertion ran before the async error boundary settled. The correction waits for the same visible error and preserves progress/Retry assertions; it reproduced red and now passes in the complete final-head view suite. The sharing failure is corrected on official main by #180498. The media-spacing case passed a bounded run on both its exact CI base and the corrected head; its earlier failure is not claimed as inherited. Replacement-head CI run 39762918802 passed, including the complete UI and real-Gateway shards.

The prior auto request was confirmed retired before this replacement push. Fresh native review and preparation bind the replacement head; no auto request is re-armed. No external lease was used.

Screenshots

Synthetic data only. Each before/after pair uses its own sealed build of the exact revisions above. Full frames were inspected before publication.

Before: catalog retry pending

After: catalog retry pending

Before: catalog failure and Retry

After: catalog failure and Retry

Before: catalog recovered

After: catalog recovered

Before: discovery backlog and provider failure

After: discovery backlog and provider failure

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T10:28:06.365533Z 5af807f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 52a25a73ee

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const error = createMemo(() => props.catalogDiscoveryError);
const read = createMemo(() => {
const currentError = error();
return (receipt()?.promise ?? Promise.resolve(null)).then((completionError) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid suspending when no catalog request exists

When an existing catalogDiscoveryError is presented without a catalogReceipt—for example, an initial published partial inventory—this still creates a newly pending promise via Promise.resolve(null).then(...). The Loading fallback therefore temporarily suppresses the alert (showing only discovery progress, or nothing), and the existing synchronous view.test.ts case that expects the backlog and warning together will fail before the promise microtask settles. Handle the no-receipt error synchronously rather than manufacturing an asynchronous read.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR moves model-discovery progress and errors into Solid async boundaries backed by the existing loader’s completion receipt.

Example: Retry model discovery while openai/prepared-primary remains selected.

  • Before: Loader flags directly render discovery progress and failure feedback.
  • After: Solid readiness renders progress and Retry feedback while retaining the selected model control.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful owner-approved refactor with inspected browser evidence, held below a clean verdict by an unadapted async consumer test and incomplete CI failure attribution.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected synthetic browser screenshots exercise the Models discovery feedback region in pending and failed states, showing retained saved controls and an actionable Retry warning after the cutover.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Discovery progress, failure recovery, and saved model controls must remain stable as requests retry or retire.
Reason: The maintainer-authored direction follows the established Solid migration while retaining the existing request and configuration owners.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this maintainer-authored refactor open; its ownership model is sound, but an existing synchronous view test must follow the new async feedback.

Priority: P3
Reviewed head: 52a25a73ee32c5439152068541a080592ec62bb9

Before merge

  • Await async feedback in the existing discovery view regression (P2) - The new CatalogProgress read returns a promise even when catalogReceipt is absent. The existing test mounts catalogDiscovering=true with catalogDiscoveryError="A provider failed discovery." and immediately asserts the alert after synchronous flush(); the promise callback cannot have run, so the alert text is undefined and the test fails. Make this test async and await the warning with waitForSolid, retaining the simultaneous status and enabled Retry assertions.

Findings

  • [P2] Await async feedback in the existing discovery view regression — ui/src/pages/model-providers/view.test.ts:336-345
Agent review details

How this fits together

The Models settings loader admits scoped catalog requests and publishes accepted results; its completion receipt now feeds the Solid feedback region beside the saved model controls.

flowchart LR
  A[Models settings] --> B[Catalog loader]
  B --> C[Gateway catalog request]
  C --> B
  B --> D[Accepted catalog]
  B --> E[Completion receipt]
  E --> F[Solid discovery feedback]
  D --> G[Retained model controls]
Loading

Technical review

Best possible solution:

Keep the owner-backed readiness cutover and update the existing view regression to await settled feedback while preserving its backlog, warning, and Retry assertions.

Do we have a high-confidence way to reproduce the issue?

Source establishes the test failure: mounting known discovery feedback without a receipt creates a pending promise, but the existing test asserts the alert before any promise microtask can settle; no target code was executed.

Is this the best way to solve the issue?

The existing loader remains the sole request owner, retired receipts settle before transport abort, and saved controls remain outside the feedback boundary; adapting the synchronous test is smaller than changing production behavior to satisfy its timing assumption.

Full review comments:

  • [P2] Await async feedback in the existing discovery view regression — ui/src/pages/model-providers/view.test.ts:336-345
    The new CatalogProgress read returns a promise even when catalogReceipt is absent. The existing test mounts catalogDiscovering=true with catalogDiscoveryError="A provider failed discovery." and immediately asserts the alert after synchronous flush(); the promise callback cannot have run, so the alert text is undefined and the test fails. Make this test async and await the warning with waitForSolid, retaining the simultaneous status and enabled Retry assertions.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8d2f6ec66180.

Provenance checked

  • Catalog request admission and retirement keeps the original intent (5f65675: Consolidate standalone catalog discovery into the existing loader while preserving scoped admission and stale-result rejection.)
  • Discovery feedback and saved controls keeps the original intent (8127bab: Move Models settings to Solid while preserving routes, controls, selectors, and Gateway ownership.)
  • Reported discovery errors keeps the original intent (df78e7a: Display the loader’s useful reported error beside Retry instead of replacing it with generic text.)
  • Independent readiness receipts keeps the original intent (2a59785: Move core refresh presentation into Solid while deliberately keeping standalone discovery independent.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test ui/src/pages/model-providers/view.test.ts --maxWorkers=1
  • pnpm test ui/src/pages/model-providers/model-providers-page.catalog.test.ts --maxWorkers=1
  • pnpm tsgo:ui
  • git diff --check

What I checked:

  • Pinned introduction and current main: The introduced diff adds a catalog completion receipt and replaces discovery feedback presentation; comparison with fetched main shows this cutover is still absent there. (ui/src/pages/model-providers/core-load.ts:108, 52a25a73ee32)
  • Existing consumer needs async settlement: The no-receipt path now returns Promise.resolve(null).then(...), while the existing backlog-and-error view test mounts and immediately asserts the alert after synchronous flush only; the earlier review identified the same timing mismatch at refactor(ui): present model discovery with Solid readiness #180484 (comment). (ui/src/pages/model-providers/view.test.ts:336, 52a25a73ee32)
  • Inspected visual evidence: Prepared before/after pending and error screenshots show matching Models layout, retained saved controls, discovery progress, and an actionable Retry warning; these are synthetic browser captures, not live-provider evidence. (52a25a73ee32)
  • Existing ownership decision: refactor(ui): use Solid async feedback for provider reads #179503 explicitly preserves separate core-refresh and standalone-discovery completion owners; this PR follows that boundary and retains request identity, cancellation, and publication checks. (ui/src/pages/model-providers/core-load.ts:105, 2a597857a055)
  • CI attribution limits: UI annotations expose a chat media-spacing failure but do not establish its relationship to this diff; the other failed UI shard provides only an exit code. Job-log retrieval was blocked by the artifact host allowlist. The context check requests PR-body headings, which is paperwork rather than a code defect. (52a25a73ee32)
  • Applied repository policy: Read the complete root and UI AGENTS.md files and the Solid, test-audit, and simplification guidance; no maintainer-notes directory exists, and the installed Solid cheatsheet is unavailable in this checkout. (ui/AGENTS.md:5, 52a25a73ee32)

PR surface

Source +70, Tests +102. Total +172 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 78 8 +70
Tests 1 105 3 +102
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 183 11 +172

Review metrics

Metric Value Why it matters
Production versus test growth Production +70 net lines; tests +102 net lines The growth provides an admitted completion receipt, narrow readiness/error boundaries, and distinct replacement-lifecycle coverage without adding another request owner.

Root-cause cluster

Relationship: canonical
Canonical: #180484
Summary: This PR explicitly consolidates the earlier discovery-read and retry-presentation proposals.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add P3: This is a behavior-preserving UI refactor with a focused test-consumer repair and no established urgent user regression.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is a behavior-preserving UI refactor with a focused test-consumer repair and no established urgent user regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 22, 2026, 5:35 AM ET / 09:35 UTC.

@steipete
steipete enabled auto-merge (squash) October 22, 2026 09:40
@steipete
steipete disabled auto-merge October 22, 2026 09:54
@steipete
steipete merged commit e1cc3a6 into main Oct 22, 2026
109 of 111 checks passed
@steipete
steipete deleted the solid2/w-s2-provider-discovery-replacement branch October 22, 2026 11:01
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 23, 2026
…180484)

* refactor(ui): derive provider catalog readiness with Solid

* test(ui): await provider discovery error readiness
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 ci:full Keep ordinary native-locale CI selection on the next PR run. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant