Skip to content

fix(ui): release conditional provider usage registrations - #179775

Merged
steipete merged 2 commits into
mainfrom
solid2/w-s2-profile-usage-lifetime
Oct 21, 2026
Merged

steipete merged 2 commits into
mainfrom
solid2/w-s2-profile-usage-lifetime

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor
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 4 / 0 1 / 1 3 / 0 0 / 0
3. Original ordinary read families: adopted / pending / excepted 7 / 2 / 0 5 / 3 / 0 0 / 2 / 1 2 / 0 / 3 2 / 5 / 0
4. Mutation families: adopted / pending / excepted 2 / 4 / 0 0 / 7 / 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 / 19285 22 / 6787 22 / 4831 14 / 3154 14 / 3476

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

Proof Result
Regression on original source c0f5 Fails at first release assertion after OAuth → API key; row retention and removed DOM assertions pass.
Changed test file, pinned Bun, one worker 15/15 pass, including pointer/keyboard ordering and focus.
Independent review / targeted lint / format P0–P2 clean; reviewed production and test blobs are byte-identical in the refreshed head.
Frozen install / UI typecheck Pass on ef4743208442beba310d376ae8b3ecb4500278ad.
Current full CI 39669976528 completed. All three UI unit shards, both real-Gateway shards and eight other browser shards pass. The sole failing test is the mixed-attachment layout case also failing latest completed scheduled main, with the same -875.6875 assertion.
Current production build pair Pass: exact 604a2923 base → ef474320 head: 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.
Production Knip Pass on final head; no new ignores.

The refreshed head merges official main 604a2923 to 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 identical expected -875.6875 to be greater than 4 in both runs. Prior-head run 39650028495 remains 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.

@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 🔄 Running since 2026-10-21T20:24:11.592272Z ef47432 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-environment Preliminary submission classification; full source review pending. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment 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 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.

  • Before: The removed OAuth usage element remains registered, and its release callback is overwritten.
  • After: Each removed usage element releases its own registration exactly once.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused, coherent repair with no actionable finding; behavioral evidence remains at renderer-harness level and broad CI is unfinished.
Proof confidence 🦐 gold shrimp (3/6) Maintainer-authored PR outside the ordinary contributor proof gate; the supplied renderer regression exercises conditional registration cleanup, while build metrics cover bundle behavior rather than the lifecycle scenario.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Credential-type changes leave detached account-usage controls retained by the Models page.
Reason: The maintainer-authored change restores the existing registration lifecycle without changing layout, configuration, or request authority.

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
Reviewed head: dd6d8eae099d15802209335e6588d116b6c172d2

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No shipped-browser trace exercises the credential-type transition and controller refresh set; supplied behavioral coverage is the focused renderer regression.
Agent review details

How this fits together

The 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
Loading

Technical review

Best 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

  • Account-usage registration keeps the original intent (18cd308: Replace page DOM queries with ref-based account-usage registration and owner cleanup.)
  • Settled row teardown keeps the original intent (6879be4: Return cleanup from settled setup while preserving usage elements mounted after the row first settles.)
  • Row element map keeps the original intent (2f2d438: Replace DOM lookups with lifetime-owned row references for profile interactions.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source 0, Tests +24. Total +24 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 21 21 0
Tests 1 32 8 +24
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 53 29 +24

Labels

Label changes:

No label changes.

Label justifications:

  • P2: A bounded Models-page lifecycle leak retains detached usage elements during credential-type changes.
  • 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 21, 2026, 2:45 PM ET / 18:45 UTC.

@steipete
steipete merged commit 0362fed into main Oct 21, 2026
128 of 132 checks passed
@steipete
steipete deleted the solid2/w-s2-profile-usage-lifetime branch October 21, 2026 21:51
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

steipete added a commit that referenced this pull request Oct 21, 2026
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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request 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. 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