Repository navigation
fix(ui): sidebar header controls read misaligned after the + button lost its border - #137317
Conversation
The new-session control kept a 5px optical offset that only made sense while it rendered as a bordered chrome button. With the border gone it reads as a hole in the rail: collapse -> search is 0px, search -> plus is 5px. Drop the offset so the actions row owns one hit-box size and one gap, and assert the gaps in the existing sidebar-header geometry e2e for LTR and RTL.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 3, 2026, 11:47 AM ET / 15:47 UTC. ClawSweeper reviewWhat this changesThe PR removes the five-pixel start margin from the sidebar new-session control and adds LTR/RTL browser-layout assertions that the three sidebar header controls have no gaps. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 3 items remain Keep this PR open: current main still has the five-pixel margin, while this branch removes that single stale spacing owner and protects the rendered geometry in both directions. No introduced correctness or security defect was found; exact-head CI is not yet green and the MEMBER/protected-maintainer context requires human handling. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI sidebar header renders collapse, search, and new-session controls beside agent identity. The renderer supplies those controls, layout CSS positions their hit boxes, and browser E2E checks validate the resulting geometry. flowchart LR
A[Sidebar renderer] --> B[Header action rail]
B --> C[Layout CSS]
C --> D[Three control hit boxes]
D --> E[Browser sidebar]
E --> F[Geometry E2E checks]
Decision needed
Why: The patch is a focused repair, but its MEMBER authorship and Before merge
Agent review detailsSecurityNone. PR surfaceSource -1, Tests +17. Total +16 across 2 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the owner-boundary CSS deletion and box-geometry regression coverage once the exact-head typecheck and CI gate are green and a designated maintainer approves the protected PR. Do we have a high-confidence way to reproduce the issue? Yes, by loading the expanded desktop sidebar on current main and measuring the three rendered control boxes; current-main CSS directly supplies the extra five-pixel margin and the existing browser E2E is the focused execution entrypoint. Is this the best way to solve the issue? Yes. Removing the uniquely scoped stale margin lets the existing action rail remain the sole spacing owner; changing glyph size or adding another compensating offset would preserve competing layout policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cfa7876d49a4. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
The test-types program runs with noUncheckedIndexedAccess, so reading boxes[index] inside the gap walk failed tsgo. Carry the previous rect forward instead, so every read is non-optional by construction.
|
Merged via squash.
|
* refs/remotes/origin/main: fix(plugins): reject unverifiable pinned npm installs (#136725) improve(ui): lift sidebar section headers on hover and mark online owners (#136985) test(cron): reuse isolated run suite hooks (#137341) test(channels): reuse shared indexed call guards (#137350) fix(ui): sidebar header controls read misaligned after the + button lost its border (#137317) fix(qa-channel): preserve conversation kind for implicit actions (#137343) fix: target the source checkout in Control UI repair commands (#137354) chore: reduce CI job count and database test overhead (#137352) fix(ios): preserve chat live edge across keyboard transitions (#136660) refactor(control-ui): consolidate mention inbox requests (#137375) fix(openai): preserve ChatGPT HTTP status for retry pacing (#137146) fix(mcp): hide policy-denied plugin tools from ACP sessions [AI] (#136546) test(queue): reuse shared deferred fixtures (#137338) fix(gateway): repair the Gateway E2E shard (browser suite project, skill resource argv, Codex diagnostic) (#137358)
…ost its border (openclaw#137317) The Control UI sidebar header controls read as misaligned: the new-session `+` sat 5px further from search than search sat from the sidebar-collapse control. The `+` used to render as a bordered chrome button, and openclaw#134365 gave it `margin-inline-start: 5px` as optical alignment so that filled box would not crowd the two borderless glyphs beside it. openclaw#136608 correctly re-based the `+` onto the borderless header-control base but kept the offset, so with no box left to sit inside it became pure extra gap. Delete the offset instead of tuning a new number: `.sidebar-brand__actions` already declares `gap`, so it becomes the single owner of control spacing and all three controls share one 28x28 hit box and one gap. The `+` stays borderless. Measured collapse -> search / search -> `+`: 0px / 5px before, 0px / 0px after, in Light, Dark and RTL. Closes openclaw#137316
Closes #137316
What Problem This Solves
Fixes an issue where operators looking at the Control UI workspace sidebar would see the three header controls — sidebar-collapse, search, and new-session
+— read as misaligned, because the+sat 5px further from search than search sat from collapse.Why This Change Was Made
The
+used to render as a bordered chrome button (shell-chrome-controls__button: 1px border,--shadow-sm, panel background), and #134365 (@vyctorbrzezowski) gave itmargin-inline-start: 5pxas optical alignment so that filled box would not crowd the two borderless glyphs beside it. #136608 (@Patrick-Erichsen) correctly re-based the+onto the borderless.sidebar-brand__icon/.sidebar-brand__header-controlpair but kept the offset, so with no box left to sit inside it became pure extra gap.The fix is to delete the offset rather than tune a new number:
.sidebar-brand__actionsalready declaresgap, so the actions row becomes the single owner of control spacing and all three controls share one 28x28 hit box and one gap. The+stays borderless. Its 20px glyph (versus 16px) is deliberate and untouched — the plus path fills less of its viewBox, and the existing e2e already proves all three render 12px of ink.Net production change is -1 line (a 4-line rule removed, a 3-line comment added at the new owner so nobody re-adds a per-button offset).
User Impact
The sidebar header controls now read as one rail: equal boxes, equal gaps, in Light and Dark, LTR and RTL. No behavior, no config, no new options.
Evidence
Gaps measured with
getBoundingClientRect()on the mocked Control UI dev server at 1440px,deviceScaleFactor: 2:+Light, 2x — before / after
Dark, 2x — before / after
RTL, 2x — before / after
Sidebar top with surrounding rows — before / after. The
+stays anchored to the trailing edge; collapse and search move 5px toward it to close the hole. Nothing below the header moves.Regression coverage lands in the existing sidebar-header geometry test,
ui/src/e2e/native-nav-responsive-layout.e2e.test.ts("keeps browser sidebar header geometry aligned in LTR and RTL"), next to the assertions that already pin hit-box size, ink width, border state, and trailing inset. The newcontrolGapspoll asserts[0, 0]in LTR and again after the RTL flip; it measures adjacent-box distance direction-agnostically, so it fails on pre-fix code with[0, 5]in both directions.Local proof on this machine: mocked Control UI dev server, headless Chromium captures above (every capture opened and inspected),
stylelintandoxfmtclean on both touched files, and a cleanautoreviewpass (gpt-5.6-sol, high,scoped-clean). Suites and typecheck are left to CI on this head.Risk and coverage
What else could shift.
--shell-chrome-control-sizeand.sidebar-brand__iconare shared. The change touches neither: it deletes a rule scoped to.sidebar-brand__new-threadand adds a comment.grepforsidebar-brand__new-threadshows exactly two remaining production rules (the 20px glyph size, untouched, and the cursor-policy selector list) plus the render call site..shell--mobile-nav .sidebar-brand__desktop-control { display: none }leaves the+as the only control in the actions row..sidebar-brand__actionscarriesmargin-inline-start: auto, so the row is trailing-anchored and its content width shrank by 5px while the+itself did not move. No mobile-visible change.margin-inline-start, i.e. already logical, so removal is symmetric by construction — and the RTL captures plus the new RTL assertion confirm it. The pre-existing RTL asymmetry in.sidebar-brand's physicalpadding: 0 2px 10px 0(which the existing test pins asactionInset2 in LTR, 0 in RTL) is untouched and out of scope here..sidebar-brand__collapseand.sidebar-brand__desktop-controldisplay rules and render their own chrome; none of them reads the deleted margin. The native-host assertions in the same e2e file are unchanged and still pass their own geometry checks..sidebar-brand__icon, which is untouched. Withgap: 0the hover fills of adjacent controls now touch for all three pairs instead of two — the same behavior collapse and search already shipped.What is uncovered. These captures are headless Chromium on macOS at 1440px,
deviceScaleFactor: 2, default Claw theme. Not captured here: real Safari/Firefox rendering, non-default themes and custom themes (they change color tokens, not the geometry this touches), text-scale settings other than 100%, and the packaged macOS/native-nav app chrome, where the sidebar controls are hidden by design and so cannot regress from this diff. Full test suites, typecheck, and build run on CI for this head rather than locally.Landing notes
Head moved from
3a7f9273bfeto7d5e48da7eb. The second commit is a test-only type fix, no CSS or behavior change; the gap measurements and captures above still describe the shipped result.ClawSweeper review of
3a7f9273bferecorded no code findings (patch quality 4/6, findings: None, security: None). Its blockers and rank-up move were all the exact-head CI failure. Each item, and what was done:check-test-types-core-4runs withnoUncheckedIndexedAccess, and the gap walk I added readboxes[index], which is| undefinedunder that flag:native-nav-responsive-layout.e2e.test.ts(203,46)and(203,66),error TS2532: Object is possibly 'undefined'.openclaw/ci-gatewas the cascade, not a second defect.7d5e48da7eb.main; named above with the exact file, lines, and TS error code.maintainerlabel asks for.No re-review requested: the only push after the review addressed a review blocker and changed no behavior beyond it.