Repository navigation
fix: keep newer model choices when a page refresh finishes - #145478
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 12, 2026, 12:55 AM ET / 04:55 UTC (Revision 6). ClawSweeper reviewWhat this changesThe Models settings page preserves newer model choices, Auto utility-model details, and discovery progress when an older page refresh finishes. Merge readiness✅ Ready for maintainer review The fix remains necessary on the inspected main revision, and no actionable defects were found. The prior draft-status blocker is resolved; the supplied browser evidence supports the changed behavior. Priority: P2 Review scores
Verification
How this fits togetherThe Models settings page combines Gateway configuration and provider data with catalog discovery triggered by opening a model picker. Its refresh coordination determines which model choices, Auto label, and progress state users see. flowchart TD
A[Page Refresh] --> B[Load configuration and provider data]
C[Open model picker] --> D[Discover model catalog]
B --> E[Compare request generations]
D --> E
E --> F[Keep newer catalog and progress]
E --> G[Apply refreshed configuration]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +20, Tests +106. Total +126 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep catalog ownership with the latest picker request while the existing page loader independently reconciles configuration and provider data. Do we have a high-confidence way to reproduce the issue? Yes: delay a page refresh's configuration response, open a model picker, then let the older refresh finish while discovery is pending or already completed. Current-main source establishes the overwrite and cancellation path; this review did not execute it. Is this the best way to solve the issue? Yes: the repair extends the existing discovery owner with a generation counter and preserves only catalog fields, without changing saved settings, provider routing, or public APIs. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fe056539fd16. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
0dbc1cb to
889f06f
Compare
Preserve newer completed or pending picker discovery while an older Models page refresh adopts configuration and other provider data. Core refreshes still retire picker work that started earlier. Validated with two causal mounted regressions, 117 selected tests, synthetic Chromium before/after proof, canonical checks, UI build and clean P2 review.
889f06f to
2f341b3
Compare
|
Merged via squash.
|
…145478) * fix: keep newer model choices when a page refresh finishes Preserve newer completed or pending picker discovery while an older Models page refresh adopts configuration and other provider data. Core refreshes still retire picker work that started earlier. Validated with two causal mounted regressions, 117 selected tests, synthetic Chromium before/after proof, canonical checks, UI build and clean P2 review. * fix: retain automatic model during page refresh
What Problem This Solves
Fixes an issue where users opening a model picker during a refresh in Settings → Models could lose newly discovered choices, see discovery stop, or see the Auto utility model revert when the older page refresh finished.
Why This Change Was Made
The page respects the newer picker request when it applies a refresh. Model choices, the resolved Auto utility model, progress, and catalog errors stay with that request while the refresh updates provider and configuration data. A later page refresh continues to retire older picker work.
User Impact
Model pickers remain usable during refresh. New choices and the Auto model stay consistent, pending discovery can finish, and refreshed default-model selections still appear.
Evidence
The completed and pending ordering regressions distinguish the initial, older refresh, and newer discovery results. Both fail without preserving the automatic utility value and pass with the fix. All 166 tests across seven related suites pass, including publication, inverse ordering, current Auto labels, and other default-model controls. UI types, all 17 core-test type graphs, lint, formatting, and the final canonical changed-file checks pass.
Real Chromium proof uses a synthetic Gateway and the actual Refresh button and picker on current main. The refreshed primary selection appears in both versions. The repaired version preserves the correct Auto value and newer catalog or pending progress, then adopts the pending discovery when it completes. Both runs finish without page errors or configuration writes; final source and index bytes are restored after baseline capture.
The two baseline states produce byte-identical screenshots, so they share one image above. Independent P2 review found no actionable findings. Browser proof uses a synthetic Gateway; no live provider or operator Gateway is exercised.