Skip to content

refactor(ui): use stores for recovery dialog presentation - #179405

Merged
steipete merged 3 commits into
mainfrom
solid2/w-s2-browser-auth-state
Oct 21, 2026
Merged

steipete merged 3 commits into
mainfrom
solid2/w-s2-browser-auth-state

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Whole-scope Solid 2 census at this PR's exact base, 93a248d1f9db. Main has since merged the plugin presentation cleanup and a plain channel-owner refactor; the census below includes them. Counts exclude synchronous domain-owner APIs and deliberate foreign-DOM adapters from presentation candidates. Arrows show only this PR's effect; other lane PRs retain their own credit.

File family 1 unsafe/native bindings 2 component/all cleanup 3 manual read pipelines 4 local mutation flows 5 manual view loaders/runtime imports 6 copied presentation objects 7 manual component factories 8 throw-only contexts 9 sibling loading groups 10 non-island/all owner APIs
app 0/30 0/3 1 1 0/67; native lazy 6 3 → 1 0 0 0 6/6
lib, excluding reactive 0/10 0/5 2 1 controller, 3 commands 0/10 1 tab-focus slot, separate PR 3 foreign-DOM adapter calls 0 0 0/4
plugin presentations 0 0/2 1 1 raw + 1 native action 0/1 1 history slot, coupled to async migration 0 0 0 0
plugin SDK/DOM bridges 0 0/1 2 foreign mounts, exempt 3 delegated SDK commands, exempt 0/8 1 opaque props slot, exempt 0 0 0 0/7
plain plugin owners 0 0 0 presentation wrappers 0 presentation wrappers 0/4 0 0 0 0 0
plain API owners 0 0 0 presentation wrappers 0 presentation wrappers 0/2 0 0 0 0 0

Item 6 corrects omissions in the earlier census: browser-auth recovery and update confirmation are copied presentation objects, and plugin history is a separate candidate. This PR removes the first two; focus loading remains coupled to its async migration. Five other object signal sites are intentional receipts/opaque adapters: command-palette input custody, native history, the router's exact committed receipt, generic Solid bridge values, and settings SDK props. This PR does not change their owners or the separate shell-owner, tabs, and dashboard work.

Exact production file/LOC census at this PR's base, 93a248d1f9db: 566 files; 91,604 → 91,605 LOC. App: 190 files, 31,376 → 31,377; lib excluding reactive: 345 files, 54,223 unchanged; plugins: 19 files, 3,903 unchanged; API: 12 files, 2,102 unchanged. Counted tracked .ts/.tsx, excluding tests, test-support modules (including lib/config/config-test-harness.ts), declarations, and lib/reactive.

What Problem This Solves

Browser sign-in recovery and update confirmation replaced a whole presentation object whenever a displayed field changed. Use shallow Solid stores for field-level subscriptions. Browser-auth recovery updates its three fields directly and removes a redundant snapshot builder. Update confirmation returns each complete, synchronously captured view snapshot from its store setter. Shallow storage preserves the exact run, schedule, and availability records supplied by the existing owner.

Request admission, credential freshness, target authority, cancellation, native reconnect/update handling, retries, dialog lifetimes, markup, classes, handlers, and load boundaries are unchanged.

Evidence

Proof Result
Browser-auth recovery tests 12 pass; reused from the unchanged patch
Update-confirmation tests 34 pass on final source, pinned Bun, --maxWorkers=1
pnpm tsgo:ui Pass, tsrs
Formatting / git diff --check Pass
Scoped oxlint Pass on final source; one pre-existing style warning
Independent isolated Codex review Original full review and final setter review both scoped-clean; source verification complete
Production Knip Pass on final setter source
Same-machine base/head UI builds Pass
Exact-head full CI Pass: 39601551734, head 6aae945bc2f83ff03c9258d8fb79711b58df284e
Strict startup JS gzip 331,314 → 331,357 B (+43 B)
Chat boot JS gzip 1,500,965 → 1,500,994 B (+29 B)
New Session boot JS gzip 1,018,351 → 1,018,387 B (+36 B)
Startup CSS 1 request; 40,439 B unchanged

Both strict checks exit 1 for existing absolute startup and Chat caps. The final +43 B and +29 B over-cap deltas are within the 64 B limit; no cap or baseline changes. Startup/Chat/New JS request counts remain 8/25/20. Every locale pair remains under its cap. The original campaign ceiling is not used for admission.

Tests cover sign-in and pending/error text, native routing, credential replacement, dismissal and abort, retained reports through reconnect, status recovery, and scoped report retirement. No tests or assertions changed. Existing STRICT_READ_UNTRACKED warnings originate from the unchanged stream-auto-follow identity re-read; they are recorded without claiming an additional base run. No local E2E or parity battery; the final head uses ci:full.

Size and scope

Two production files: 817 → 818 LOC (+1). Browser-auth recovery: 261 → 268; update confirmation: 556 → 550. Diff: 48 insertions, 47 deletions. Test LOC unchanged. Copied presentation signals 2 → 0; shallow stores 0 → 2; redundant browser-auth snapshot builders 1 → 0. Other touched-file checklist candidates remain zero; existing async/action authority and imports are unchanged.

The small growth is the field-by-field browser-auth draft update. The snapshot builder remains the single representation of update-confirmation state; returning its complete captured value avoids another assignment wrapper. No dependencies, helpers, state owners, or guards are added. There is no visual change.

Previous inherited-failure attribution is withdrawn: both exact UI/Gateway cases pass scheduled main run 39592709539. The replacement head uses fresh full CI; no old failure evidence is used for landing. Canonical async/action recipes are still absent from fetched main, so this PR completes only the presentation-state representation change.

@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 ✅ Completed 2026-10-21T12:30:51.812454Z f31fd8e 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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 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 replaces whole-object presentation signals with shallow Solid stores in browser sign-in recovery and update confirmation.

Example: A user clicks Check again while the sign-in recovery dialog remains open.

  • Before: Updating the pending flag replaces the presentation object and invalidates unrelated bindings.
  • After: The pending field updates independently while the existing buttons and recovery behavior remain.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-correct; validation supports it through existing dialog harnesses, while CI remains unresolved.
Proof confidence 🦐 gold shrimp (3/6) The maintainer-authored PR is outside the ordinary contributor proof gate; supplied evidence reports focused dialog tests, types, lint, and paired builds rather than a shipped-entry-point demonstration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Recovery dialogs subscribe unrelated display bindings to a single presentation-object signal.
Reason: Maintainer-authored direction is established, and the patch improves subscription granularity without introducing another domain owner or changing recovery policy.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-directed refactor preserves existing recovery behavior, and no actionable introduced defect was found; CI still needs attention.

Priority: P3
Reviewed head: 6fb42bfb92e3de0cbf2c876b4ddbe52ba2059e92

Before merge

None.

Findings

None.

Agent review details

How this fits together

These Control UI dialogs translate synchronous authentication and update-owner state into displayed status and actions; authorization, requests, retries, and cleanup remain with their existing owners.

flowchart TD
  A[Browser HTTP failures] --> B[Sign-in recovery owner]
  C[Gateway update receipts] --> D[Update dialog owner]
  B --> E[Shallow presentation stores]
  D --> E
  E --> F[Solid dialog bindings]
  F --> G[Existing recovery actions]
Loading

Technical review

Best possible solution:

Retain this focused store conversion and the existing synchronous owners, record identities, and dialog lifetimes.

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

This is a refactor rather than a reported functional bug; source inspection confirms the previous whole-object publication pattern.

Is this the best way to solve the issue?

The conversion is appropriately narrow: it removes browser-auth snapshot rebuilding, retains the updater's complete view builder, and uses shallow storage to preserve owner-supplied record identity.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Solid dialog presentation keeps the original intent (99bc045: Move the existing dialogs from Lit to Solid while preserving actions, focus, lazy loading, and plain TypeScript domain ownership.)
  • Browser-auth modal host keeps the original intent (a05ccb5: Consolidate imperative dialogs under one Solid rendering root while preserving cancellation and lifecycle contracts.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit e074991 adds ui/src/app/browser-auth-recovery.ts:15 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e074991f0344; files: ui/src/app/browser-auth-recovery.ts)
  • Vyctor H. Brzezowski: Raw commit 95fdce7 adds ui/src/app/update-confirmation.runtime.ts:27 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 95fdce704931; files: ui/src/app/update-confirmation.runtime.ts)
  • Vincent Koc: Raw commit 1c3468f adds ui/src/app/update-confirmation.runtime.ts:20 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 1c3468fd05fb; files: ui/src/app/update-confirmation.runtime.ts)

PR surface

Source +5. Total +5 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 52 47 +5
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 52 47 +5

Labels

Label changes:

  • add P3: This is a bounded presentation refactor with unchanged user-facing actions and no established urgent product failure.
  • 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:

  • P3: This is a bounded presentation refactor with unchanged user-facing actions and no established urgent product failure.
  • 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, 7:23 AM ET / 11:23 UTC.

@steipete
steipete merged commit c5dd59f into main Oct 21, 2026
110 of 113 checks passed
@steipete
steipete deleted the solid2/w-s2-browser-auth-state branch October 21, 2026 13:54
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
…79405)

* refactor(ui): use stores for recovery dialog presentation

* refactor(ui): simplify recovery snapshot publication
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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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