Repository navigation
refactor(ui): consolidate shared presentation - #169874
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 consolidates Control UI presentation in existing shared renderers while preserving controller ownership and retained Lit callers. Example: Choose 🦉 and blue in the appearance picker.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherControl 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
Technical reviewBest 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
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -1070, Tests +57. Total -1013 across 44 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes: No label 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 (1 earlier review cycle)
Reviewed October 12, 2026, 8:25 AM ET / 12:25 UTC (Revision 2). |
|
Exact-head inherited-failure landing evidence for 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:
Causal separation: the tested merge is 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. |
* refactor(ui): consolidate shared presentation * test(ui): align shared renderer migration proofs
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.
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-regexsuppression insrc/gateway/control-ui-public-session-card-render.ts; current main already removes it in1c7da6f0ff3. 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 untouchedsrc/config/sessions/session-entry-patch.authority.test.ts:41,56; current main already fixes those exact lines in684874efa1c. 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.
CI follow-up
The first head
918f447ab9d186a3e0bea179bfe696a837f1fc61completed run 38246157332: all 58 jobs terminal. Every failed job was inspected:src/config/sessions/transcript-entry-anchor.tsin the untouched PR-wrapper inventory. The exact assertion reproduces on current main12a91e0919d(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.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.