Skip to content

refactor(ui): migrate Sessions and Agents Home to Solid - #168773

Merged
steipete merged 6 commits into
mainfrom
solid2/w-pg-4b
Oct 11, 2026
Merged

steipete merged 6 commits into
mainfrom
solid2/w-pg-4b

Conversation

@steipete

@steipete steipete commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

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, including ui/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

Proof Result
Focused single-file unit tests Passed; exact commands and wall times below
DOM identity regressions Failed before the relevant fixes, passed afterward: menu, override selects, sort header, goal badge
Initial inactive roster regression Failed before the parking fix; passed afterward
Lit-hosted shell layout regression Failed before bridge fix; 11 bridge tests passed afterward
Focused lexical lint / formatting / whitespace Passed
Lit and max-lines ratchets Passed against integrated base 6b8e69e47076
Assertion-safety ratchet Passed; removed the obsolete view baseline entry
Testbox One attempt, tbx_01m4kk3vzkycggrvxmmvmy67cq, not admitted after about 14 minutes; stopped
Exact-head CI On 599d8ea2719b: 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.
Visual parity 60 before + 60 after captures passed and were inspected: desktop/mobile, light/dark, routes plus 13 state scenes. Two accepted whitespace/layout differences are described below.
Autoreview Fresh final review: no actionable P0–P2 findings

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
File under ui/src/ Passed cases Wrapper wall time
pages/sessions/sessions-page.test.ts 29 448.56 s
pages/sessions/view.test.ts 26 67.18 s
pages/sessions/view-goals.test.ts 2 73.45 s
pages/sessions/view-transcript-search.test.ts 13 40.93 s
pages/sessions/sessions-page.typing.test.ts 17 9.95 s
pages/sessions/sessions-page.archive-lifetime.test.ts 5 4.07 s
pages/sessions/sessions-page.archive-outcome.test.ts 8 5.12 s
pages/sessions/sessions-page.archive-tree-outcome.test.ts 2 4.89 s
pages/sessions/sessions-page.archived.test.ts 5 7.23 s
pages/sessions/sessions-page.scope-race.test.ts 8 5.66 s
pages/sessions/route.test.ts 4 3.13 s
pages/agents-home/agents-home-page.test.ts 4 112.38 s
pages/gateway-source-replacement.test.ts 19 192.31 s
i18n/command-discovery-loading.test.ts 4 7.75 s
lit/solid-bridge.test.tsx 11 101.65 s

Size 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 38110971288 tested merge 1b6264475c1a (main parent c2d584acd704, PR head 599d8ea2719b). Main commit 4a7d53616a5d moved 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 as f4d601a0061357c965899c731aebc91161146cf0, 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 :empty rule. 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

Before: routes-agents-home — desktop/mobile, light/dark

After: routes-agents-home — desktop/mobile, light/dark

routes-sessions

Before: routes-sessions — desktop/mobile, light/dark

After: routes-sessions — desktop/mobile, light/dark

agents-loaded

Before: agents-loaded — desktop/mobile, light/dark

After: agents-loaded — desktop/mobile, light/dark

agents-loading

Before: agents-loading — desktop/mobile, light/dark

After: agents-loading — desktop/mobile, light/dark

agents-empty

Before: agents-empty — desktop/mobile, light/dark

After: agents-empty — desktop/mobile, light/dark

agents-error

Before: agents-error — desktop/mobile, light/dark

After: agents-error — desktop/mobile, light/dark

agents-disconnected

Before: agents-disconnected — desktop/mobile, light/dark

After: agents-disconnected — desktop/mobile, light/dark

sessions-loaded

Before: sessions-loaded — desktop/mobile, light/dark

After: sessions-loaded — desktop/mobile, light/dark

sessions-details-selection

Before: sessions-details-selection — desktop/mobile, light/dark

After: sessions-details-selection — desktop/mobile, light/dark

sessions-groups

Before: sessions-groups — desktop/mobile, light/dark

After: sessions-groups — desktop/mobile, light/dark

sessions-search

Before: sessions-search — desktop/mobile, light/dark

After: sessions-search — desktop/mobile, light/dark

sessions-archived

Before: sessions-archived — desktop/mobile, light/dark

After: sessions-archived — desktop/mobile, light/dark

sessions-empty

Before: sessions-empty — desktop/mobile, light/dark

After: sessions-empty — desktop/mobile, light/dark

sessions-error

Before: sessions-error — desktop/mobile, light/dark

After: sessions-error — desktop/mobile, light/dark

sessions-loading

Before: sessions-loading — desktop/mobile, light/dark

After: sessions-loading — desktop/mobile, light/dark

@clawsweeper

clawsweeper Bot commented Oct 11, 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.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 11, 2026
@clawsweeper

clawsweeper Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: Lit displays the agent card, activity, model, and Open chat link.
  • After: Solid displays the same information and navigation.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent, approved migration with directly inspected visual parity and useful interaction regressions; CI remains incomplete, with inherited-failure evidence recorded separately.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after browser captures of both routed pages across desktop/mobile and light/dark, showing preserved visible content and controls; focused DOM identity and lifecycle regressions supplement the captures.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Sessions and Agents Home still use the previous renderer during the approved Control UI migration.
Reason: The approved port removes the old page implementations, preserves domain ownership, and explains its temporary interop and code-growth tradeoffs.

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
Reviewed head: 599d8ea2719bf48d10eb451a78ee06bfd4b8cd75

Before merge

None.

Findings

None.

Agent review details

How this fits together

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

Technical review

Best 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

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +490, Tests +284, Docs +2, Other -2. Total +774 across 40 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 23 2722 2232 +490
Tests 14 472 188 +284
Docs 1 3 1 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 2 0 2 -2
Total 40 3197 2423 +774

Root-cause cluster

Relationship: partial_overlap
Canonical: #168114
Summary: This PR delivers the Sessions and Agents Home portion of the broader renderer migration.

Members:

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • 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.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This advances a planned Control UI migration without evidence of an urgent user outage.
  • 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: sufficient: Contributor real behavior proof is sufficient.
  • 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 need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (5 earlier review cycles)
  • reviewed 2026-10-11T01:07:42.470Z sha 9da11db :: needs changes before merge. :: [P3] Track locale changes in the agent-scope adapter
  • reviewed 2026-10-11T01:43:52.711Z sha 2cb3e0c :: needs maintainer review before merge. :: none
  • reviewed 2026-10-11T02:18:51.479Z sha 40d12f2 :: needs changes before merge. :: none
  • reviewed 2026-10-11T03:05:15.851Z sha f776ca1 :: needs changes before merge. :: none
  • reviewed 2026-10-11T04:21:45.562Z sha 599d8ea :: needs maintainer review before merge. :: none

Reviewed October 11, 2026, 1:32 AM ET / 05:32 UTC (Revision 6).

@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 11, 2026
@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 11, 2026
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Oct 11, 2026
@steipete
steipete merged commit f4d601a into main Oct 11, 2026
102 of 106 checks passed
@steipete
steipete deleted the solid2/w-pg-4b branch October 11, 2026 06:10
@steipete

Copy link
Copy Markdown
Contributor Author

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

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

* refactor(ui): draft Solid sessions and agents home pages

* fix(ui): resolve Solid page lint and type-only cycle

* fix(ui): use supported Solid native input bindings

* refactor(ui): consolidate retained Lit interop in existing owners

* test(ui): correct migrated page fixture types
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 P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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