Skip to content

refactor(ui): pair page lifecycles and use JSX renderers - #180378

Merged
steipete merged 23 commits into
mainfrom
solid2/w-s2-pages-c-lifecycles-current
Oct 22, 2026
Merged

steipete merged 23 commits into
mainfrom
solid2/w-s2-pages-c-lifecycles-current

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Solid 2 checklist

Against official base 1ff9c4a7ad23 and signed head 0c5f81cc8907: 15 logical production modules, 5,374 → 5,391 LOC (+17). Native TypeScript AST counts cover the touched production files.

Item Before → after and disposition
Native handlers Conditional intrinsic bindings 0 → 0.
Lifecycle onCleanup 13 → 2; onSettled 11 → 19. The two survivors are the immediate Meetings request primitive and PluginPage's synchronous authorization owner.
Async reads The Debug section-state map remains 1 → 1 for its focused successor #179755. Main's native Cloud pending read and Archive reads remain intact.
Mutations action 1 → 1; createOptimistic 3 → 3. Existing owners retain mutation authority.
Code splitting lazy 1 → 1. The Activity route retains its deferred import; layout and JSX rendering stay behind it.
State shape createSignal 23 → 21; createStore 3 → 5. Debug history and Meetings drafts use local store mutations.
JSX Manual createComponent 4 → 0.
Context Throw-only wrappers 0 → 0.
Sibling loading Loading 2 → 2, Errored 2 → 2, Reveal 0 → 0. Existing reveal behavior is preserved.
Owner APIs createRoot, getOwner, and runWithOwner each 0 → 0.

createEffect remains 4 and createMemo remains 21. Render effects, untrack, and flush remain 0.

What Problem This Solves

Several page resources register cleanup separately from their setup. Activity and Debug construct Solid content manually, while Debug history and Meetings input drafts copy local collections on each update.

Pair component setup and teardown through onSettled, express Activity's lazy route and Debug renderers in JSX, and use stores for the two local collections. Keep domain authority synchronous. Activity retains its host, selectors, live route props, and lazy boundary. Debug retains timestamp deduplication, its 90-sample history cap, and event updates. Meetings retains URL-equal clears, unrelated drafts, pagination, cancellation, and permission retirement.

Main's independently landed plugin artwork lifecycle (#180096) supersedes the old consent-dialog hunk; that file is exactly the incoming main blob. The merged Cloud code keeps its native pending read and adds only confirmation cancellation to existing unsubscribe cleanup. The merged Meetings code retains main's reader-page store alongside the local draft store and paired lifecycle.

The coupled planner tests compare the executor's effective child-resource environment rather than the retired mixed-membership serial heuristic. They retain selected-file, ownership, configuration, timing-key, and worker-budget assertions. No planner policy, dependency, cap, timeout, or ignore is changed. The HTML publication changes collect bounded scalar failure diagnostics around the original Count action; they do not retry it or change assertions/timeouts, and do not establish a fix for the earlier failure.

Evidence

Check Result
Frozen installs Base and head pass with Node 24.22.1 / pnpm 12.15.0.
UI and tooling types pnpm tsgo:ui and the tooling test typecheck pass on the reviewed tree.
Focused tests, pinned Bun Native pages 2/2; Meetings 29/29; affected planner ownership/budget cases 4/4. Each file ran once to completion.
Controller guard Pass against the exact base; no allowance added.
Production Knip Fails identically on this head and exact base: 13 unused heartbeat files, no UI files. Exact path-set comparison recorded; no new ignore.
Actual production builds Both pass: base 137.237 s, head 103.329 s. Identical runtime, timestamp, branch and build options; actual commit/build IDs retained. All seven canonical browser plugin distributions rebuilt independently: 29 consumed package files and 45 emitted plugin files are byte-identical.
Strict performance Base/head/pair 0/0/0. Startup 316,640 → 316,642 B gzip (+2 B); chat 1,438,729 → 1,438,736 (+7 B); New 1,015,532 → 1,015,546 (+14 B). These are within the 64 B build-variance allowance. Startup retains 7 JS requests and 1 CSS request; CSS bytes unchanged.
Independent review Complete retained patch reviewed at P0–P2 with no actionable finding; captured source verified unchanged. Coordinator separately inspected combined owners. Reviewer assessment is source-only; tests above provide execution proof.
Synthetic visual proof Both exact-source captures pass with zero page errors. Four full frames inspected and synthetic-only. Activity is byte-identical; Debug visibly differs only in its build footer.
CI Exact-head run39734757438 passed with ci:full, which requests every UI unit, Control UI E2E, browser-extension, and real-Gateway shard.

The initial build pair used unequal packaged plugin inventories (seven versus three), so its byte comparison was invalidated. The recorded comparison above rebuilds all seven source-declared browser plugins independently on both exact sources and requires their distributions; all 29 consumed package files and 45 emitted plugin files match byte-for-byte. No artifact was copied between sources.

The full contribution is 24 files, +229/−145. The small production increase pairs setup with teardown, expresses the lazy route in JSX, and replaces collection copies with store drafts.

Replacement and historical evidence

Supersedes #179161. Its retained native review workflow supports state schema 30 while the current shared landing state uses 31; native provisioning also stopped on a stale worktree administrative path. This replacement uses current-main tooling. The original confirmed-cancelled merge outcome and native metadata are preserved; no binding, schema, or administrative directory was rewritten.

Previous-head CI, captures, failed attempts, and attribution remain recorded in #179161. In particular, 23cd0dd0d82d passed all 63 executed jobs in run 39714034729, with 23 skips. That is historical proof, not current-head CI or a waiver. Its HTML diagnostic green run does not explain the earlier counter failure. The initial local UI package launcher for this refresh was stopped before a verdict because it selected Node; the completed test results above use the canonical pinned-Bun wrapper. Node is used only for the targeted Playwright captures.

Visual proof

Inspected synthetic-only captures at 1366×900, fixed time, light Claw theme, and reduced motion. Before: 1ff9c4a7ad23; after: 0c5f81cc8907. Each mock Gateway matches its actual built commit and build ID. Images follow below.

Before: synthetic Activity

After: synthetic Activity

Before: synthetic expanded Debug

After: synthetic expanded Debug

Keep the route-to-request-owner effect in the original Activity page and the router props and shell layout in a lazy JSX adapter. Declare the plain host tag in the canonical JSX types.

This restores the verified TypeScript-to-TSX rename without changing the controller guard or allowances. The native page test loads the production route and preserves live route updates, host identity, and cleanup.
Resolve the required plugin-page import conflict while retaining main's
native lazy bundled-view loader and the page lifecycle's paired iframe
theme setup and cleanup. Preserve the current consent icon subscription
owner alongside its image callback retirement guard.

UI types, targeted lint, formatting, controller ratchets, and diff checks
pass. The focused plugin and consent test attempt hit the normal setup
watchdog before assertions. The earlier managed-media recap CI failure
remains unresolved; this conflict integration does not claim to fix it.
Resolve the shared Solid intrinsic-element insertion conflict by retaining both Activity and Cron scratch hosts. Runtime files in the lifecycle change remain identical to the previously green head.

Validation: UI typecheck, focused typed lint, formatting, controller ratchets, diff hygiene, and independent P0-P2 review passed. Runtime and bundle evidence remains attributed to its original head; fresh PR CI validates the integrated candidate.
Preserve conditional account-usage teardown and settled row registration.
Retain main's late-mount regression, serial planner helper, and renamed
Claws English registration.
Selected jobs can combine parallel groups from different full-plan owners.
Compare bounded job execution metadata with the selected canonical owner,
while preserving independent full-plan group policy and precise E2E coverage.

The direct selection checks retain singleton normalization semantics.
Production planner behavior is unchanged.
Merge official main with the corrected Usage export fixture activity window.
Preserve the reviewed lifecycle cleanup and selected planner owner checks.
Merge official main effective worker-budget validation and route export fixes.
Preserve the Activity lazy JSX adapter and scoped lifecycle resource ownership.
Supersede the earlier planner expectation correction with the canonical
executor-budget proof; retain only the Activity source-path update.
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.
Merge official main while preserving Archive request ownership and the
Lifecycle draft store and paired component teardown. Replace stale planner
test composition assumptions with effective child resource assertions,
and wait for the loaded Details body in the Subagents fixture.

Preserves Activity route state, existing host tags, Debug history, Meetings
drafts, cancellation, permissions, and the existing lazy boundaries.
Keep the reviewed child-environment resource contract when main retires the
older serial-projection heuristic. Every net authored file remains identical
to the fully reviewed Lifecycle candidate; official main is merged directly.
@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 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 22, 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-22T06:39:35.847836Z 0c5f81c PR opened
ℹ️ 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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR pairs page setup with teardown, replaces manual Solid rendering with JSX, and moves local collections into stores.

Example: Open Activity at /activity?view=live, then switch to Sessions.

  • Before: Manual component construction updates the route within the existing Activity host.
  • After: The lazy JSX renderer preserves the same host and live route updates.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, bounded refactoring with inspected browser evidence, preserved ownership contracts, and no actionable findings.
Proof confidence 🐚 platinum hermit (4/6) The ordinary contributor-proof gate does not apply to this maintainer-authored PR; inspected production-build browser captures show Activity and Debug parity, supported by reported focused execution and the passing current-head CI gate.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: No visible behavior change is intended; the change reduces lifecycle and rendering machinery while preserving navigation, drafts, diagnostics, and cleanup.
Reason: The maintainer-authored direction continues the existing Solid migration with bounded changes and preserved domain owners.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored refactor preserves existing page contracts, and inspection found no actionable correctness or security defects.

Priority: P3
Reviewed head: 0c5f81cc890792db4a5fcdb0f779bd41600918f1

Before merge

None.

Findings

None.

Agent review details

How this fits together

Control UI route components consume Gateway-owned state and local presentation drafts, render page content, and release subscriptions, requests, timers, and element registrations when their owners retire.

flowchart LR
  A[Router] --> B[Lazy page renderer]
  C[Gateway owners] --> B
  B --> D[Local presentation stores]
  D --> E[Page DOM]
  B --> F[Paired resource cleanup]
Loading

Technical review

Best possible solution:

Retain the paired lifecycles and JSX cutover while preserving synchronous domain authority and existing page behavior.

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

This PR is a refactor rather than a reported bug; source inspection and supplied browser captures establish the behavior being preserved.

Is this the best way to solve the issue?

The change follows existing Solid owners, removes manual rendering, and preserves distinct request and authorization lifetimes without adding competing state ownership.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Activity host and lazy route rendering keeps the original intent (refactor(ui): render migrated pages through the Solid outlet #170571: Native route renderers preserve host identity, live loader props, shell layout, and lazy loading; the later bridge removal intentionally retained the TypeScript path for inventory stability.)
  • Component resource cleanup keeps the original intent (refactor(ui): bind page updates to owner receipts #176492: Owner receipts provide synchronous scope retirement while component subscriptions follow their mounted lifetime; this patch pairs cleanup without replacing those authoritative owners.)
  • Debug history and renderers keeps the original intent (refactor(ui): simplify Debug overlay ownership #173866: Solid owns presentation while request identity, polling, connection custody, and bounded history remain explicit; the draft store preserves timestamp deduplication and the 90-sample cap.)
  • Meetings drafts and listeners keeps the original intent (refactor(ui): retire unused Solid page bridges #171809: Native rendering retains page-local drafts and request lifetimes; store mutations preserve URL-equal clears and unrelated drafts, and immediate request cleanup remains separate.)
  • Changed-test planner expectations keeps the original intent (fix: prevent false changed-test concurrency failures #180051: Later packing phases can serialize mixed-owner rows, making membership-based raw concurrency expectations unreliable; comparing effective child resources retains the actual execution contract.)
  • HTML publication and reconnect validation keeps the original intent (chore(qa): cover Control UI reconnect continuity #155468: Reconnect coverage verifies persisted history outside the browser stream; the patch strengthens terminal-settlement checks, while HTML diagnostics retain the original click, assertion, and timeout.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Introduced patch and current-main context: Reviewed the pinned introduction diff and relevant current-main implementations; Activity retains its lazy boundary and request-owner effect, while Meetings retains immediate request cleanup. (ui/src/pages/activity/activity-route.tsx:6, 0c5f81cc8907)
  • Preserved ownership and authorization: PluginPage retains synchronous Gateway subscription disposal and authorization retirement; the changed iframe lifecycle pairs registration with removal. Cloud confirmation continuations retain current-scope and permission checks before RPC effects. (ui/src/pages/plugin/plugin-page.tsx:48, 0c5f81cc8907)
  • Inspected browser evidence: Inspected all four prepared screenshots linked in the PR: synthetic production-build Activity and expanded Debug before/after captures preserve visible content and geometry, apart from Debug's build footer. (0c5f81cc8907)
  • Current-head check outcome: The current-head openclaw/ci-gate status passes. The separate PR context check fails because it expects specific body headings; cancelled auto-response jobs provide no runtime failure evidence. (0c5f81cc8907)
  • Replacement and adjacent work: The body explicitly supersedes refactor(ui): pair page resources with Solid lifetimes #179161; refactor(ui): present meeting actions with native Solid transitions #180367 explicitly leaves Meetings lifecycle and draft changes to this PR. (0c5f81cc8907)
  • Determining Solid lifecycle contract: The patch imports onSettled and createStore from Solid. The rc.16 source cheatsheet confirms returned component cleanup, deferred store writes, and draft setters; it was read through GitHub because installed dependencies are absent. (packages/solid/CHEATSHEET.md, b0ad1df505b8)

PR surface

Source +17, Tests +67, Other 0. Total +84 across 24 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 15 102 85 +17
Tests 6 119 52 +67
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 8 8 0
Total 24 229 145 +84

Root-cause cluster

Relationship: canonical
Canonical: #180378
Summary: This PR explicitly replaces the earlier lifecycle contribution with the retained work on current tooling.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add P3: This is behavior-preserving UI lifecycle and rendering cleanup without an established urgent user-facing failure.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 behavior-preserving UI lifecycle and rendering cleanup without an established urgent user-facing failure.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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 22, 2026, 2:51 AM ET / 06:51 UTC.

@steipete
steipete merged commit 841b90f into main Oct 22, 2026
171 of 177 checks passed
@steipete
steipete deleted the solid2/w-s2-pages-c-lifecycles-current branch October 22, 2026 07:13
@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 23, 2026
…0378)

* refactor(ui): pair page resources with Solid lifetimes

* refactor(ui): keep presentation collections in Solid stores

* test(ui): use the dashboard Panels control in layout coverage

* test(ui): verify reconnect follow-up after terminal settlement

* test(ci): compare shared fields across shard types

* refactor(ui): render activity route through JSX

* fix(ui): separate Activity route layout from page lifecycle

Keep the route-to-request-owner effect in the original Activity page and the router props and shell layout in a lazy JSX adapter. Declare the plain host tag in the canonical JSX types.

This restores the verified TypeScript-to-TSX rename without changing the controller guard or allowances. The native page test loads the production route and preserves live route updates, host identity, and cleanup.

* test(ci): compare selected planner execution owners

Selected jobs can combine parallel groups from different full-plan owners.
Compare bounded job execution metadata with the selected canonical owner,
while preserving independent full-plan group policy and precise E2E coverage.

The direct selection checks retain singleton normalization semantics.
Production planner behavior is unchanged.

* test(ci): exercise hourly main validation policy

* test(ui): diagnose HTML publication counter failures
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. extensions: qa-lab P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: M 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