Repository navigation
improve(ui): move sidebar controls into agent header - #134365
vyctorbrzezowski merged 18 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 2:44 PM ET / 18:44 UTC. ClawSweeper reviewWhat this changesThe branch moves collapse, command-palette, and new-session controls into the expanded desktop agent header, with responsive and native-host layout coverage plus matching Control UI documentation. Merge readinessKeep open for maintainer direction: the prior layout-clearance finding is fixed, but this PR intentionally retains a three-control collapsed rail while the related canonical request specifies expand-only collapsed navigation. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI shell renders desktop, mobile, and native-host navigation chrome. Header controls call the shell to toggle the sidebar, open the command palette, or start a session, which then changes the workspace layout. flowchart LR
User[Desktop user] --> Header[Agent header]
Header --> Controls[Collapse search new session]
Controls --> Shell[Control UI shell]
Shell --> Navigation[Sidebar state]
Shell --> Palette[Command palette]
Shell --> Session[New session]
Navigation --> Layout[Workspace layout]
Decision needed
Why: Both arrangements preserve recovery paths, but the linked canonical request explicitly asks for a different collapsed state and the branch deliberately declines it. Before merge
Agent review detailsSecurityNone. PR surfaceSource +79, Tests +170, Docs 0. Total +249 across 21 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Confirm the collapsed desktop control policy with the owner of the canonical request, then land this bounded header layout only after the exact-head gate and merge result are green. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR changes layout hierarchy rather than repairing a reported runtime defect; the relevant behavior is directly covered by the supplied focused UI tests. Is this the best way to solve the issue? Unclear: the control-owner refactor and prior clearance repair are coherent, but the unresolved collapsed-state policy prevents calling this the best product solution. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d17027cfdc5e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (8 earlier review cycles)
|
4a32b02 to
aba74d4
Compare
aba74d4 to
9b393df
Compare
|
ClawSweeper rank-up moves:
|
128a34f to
853dd9b
Compare
|
ClawSweeper rank-up moves for final head
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
ClawSweeper final-head resolution for
All current Rank-up moves are applied or explicitly skipped above. |
|
Merged via squash.
|
* improve(ui): move sidebar controls into agent header * fix(ui): keep sidebar environment pill visible * fix(ui): pin native new session action right * fix(ui): pin sidebar header actions right * fix(ui): align sidebar header in rtl * fix(ui): anchor agent unread indicator * fix(ui): preserve sidebar header behavior in RTL * test(ui): normalize sidebar fade direction * test(ui): align sidebar review coverage * fix(ui): preserve native new-session focus * test(ui): compare shell control centerlines * fix(ui): center sidebar header controls * fix(ui): scope page header clearance * fix(ui): finalize sidebar header interactions * test(ui): normalize shell centerline precision * fix(ci): allow empty extension lint stripes * test(ui): exercise sidebar clearance on workspace route * test(ui): match native header inset
…ost its border (#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 #134365 gave it `margin-inline-start: 5px` as optical alignment so that filled box would not crowd the two borderless glyphs beside it. #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 #137316
…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
Related: #122449
This PR extracts and updates the sidebar-header portion of #125062. The broader chat-header and native-titlebar redesign from that draft remains out of scope here.
What Problem This Solves
The expanded sidebar renders collapse and search outside the identity header, separating primary navigation actions from the agent they govern. The identity row also exposes transient session status and can lose its switcher chevron when long names consume the available width.
Why This Change Was Made
In this PR, collapse and search move into the expanded browser sidebar header alongside new session. The order is collapse, search, then new session; collapse and search are quiet icon-only controls, while new session keeps its bordered treatment. The action rail stays against the sidebar's inline-end padding independently of the identity card, including in RTL.
The agent header omits transient session subtitles, keeps environment context when present, and gives long names a subtle trailing fade while reserving space for the Lucide up/down chevron. The unread indicator is owned by the avatar and sits at its top-left with a sidebar-surface cutout ring. The agent surface retains its responsive hover/active background with a 1px horizontal inset.
Mobile drawers and native titlebar hosts keep their existing control owners. On native web-chrome hosts, collapse and search remain in the titlebar, the sidebar new-session action moves to the far-right edge, and its normal state has no border or shadow while keyboard focus retains the standard focus ring. Focus restored after collapsing or reopening the sidebar does not open a tooltip automatically; a later explicit keyboard return still does.
User Impact
This PR proposes one compact, aligned sidebar header with agent identity and its right-aligned actions. Long names and environment labels truncate gracefully without pushing the chevron or controls offscreen. Collapsing the sidebar still leaves a complete path to expand it, start a session, and search.
Evidence
The nine final-head captures below use the canonical mocked Control UI with real components. Four unchanged before-state references preserve equivalent comparison conditions. The approved macOS app reference is retained separately, while the final-head native-host fixture proves the current branch behavior. Every referenced image was opened and inspected before publication; no tuner UI is included.
This landing head also carries a narrow main-side CI repair for #135302: extension lint striping treats an empty selection as a no-op, still rejects non-extension shards, and constructs bounded extension Programs for explicit stripes even on roomy hosts. The regression blocked this PR's otherwise unrelated
check-lintrun.Light — short name, unread dot, collapse hover
Light — long name, colored environment pill, search hover
Dark — long name, colored environment pill, unread dot, new-session hover
Dark — agent menu open
Minimum width — 240px, long environment label, unread dot
Comfortable browser width
Native-host layout
Layout-guide inspection
Validation
ui/src/e2e/native-nav-sidebar-toggle.e2e.test.tscovers native new-session normal and keyboard-focus states plus tooltip behavior after sidebar replacement focus.ui/src/e2e/native-nav-responsive-layout.e2e.test.tscovers logical-edge action alignment, centered collapse/search glyphs, 28px browser and 32px native avatars, long-name fade direction, and shadowless new-session geometry.ui/src/e2e/new-session-page.places.e2e.test.tsremains the direct shell-control geometry consumer and compares centerlines because the intentionally different button sizes no longer share a top edge.ui/src/components/form-controls.browser.test.ts:418, which directly consumes.sidebar-agent-card__nameonly for text-scale typography; the class and scaling contract remain unchanged.ui/src/app/control-ui-environment.test.ts:33-79, which directly supplies the configured environment and verifies the pill label and avatar ring; constrained-width ellipsis preserves those semantics.git diff --checkpasses on the final rebased head.