Skip to content

refactor(ui): derive explicit model discovery status - #179576

Closed
steipete wants to merge 15 commits into
mainfrom
solid2/w-s2-provider-catalog-discovery
Closed

steipete wants to merge 15 commits into
mainfrom
solid2/w-s2-provider-catalog-discovery

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Whole Pages B checkpoint at verified merged main 4611232730583082f5c49bd79f1f68dfbfbd1b60: 171 production files / 37,753 physical LOC. The canonical pinned-blob AST census and named-family audit credit merged source only; this PR is not counted. Cron remains with the recipes lane.

Wave-ten item New Session Model Providers Model Setup Channels Skills
1. Frozen intrinsic handlers 0 0 0 0 0
2. Component cleanup pending / allowed reactive or immediate 1 / 2 2 / 0 1 / 1 3 / 0 0 / 0
3. Original ordinary read families: adopted / pending / excepted 7 / 2 / 0 5 / 3 / 0 1 / 1 / 1 2 / 0 / 3 2 / 5 / 0
4. Mutation families: adopted / pending / excepted 3 / 3 / 0 2 / 5 / 1 0 / 2 / 0 0 / 4 / 0 0 / 8 / 0
5. Manual signal-based component loaders 0 0 0 0 0
6. Copied editable collections / unkeyed interactive lists 0 / 0 0 / 0 0 / 0 1 / 0 0 / 0
7. Handwritten createComponent 0 0 0 0 0
8. Throw-only context wrappers 0 0 0 0 0
9. Uncoordinated sibling Loading groups / exception 0; preview/composer independent 0; usage/cost separate retries/pacing 0 0 0
10. Escaped owner APIs 0 0 0 0 0
Production files / physical LOC 99 / 19330 22 / 6910 22 / 4879 14 / 3158 14 / 3476

Model Providers before → after for this PR (all other family counts above are unchanged):

Checklist item Before → after
1. Frozen native handlers 0 → 0
2. Component cleanup 2 pending → 2 pending
3. Ordinary read families 5 adopted / 3 pending → 6 / 2
4. Mutation families 2 adopted / 5 pending / 1 exception → unchanged
5. Manual component loaders 0 → 0
6. Copied editable collections / unkeyed lists 0 / 0 → 0 / 0
7. Handwritten createComponent 0 → 0
8. Throw-only context wrappers 0 → 0
9. Uncoordinated sibling loading 0 → 0; existing independent pacing retained
10. Escaped owner APIs 0 → 0

This PR adopts one pending Model Providers read family: explicit model discovery. The table above counts merged main only; it does not credit this unmerged PR. Cron stays with the recipes lane.

What Problem This Solves

Saved model selectors remain mounted and usable while discovery runs. The existing catalog owner still admits requests, cancels retired requests, and publishes accepted results. A boxed completion receipt feeds a deferred computation under Loading/Errored; isPending drives discovery feedback. The status slot always reads the completion, including when providers still report progress, so a failed request cannot hide its Retry button.

The renderer deliberately retains the accepted catalog during refresh. It does not duplicate a Gateway request or replace the plain owner with reactive authority. Core inventory and explicit discovery retain separate receipts after integrating current main.

Evidence

Proof Result
Focused behavior Retained catalog/core-recovery suite17/17 with pinned Bun and one worker. The production and regression blobs remain unchanged by the conflict resolution.
Titlebar repair Exact macOS titlebar case passes on patched22311 (1passed,8skipped), pinned canonical runner. Independent final review is scoped-clean with source integrity verified; formatting/whitespace pass. Four test lines added; production source and build inputs are unchanged.
Types / formatting Fresh UI tsrs passes after integrating exact4d. Scoped formatting and whitespace checks pass.
Production Knip Fresh final-head pnpm deadcode:knip passes, exit0; no new ignore.
Independent review Original adoption/corrections and this exact main-integration delta are independently scoped-clean through P2. The only manual conflict resolution takes main's wording for an unchanged shared test assertion.
Paired build / strict budgets Exact base 4d86333f6a82117ede1c530fa0b2a3b70341bcab → head 22311737e3f8cfa9156021dddee5f6c544894f38, same machine, Node24.22.0, Vite8.3.4, Solid rc.16 and fixed metadata. All seven canonical plugin distributions were freshly rebuilt; complete manifests/assets and runtime/build-input hashes match. Startup 325,512 → 325,540 B (+28); Chat 1,442,105 → 1,442,140 B (+35); New 1,019,875 → 1,019,884 B (+9). Startup CSS 40,896 B /1 request; JS requests 9/27/22, unchanged. All42 locale deltas +0..+4 B. Both strict checks exit0. Base startup is over325,000 B; the delta stays within64 B. Earlier cached-distribution figures are superseded. The subsequent530019 head changes only the E2E test, so these sealed production/build-input-identical measurements remain valid.
Synthetic visual proof Inspected synthetic pending/error/ready pairs below remain representative; this integration changes no authored presentation.
Full PR CI Exact-head full CI39713253403 on 530019470cb3cf85da1eb545fdcc94667b3082bc passes; every job succeeds or skips. The prior run exposed a titlebar sample taken during the sidebar expansion transition. This head waits for the expanded width and preserves every geometry and drag-gap assertion. No inherited-failure waiver is used.

Production LOC against the original pinned 4d86333f diff base: Model Providers 6,788 → 6,829 (+41); whole Pages B 37,542 → 37,583 (+41). Explicit discovery replaces one manual read presentation with native deferred readiness: one additional Loading, Errored, isPending, and createDeferred. Existing paired onSettled stays; items1,2,5–10 add no pending site. Mutation ownership is unchanged. No new dependency, tag, class, route, lazy-boundary, or owner-authority change. No external lease.

The retained HTML Count diagnostic records only synthetic preview state on failure. It adds no waits, retries, production seam, or policy change; the prior full run passes that assertion, without establishing its original cause.

No external test lease used. Screenshots are synthetic-only, before left and after right.

Model discovery pending, before left and after right

Model discovery error, before left and after right

Model discovery ready, before left and after right

Catalog discovery error and progress, before left and after right

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

clawsweeper Bot commented Oct 21, 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 21, 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-22T02:22:33.401568Z — 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
# Conflicts:
#	ui/src/e2e/chat-managed-media-order.real-gateway.e2e.test.ts
#	ui/src/pages/model-providers/core-load.ts
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR derives standalone model-discovery progress and errors from the existing loader’s completion using Solid async boundaries.

Example: The catalog reports refreshFailed: true while pendingProviders contains openai.

  • Before: Discovery progress and an error with Retry appear together, preserving saved model choices.
  • After: The same feedback and saved choices remain visible through Solid’s loading and error boundaries.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is coherent and has no actionable finding; supplied discovery evidence consists of synthetic browser captures and mounted coverage.
Proof confidence 🦐 gold shrimp (3/6) The contributor proof gate is exempt for this maintainer-authored PR; inspected synthetic browser captures show discovery feedback parity, while mounted tests cover Retry and retired results.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Users need discovery progress and actionable Retry feedback without losing access to saved model controls.
Reason: The maintainer-authored direction matches the existing Solid migration and preserves the established user contract without adding configuration or another request owner.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored refactor open: it preserves the discovery contract, and no actionable introduced bug was found; required CI remains red.

Priority: P3
Reviewed head: b82286cd1bd0c2e4f8634d245cf105ddcbacb5cb

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Models settings controller connects Gateway catalog reads to the Defaults card; the existing loader admits requests and accepts results, while Solid presents progress, errors, and Retry.

flowchart LR
  A[Models settings] --> B[Existing core loader]
  B --> C[Shared catalog store]
  C --> D[Gateway models list]
  B --> E[Accepted completion]
  E --> F[Solid discovery feedback]
  F --> B
Loading

Technical review

Best possible solution:

Keep request authority in the existing loader and use its accepted completion solely for discovery presentation.

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

This is a refactor rather than a new bug report; source, mounted coverage, and inspected synthetic captures establish the behavior being preserved.

Is this the best way to solve the issue?

The change follows the approved Solid presentation direction, removes the superseded copied error field, and preserves the existing request and publication owners.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +41, Tests +57. Total +98 across 7 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 3 85 44 +41
Tests 4 129 72 +57
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 214 116 +98

Review metrics

Metric Value Why it matters
Production versus test growth Production +41 net lines; tests +57 net lines. The pinned diff replaces copied discovery feedback with async presentation; test growth includes existing lightbox-case extraction, lazy-import cleanup, scalar diagnostics, and mixed-state coverage.

Labels

Label changes:

  • add P3: This is a behavior-preserving UI refactor with no established current user-facing regression.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a behavior-preserving UI refactor with no established current user-facing regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • 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 21, 2026, 4:33 PM ET / 20:33 UTC.

@steipete

Copy link
Copy Markdown
Contributor Author

Superseded by #180484, now merged as e1cc3a6. The replacement preserves the discovery owner and saved picker identity, completes Solid async readiness/error/retry presentation, and passed full exact-head CI run 39762918802. The merge and all five authored blobs are verified on official main.

@steipete steipete closed this Oct 22, 2026
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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M 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