Repository navigation
refactor(ui): migrate Sessions and Agents Home to Solid - #168773
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: needs maintainer review before merge. What this changesThis PR replaces the Sessions and Agents Home Lit renderers with Solid while preserving their routes and existing domain owners. Example: Open /agents with the configured OpenClaw agent.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this approved migration contains distinct work absent from current main, and review found no definite introduced defect. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI router mounts these pages through the shared bridge; existing Gateway-backed capabilities supply session and roster state, and Solid renders controls and navigation. flowchart LR
Router --> Bridge
Bridge --> SolidPages
SolidPages --> PresentationController
PresentationController --> DomainCapabilities
DomainCapabilities --> Gateway
DomainCapabilities --> SolidPages
Technical reviewBest possible solution: Complete the scoped renderer migration while preserving existing session authority, preferences, and interaction contracts. Do we have a high-confidence way to reproduce the issue? This is a renderer refactor; source confirms the existing Lit implementations remain on main, and no target code or tests were executed during this read-only review. Is this the best way to solve the issue? The shared bridge and revision projections provide a coherent migration path that leaves authoritative session and roster decisions with their existing owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d4e9d09e9422. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +490, Tests +284, Docs +2, Other -2. Total +774 across 40 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 HistoryReview history (5 earlier review cycles)
Reviewed October 11, 2026, 1:32 AM ET / 05:32 UTC (Revision 6). |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
What Problem This Solves
Completes the Solid renderer migration for Sessions and Agents Home while keeping their current routes, custom-element tags, CSS classes, and selectors.
User Impact
The two pages retain their existing session management, roster, search, archive, grouping, and navigation behavior. Refreshes preserve the open session menu, override controls, sort-header focus, and goal-badge identity. An initially inactive Agents Home waits until presentation to subscribe and load its roster.
Why This Change Was Made
Both registered page tags now have one Solid implementation through
defineSolidBridge; their Lit classes are deleted. Session domain owners remain unchanged, includingui/src/lib/sessions. The page controller keeps synchronous presentation writes and publishes revisions to Solid. Its three existing shared controllers retain their current host contract.The shared bridge now connects Lit-hosted pages to the existing shell layout owner. Solid-owned pages inherit their existing provider. The existing bridge also hosts the small Lit-content adapter for shared avatar, hub-tab, and agent-scope templates until those owners migrate. The remaining Web Awesome popover has no landed owned replacement on the integrated base.
The existing session row renderer is in its own module, removing the view's oversized-file exemption. Its shared props live in a type-only leaf module to avoid an import cycle. Agent-scope labels also track locale changes. No new dependency or store is introduced.
Evidence
6b8e69e47076tbx_01m4kk3vzkycggrvxmmvmy67cq, not admitted after about 14 minutes; stopped599d8ea2719b: production types, lint, architecture, guards, ratchets, i18n/performance, UI shards 1/3, and E2E 1/2/3 passed. UI shard 2 failed two unchanged markdown-table focus tests and later received runner shutdown; core test-types 5 was cancelled. The exact main parent and tested merge reproduce both failures identically.Existing focused tests ran as
pnpm test <file> --maxWorkers=1. The source replacement check was rerun after integration. The discovery check is pre-integration evidence; current-head CI will cover its integrated inputs. Test bodies remain small; the shared host's startup contention dominates the longer wrapper times.Focused commands and wall times
ui/src/pages/sessions/sessions-page.test.tspages/sessions/view.test.tspages/sessions/view-goals.test.tspages/sessions/view-transcript-search.test.tspages/sessions/sessions-page.typing.test.tspages/sessions/sessions-page.archive-lifetime.test.tspages/sessions/sessions-page.archive-outcome.test.tspages/sessions/sessions-page.archive-tree-outcome.test.tspages/sessions/sessions-page.archived.test.tspages/sessions/sessions-page.scope-race.test.tspages/sessions/route.test.tspages/agents-home/agents-home-page.test.tspages/gateway-source-replacement.test.tsi18n/command-discovery-loading.test.tslit/solid-bridge.test.tsxSize and accepted migration boundary
Page production LOC: 3,984 → 4,436 (+452, 11.3%). Shared interop and typing add 38 production lines (20 lines for the stateless-template adapter inside the existing bridge, 12 for shell layout integration, and 6 for the existing session-menu element type). This misses the net-zero target: residual growth is primarily explicit typed presentation state, keyed rendering and property/event contracts, plus the temporary shared-controller host contract. The Lit page implementations are removed; the maintained stateless Lit templates have multiple consumers and remain behind the small adapter until their owner migration.
Inherited CI failure
CI run
38110971288tested merge1b6264475c1a(main parentc2d584acd704, PR head599d8ea2719b). Main commit4a7d53616a5dmoved modal focus restoration into a microtask; the unchanged markdown-table tests still check focus synchronously. With the pinned Bun fork, the exact main parent and tested merge each yield 10 passed / 2 failed, at the same focus assertions (lines 274 and 301). Baseline wall time: 103.17 s; merge wall time: 119.41 s. This is retained as a failed check, not reported as passing. Landed through the native inherited-failure route asf4d601a0061357c965899c731aebc91161146cf0, retaining the exact evidence and cancelled coverage. The post-merge audit found intervening main changes disjoint from UI, and the landed tree exactly matches the merge of its actual parent and the reviewed head.Screenshots
Synthetic fixtures only. Baseline:
6b8e69e47076; rendered Solid bundle:9da11db02ddd. Later commits contain type/lint corrections, equivalent native property bindings, locale tracking, and relocation of unchanged interop/controller code; they do not change these English layouts. Agents Home is pixel-identical across desktop/mobile light/dark. Sessions intentionally loses an 8px empty grid gap because Solid’s empty status node now matches the existing:emptyrule. The Agents Home error Retry button also moves a few pixels left after removal of template whitespace; it remains a distinct readable control. All contents and controls are preserved. All 120 full captures were inspected for synthetic-only content; the 30 sheets below show every captured state/profile.routes-agents-home
routes-sessions
agents-loaded
agents-loading
agents-empty
agents-error
agents-disconnected
sessions-loaded
sessions-details-selection
sessions-groups
sessions-search
sessions-archived
sessions-empty
sessions-error
sessions-loading