Skip to content

refactor(ui): deslop shared components and libraries - #156740

Merged
steipete merged 3 commits into
mainfrom
deslop/l21-ui-components-20260923
Sep 24, 2026
Merged

steipete merged 3 commits into
mainfrom
deslop/l21-ui-components-20260923

Conversation

@steipete

@steipete steipete commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Shared Control UI components and libraries repeat forwarding layers, state-owner projections, mutation settlement, and rendering decisions. Each copy increases the chance that one path misses an ownership guard or drifts from the same UI behavior elsewhere.

User Impact

No intended behavior or appearance change. CSS, visible copy, translation keys, config/protocol/storage schemas, CLI contracts, and plugin SDK exports are unchanged.

Why This Change Was Made

This maintainer-requested subsystem sweep removes duplication around existing owners:

  • Sidebar/session code calls its existing organizer, catalog, and row-observation owners directly. Shared mutation admission/settlement preserves stale-result, confirmation, and recovery checks.
  • Browser annotation settlement shares the existing handler, while child type contracts retain their acyclic dependency boundary. Terminal chrome calls the existing action/tab renderers directly; Board grant notices and settlement share one implementation.
  • Config forms share enum/union normalization and scalar controls. Menus, hovercards, progress cards, usage breakdowns, palette items, lightbox inputs, and Markdown disclosure tokens share their repeated rendering or normalization decisions.
  • Device pairing and skill changes reuse existing mutation/snapshot owners. Chat helpers remove repeated argument classification, forwarding, and text/diff normalization.

The sweep read all 247 production files over 200 lines in its inventory of the two owned subtrees and recorded a per-file outcome. It preserves larger owners where their receipts, request identity, persistence, or rendering contracts differ.

Production reduction at the final head: 1,085 net lines.

95 files changed, 1155 insertions(+), 2240 deletions(-)

Measured with git diff --shortstat $(git merge-base origin/main HEAD) -- . ':(exclude)**/*.test.*' ':(exclude)**/test/**' ':(exclude)docs/**'.

Evidence

The full sweep proof ran on base 2cb62af8ba92992a21c850e2f28a740b8c99d983. After the type-contract rollback, architecture, scoped changed-file checks, browser tests, E2E, and build were rerun on base 5e20a15ffe76ef51a2426f9cd85b52e11fe70d0b. The final rebase preserves the commit patches, with hosted CI bound to the final head.

  • Final head: 056f08fb2cdbaf2e92834d28c17a09339e42ea31.
  • node scripts/check-changed.mjs: passed with exit 0: all 25 core test type graphs, production UI types, formatting, i18n, ratchets, three zero-entry dead-export scans, core/script lint, and UI style lint.
  • node scripts/run-vitest.mjs over the focused and resolved reverse-import selections: passed 1,178 files and 20,874 cases, with one existing skip, across eight routed shards in 595.95s; includes 82 Chromium files and 1,017 browser cases.
  • node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner over 21 selected mocked-Gateway flows: passed all 21 files / 116 unique cases across the initial run and the three-file environment-repaired replay (19/19 replay cases). The separate plugin-skill bundle browser flow also passed 6/6 tests.
  • Correction proof: pnpm check:architecture passed (zero runtime and Madge cycles); node scripts/check-changed.mjs -- ui/src/components/browser/browser-panel-{controller-input,download,native-controller,native-presentation,snapshot-controller,stream,viewport-controller}.ts passed, including all 25 type graphs; browser/direct-caller tests passed 29 files / 362 cases, and six browser E2E files passed 45 cases.
  • pnpm build: passed again after the correction in 6m23.4s, including the production UI bundle and all 158 SDK export checks.
  • Independent Codex autoreview through P2: the full 13-pass review and the subsequent seven-file cycle rollback review are scoped-clean, exit 0, with no P0–P2 findings.
  • Exact-head CI: green in run 35946033669, a completed successful pull_request run for 056f08fb2cdbaf2e92834d28c17a09339e42ea31. Architecture, both formerly failing tooling shards, all 3 UI jobs, all 9 UI E2E jobs, build artifacts, and openclaw/ci-gate passed. The native exact-head watcher exited 0 (GREEN).
  • Config schema/tier comparison: 15,000 deep-equal cases, including explicit verification of the review's mixed-literal union example. Scalar coercion comparison: 27,720 equal outputs, including the review’s exact mixed string/number example. Markdown disclosure comparison: 268 inputs with identical HTML and tokens. Previous mascot comparison retained 24,300 identical seeded poses and 1,620 identical canvas traces.

ClawSweeper’s review of the final head reports no actionable findings and confirms the prior browser cycle is removed. Its remaining compatibility checklist comes from unknown-truncated-pull-files metadata. Compatibility review used the complete 100-file Git diff: only the two UI subtrees and the assertion-count shrink ratchet changed; config, protocol, and stored-data shapes are preserved, with schema/scalar parity proof above. No migration is needed.

The changed-file translation-call inventory is identical to base: 455 literal keys and 14 existing dynamic expressions; the conditional key choices retain the original literal sets.

Changed-test single-worker costs (pnpm test <file> --maxWorkers=1): exec-approval-card 12.79s wall; app-sidebar-catalog-menu 14.78s; dock-panel-layout 39.32s on the loaded local host. Earlier unchanged browser test edits measured 17.97s and 12.97s. Hosted UI job costs on the final head, including setup: shard 1/3 369s; 2/3 375s; 3/3 333s. All nine UI E2E jobs passed (276–521s each).

The remote runs used Blacksmith Testbox with native source-tree and explicit file-hash verification:

Run Command result
tbx_01m38961msge93nkf7df7p0gd2 1,178 test files passed; E2E stopped at the missing ffmpeg prerequisite described below.
tbx_01m38bm3h8fmhdnxmsncr08avj Corrected command/caller tests, recording E2E replay, and full build passed; wrapper exit 0. Lease stopped normally.
tbx_01m38gc00qffd8tqtv8ky4n4wt Final type-contract rollback: architecture, scoped changed checks, browser tests, six E2E files, and build passed; wrapper exit 0. Lease stopped normally.

The wrapper exit and timing result own Testbox proof; normal one-shot cleanup may cancel its backing Actions step.

Investigated failures and rejected sub-changes

The first expanded exact-head CI run, on 7ede99bd7ec, found one introduced architecture failure: deriving browser child contracts from BrowserPanelController created a type-import cycle. The runtime cycle check stayed at zero, but Madge correctly rejected the dependency graph. Matched local proof found one cycle on the candidate and zero on clean base 5e20a15ffe76; restoring the original child-host contracts returned the candidate to zero. All seven modules emit identical JavaScript after whitespace normalization. The responsible simplification was reverted; no cycle rule or ignore was changed. Two independent tooling failures in that run were repaired by main-owned fixes 10145049f81 (wrapper closure inventory) and a018e414bb9 (Codex database-worker test routing); both are included by the final rebase. Matched Node 26.5/macOS whole-file runs on candidate and clean base each finished with 6 failures and 382 passes: both reproduced the exact unresolved plugin-loader import, plus the same five project-config fixture failures (timeouts and subsequent selection assertions). A single clean-base focused ownership probe reached the original CI assertion and reproduced the exact two missing Codex paths; the corresponding candidate-local probe hit the unchanged 120s deadline. These limitations are retained; no timeout was raised and no passing replay is presented as a fix.

A proposed outbox codec regrouping broke the existing canonical JSON read-back guard by moving sessionKey ahead of sendAttempts. The candidate reproduced 11 failures across four existing test files; a clean merge-base worktree passed all 420 cases. The entire codec simplification was reverted. The corrected candidate passed those 420 cases plus all 10 dock-layout tests, with no changed assertion or guard. There is no remaining codec diff.

The subsequent static run passed all type graphs and three dead-export scans, then rejected object spreads inside the command-argument map. That projection sub-change was restored verbatim to base; the command wrapper/comparator simplifications remain. The eight command/caller files passed all 1,062 cases in 12.22s, and the final static gate was rerun.

The first static run found an orphaned DockPanelSide export after its final production forwarding caller was removed. The alias was removed, and the existing test now derives the identical type from DockPanelPlacement.

The expanded E2E run passed 109/116 cases; seven recording cases in three files stopped before page creation because the Testbox lacked Playwright’s ffmpeg binary. The recovery run installed that test-environment binary and passed the three entire files plus the previously unrun build. No source or assertion was changed for this environment repair.

The first remote test preflight incorrectly compared the synthetic source-carrier commit with the ordinary local HEAD. It stopped before running tests. The corrected preflight uses the native verified source capsule/base, physical checkout, and explicit file-byte checks; no source verification was skipped.

Initial review reports about config unions and channel single-select steps omitted unchanged early returns; complete-function evidence resolved them. Two browser reports concerned code identical to the base apart from a forwarding-method rename. A later scalar fallback report was also contradicted by the complete base function: both versions prefer a valid numeric candidate before falling back to the string; the 27,720-case comparison confirms equivalent outputs. An intermediate review’s lightbox report was rejected against the complete owner: unchanged destroyPanzoom() already resets imageReady, so the removed second assignment is redundant; resetZoom() is unchanged. The fresh final review completed all 13 passes with no findings.

The prior server CI failures were independently attributed. The public-share fixture repair is db8095d7ce4; the Workshop clock repair is 764c9331a31b, which superseded #156776. Both are included by the final rebase. The previous supplemental real-Gateway agent-file scenario exceeded its unchanged startup deadline on both candidate and clean base, before any UI mutation; no successful real-Gateway proof or screenshots are claimed. The changed UI paths are covered by the mocked-Gateway/browser checks above.

The build retains the documented unchanged Mermaid vendor-asset warning: 1,555.8 KiB gzip versus the 960 KiB advisory budget. Earlier base/candidate builds emitted the identical content-addressed asset and showed zero CSS-size change; no budget was relaxed.

No SDK export or extension boundary changed, so the conditional SDK/extension suites do not apply. No test budget, timeout, snapshot, ignore, or assertion was weakened. The existing assertion-count baseline decreases only from 3 to 2 for the removed redundant cast.

@clawsweeper

clawsweeper Bot commented Sep 23, 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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 23, 2026, 10:36 PM ET / September 24, 2026, 02:36 UTC (Revision 9).

ClawSweeper review

What this changes

The branch simplifies shared Control UI components and libraries for sessions, settings, browser and Board views, terminal controls, and chat display while reducing the assertion baseline.

Merge readiness

⛔ Blocked before merge - 2 items remain

This remains useful work that current main has not absorbed. The earlier browser import-cycle finding is resolved, and the reviewed owner paths show no discrete introduced defect. The prior compatibility concern came from truncated file metadata; the complete changed-file inventory does not show a config, protocol, or stored-data contract change.

Priority: P3
Reviewed head: 056f08fb2cdbaf2e92834d28c17a09339e42ea31

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The refactor is broad but coherent, with focused browser-flow validation, successful exact-head CI, and no verified remaining defect.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The external-contributor real-setup gate does not apply to this member-authored PR. The body reports mocked-Gateway browser flows and exact-head CI for the changed Control UI paths, while explicitly noting that a supplemental real-Gateway scenario did not complete; no stored-data format or schema change appears in the introduced diff.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor real-setup gate does not apply to this member-authored PR. The body reports mocked-Gateway browser flows and exact-head CI for the changed Control UI paths, while explicitly noting that a supplemental real-Gateway scenario did not complete; no stored-data format or schema change appears in the introduced diff.
Evidence reviewed 8 items Introduced scope: The pinned merge-base-to-head inventory contains 100 changed paths, all under the two Control UI source subtrees except the assertion-count baseline; it shows no config schema, protocol, SDK, dependency, or workflow file change.
Current main still differs: Current main retains the older config-form union helper, while the PR head consolidates that normalization. The shared-component work remains distinct from current main.
Session mutation ownership: The consolidated group mutation path captures its connection and rejects a stale result before applying it.
Findings None None.
Security None None.

How this fits together

The Control UI turns Gateway state into web views for sessions, settings, browser activity, and other tools. User actions pass through UI controllers and stores to Gateway requests, whose results update those views.

flowchart LR
  A[Gateway state] --> B[Control UI stores]
  B --> C[Shared session and settings logic]
  B --> D[Browser and Board controllers]
  C --> E[Rendered web views]
  D --> E
  F[User actions] --> C
  F --> D
  C --> G[Gateway requests]
  D --> G
Loading

Before merge

  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

None.

Stored data model

Persistent data-model change detected: unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep each Control UI workflow on its existing state owner, preserving scoped async-result checks and the current Gateway contract.

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

Not applicable: this refactor does not report a user-facing failure to reproduce; its stated goal is equivalent behavior with fewer duplicated UI paths.

Is this the best way to solve the issue?

Yes, based on the reviewed paths: the branch reuses existing UI owners while retaining the sampled connection, mutation-access, and stale-result checks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 8c870f669e35.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is an internal Control UI cleanup with no intended user-visible behavior change.
  • 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. Not applicable: The external-contributor real-setup gate does not apply to this member-authored PR. The body reports mocked-Gateway browser flows and exact-head CI for the changed Control UI paths, while explicitly noting that a supplemental real-Gateway scenario did not complete; no stored-data format or schema change appears in the introduced diff.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RoboClaw: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Dallin Romney: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (8 earlier review cycles)
  • reviewed 2026-09-23T20:14:24.998Z sha 00dee31b40adff2a5fd29ff4b57b873f858f70dd :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-23T20:26:09.052Z sha 00dee31b40adff2a5fd29ff4b57b873f858f70dd :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-23T21:12:21.242Z sha c782fa1 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-23T21:24:06.070Z sha c782fa1 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-23T21:50:16.037Z sha c782fa1 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-24T01:09:38.332Z sha 7ede99b :: blocked before merge. :: none
  • reviewed 2026-09-24T01:28:54.610Z sha 7ede99b :: blocked before merge. :: [P2] Break the browser controller import cycle
  • reviewed 2026-09-24T02:19:15.693Z sha 056f08f :: blocked before merge. :: none

@steipete
steipete force-pushed the deslop/l21-ui-components-20260923 branch from 00dee31 to c782fa1 Compare September 23, 2026 21:03
@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 Sep 23, 2026
@steipete
steipete force-pushed the deslop/l21-ui-components-20260923 branch from c782fa1 to 7ede99b Compare September 24, 2026 01:02
@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. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. 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. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. 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. labels Sep 24, 2026
@steipete
steipete force-pushed the deslop/l21-ui-components-20260923 branch from 7ede99b to 056f08f Compare September 24, 2026 02:09
@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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Sep 24, 2026
@clawsweeper clawsweeper Bot removed the status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. label Sep 24, 2026
@steipete
steipete merged commit 9dca5fb into main Sep 24, 2026
186 of 187 checks passed
@steipete
steipete deleted the deslop/l21-ui-components-20260923 branch September 24, 2026 03:16
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 24, 2026
* refactor(ui): deslop shared components and libraries

* refactor(ui): consolidate shared component and library owners

* refactor(ui): preserve acyclic browser host contracts
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
steipete added a commit that referenced this pull request Sep 25, 2026
Consolidate config rendering, sidebar/session bookkeeping, and common
formatting helpers while removing unused forwarding and derived state.
Preserve component, Gateway, route, preference, and accessibility contracts.

Fix generic filename glyphs, file-preview type labels, and session channel
labels for prototype-shaped names. Clear geolocation when its IP is removed.

Second-pass follow-up to #156740 with page importers from #158032 covered.
steipete added a commit that referenced this pull request Sep 25, 2026
Consolidate config rendering, sidebar/session bookkeeping, and common
formatting helpers while removing unused forwarding and derived state.
Preserve component, Gateway, route, preference, and accessibility contracts.

Fix generic filename glyphs, file-preview type labels, and session channel
labels for prototype-shaped names. Clear geolocation when its IP is removed.

Second-pass follow-up to #156740 with page importers from #158032 covered.
steipete added a commit that referenced this pull request Sep 26, 2026
Consolidate config rendering, sidebar/session bookkeeping, and common
formatting helpers while removing unused forwarding and derived state.
Preserve component, Gateway, route, preference, and accessibility contracts.

Fix generic filename glyphs, file-preview type labels, and session channel
labels for prototype-shaped names. Clear geolocation when its IP is removed.

Second-pass follow-up to #156740 with page importers from #158032 covered.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 27, 2026
Consolidate config rendering, sidebar/session bookkeeping, and common
formatting helpers while removing unused forwarding and derived state.
Preserve component, Gateway, route, preference, and accessibility contracts.

Fix generic filename glyphs, file-preview type labels, and session channel
labels for prototype-shaped names. Clear geolocation when its IP is removed.

Second-pass follow-up to openclaw#156740 with page importers from openclaw#158032 covered.
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. 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