Repository navigation
fix(ui): render model provider controls progressively - #130546
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs changes before merge. Reviewed August 29, 2026, 8:33 AM ET / 12:33 UTC. ClawSweeper reviewWhat this changesThe PR renders Model Providers controls from authentication, catalog, and configuration data first, then loads provider usage and local session cost afterward. Merge readinessKeep open: the PR unblocks the core controls, but one slow supplemental RPC still prevents the other supplemental result from appearing, leaving the linked behavior only partially fixed. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI asks the Gateway for provider configuration and for secondary quota and local-cost metrics. The page uses the core data to render editable provider controls, then enriches provider cards as metric results arrive. flowchart LR
A[Gateway connection] --> B[Core provider reads]
A --> C[Provider usage request]
A --> D[Session cost request]
B --> E[Editable provider controls]
C --> F[Quota and plan details]
D --> G[Local cost details]
E --> H[Model Providers page]
F --> H
G --> H
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +141, Tests +184. Total +325 across 8 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the core-first split, but have the supplemental owner publish provider usage and local cost independently with the same client/epoch fence, then add one-sided-settlement coverage. Do we have a high-confidence way to reproduce the issue? Yes—source reproducible: resolve the core reads and only one of usage.status or sessions.usage; the introduced Promise.all cannot publish that settled result while the other remains pending. Is this the best way to solve the issue? No—the core-versus-supplemental split is the right boundary, but combining the two supplemental calls still violates the linked issue's independent-settlement requirement. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against da1f6dd43e43. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
d85d130 to
9441b41
Compare
9441b41 to
3c917fb
Compare
|
Thanks @sunlit-deng! Proof: An isolated Chromium run held provider quota and local cost responses. Provider controls appeared immediately, quota appeared before cost, Refresh rejected stale results, and quota retries left the pending cost request active. Exact-head CI and immutable ClawSweeper passed.
Example
|
Render Model Providers controls as soon as authentication, catalog, and configuration data are ready. Load provider usage and local cost independently. Cancel stale supplemental generations when core refresh starts, and keep quota retries from restarting pending cost work. Co-authored-by: Ayaan Zaidi <[email protected]>
Fixes #130111.
What Problem This Solves
The Model Providers page waited for provider quota and local session-cost requests before it showed auth, catalog, and config controls. A slow supplemental request left the whole provider section on
Loading….Root cause
The route loader put auth, catalog, config, provider usage, and session cost in one
Promise.all. The page could not adopt the required provider data until every supplemental request settled.Fix
Loading…while supplemental data is pending.Evidence
de969147e7f3ba404e20d8f9966b97f1981e5f17: Chromium heldusage.statusandsessions.usage; provider controls did not appear within 1 second.ee7154a5f6feaa45aafb1dab620b63f0f53091c2: the same browser flow showed provider controls while both calls remained pending, showed theProplan while cost remained pending, then showed$1.25after cost release.usage.statusrequest and onesessions.usagerequest.3c917fb890551dd2f827c4833103a9bc946ee50eleft an old supplemental request active while a held core refresh ran.ee7154a5f6feaa45aafb1dab620b63f0f53091c2aborts both old supplemental requests before the held core refresh can finish or stale data can publish.f9f8b32ffd19d8dbd08eea30861bb91287488037restarted a held local-cost request during automatic usage recovery; the new head retries only usage and lets that cost request publish.Before / After browser evidence
Credentials configuredandLoading…appeared while both requests stayed pendingProappeared while$1.25stayed absent$1.25appeared on the already-visible provider cardThe isolated Chromium run observed one
usage.statusrequest and onesessions.usagerequest. It used a mocked Gateway WebSocket with held responses and no private account or provider data.Change size