Skip to content

refactor(ui): consolidate shared presentation - #169874

Merged
steipete merged 2 commits into
mainfrom
deslop/w03-ui-solid-p3-20261012
Oct 12, 2026
Merged

steipete merged 2 commits into
mainfrom
deslop/w03-ui-solid-p3-20261012

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Solid migration left parallel presentation implementations and redundant UI bookkeeping in the shared components.

User Impact

No intentional user-visible change. Both Lit and Solid callers keep their existing features, text, controls, focus behavior and layout. No config, protocol, SDK, dependency or persisted-data shape changes.

Why This Change Was Made

Use the existing native renderer for terminal hosted actions, MCP confirmation, loading/error/copy/provider helpers, plugin appearance picking, board errors and desktop buttons. Group defaults shares the maintained folder browser. Delete retired settings variants, orphan color presentation and duplicate optional-context helpers. One CSS owner serves native and retained Lit tab strips without changing native host specificity.

Production delta: 1,070 net lines removed (+359/−1,429), excluding tests, fixtures, test support, generated files and declarations. This is the third sequential w03 campaign PR; the preceding PR is already merged.

Best-effort tradeoffs accepted

Security and normal lifecycle authority remain: MCP consent/current frame/settlement, clipboard payload retirement, terminal sessions/resources, context switching, external-input validation and draft/persistence ownership are unchanged. The standalone session-memory backend is untouched.

Evidence

Focused module and sibling proof uses isolated runtime/state directories, never operator OpenClaw state. No timeouts, retries, skips or suppressions were added.

  • Prior focused proof: group defaults/terminal hosted (11 cases, 50.47s wrapper); MCP/board/primitives/router (38, 64.48s); Lit/native copy (12, 27.72s); provider icons (19, 24.38s); optional context/identity/panels (66, 154.17s); settings/hovercard browser (8, 87.11s); affected siblings (141 across 13 files, 156.11s).
  • Added picker/tab-strip/terminal/browser/link-reader proof covers 115 cases in seven module suites; the final two adapted CSS-contract suites pass 49/49 (39.35s wrapper). Real-browser IME/form/disabled/SVG and tab focus/overflow coverage passes 8/8 (20.86s). Ten fresh dark/light picker and tab-strip comparisons are pixel-identical (37.09s wrapper).
  • Chromium inspected dark/light before/after captures cover every touched presentation. WebKit verifies terminal picker Escape/focus restoration and folder-browser keyboard navigation (18.258s).
  • Runtime and static import cycles: zero. Final UI build passes (1m33s bundler wall time). Strict same-machine performance comparison passes: startup JS 410,027→409,627 bytes gzip; chat boot −2,465 bytes, New Session boot −62 bytes; CSS unchanged. New Session requests 27→28 remain below the 35-request budget. Existing startup CSS advisory remains; no budget edits.
  • All affected UI test type graphs and production UI types pass. Complete changed-file type-aware lint, style lint and format checks pass. Fresh independent review of the complete candidate is clean, with no actionable findings. The complete-diff changed-check and suppression inventory have only the two already-fixed base failures detailed below; neither full command is claimed green.

The provider-icon assertion now compares independent expected SVG geometry, namespaces and drawing attributes rather than renderer comment serialization; decorative semantics are separately asserted. Tab CSS assertions retain their original expectations and read the canonical CSS source because unit-test CSS inline imports are stripped.

Known local baseline issues: suppression inventory at this base contains an unchanged unlisted no-control-regex suppression in src/gateway/control-ui-public-session-card-render.ts; current main already removes it in 1c7da6f0ff3. The complete-diff changed-check passed all preflight/format/ratchet/i18n checks and 23 test type graphs, then stopped at two optional-row dereferences in untouched src/config/sessions/session-entry-patch.authority.test.ts:41,56; current main already fixes those exact lines in 684874efa1c. Neither is asserted to be a current-main failure. The stopped changed-check is not claimed passing; no allowlist or unrelated source was changed.

Visual proof

Attached pairs show before left / after right; dark top / light bottom. All are inspected synthetic-only scenes. Grid, custom, disabled and nonclearable picker states and native/legacy tab strips are included alongside the affected owner and primitive views.

UI parity: before left, after right; dark top, light bottom

UI parity: before left, after right; dark top, light bottom

UI parity: before left, after right; dark top, light bottom

UI parity: before left, after right; dark top, light bottom

UI parity: before left, after right; dark top, light bottom

UI parity: before left, after right; dark top, light bottom

UI parity: before left, after right; dark top, light bottom

UI parity: before left, after right; dark top, light bottom

UI parity: before left, after right; dark top, light bottom

UI parity: before left, after right; dark top, light bottom

UI parity: before left, after right; dark top, light bottom

UI parity: before left, after right; dark top, light bottom

UI parity: before left, after right; dark top, light bottom

UI parity: before left, after right; dark top, light bottom

UI parity: before left, after right; dark top, light bottom

UI parity: before left, after right; dark top, light bottom

CI follow-up

The first head 918f447ab9d186a3e0bea179bfe696a837f1fc61 completed run 38246157332: all 58 jobs terminal. Every failed job was inspected:

  • checks-ui (1/3): the CSS-source assertion introduced a Node filesystem import into a suite also run in WebKit. Move that assertion unchanged to a Node-only file. The browser suite now passes all 19 WebKit cases.
  • checks-ui (2/3): shrink the stale combobox inventory after group defaults delegates to the shared folder browser. A separate avatar fallback test observed four fetches instead of two; focused Node and Bun runs on current main and focused branch coverage pass without changing that test. That original failure remains unexplained, not claimed fixed or inherited from a passing replay.
  • checks-ui (3/3): the copy assertions used a disconnected transcript fixture. Exercise its normal connect/update lifecycle and flush Solid before the same four assertions. All 41 focused cases across the four correction suites pass (35.55s wrapper).
  • checks-node-compact-small-1: duplicate src/config/sessions/transcript-entry-anchor.ts in the untouched PR-wrapper inventory. The exact assertion reproduces on current main 12a91e0919d (18.41s wrapper). The older scheduled main comparison reported this as new; fresh main reproduction establishes it independently. No wrapper source, inventory or import-closure input is changed here; this protected-path defect is a coordinator follow-up.
  • openclaw/ci-gate: downstream aggregate of those four failed test jobs, not an independent test failure.

The draft-era context/evidence cancellation was superseded by a successful same-head context/evidence job; no test job was cancelled. No CI reruns or green-only pushes. Corrections are test-only, freshly independently reviewed with no actionable findings; existing production build, performance and inspected pixel-identical captures remain valid. Assertions, timeouts, retries and skips are unchanged.

Landing result

Merged as d4f5517f7771476ec6d3801880954a7c9a60acd1; fetched main ancestry verified. Exact reviewed head: 0e591fe455369100f645a3ac41723c831a38c0bb. Final CI run 38248084451 completed all 58 jobs; the complete head inventory contains 88 terminal checks, none pending. All UI shards and UI E2E pass. UI CI job wall times, including setup: shard 1 438s, shard 2 308s, shard 3 361s, UI E2E 202s.

Used the coordinator-authorized inherited-main-red exception for the unrelated wrapper inventory failure and its downstream CI gate, with individual failure, cancellation and security attribution. Independent security-sensitive and dependency reviews are clear. The wrapper inventory repair remains a protected-path coordinator follow-up. No cancelled test suites, CI reruns, weakened assertions or new suppressions. Net production removal: 1,070 lines.

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

@steipete
steipete marked this pull request as ready for review October 12, 2026 11:59
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. 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 consolidates Control UI presentation in existing shared renderers while preserving controller ownership and retained Lit callers.

Example: Choose 🦉 and blue in the appearance picker.

  • Before: A separate Lit implementation renders the custom emoji, selected color, Set button, and reset control.
  • After: The shared Solid implementation renders the same controls and appearance.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The consolidation is coherent and has no actionable findings; visual comparisons are broad, but supplied proof does not establish a shipped end-to-end flow.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the ordinary contributor proof gate; inspected synthetic browser comparisons show presentation parity, while interaction results remain reported harness coverage.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Parallel presentation implementations make shared controls harder to maintain consistently during the Solid migration.
Reason: The maintainer-directed change removes substantial duplication without adding settings, dependencies, public contracts, or persisted formats.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: the maintainer-directed consolidation removes meaningful duplication without an actionable introduced defect; current-head CI is still completing.

Priority: P3
Reviewed head: 0e591fe455369100f645a3ac41723c831a38c0bb

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied comparisons and reported interaction coverage exercise synthetic component scenes rather than a shipped full Control UI flow.
Agent review details

How this fits together

Control UI controllers and stores supply state to shared presentation components; native callers and retained Lit adapters render browser controls that return actions to those controllers.

flowchart LR
A[Controllers and stores] --> B[Shared presentation]
C[Lit callers] --> D[Existing renderer adapter]
D --> B
E[Solid callers] --> B
B --> F[Browser controls]
F --> A
Loading

Technical review

Best possible solution:

Land the consolidation through normal CI while preserving the existing renderer and controller contracts.

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

This is a behavior-preserving refactor; parallel presentation paths are visible in the original blobs, and no defect reproduction is claimed.

Is this the best way to solve the issue?

Reusing the maintained renderers and interop boundary removes competing presentation paths without introducing another state owner.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Presentation primitives and retained Lit callers keeps the original intent (eca633a: Supply Solid presentation while retaining working Lit callers through the shared interop boundary.)
  • Clipboard payload retirement keeps the original intent (15ab3ed: Retire stale copy controls when text changes; the reused Solid component retains payload-keyed controls.)
  • Panel tab styles changes intended behavior with a stated reason (89564fa: Preserve panel controls, focus, and layout during migration; this PR explains removing unsupported literal theme fallbacks.)
  • Group-defaults folder browser keeps the original intent (4818138: Port session presentation without changing domain ownership or keyboard behavior; this PR delegates to the maintained folder browser.)
  • MCP confirmation keeps the original intent (668c062: Replace suppressed native dialogs with pane-owned consent while preserving current-binding checks.)
  • Progress load counter changes intended behavior with a stated reason (7170a62: Fence asynchronous card results; the later composite renderer rereads stores, and this PR explicitly accepts an extra same-session repaint.)
  • Settings presentation variants keeps the original intent (b988ce9: Support Plugins and Skills workspace presentation; active Solid consumers retain the variants while unused Lit variants are removed.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 668c062 adds ui/src/components/mcp-app-confirm.ts:76 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 668c06211e6c; files: ui/src/components/mcp-app-confirm.ts)
  • Patrick Erichsen: Raw commit 51f34f1 adds ui/src/components/settings-ui.ts:48 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 51f34f15dc93; files: ui/src/components/settings-ui.ts)

PR surface

Source -1070, Tests +57. Total -1013 across 44 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 36 359 1429 -1070
Tests 8 83 26 +57
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 44 442 1455 -1013

Review metrics

Metric Value Why it matters
Production versus test LOC Production +359/−1,429; tests and support +83/−26. The consolidation removes 1,070 net production lines while preserving and adapting existing contract coverage.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is presentation cleanup with no intended user-visible behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-12T12:08:15.429Z sha 918f447 :: needs maintainer review before merge. :: none

Reviewed October 12, 2026, 8:25 AM ET / 12:25 UTC (Revision 2).

@steipete

Copy link
Copy Markdown
Contributor Author

Exact-head inherited-failure landing evidence for 0e591fe455369100f645a3ac41723c831a38c0bb.

CI run 38248084451 has all 58 jobs terminal. The complete exact-head inventory contains 88 terminal check runs, none pending. Every remaining failure is attributed individually:

  • checks-node-compact-small-1, job 114807390861: test/scripts/eager-import-closure.test.ts:173, “resolves wrapper package exports and workspace aliases from the extracted dependency context”, receives the duplicate src/config/sessions/transcript-entry-anchor.ts entry from scripts/pr-lib/wrapper-components.txt. The exact assertion reproduces on main 12a91e0919d with isolated runtime/state directories (18.41s wrapper): node scripts/run-vitest.mjs test/scripts/eager-import-closure.test.ts -t "resolves wrapper package exports and workspace aliases" --maxWorkers=1. Freshly fetched current main 08005517c47b44608d9c9ac83f91350d390ed494 has byte-identical inventory, test and copy helper. The automatic classification is unknown, not accepted as inherited proof; the inspected scheduled comparison has unrelated failures. Independent main reproduction supplies the evidence.
  • openclaw/ci-gate, job 114810915596: downstream aggregate failure from the single compact job above. All selected UI, UI E2E, performance, type, lint, architecture and other test jobs pass. The CI-dependent commit status reflects this same failure; independent security-sensitive and dependency-review commit statuses, security-fast, and both Socket Security checks pass.

Causal separation: the tested merge is d1339d9945c441a27cf4e0b4c548b2f3bb98517a, with parents ac09d7a0f5086f768614b983fdf4f92a6dbd7112 and the exact PR head. The inventory, failing test and copy helper are unchanged between its base and tested merge. The helper returns the listed inventory after copying files; the duplicate assertion fails before executing any UI code. No changed file can affect this assertion. The wrapper inventory/import closure is protected by this lane order, so its repair is a coordinator follow-up, not included here.

Cancelled non-test jobs are fully accounted for: dispatch 114806941267 is superseded by successful same-head dispatch 114806964215; context/evidence 114806940308 is superseded by successful same-head context/evidence 114806956252. They run no test suite; no test job was cancelled. No CI reruns or green-only pushes were requested.

The earlier head's three concrete test corrections passed fresh independent review, 41 focused cases, 19 WebKit cases, affected graph types, lint/format and zero runtime/static cycles. All UI shards now pass on this exact head. The earlier avatar fetch-count observation remains documented as unexplained, not claimed repaired by a replay; its unchanged test passes here. All 16 inspected synthetic before/after image pairs remain embedded and verified. Net production removal remains 1,070 lines.

Proceeding under the coordinator's standing inherited-main-red exception with a squash pinned to the exact reviewed head above. No enforced review or independent security requirement is waived.

@steipete
steipete merged commit d4f5517 into main Oct 12, 2026
86 of 91 checks passed
@steipete
steipete deleted the deslop/w03-ui-solid-p3-20261012 branch October 12, 2026 12:31
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
* refactor(ui): consolidate shared presentation

* test(ui): align shared renderer migration proofs
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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