Repository navigation
refactor(ui): deslop shared components and libraries third pass - #158787
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. |
l80 shared components and libraries: large-file coverageBaseline:
|
|
Codex review: blocked before merge. Reviewed September 26, 2026, 10:39 AM ET / 14:39 UTC (Revision 7). ClawSweeper reviewWhat this changesConsolidates shared Control UI helpers across search, sidebar, Markdown, configuration, desktop, mascot, and outbox paths without intending a user-visible change. Merge readiness⛔ Blocked before merge - 1 item remains Keep open. The two linked cleanup passes are merged, but current main still contains code uniquely changed by this branch. The earlier compatibility concern is resolved by the retained preference keys, defaults, and outbox field order; no actionable defect was found. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI is the browser app served by the Gateway. Gateway data and browser-local preferences feed its shared components, which render views and send user actions back to the Gateway. flowchart LR
A[Gateway data and events] --> C[Control UI state]
B[Browser preferences and drafts] --> C
C --> D[Shared UI helpers]
D --> E[Sidebar, chat and settings]
D --> F[Desktop and board views]
E --> G[User actions and Gateway requests]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Retain this distinct cleanup for normal PR review and landing, with its browser parity and existing-state outbox behavior preserved. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a behavior-preserving cleanup PR, and the review identified no current-main bug to reproduce. Is this the best way to solve the issue? Yes: the branch reuses existing Control UI owners, and the inspected storage paths and browser captures support the intended behavioral parity. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d9a52238b381. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
Refresh the PR merge-ref checks after main repaired stale bounded-fetch assertions in 380a77a.
|
Inspected before/after screenshots from an isolated Control UI browser with synthetic Gateway data and scripted RFB. Before is All 12 selected browser cases passed (six per revision). Eighteen of 21 full screenshot pairs are pixel-identical, including all sidebar and menu states, scalar config fields, the resident mascot, and Desktop states. The remaining differences are confined to animated visitor sprites (35 and 252 pixels) and 19 isolated input-border pixels; full images were inspected for appearance and synthetic-only content. No credentials, real user data, internal identifiers, or invitation cards are present. Desktop captures prove panel and fullscreen presentation over the synthetic framebuffer. Each sheet places before on the left, after on the right. The first capture attempt's submenu placement offset disappeared after the fixture awaited the submenu's public opening completion and stable proof surface. |
|
@clawsweeper re-review Current head is The compatibility flags are resolved: this cleanup changes no schema, default, localStorage key, persisted shape, or migration. Original optional outbox-field insertion order is retained, and the existing outbox migration E2E plus delayed-send suites pass. The current evidence and known capture limits are recorded in the PR body and screenshot comment. |
|
🦞👀 Re-review progress:
|
|
Compatibility review is complete against the full diff. No Gateway RPC method/payload, config schema/default, localStorage key/shape, or migration changes are introduced. The outbox decoder retains its original field insertion order; existing migration E2E and 378 delayed-send cases pass. The remaining generic compatibility checklist entries come from incomplete file-list metadata, not an identified contract change; no new migration is required. Published proof is verified: GitHub renders seven image elements in the linked screenshot comment, and all seven served PNGs were fetched successfully and byte-matched to the inspected originals. All comparison sheets were also delivered in the originating chat. Final CI is green for BELOW-THRESHOLD-PR-READY: 647 net production lines removed; the complete 243-file coverage log is linked from the PR body. The PR remains unmerged. |
…claw#158787) * refactor(ui): deslop shared components and libraries third pass * refactor(ui): finish shared component cleanup checks * refactor(ui): keep lobster palette catalog independent * ci: refresh checks after shared base recovery repair Refresh the PR merge-ref checks after main repaired stale bounded-fetch assertions in 824ba21.







What Problem This Solves
Shared Control UI components and libraries still repeat small rendering, type, cache, and lifecycle operations after the first two cleanup passes.
User Impact
No user-visible change is intended. Appearance, copy and i18n keys, accessibility and keyboard behavior, Gateway RPC payloads, routes, and persisted preference formats are preserved. No schema, localStorage key, stored shape, default, or migration changes are introduced. This is the third pass after #156740 and #158198; page implementations and CSS are unchanged.
Why This Change Was Made
The sweep read the full subtree. The measured reduction is 647 net production lines across 86 production files; test code changes by +1 line. This is below the requested 1,000-line threshold. The sorted coverage log accounts for all 243 production files over 200 lines, with a READ disposition for every file. Retained larger modules own concrete lifecycle, recovery, routing, or persisted-data contracts.
Evidence
All execution used Blacksmith Testbox through the repository wrapper, which verified the complete source snapshot. The final code tree is
1cef300ef0df435af55fb655f48c14daa9525dcf; head41fa8a0c18eonly refreshes CI after the shared main repair and has that same tree.pnpm check:architecturepassed with zero runtime and Madge cycles.pnpm buildpassed in 7m11.3s. Fresh independent reviews found no actionable P0–P2 defects after each correction.41fa8a0c18e4cd993f3e5bb2f1027c56e256a4a6.Changed-test costs measured with
pnpm test <file> --maxWorkers=1:app-navigation-groups.test.ts24 cases / 2.36 s wall;command-palette-catalog-search.test.ts3 cases / 1.85 s;sidebar-issue-item.test.ts8 cases / 2.15 s. CI-reported Vitest execution durations for those files were 0.036 s, 0.010 s, and 0.063 s respectively (excluding setup). No new tests were added.Proof leases: tbx_01m3eh1rpywchwt4ms448pkqwn (broad UI/build/E2E), tbx_01m3eqeb322x0papyzcd622mne (follow-up checks and 194 cases), and tbx_01m3etcw3gx51q7ttmbn0vvw1g (final architecture/changed checks, 104 cases, build, and captures). Each was used serially and is now stopped/completed.
Fixes found along the way
The first full UI run caught an insertion-order regression in the optional outbox-field cleanup: durable admission compares canonical JSON bytes, and moving
sendErroraftersendAttemptsrejected delayed sends. The original field insertion points were restored; only contiguous trailing fields share a loop. Existing tests caught this regression, so no duplicate tests were added.Hosted architecture CI caught a type-only cycle between the derived palette-ID contract and its catalog. The catalog is now a zero-import leaf; its sole consumer owns the unchanged chimera helpers privately. The first capture attempt omitted
sessions.patchfrom the synthetic Gateway and correctly disabled the model picker on both revisions; the fixture now advertises the intended capability and waits for completed submenu presentation.A later CI run inherited stale Testbox fetch-count assertions from main after the recovery policy added a deeper probe. The owning repair landed as
380a77a86f6; a source-identical fresh push then passed the full PR CI. That repair is outside this PR's diff.Published-image verification used GitHub’s rendered comment HTML and the exact served PNG bytes after the optional remote Chromium verification lease expired during source preparation. That additional lease,
tbx_01m3f0rkw7w4rd9mcv7ydwrtkv, is also stopped/completed; no browser success is claimed for it.