Skip to content

refactor: render New Session with Solid - #169692

Merged
steipete merged 32 commits into
mainfrom
solid2/w-chat-8b
Oct 13, 2026
Merged

steipete merged 32 commits into
mainfrom
solid2/w-chat-8b

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Port New Session and its launch controls from Lit to Solid while preserving /new, deep links, host tags, CSS classes, selectors, placement, agent/workspace/template choices, draft recovery, attachments, and the single startup RPC. Solid owns the page, pickers, recovery views, palette controls, and composer. The Lit page class is removed; remaining Lit callers use the registered bridge. Domain owners remain synchronous plain TypeScript, and route/composer/attachment lazy boundaries remain intact.

The coupled group-defaults dialog consumes the shared Solid PlaceBrowser. Pending-create admission is published before preview navigation, and delayed dictation stays bound to its originating draft. Shared components consume the landed prerequisite ports; stateless adapters remain only for unported callers.

Coupled repairs and current-main integration

  • The browser’s old 750 ms fallback could sign an empty-nonce connect frame before a delayed challenge. Use the existing challenge-required mode and 15-second preauth budget. The two regressions failed before repair; all 42 browser-client cases passed afterward.
  • Model-change evidence showed the correct session identity and model in sessions.patch, followed by a retryable schema-admission refusal before the write. Current main now owns the native repair: retire the refused generation and allow one fresh admission before caller entry, preserving authority, cleanup, invalid-receipt, and no-replay boundaries. This PR retains the additional malformed-receipt regression and removes duplicate recovery coverage.
  • Consume main’s quiet online and offline recovery presentation (#170352, #170477), keeping the duplicate composer status band absent. Retain main’s precise steering selectors and complete runtime-config fixture setup.
  • Carry main’s unavailable-computer guidance into both Solid selectors, including keyboard/touch explanations and selection blocking. Explicit text whitespace preserves the accessible name between the selected summary and the new Unavailable badge; the existing browser cases failed before this correction and pass afterward.
  • Fix nested Solid/Lit mount ownership at the shared adapter; retain unowned mounts, focus, local state, parking, and cleanup.
  • Preserve main’s lazy mounting of microphone menu contents; New Session consumes the same implementation through three exported renderers.
  • Adopt main’s context-request E2E adapter and Playwright-owned click handling, removing the older manual geometry path. Regenerate the boot manifest against the landed Solid shell.

Evidence

Current head: b1d8a22789199c96f3ab060fde1efd0262019a31. Same-machine build baseline: e61083f8f116b50e742a64e219c6a26342e67fcd. The latest repair keeps nested Solid content in its parent rendering transaction using the existing bridge pattern; unowned Lit mounts keep their normal top-level renderer. The original native-titlebar failure reproduces locally before the repair, and all three failed CI cases pass afterward without assertion or timeout changes.

Check Result / wall time
Retained cloud-startup recovery E2E (084a) 8/8; 265.45 s Vitest / 363.64 s wrapper
Current interop / composer / microphone / dictation tests 68/68; 72.62 s Vitest / 178.23 s wrapper
Current CI regression replays Titlebar: 199.05 s Vitest / 242.16 s wrapper; sidebar roster: 148.44 s / 199.03 s; native new-session links: 83.73 s / 117.16 s; all pass
Current UI types Pass; 202.70 s
Build, base / head Pass; 168.35 s / 70.06 s
Strict performance, base / head Pass; 3.47 s / 2.26 s; zero violations
Startup JS gzip, base / head 342,383 → 342,421 B; 8 JS / 1 CSS request
Startup CSS 49,077 B on both sides; below the 51,200 B hard ceiling
Retained native admission / reclamation 49/49; 1,309.84 s wrapper on the reviewed integration; includes malformed-receipt, authority, single-readmission, and no-replay coverage
Retained selector unit / browser proof 20/20; 25.70 s Vitest / 124.03 s wrapper after the explicit whitespace correction
Retained unavailable-computer E2E 2/2 at 1280/390 px; base 191.31 s Vitest / 272.59 s wrapper; Solid 320.19 s / 424.20 s
Retained archive E2E Selected stale-roster restore case passes; 223.30 s Vitest / 344.47 s wrapper
Visual parity All four guidance before/after frames are pixel-identical (AE=0), fully inspected, and synthetic
Independent review Earlier migration reviews retained; eight-path integration review scoped-clean through P2 (0.84); latest shared-adapter repair review scoped-clean through P2 (0.92), with full adapter, bridge, interop tests, and New Session consumer supplied
Focused checks Formatting and whitespace pass; syntax lint has no errors and retains custom-listener reactivity warnings; type-aware preparation limitation below
Current-head full CI Pass, 38342548638, 851 s run wall time; every UI unit shard, all nine UI E2E shards, both real-Gateway shards, and the CI gate pass on b1d8a2278919

Earlier unchanged-contract proof includes 201 composer/model/dictation/creation/emoji/mention tests, 18 page/attachment/sidebar tests, 63 route/placement/sibling tests, 68 integration picker/composer tests, and targeted instant-thread/attachment/capability E2Es. Two preceding complete ci:full runs passed every UI shard and both real-Gateway shards: 38322192020 and 38328106977. These are historical coverage, not current-head gate evidence.

Investigated failures and limits

CI 38339845035 exposed two New Session route-readiness timeouts and an owned-scope write during native-titlebar navigation. Nested top-level Solid rendering in the Lit welcome template could flush queued effects under the parent render owner, halting reactive updates. The shared adapter now follows the bridge’s createRoot/insert ownership pattern and disposes its owned DOM. The existing titlebar case reproduced the same error locally before repair; all three original cases pass afterward. No inherited-failure exception is claimed.

The initial real-Gateway failures were not called inherited: scheduled main passed them. Browser challenge handling and native schema admission were repaired at their owners. Local real-Gateway runs are refused by this host’s managed-Gateway guard; Testbox did not admit a later lease, and the earlier task lease is stopped. Current PR CI 38342548638 supplies passing real-Gateway proof.

Historical local wrapper/group-defaults timeouts and the Bun agent-deletion timeout cascade remain unattributed. Their later passing CI runs are not claimed as causal fixes. No timeout, ownership, or managed-Gateway guard was relaxed. The current local type-aware lint attempts stopped during unrelated plugin-SDK declaration preparation at its existing 300-second guard, before linting the selected files; focused syntax lint and UI types provide local coverage, and the full CI lint gate passed on the current head. No whole-repository local suite or local Docker was used.

Size and screenshots

Production TS/TSX changed-file union against pinned main: 12,231 → 13,217 LOC (+986), 58 files. This counts both sides of renames and excludes tests, declarations, and test support. Explicit JSX/typing, owner/view separation, and the interop needed by remaining Lit callers account for the growth. No dependency or version change was authored.

All captures are inspected and synthetic. The new pair compares unavailable-computer explanations in both selectors at desktop and phone widths. Existing migration and Incognito captures remain below.

Unavailable-computer guidance

The before/after contact sheets are attached at the end. These captures compare main 3c63da22 and reviewed Solid integration b9732086; the guide renderers and CSS are unchanged by the final main merge. They cover the environment picker and command-palette settings on desktop and phone.

Retained desktop/mobile parity

These earlier synthetic desktop/mobile pairs were inspected and pixel-identical at their captured baseline and head. The current unavailable-computer comparison covers both selectors at both widths.

Desktop before
Desktop after
Mobile before
Mobile after

Retained Incognito before/after

Incognito before
Incognito after

Before: unavailable-computer guidance in both selectors, desktop and phone

After: Solid unavailable-computer guidance in both selectors, desktop and phone

Preserve route ownership, draft recovery, and lazy loading while replacing the page, placement pickers, palette controls, and composer renderer. Keep the remaining shared composer seams until the prerequisite lands. Publish pending-create state before preview navigation so a resumed route cannot select an unadmitted session.
Preserve the route, launch controls, draft recovery, attachment flow, and single startup request while replacing the Lit page and controls. Consume the shared native composer controls and retain synchronous domain ownership. Publish pending-create admission before preview navigation and bind delayed dictation sends to their originating draft.
@clawsweeper

clawsweeper Bot commented Oct 12, 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 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: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR ports New Session, its composer, placement pickers, recovery views, and launch controls from Lit to Solid.

Example: Open /new at 390×844 with Parity workstation and Agent workspace selected.

  • Before: Lit renders the mobile composer and placement controls.
  • After: Solid renders the same visible layout and selections.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Visual parity, focused contract coverage, and green current-head CI support this useful migration with no actionable introduced defect identified.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected synthetic browser before/after captures show New Session rendering at desktop and mobile widths; retained lifecycle regressions and successful current-head CI support the migration and latest adapter repair.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Existing New Session workflows must remain usable during the Control UI renderer migration.
Reason: Maintainer authorship establishes the direction, and the implementation follows the repository’s approved Solid ownership and interop contracts.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: the maintainer-directed Solid migration remains necessary on main, no actionable introduced defect was found, and the reviewed head’s CI gate is green.

Priority: P3
Reviewed head: b1d8a22789199c96f3ab060fde1efd0262019a31

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI turns prompts, attachments, and placement choices into draft-owner operations, Gateway session requests, and startup or recovery views.

flowchart TD
A[New Session route] --> B[Solid page and controls]
B --> C[Synchronous draft owners]
C --> D[Gateway browser client]
D --> E[Session admission]
E --> F[Chat or draft recovery]
Loading

Technical review

Best possible solution:

Land the Solid cutover with the existing draft, admission, preference, and recovery owners intact.

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

This is primarily a renderer migration; source comparison and inspected browser captures establish its scope, and no target code was executed during this read-only review.

Is this the best way to solve the issue?

The cutover follows the approved Solid direction, removes replaced renderers, and preserves synchronous domain ownership and lazy boundaries.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • New Session lifecycle and state ownership keeps the original intent (88e8716: Consolidate composer ownership while preserving admission, rendering, and lifecycle behavior.)
  • Composer presentation keeps the original intent (64853b1: Provide one multiline composer with stable focus, attachments, dictation, and explicit outcomes.)
  • Worktree picker keeps the original intent (bcafd72: Preserve picker editing, keyboard access, and ownership of submitted worktree names.)
  • Environment and cloud controls keeps the original intent (b905002: Provide searchable environment selection and compact cloud configuration while retaining selection ownership.)
  • Browser handshake changes intended behavior with a stated reason (7c9b8ba: Consolidate WebSocket lifecycle while retaining browser policy; this PR explains that the retained fallback can emit invalid empty-nonce connect parameters.)
  • Nested Solid and Lit mounts changes intended behavior with a stated reason (7c06f39: Preserve retained routes and temporary interop during the Solid shell migration; this PR changes nested mount mechanics to avoid flushing effects under the parent render owner.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Migration remains necessary: Fetched main retains the Lit New Session page; the introduced comparison replaces it with a Solid page and a synchronous page owner. (ui/src/pages/new-session/new-session-page.ts:1, 799b7a347c50)
  • Latest adapter repair: Owned nested mounts use createRoot and insert, matching the existing Solid bridge pattern; unowned mounts retain the top-level renderer and explicit disposal clears owned DOM. (ui/src/lit/solid-content.tsx:231, b1d8a2278919)
  • Visual proof inspected: Inspected downloaded desktop and mobile before/after captures at 1440×960 and 390×844; they show preserved New Session layout, composer, and placement selections. (b1d8a2278919)
  • Current-head CI: The reviewed head’s check runs have no failing or pending result, both real-Gateway shards succeeded, and openclaw/ci-gate reports that CI and applicable security review requirements passed. (b1d8a2278919)
  • Admission ordering retained: Pending-create ownership is published before preview navigation, while the existing handoff retains connection and recovery-scope checks. (ui/src/pages/new-session/instant-thread-handoff.ts:108, b1d8a2278919)
  • Handshake contract: The browser selects the existing challenge-required mode; the canonical connect schema requires a nonempty nonce, and the shared client checks the current connection before sending prepared parameters. (ui/src/api/gateway.ts:261, b1d8a2278919)

Likely related people:

  • Peter Steinberger: Raw commit 81901bf adds ui/src/pages/new-session/checkout-chip.ts:107 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 81901bfd217e; files: ui/src/pages/new-session/checkout-chip.ts)

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production versus test LOC Production +986; tests and test support +396 The introduced comparison supports the documented growth for explicit JSX, owner/view separation, and temporary interop while retaining behavioral coverage.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is an approved renderer migration with preserved workflows and no identified urgent user regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster 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 execution lanes are retired.

History

Review history (28 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-12T22:08:05.010Z sha 8aab66d :: needs changes before merge. :: none
  • reviewed 2026-10-12T22:39:09.613Z sha 7f5fa59 :: needs changes before merge. :: none
  • reviewed 2026-10-12T23:20:31.004Z sha 38b4e7f :: needs changes before merge. :: none
  • reviewed 2026-10-12T23:51:43.741Z sha 7535726 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-13T00:47:17.750Z sha 3d015bb :: needs maintainer review before merge. :: none
  • reviewed 2026-10-13T01:10:19.888Z sha 3d015bb :: needs changes before merge. :: none
  • reviewed 2026-10-13T02:43:10.726Z sha 084a09d :: needs changes before merge. :: none
  • reviewed 2026-10-13T03:12:11.727Z sha b771248 :: needs maintainer review before merge. :: none

Reviewed October 12, 2026, 11:54 PM ET / October 13, 2026, 03:54 UTC (Revision 29).

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Oct 12, 2026
@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 12, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 12, 2026
@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 12, 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 12, 2026
@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 12, 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 13, 2026
@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 13, 2026
@steipete
steipete merged commit 74c7b3d into main Oct 13, 2026
147 checks passed
@steipete
steipete deleted the solid2/w-chat-8b branch October 13, 2026 04:27
@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 14, 2026
* refactor(ui): port new session rendering to Solid

Preserve route ownership, draft recovery, and lazy loading while replacing the page, placement pickers, palette controls, and composer renderer. Keep the remaining shared composer seams until the prerequisite lands. Publish pending-create state before preview navigation so a resumed route cannot select an unadmitted session.

* fix: keep New Session view adapters out of state owners

* test: migrate the Skills reader dialog fixture

* test: dispose New Session browser fixtures explicitly

* fix(ui): preserve New Session tooltip and live status DOM

* fix(ui): reuse the Solid folder browser in group defaults

* fix(ui): await Gateway challenge before signing browser connect

* test(state): verify reclamation reuses readmitted schema proof

Expect one successful opening after transient schema invalidation while request authority stays current. Preserve later-invalidation scans and assert fresh transferable proof without an extra reclamation scan.

* test(ui): align lifecycle activation with clipped viewports

Keep lifecycle activation atomic after Playwright actionability and retain all manual visibility and enabled guards. Extend the exact-once fixture with a partially visible control. Report responsive bounds and sanitized background-work stages without changing assertions or timeouts.

* fix(ui): avoid nested Solid render flushes
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. docs Improvements or additions to documentation P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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