Skip to content

refactor(ui): deslop Control UI pages - #156436

Merged
steipete merged 4 commits into
mainfrom
deslop/l14-ui-pages-20260923
Sep 23, 2026
Merged

steipete merged 4 commits into
mainfrom
deslop/l14-ui-pages-20260923

Conversation

@steipete

@steipete steipete commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Control UI pages repeat request lifecycles, rendering decisions, and local copies of shared contracts, increasing the cost of keeping behavior consistent.

User Impact

No intended behavior or visual change. CSS, displayed copy, translations, Gateway protocol, configuration, persisted state, and plugin SDK exports are unchanged. Connection, generation, and authority checks remain with their existing owners.

Why This Change Was Made

  • Share chat steer/redirect dispatch and acknowledgment normalization; reuse directive normalizers, attachment viewport ownership, and abortable retry sleep.
  • Consolidate memory-backfill, task-action, device-discovery, channel-pairing, and WhatsApp request lifecycles while retaining their distinct outcomes and stale-result checks.
  • Reuse Gateway response types and canonical view/composer contracts; consolidate byte encoding in the shared utility.
  • Share Usage CSV projection, UTC calendar parsing, cost formatting, diagnostic rendering, approval-policy controls, and device metadata rendering.
  • Route browser input directly to its existing controller and share embedded/docked action dispatch. Reuse diff-line splitting and deferred-promise ownership in chat helpers.
  • Use one bounded sensitive-value traversal and one schema-child normalization path, preserving boolean schema values through composition.
  • Reuse shared settings groups, mutation messages, connection status, and model-provider prop contracts; remove unused props, unreachable project-recents rendering, and redundant forwarding paths.

The PR removes 1,158 net lines of production code. The requested exclusion command reports 1,163 net lines, including three removed test-support lines and two retired assertion-ratchet entries. No size, lint, or test budget was increased.

Evidence

Final validation base: 05996479d8184c8c8e802448a7ef774590e30a9b. The original three refactor patches are unchanged by rebase. The added integration fix completes the new main-side model-catalog caller's cutover to agentsSelectedId.

  • pnpm build — passed on the final candidate, 390.260s.

  • Codex autoreview through P2 — scoped-clean, no accepted/actionable findings. git diff --check — passed.

  • node scripts/check-changed.mjs --base 05996479d8184c8c8e802448a7ef774590e30a9b --timed — passed, 2,013.959s: formatting, all 25 core test-type lanes, UI production types, lint/style/script checks, i18n, ratchets, and all three dead-export scans with zero entries.

  • node scripts/run-vitest.mjs run --config ui/vitest.config.ts --configLoader runner <661 explicit owner/import-dependent files> — 661 files passed; 12,415 tests passed, three existing skips, 203.192s. Includes Chromium browser tests and the new main-side browser dashboard, board widget, app-host title, composer-sizing, and message-copy coverage.

  • node scripts/run-vitest.mjs src/config/schema-control-ui-contract.test.ts src/gateway/talk/handlers/client-native-actions.test.ts src/gateway/server.talk-consult-history.test.ts src/gateway/chat-auth-readiness.integration.test.ts src/gateway/server-methods/system-agent-setup-control-ui.test.ts — 5 files / 53 tests passed, 100.386s.

  • node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner <17 explicit files> — 17 files / 117 tests passed, zero skips/failures, 158.897s. Covers model providers/defaults, settings/native embedding, browser routes and width, metadata, session diffs, plugin schemas, WhatsApp logout, and skill installation.

  • pnpm ui:check-performance:base 05996479d8184c8c8e802448a7ef774590e30a9b — passed, 30.016s: startup JavaScript 370,850 / 371,332 bytes; startup/largest CSS 51,144 bytes, zero growth against base.

Final head: bd9d41c1b6fc927fcc47ef2132ea343d9537a97a. Isolated Linux proof run: native wrapper exit 0; candidate tree 6cc483cc9713697d52292a79d28fcaec1936529a and all 92 source/routing hashes verified before each phase. The task-owned Testbox was stopped and verified completed. Hosted CI passed on this exact head; node scripts/watch-pr-ci.mjs 156436 bd9d41c1b6fc927fcc47ef2132ea343d9537a97a --repo openclaw/openclaw --timeout 3600 --interval 120 returned GREEN. All three UI shards and all nine UI E2E shards passed.

Earlier validation exposed two existing fixture readiness assumptions: Models layout queried its independently lazy sidebar before attachment, and the HTML preview test polled for first CodeMirror admission before its asynchronous loading completed. The fixtures now await the actual sidebar attachment or browser textbox interaction, following existing owners. All original assertions and timeout settings remain. Each corrected file passed 20 standalone runs, and each owning selection passed three complete runs across the local and isolated proof.

Earlier contended Mac runs also hit native Talk and source-Vite timing failures. Isolated Linux proof passed with unchanged limits; the exact Mac runtime cause remains unproven. Details are retained below.

Regression, test cost, and retained failure evidence
  • pnpm test ui/src/components/config-form-composition-integrity.browser.test.ts ui/src/lib/channels/index.test.ts --maxWorkers=1 — 45 passed, 10.28s combined wrapper wall time. The new boolean-schema preservation case first failed with {} instead of { blocked: false }, then passed after the repair. The two isolated Vitest shards took 1.64s and 5.18s respectively.
  • pnpm test ui/src/e2e/model-providers-layout.e2e.test.ts --maxWorkers=1 — 20/20 full runs passed, five widths each; first run 18.26s test time and 144.81s wrapper wall, including a cold bundled app build.
  • pnpm test ui/src/pages/chat/components/chat-html-file.browser.test.ts --maxWorkers=1 — 20/20 full runs passed, nine cases each; first wrapper wall 9.76s. Preserves editability, editor identity, draft persistence, preview, and undo assertions.
  • The original sidebar failure left the first E2E run at 116/117; its later diagnostic capture already contained the expected selector without browser errors. An unchanged replay passed before the repair; that replay alone is not claimed as a fix.
  • The original HTML readiness assertion failed in the broader and serialized Chromium selections, while the other eight cases passed; it passed alone. The corrected full Chromium selection passed three times, followed by 20 standalone file runs.
  • A later contended local E2E run hit the source-Vite suite's existing 10-second initial-navigation limit before any skeleton assertion. Its capture showed a successful Models route, a connected Gateway, and no browser errors. Both isolated sequential runs passed all 117 cases without overrides.
  • The first local Gateway shard passed 49/51 cases: native Talk's existing 10-second whole-test watchdog expired, then the next fixture received SESSION_MUTATION_AUTHORIZATION_CHANGED during initial creation. These occur before the changed helper can execute; the suite imports only the unchanged extractText implementation. All 53 cross-shard tests passed on isolated Linux with unchanged timeouts/assertions. Their original Mac runtime cause remains unproven; no native Talk repair is claimed.

Final-head hosted durations: config-form composition 0.024s, HTML preview 2.995s, and Models layout 3.924s for all five widths. The first published CI run also recorded passing channel helpers at 0.079s, Usage query at 0.008s, and byte encoding at 0.031s. The final-head results above supersede that run's overall failing verdict.

Requested measurement:

69 files changed, 1140 insertions(+), 2303 deletions(-)
git diff --shortstat $(git merge-base origin/main HEAD) -- . ':(exclude)**/*.test.*' ':(exclude)**/test/**' ':(exclude)docs/**'

The prior published CI run exposed one integration issue: newer main added a model-catalog getter that called the removed resolveSelectedAgentId() wrapper. Its canonical-state replacement passed the four affected files (51 tests) and the two routed E2E files (four tests). The intervening full changed-check attempt then found an unrelated missing policyConfig fixture field on main; this branch incorporates its owning repair, 09012603235, by rebase. No Gateway source or test is changed by this PR.

Additional SDK/export and broad-extension gates are not applicable; those surfaces were not changed. ui/src/pages/chat/route-loader.ts and CHANGELOG.md are untouched. This PR has not been merged; it awaits coordinator review before landing.

@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 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 23, 2026, 1:47 PM ET / 17:47 UTC (Revision 7).

ClawSweeper review

What this changes

Consolidates repeated Control UI request handling, rendering, media lifecycle, and response types, with focused regression and fixture updates.

Merge readiness

⛔ Blocked before merge - 3 items remain

The cleanup remains useful, and the previous model-catalog blocker is resolved. No blocking correctness or security finding remains.

Priority: P3
Reviewed head: bd9d41c1b6fc927fcc47ef2132ea343d9537a97a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Recorded reviewer rating: Coherent consolidation with focused coverage, successful exact-head CI, and the prior integration defect repaired. Real behavior proof remains required by host policy.
Proof confidence 🌊 off-meta tidepool Recorded reviewer rating; Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: Verified repository-admin authorship exempts this internal refactor from external-contributor runtime proof. Reported browser/controller tests and exact-head CI supplement source review; no material authority, appearance, or stored-data contract change triggers a separate proof requirement.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Required by policy Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: Verified repository-admin authorship exempts this internal refactor from external-contributor runtime proof. Reported browser/controller tests and exact-head CI supplement source review; no material authority, appearance, or stored-data contract change triggers a separate proof requirement.
Evidence reviewed 9 items Introduced patch and merge identity: Read the complete merge-base-to-head diff. The test merge’s raw parents are the pinned base followed by the exact PR head; unrelated base-branch changes were excluded from attribution.
Previous finding resolved: The model-catalog getter now uses agentsSelectedId directly. GitHub’s exact-head commit patch confirms this repair, and the verified test merge retains it.
Request ownership preserved: Pairing and WhatsApp helpers retain connection, authorization-epoch, request-identity, and operation-sequence checks. Distinct success, refusal, error, and cleanup outcomes remain intact; the refactor does not materially change authority.
Findings None None.
Security None None.

How this fits together

Control UI is OpenClaw’s browser interface. Its page controllers translate user actions into Gateway requests and update chat, settings, channel setup, and task views from the responses.

flowchart LR
  A[User actions] --> B[UI page controllers]
  B --> C[Shared UI helpers]
  C --> D[Gateway requests]
  D --> E[Current context checks]
  E --> F[Updated views]
Loading

Before merge

  • Add real behavior proof - Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: Verified repository-admin authorship exempts this internal refactor from external-contributor runtime proof. Reported browser/controller tests and exact-head CI supplement source review; no material authority, appearance, or stored-data contract change triggers a separate proof requirement.
  • 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-data-model-change: ui/src/pages/memory-import/memory-import-page.ts, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep shared UI helpers as the single implementation while preserving Gateway contracts, settings, and request ownership.

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

Not applicable: this is primarily a refactor, and source inspection found no remaining introduced failure to reproduce.

Is this the best way to solve the issue?

Yes: the patch consolidates existing owners and equivalent helpers without adding competing configuration or public APIs.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 5ada5d15a4f3.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is internal UI cleanup with no intended workflow or appearance change and no remaining blocking defect.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit. This is the recorded reviewer rating; real behavior proof remains required by host policy.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: Verified repository-admin authorship exempts this internal refactor from external-contributor runtime proof. Reported browser/controller tests and exact-head CI supplement source review; no material authority, appearance, or stored-data contract change triggers a separate proof requirement.

Evidence

What I checked:

  • Introduced patch and merge identity: Read the complete merge-base-to-head diff. The test merge’s raw parents are the pinned base followed by the exact PR head; unrelated base-branch changes were excluded from attribution. (bd9d41c1b6fc)
  • Previous finding resolved: The model-catalog getter now uses agentsSelectedId directly. GitHub’s exact-head commit patch confirms this repair, and the verified test merge retains it. (ui/src/pages/agents/agents-page.ts:117, bd9d41c1b6fc)
  • Request ownership preserved: Pairing and WhatsApp helpers retain connection, authorization-epoch, request-identity, and operation-sequence checks. Distinct success, refusal, error, and cleanup outcomes remain intact; the refactor does not materially change authority. (ui/src/lib/channels/index.ts:322, bd9d41c1b6fc)
  • Security and compatibility inspection: Sensitive-value traversal retains its depth/node bounds and conservative overflow result. Changes do not introduce dependencies, execution hooks, plugin SDK changes, stored-data formats, migrations, or preference defaults. (ui/src/components/config-form.shared.ts:56, bd9d41c1b6fc)
  • Verified author permissions: GitHub returned permission=admin and role_name=admin for steipete. This independently establishes internal maintainer authorship despite the captured CONTRIBUTOR association.
  • Validation evidence: Hosted CI run https://github.com/openclaw/openclaw/actions/runs/35895297741 completed successfully on the pinned head. The captured body reports 661 UI test files, 53 Gateway tests, and 117 UI E2E cases passing. The separate Testbox workflow is cancelled following the reported teardown; its workflow conclusion is not treated as a passing runtime demonstration. This review executed no target code. (bd9d41c1b6fc)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RomneyDa: 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 (6 earlier review cycles)
  • reviewed 2026-09-23T10:31:36.501Z sha 6bce2088ac53d66be72cf336349f33a6258e7641 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-23T11:19:51.152Z sha d95bed6bb0e53803917e7cde137fdc9b310ca30b :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-23T12:07:17.000Z sha 11beba9 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-23T15:14:20.125Z sha cbbb1c7 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-23T15:56:04.789Z sha cbbb1c7 :: needs real behavior proof before merge. :: [P1] Migrate the model-catalog getter before removing its helper
  • reviewed 2026-09-23T17:31:25.015Z sha bd9d41c :: needs real behavior proof before merge. :: none

@steipete
steipete force-pushed the deslop/l14-ui-pages-20260923 branch from 6bce208 to d95bed6 Compare September 23, 2026 11:11
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 23, 2026
@steipete
steipete force-pushed the deslop/l14-ui-pages-20260923 branch 2 times, most recently from 11beba9 to cbbb1c7 Compare September 23, 2026 15:03
@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 Sep 23, 2026
@steipete
steipete force-pushed the deslop/l14-ui-pages-20260923 branch from cbbb1c7 to bd9d41c Compare September 23, 2026 17:23
@clawsweeper clawsweeper Bot added 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 Sep 23, 2026
@steipete
steipete merged commit 56b3d23 into main Sep 23, 2026
176 of 178 checks passed
@steipete
steipete deleted the deslop/l14-ui-pages-20260923 branch September 23, 2026 18:21
@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 Control UI pages

* refactor(ui): complete workspace update cutover

* refactor(ui): consolidate page and component helpers

* refactor(ui): complete agent model catalog cutover
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
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: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant