Skip to content

fix(ui): clear stuck model checks after catalog publication - #173385

Merged
steipete merged 3 commits into
mainfrom
fix/models-trailing-publication
Oct 15, 2026
Merged

steipete merged 3 commits into
mainfrom
fix/models-trailing-publication

Conversation

@steipete

@steipete steipete commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes Models remaining on “Checking models…” when a completed catalog publication arrives while the initial credential read is still pending.

User Impact

Provider cards adopt the ready catalog after the active load, without another manual refresh.

Why This Change Was Made

Keep one pending publication and consume it after the active core/catalog reads finish. A replacement read absorbs it, and scope invalidation clears it. Provider cards then adopt the ready catalog without another manual refresh.

The regression sends two catalog-invalidating events through the existing page harness while auth is pending, then verifies visible Ready, no pending provider, and one coalesced follow-up catalog read. No timers, timeout increases, weaker assertions, or production test seams.

No layout, startup import, tag, selector, or Gateway producer changes.

Evidence

Check Result
New regression against unchanged production Fails: expected Ready, remained Checking models…
Final model-providers-page.catalog.test.ts --maxWorkers=1 14/14 pass; 31.97 s command, regression 1.314 s
pnpm tsgo:ui Pass
Scoped oxlint, formatter, git diff --check Pass
Independent Codex review No actionable P0–P2 findings
Current-head full UI CI Run 38810484880 at 366c77a50319b5a92af2ee55cfde9e1a0e4659ff: 3/3 UI unit shards, 9/9 browser shards, 2/2 real-Gateway shards pass; all other selected checks and openclaw/ci-gate also pass

Both authored files are byte-identical after merging current main for recovery; the real PR diff remains two files, +51/−1. Reuse the focused local tests and independent review; fresh CI owns the current head. No local E2E/build was needed for this behavior-only change.

The previous head’s run 38798321191 passed all three UI unit shards, both real-Gateway shards, eight browser shards, and other selected checks. Its sole failure was the update-run success headline fixture, identical to scheduled main run 38794323475. That separate fixture repair (#173438) is now included through main. Native inherited-failure admission stopped before submission because GitHub kept reporting UNKNOWN mergeability; the documented recovery merged main and pushed once. Earlier CI remains historical, not current-head proof.

The same stuck status was seen in quota-reset-status.real-gateway.e2e.test.ts on scheduled main. Its artifacts do not establish event ordering, so this PR proves the concrete loader bug and covers the same visible symptom without claiming the historical CI cause was certain.

LOC: loader 169 → 180; directly changed catalog tests 676 → 715; total 845 → 895. The extra production code is one pending flag and the idle refresh used by both existing finalizers.

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

clawsweeper Bot commented Oct 15, 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 15, 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-15T21:34:32.260651Z 366c77a 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 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 Oct 15, 2026
@clawsweeper

clawsweeper Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR retains catalog publications received during loading and reconciles them once the Models loader becomes idle.

Example: OpenAI catalog discovery finishes while the Models page is still awaiting its initial credential response.

  • Before: The publication is discarded and the provider card remains on “Checking models…” until Refresh.
  • After: One follow-up read adopts the ready catalog and clears the checking indicator.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch appears correct and useful; confidence in observed behavior rests on reported page-harness results rather than demonstrated shipped-entry-point execution.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; its supplied evidence exercises the real page controller with mocked Gateway requests, while real-Gateway CI remains pending.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A provider card can keep showing Checking models after its catalog has finished publishing.
Reason: This maintainer-authored repair restores automatic convergence with a small change and an observable regression case.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it repairs a concrete dropped-publication path still present on current main, and no actionable introduced defect was found.

Priority: P2
Reviewed head: d0f79c14ce5dbd6863bb4450d3fa4911b3e86002

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not exercise this exact publication-before-auth ordering through a shipped browser and real Gateway.
Agent review details

How this fits together

The Control UI Models controller receives Gateway catalog events and uses its scoped core loader to refresh credential and catalog projections displayed by provider cards and model pickers.

flowchart TD
  A[Gateway catalog publication] --> B[Models page controller]
  B --> C[Core loader]
  C --> D[Pending publication flag]
  D --> C
  C --> E[Shared catalog and credential readers]
  E --> F[Provider cards and model pickers]
Loading

Technical review

Best possible solution:

Retain the focused pending-publication repair within the existing loader and complete normal exact-head CI before landing.

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

Source shows publication events being discarded while auth or discovery is pending, and the supplied regression reports the corresponding failure before the fix; no target code was executed during this review.

Is this the best way to solve the issue?

The change addresses the dropped event at its existing loader owner with bounded coalescing and preserves request retirement, shared catalog ownership, and independent usage loading.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Publication events received during active core or catalog loading changes intended behavior with a stated reason (9e489ce: The earlier refactor deliberately accepted stale display until the next ordinary refresh to remove queued-publication bookkeeping.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +11, Tests +39. Total +50 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 12 1 +11
Tests 1 39 0 +39
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 51 1 +50

Review metrics

Metric Value Why it matters
Production versus test delta Production +12/−1 lines; tests +39/−0 lines The production growth is a bounded pending flag and its lifecycle handling; the regression exercises visible recovery through the existing page harness.

Labels

Label changes:

  • add P2: The stale checking indicator affects model-settings feedback but has an existing in-product Refresh recovery.
  • 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:

  • P2: The stale checking indicator affects model-settings feedback but has an existing in-product Refresh recovery.
  • 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.

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 15, 2026, 2:39 PM ET / 18:39 UTC.

@steipete
steipete merged commit 19752be into main Oct 15, 2026
110 of 113 checks passed
@steipete
steipete deleted the fix/models-trailing-publication branch October 15, 2026 22:03
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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