Repository navigation
refactor(ui): pair page lifecycles and use JSX renderers - #180378
Conversation
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.
|
🦞👀 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 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.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherControl 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]
Technical reviewBest 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
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +17, Tests +67, Other 0. Total +84 across 24 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel 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 22, 2026, 2:51 AM ET / 06:51 UTC. |
|
Merged via squash.
|
…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
Solid 2 checklist
Against official base
1ff9c4a7ad23and signed head0c5f81cc8907: 15 logical production modules, 5,374 → 5,391 LOC (+17). Native TypeScript AST counts cover the touched production files.onCleanup13 → 2;onSettled11 → 19. The two survivors are the immediate Meetings request primitive and PluginPage's synchronous authorization owner.action1 → 1;createOptimistic3 → 3. Existing owners retain mutation authority.lazy1 → 1. The Activity route retains its deferred import; layout and JSX rendering stay behind it.createSignal23 → 21;createStore3 → 5. Debug history and Meetings drafts use local store mutations.createComponent4 → 0.Loading2 → 2,Errored2 → 2,Reveal0 → 0. Existing reveal behavior is preserved.createRoot,getOwner, andrunWithOwnereach 0 → 0.createEffectremains 4 andcreateMemoremains 21. Render effects,untrack, andflushremain 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
pnpm tsgo:uiand the tooling test typecheck pass on the reviewed tree.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,
23cd0dd0d82dpassed 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.