Repository navigation
refactor(ui): deslop UI core - #164011
refactor(ui): deslop UI core#164011
Conversation
Consolidate browser data readers, presentation subscriptions, state and request forwarding, chat rendering helpers, and duplicate CSS. Remove styles for retired companion rail and dock renderers while retaining the embedded UI. Also repair malformed terminal replay listener cleanup, prototype-named command descriptions, and MCP onboarding where crypto.randomUUID is unavailable. Original-source regression probes fail as expected; focused UI proof passes 1,957 tests across 71 files. Bundle, browser, cycle and hosted gates follow before publication.
|
🦞👀 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: blocked before merge. Reviewed October 3, 2026, 12:38 AM ET / 04:38 UTC (Revision 3). ClawSweeper reviewWhat this changesThe Control UI consolidates rendering, subscriptions, encoding, menus, and styles while repairing terminal replay cleanup, plugin command descriptions, and MCP app onboarding. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: the cleanup and fixes remain useful against current main, and no blocking introduced defect was found. Source inspection does not support retaining the previous generic configuration/upgrade warning. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI turns Gateway state and browser input into chat, terminal, sidebar, and settings views. Its controllers manage presentation and requests while the Gateway remains the shared-state owner. flowchart LR
A[Browser input] --> B[UI controllers]
C[Gateway state] --> B
B --> D[Shared rendering and encoding]
D --> E[Chat and sidebar views]
D --> F[Terminal and settings views]
B --> G[Gateway requests]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep the existing UI owners consolidated while preserving Gateway authority, stored-state contracts, and rendered behavior. Do we have a high-confidence way to reproduce the issue? Yes, source provides concrete paths for malformed terminal replay listener retention and MCP onboarding without crypto.randomUUID; no runtime reproduction was executed in this read-only review. Is this the best way to solve the issue? Yes, reusing existing owners and removing unreachable compatibility/rendering paths is a maintainable approach; the inspected changes preserve supported configuration and storage contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e159e3bcf618. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
* refactor(ui): deslop UI core Consolidate browser data readers, presentation subscriptions, state and request forwarding, chat rendering helpers, and duplicate CSS. Remove styles for retired companion rail and dock renderers while retaining the embedded UI. Also repair malformed terminal replay listener cleanup, prototype-named command descriptions, and MCP onboarding where crypto.randomUUID is unavailable. Original-source regression probes fail as expected; focused UI proof passes 1,957 tests across 71 files. Bundle, browser, cycle and hosted gates follow before publication. * refactor(ui): finish canonical command copy and style consolidation * chore(ui): shrink assertion baseline after cleanup * test(ui): use terminal offsets in E2E fixtures
What Problem This Solves
The Control UI carries duplicate state, encoding, presentation, and CSS paths, including styles for companion layouts that no longer render.
User Impact
Normal UI rendering, translations, storage keys, and Gateway shapes stay the same. This batch also fixes:
constructor.crypto.randomUUID.Why This Change Was Made
Reuse the existing UI owners for encoding, presentation subscriptions, session operations, command descriptions, and menu construction; remove obsolete companion styles and duplicate CSS declarations. The bundled terminal UI uses its current same-version Gateway offset protocol. External-client compatibility remains server-owned.
The batch removes 1,054 net production lines (+835/−1,889), plus 77 net test/support lines: 1,132 fewer lines overall, including the shrink-only assertion baseline correction. All production changes stay inside
ui/; the only additional file is the assertion-safety baseline. No Gateway client, plugin SDK, configuration, or storage contract changes.Evidence
The first exact-head CI attempt (37094291111) correctly required three assertion-baseline shrink updates caused by this cleanup:
display.ts6→5,chat-avatar.ts1→0 (row removed), andstream-reconciliation.ts3→1. Corrected in0306c398bd46954f049eea9b9c18d64559e5bebe; the full ratchet passes across 3,060 files / 7,647 grandfathered assertions, and the focused independent review is clean. Fail-fast cancelled 34 jobs in that first attempt; those cancellations are not passing coverage. This was a PR-caused failure, not an inherited-main exception.The second exact-head CI attempt (37095349470) passed all three UI unit shards (1,038 combined job-wall seconds), the assertion ratchet, and the performance job. It exposed one incomplete terminal fixture migration: a 19-unit output declared offset 17 and correctly triggered recovery.
4cdb4e58eff39a67d0e7f26f46845de419f5b2bbcorrects that payload and two sibling zero-offset fixtures using each unchanged string’s.length, retaining every assertion. The three affected bundled E2E files pass 10/10 tests in 108.77 s Vitest wall time at one worker; formatting, targeted lint, and independent review pass. UI E2E shard 8/9 was collateral cancellation, not a second failing root.Final exact-head CI 37096865729 passed for
4cdb4e58eff39a67d0e7f26f46845de419f5b2bb. The complete 139-file review confirms no configuration schema/default or persisted-format change; the generic compatibility flags caused by truncated file-list metadata do not represent a source change requiring migration. ClawSweeper's current-head technical review reports no actionable defect or security finding.pnpm test ui/src/pages/chat/components/chat-session-workspace.test.ts ui/src/pages/chat/components/chat-sidebar.test.ts --maxWorkers=1through the equivalent direct Node wrapper. Wrapper wall time: 97.32 s (Vitest: 86.13 s). The second exact-head run passed all three UI unit shards; their combined job-wall time is recorded above.ui/AGENTS.md, and the removed facade exports belong to the private UI package, with all consumers migrated. The public terminal protocol/server compatibility remains intact. No accepted actionable finding remains.nice -n 15local fallback.Bundle measurements
Both builds use one Vite 8.3.1 toolchain and a normalized build identity. Budget limits are unchanged.
Baseline:
704fbb812e1c7157df999343b81c5bcef452e390; measured runtime candidate:8d480d01541833a85b7704ee4ee9165bae7dc312. Subsequent corrective commits change only baseline counts and test fixtures; the runtime build and visual proof remain applicable to4cdb4e58eff39a67d0e7f26f46845de419f5b2bb.New-session ready-route JS also shrinks by 14 B and CSS by 137 B. Its one additional deferred request remains within the existing route budget. The pre-existing startup CSS advisory remains above its soft target, with 492 B of hard-ceiling headroom.
Visual parity
38/38 screenshot states match exactly, retaining the original 36 matching pairs and replacing both disputed surfaces with fresh desktop/narrow captures. Synthetic Gateway data, fixed clock/randomness, and fixed latency are used throughout.
The supposed appearance-icon delta was a 2×2 Language-card border corner; settled recaptures match. The model-dialog difference reproduced with the identical baseline build on both sides. All 405 desktop / 418 narrow measured elements also had identical geometry and computed styles. Explicitly settling the page and capturing with Playwright
animations: "allow"instead of"disabled"removed the capture-time difference. No production revert was warranted.Visual baseline:
ac96ec93fa9554428992841a686d494cfd34edc9; the final rebase preserved both patches exactly, and intervening UI changes only refresh foreign-language catalog metadata/translations. These English fixtures and rendering source are unchanged by that integration.