Repository navigation
fix(ui): release conditional provider usage registrations - #179775
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR releases account-usage registrations when their conditional controls disappear while preserving the provider profile row. Example: The retained profile openai:one changes from OAuth to API key, then back to OAuth.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: current main retains the registration leak, and this focused maintainer-authored repair addresses it without an identified correctness defect. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Models page renders keyed provider profiles and registers their conditional usage controls with the page controller, which refreshes registered controls. flowchart TD
A[Provider profile snapshots] --> B[Keyed profile row]
B --> C[Conditional OAuth usage branch]
C --> D[Controller refresh set]
D --> E[Account usage control]
C --> F[Branch disposal]
F --> D
Technical reviewBest possible solution: Keep registration and release together in the existing conditional branch, with row-map cleanup owned separately by the keyed row. Do we have a high-confidence way to reproduce the issue? Source establishes that OAuth-to-API-key removes the usage element without releasing its registration, and a later OAuth mount overwrites the callback; the author reports the extended regression failing before repair. Is this the best way to solve the issue? The patch repairs the registration lifetime at its producer using existing Show and onSettled owners, removes the superseded mutable slots, and extends one relevant regression without unnecessary machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c927604295ba. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource 0, Tests +24. Total +24 across 2 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 21, 2026, 2:45 PM ET / 18:45 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
Adopt the official provider usage registration owner and its stronger retained-row regression from #179775. Remove the superseded profile contribution while preserving the remaining page lifecycle, Activity JSX, Debug history, and Meetings draft changes.
Whole-scope census at official main
45cf229cf750: 171 production files / 37,533 LOC; 16 adopted reads, 12 pending, four owner exceptions; two adopted mutation families, 25 pending and one owner exception. Only merged source is credited. This two-file lifetime fix does not change those counts. Cron belongs to the recipes lane.What Problem This Solves
An OAuth usage element can disappear while its keyed provider row stays mounted. Previously the row retained the removed element's registration until the row disappeared; returning to OAuth overwrote its release callback. The controller could therefore retain detached usage elements.
User Impact
Switching credentials releases the removed usage element while retaining the provider row. No intended layout or interaction change.
Why This Change Was Made
The conditional OAuth branch now owns its settled registration and cleanup. The row separately owns its row-map registration; refs only capture DOM elements. Switching credential type retains the row, releases the removed usage element and registers its replacement. Tags, classes, interaction and request ownership are unchanged.
Production LOC: 663 → 663. Tests: 417 → 441 (+24). Mutable registration/release slots 2 → 0; ref callbacks performing registration or reactive reads 2 → 0; settled setup/cleanup pairs 1 → 2. Remaining touched-file checklist counts are zero.
Evidence
c0f5ef4743208442beba310d376ae8b3ecb4500278ad.-875.6875assertion.604a2923base →ef474320head: startup 325,002 → 324,995 B (-7), 9 JS requests; CSS 40,780 B / 1 unchanged; Chat 1,441,061 → 1,441,034 B (-27), New Session 1,019,219 → 1,019,203 B (-16), request counts unchanged.The refreshed head merges official main
604a2923to include the recovery repairs for nine names now passing on latest scheduled main 39671240295. Those obsolete failures are not inherited against the latest main. Current remaining failure:Chat responsive app behavior > renders one named card for every success and failure in a mixed attachment batch, with identicalexpected -875.6875 to be greater than 4in both runs. Prior-head run39650028495remains failed historical evidence, not proof for this head.The lifecycle regression drives API-key → OAuth → API-key → OAuth → removal while retaining the same row. This is a nonvisual correction, so no layout screenshot is claimed as proof of the release contract. Row registration occurs after initial settle, before interaction with the displayed row; imperative interaction with an uncommitted element is not supported.
Both sides use the same machine, fixed build metadata, Vite 8.3.4 and Pako 3.0.2. Base build used Node 26.12.0; head used Node 24.22.0. All startup source bytes match after normalizing only emitted eight-character JS/CSS filename hashes, and raw startup bytes remain 973,548. Both strict comparisons run under Node 24.22.0; no startup code or library was added.