Skip to content

refactor(ui): consolidate presentation and preference recovery - #169367

Merged
steipete merged 4 commits into
mainfrom
deslop/w03-ui-solid-20261011
Oct 12, 2026
Merged

steipete merged 4 commits into
mainfrom
deslop/w03-ui-solid-20261011

Conversation

@steipete

@steipete steipete commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Remove parallel presentation implementations left by the Solid migration while keeping both render paths working. Lit icons now use the existing renderer-neutral geometry catalog; Solid's renderer and catalog are unchanged. The live usage page calls the canonical Solid provider renderer, and model/decision pickers share their option construction without sharing DOM ownership.

User Impact

The presentation is unchanged. Repeated preference-write contention now exposes an error and retains intent for an ordinary next edit/reconnect instead of scheduling five more rounds. CAS, durable pending edits, normal retry, and authorization remain. No configuration, protocol, schema, dependency, or persisted-data changes. Link-reader context checks remain unchanged after review.

Why This Change Was Made

The migration had duplicated icon geometry, provider usage rendering, and picker option construction. Keep one owner for each while allowing remaining Lit consumers to work. Preference recovery should handle ordinary conflicts without a timer chain for continuous contention.

Best-effort tradeoffs accepted

  • Sidebar ACK reconciliation fences: retain the scoped fresh read required when reconnect hydration publishes pre-write pins during replay; remove its extra config-object and pre-read confirmation-identity fencing from #168325, which carried synthetic ordering proof rather than a human config-change incident. The existing writer/profile authority checks remain; an overlapping same-profile config/read change converges through the normal refresh owner.
  • Five-round conflict timer: #114286 cites agent Testbox/two-tab reproductions, not a human incident. Keep the normal single retry; continued contention records an error and retains the outbox for the next edit/reconnect (and existing appearance Retry controls).

Evidence

  • Net production reduction: 1,103 lines (229 added, 1,332 removed; tests/support/generated excluded).
  • Inspected synthetic pixel-identical before/after: built-in icon catalog in Lit/Solid, provider quotas/billing/cost/empty/error, six model/decision-picker states, and a plugin link-reader document through the real toggle/read flow.
  • All 170 rebased-main Lit icons were rendered against the final registry and compared directly: identical SVG geometry, attributes, and namespaces (whitespace/attribute order ignored), including main's new saved-version history glyph.
  • Rebased icon import closure with identical bundle settings: Lit minified bytes 34,977 → 33,885; gzip 10,596 → 10,099. Solid's renderer is unchanged. No new lint suppressions.
  • Runtime cycles: zero; Madge cycles: zero.
  • Final icon/keyboard tests: 24 passed across three files; 10.16s wrapper wall (6.09s Vitest).
  • node scripts/run-vitest.mjs ui/src/components/solid/model-picker.test.tsx ui/src/components/provider-usage.test.ts --maxWorkers=1: seven passed; 33.00s wall (15.09s Vitest). This includes dynamic decision-catalog replacement and the migrated provider-currency/edge coverage.
  • Changed navigation boundary: 35 passed; 30.21s wrapper wall (11.96s Vitest). Remaining server-preference, background-CAS, and reactive-picker proof passed in their focused rerun.
  • Changed shell preferences: 11 passed; usage chart browser: one passed. The browser initially could not find Chromium under isolated HOME; setting the existing browser-cache path fixed the test environment, without changing isolation of OpenClaw state.
  • Lint-suppressions: three passed. All 28 core test-type graphs and UI production types passed (five core graphs serial, the same remaining 23 through the supported four-way runner). The canonical changed-check plan's guard/i18n/type gates and changed-file style checks passed.
  • Local dead-export gate is incomplete: Knip's production and full-tree scans hit their fixed 605-second timeout; its script scan passed with zero entries. No timeout, skip, or baseline change was made. Hosted exact-head CI remains required.
  • The all-core lint wrapper reached its fixed 900-second timeout. Its supported direct, type-aware lint route passed for all 21 present changed files with the same core TypeScript configuration; no timeout or suppression was changed.
  • Final committed-head review: scoped clean, no actionable P0–P2 findings.
  • The final unused test-fixture cleanup also received a clean independent review; the affected preference suite passed 30 tests and the pre-push suppression suite passed three.
  • Conflict-only rebase onto 939f740219d: retained main's history icon via the canonical catalog and preserved its Settings draft receipt integration. Rebased proof: 177 focused tests, 11 shell preference tests, three suppression checks; UI types, zero runtime/Madge cycles, and targeted type-aware lint all passed.
  • Review follow-up retained the original link-reader context guards; all 126 owner tests and the suppression check passed, as did targeted lint and independent corrective review.
  • First hosted CI attempt 38178057007 failed its UI builds because the then-current main deleted live domain-board.ts / domain-keyed.ts adapters. The performance baseline and five UI E2E shards reported the same missing imports; other jobs were cancelled. Main fixed that separate regression in da8802bc54e. No jobs were manually rerun.
  • Hosted attempt 38180278587 passed performance and lint but exposed a real reconnect/unpin regression from removing the reconciliation read entirely. The unchanged E2E failed locally for the same reason, then passed after retaining the minimal scoped read. Final corrective proof: all three pin/unpin E2Es, 35 navigation tests, all 12 original cross-realm preference tests, and three suppression checks passed; targeted lint, UI types, and independent review passed. No E2E assertions, retries, or timeouts were changed.
  • Exact-head attempt 38182380028 has 41 successful check runs, 44 skipped, two failed UI-unit shards, two cancelled siblings, and the downstream aggregate failure. Media-handoff disconnect and geometry-remount assertions also fail on current main 3210da0bbf5; none of their owners/tests is changed here. Head-only proof passes all 57 tests. Current main's retained-root lifecycle needs completed disposal before remount in those fixtures. That newer implementation was not in CI's merge e67dc1f441689cacaa6a3c95c458d95361c15130, so the exact cause of the earlier CI manifestation remains uncertain; no cache cause is claimed.
  • The cancelled E2E shard also contains stale theme config.get count failures, independently reproduced on main. Main 9310023551c intentionally removed those redundant reads; the separate repair b17443fb0fb now waits for the canonical preference-write receipt while retaining color, contrast, selection, payload and no-extra-read assertions. This lane does not duplicate that repair.
  • The cancelled core-test-types stripe completed five of its six graphs successfully in hosted logs; the missing core-test-ui-components graph passed locally in 132.4s. Cancelled jobs are not reported as green.
  • Main repair eed222fec68 fixes the two transcript fixtures by awaiting real detached disposal; all 57 cases and independent review pass. No runtime behavior changes. The cancelled E2E log contains 24 completed passing files; the remaining theme coverage passed 26/27 locally, with an initial-request renderer timeout in the final Miami-light case. That case passed in isolation on current main with b17443fb0fb; the earlier timeout remains recorded, not claimed fixed. An additional path-dependent local E2E slice passed 119 tests in 25 files.
  • Current-main-only local limits: the suppression inventory reports the unrelated json-predicate-fields.ts control-regex entry from perf(state): promote hot session JSON predicates to columns #169315, and its type wrapper refuses a borrowed dependency installation. The exact-head lane suppression check and missing type graph both pass. These limits are not represented as green main-wide proof.

Before/after images: #169367 (comment)

Review disposition: the reviewer questioned reactive spread forwarding. The installed Solid compiler emits createComponent(ModelPicker, mergeProps(params)), passing the memo accessor, not a snapshot; the retained component test now also exercises dynamic catalog, selected value, and disabled-state replacement. No production change was needed for that finding.

The initial partial-name test selection expanded into a full UI run and was deliberately stopped for the final icon revision; it is not counted as a pass. A later exact-file selection exposed a background-CAS timing failure that passed in the focused rerun; no fix is claimed for that unresolved flake.

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

@steipete

Copy link
Copy Markdown
Contributor Author

Inspected synthetic before/after evidence. Every paired view is pixel-identical: built-in icon catalog, provider usage, model/decision pickers, and the link-reader document.

The full 169-icon Lit registry was also compared against the initial commit for exact SVG attributes, geometry, and namespaces.

Before: built-in icon catalog

After: identical built-in icon catalog

Before: provider usage

After: identical provider usage

Before: model and decision pickers

After: identical model and decision pickers

Before: link reader

After: identical link reader

@clawsweeper

clawsweeper Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR shares Control UI icon and picker data, removes the duplicate usage renderer, and simplifies preference-conflict recovery.

Example: Saving sidebar shortcuts ["route:usage", "route:plugins"] encounters two consecutive CAS conflicts.

  • Before: The outbox schedules up to five additional delayed retry rounds.
  • After: The outbox records an error, retains the pending shortcuts, and resumes on another edit, explicit retry, or reconnect.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful consolidation with inspected browser parity and meaningful boundary coverage; no introduced correctness finding, while synthetic scenarios provide narrower evidence than a complete shipped-app run.
Proof confidence 🐚 platinum hermit (4/6) The host identifies this as maintainer-authored, outside the ordinary contributor-proof gate; inspected browser screenshots cover presentation parity, and the PR records focused reconnect/unpin evidence without claiming cancelled CI jobs passed.
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 increase drift risk, while repeated preference contention previously kept edits pending through additional timer rounds.
Reason: The established area owner authored this consolidation and explicitly accepted the recovery tradeoffs; existing configuration, persistence formats, and authorization contracts remain intact.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it removes duplicate presentation owners and implements an explicitly accepted preference-recovery tradeoff; no actionable introduced defect was found.

Priority: P3
Reviewed head: 8be8df3fa2f0c87da1b70e68c3cd69fd357f3c4b

Before merge

None.

Findings

None.

Agent review details

How this fits together

Control UI presentation consumes icon catalogs, model options, and provider snapshots, while the preference outbox sends scoped edits through existing Gateway mutation owners.

flowchart TD
  A[Presentation catalogs] --> B[Lit adapters]
  A --> C[Solid components]
  D[Provider snapshots] --> C
  E[Preference edits] --> F[Preference outbox]
  F --> G[Gateway mutation owners]
  G --> F
Loading

Technical review

Best possible solution:

Retain the shared presentation owners and the accepted recovery behavior, with pending intent and scoped reconciliation preserved.

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

This is a refactor rather than an unresolved bug report; source inspection establishes the duplicate owners and changed conflict handling, without executing target code.

Is this the best way to solve the issue?

The change uses existing presentation catalogs and rendering owners, preserves renderer-specific DOM ownership, and keeps the reconciliation read needed for reconnect/unpin recovery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 8127bab adds ui/src/components/solid/provider-usage.tsx:2 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 8127bab9d876; files: ui/src/components/solid/provider-usage.tsx)
  • Vincent Koc: Raw commit 9eee618 adds ui/src/app/server-prefs.ts:337 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 9eee6181d7b9; files: ui/src/app/server-prefs.ts)
  • RoboClaw: Raw commit fd01817 adds ui/src/app/server-prefs-drain.ts:99 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: fd018170c943; files: ui/src/app/server-prefs-drain.ts)

PR surface

Source -1103, Tests -22. Total -1125 across 20 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 16 229 1332 -1103
Tests 4 78 100 -22
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 20 307 1432 -1125

Review metrics

Metric Value Why it matters
Production versus test LOC Production +229/-1,332; tests +78/-100. Production shrinks by 1,103 lines through shared owners; test changes retain currency, reactive-picker, and conflict-recovery contracts.

Labels

Label changes:

  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is maintainer-directed consolidation with an accepted, recoverable preference-contention change and no demonstrated urgent user regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 (4 earlier review cycles)
  • reviewed 2026-10-11T21:14:39.552Z sha 42c7e73 :: needs changes before merge. :: none
  • reviewed 2026-10-11T21:57:57.951Z sha c9bf5e8 :: needs changes before merge. :: none
  • reviewed 2026-10-11T22:33:39.542Z sha 8733889 :: needs changes before merge. :: [P2] Align the reconnect E2E assertion with the accepted ACK contract
  • reviewed 2026-10-11T23:14:09.317Z sha 8be8df3 :: needs changes before merge. :: none

Reviewed October 11, 2026, 7:52 PM ET / 23:52 UTC (Revision 5).

@steipete
steipete force-pushed the deslop/w03-ui-solid-20261011 branch from 42c7e73 to c9bf5e8 Compare October 11, 2026 21:46
@steipete
steipete marked this pull request as ready for review October 11, 2026 21:51
@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: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 11, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 11, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 11, 2026
steipete added a commit that referenced this pull request Oct 12, 2026
The retained Solid content boundary now preserves same-turn parking. Exercise
an actual detached disposal before remounting in the media and geometry tests,
instead of expecting a parked root to have already been destroyed.

Keep all image-abort, no-resurrection, geometry and retired-observer assertions.
Both original failures reproduce on main; all 57 transcript cases pass with
this fixture repair. Independent review has no actionable P0-P2 findings.

Observed during #169367 CI attribution. No production behavior changes.
@steipete

Copy link
Copy Markdown
Contributor Author

Exact-head CI attribution for 8be8df3fa2f0c87da1b70e68c3cd69fd357f3c4b, run 38182380028 (attempt 1), before inherited-failure landing:

  • checks-ui (1/3) (job 114597697242): chat-transcript-media-handoff.test.ts disconnect case, expected the old request aborted. The identical assertion fails independently on main 3210da0bbf5; head-only proof passes all 48 media cases. The PR does not change this test or its lifecycle owner. Main's newer retained-root semantics require a completed physical disconnection, not same-turn parking. The earlier CI merge had the older owner, so that observation does not completely explain the earlier CI manifestation; no cache cause is claimed.
  • checks-ui (2/3) (job 114597697258): chat-transcript-geometry.test.ts expected a replacement DOM node after same-turn disconnect/reconnect. The identical assertion fails independently on main 3210da0bbf5; head-only proof passes all nine geometry cases. Neither test nor lifecycle owner is changed here. The completed-disposal fixture repair retains all geometry, retired-observer and image-safety assertions; its 57 tests pass.
  • checks-ui-e2e (3/6) (job 114597697240), cancelled: its log nevertheless contains failing theme-muted-contrast cases expecting an extra config.get. Main 9310023551c deliberately removed that read; the same expected-2/actual-1 failure reproduces on main. Separate main repair b17443fb0fb adopts the canonical write receipt and retains all theme/contrast/picker assertions. Remaining local coverage is recorded below; cancellation itself is not a pass.
  • check-test-types-core-2 (job 114597868293), cancelled: hosted logs prove five graphs completed successfully (agents-other, infra, messaging, ui-other, gateway-methods). The missing ui-components graph passes locally at the exact PR head (132.4 seconds).
  • openclaw/ci-gate (job 114598876366): downstream aggregate of these failed/cancelled jobs, not an independent product failure.

Main repair eed222fec68 now makes the two transcript fixtures await actual detached disposal, with all 57 cases and independent review passing. No production behavior changed. The separate theme repair remains b17443fb0fb.

Cancelled-E2E coverage: the hosted log records all 24 other files passing. A local replay of the numeric slice selected a different path-dependent set and passed 119 tests in 25 files; this is additional coverage, not a claim of exact hosted partition identity. The complete local theme matrix passed 26/27; its last miami-light case timed out before the first config.patch, with renderer diagnostics unavailable. That unchanged case passed on current main with the landed theme repair. The transient renderer timeout remains an investigated local failure, not a claimed fixed defect. Together with the hosted 24-file passes and explicit theme proof, no cancelled suite is silently counted as green.

The complete exact-head census contains 41 successes, 44 skips, three failures including the aggregate, and two cancellations. No hosted jobs were rerun and no source push was made merely to obtain green. Pixel parity, focused changed-owner tests, types, cycles and independent review are recorded in the PR body. This uses the campaign's explicitly authorized inherited-failure exception; it does not label the failed CI run green.

Additional current-main limitation: its suppression inventory reports the existing src/state/json-predicate-fields.ts|no-control-regex entry added by #169315. This lane adds no suppressions; the exact-head pre-land suppression check passes. A main-baseline test-types attempt refused the borrowed dependency installation; the exact-head missing graph was successfully checked in the lane's supported installation. Neither unrelated limitation is represented as passing.

@steipete
steipete merged commit 7fe5bf1 into main Oct 12, 2026
110 of 116 checks passed
@steipete
steipete deleted the deslop/w03-ui-solid-20261011 branch October 12, 2026 00:28
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 12, 2026
The retained Solid content boundary now preserves same-turn parking. Exercise
an actual detached disposal before remounting in the media and geometry tests,
instead of expecting a parked root to have already been destroyed.

Keep all image-abort, no-resurrection, geometry and retired-observer assertions.
Both original failures reproduce on main; all 57 transcript cases pass with
this fixture repair. Independent review has no actionable P0-P2 findings.

Observed during openclaw#169367 CI attribution. No production behavior changes.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 12, 2026
…law#169367)

* refactor(ui): consolidate migration presentation and preference recovery

* test(ui): remove obsolete conflict fixture

* fix(ui): retain link reader context checks

* fix(ui): preserve personal unpin replay reconciliation
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: 🐚 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