You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web-ui): align spacing of sidebar threads header icons - #1402
Fixes uneven horizontal spacing of the five action icons beside the sidebar Threads / Sessions header (Activity, Search, New section, View options, Add workspace) on touch devices and in the mobile drawer.
Root Cause
Under @media (hover: none), (pointer: coarse) and :global([data-phone-drawer]), .iconButton, .searchButton, and .searchSlot expanded to 44px and .headerActions expanded to 148px, while .activitySlot remained capped at max-width: 28px (and lacked overflow: hidden). As a result, the first (Activity) 44px button overflowed its 28px slot into the neighbor, producing uneven center-to-center spacing of [32px, 48px, 48px, 48px].
In the mobile drawer (320px max width → 284px inner header width on 375px/390px viewports), five 44px buttons with 4px gaps require 236px, leaving less than the width of the English "Sessions" label (~59px) + gap and causing .searchSlot (flex: 1; min-width: 0) to shrink.
Add overflow: hidden to .activitySlot to match .headerActions during width collapse transitions.
Under @media (hover: none), (pointer: coarse) and :global([data-phone-drawer]):
Size .iconButton, .searchButton, .activitySlot:not(.activitySlotHidden), .searchSlot, and .search consistently to 36px (keeping .sectionHeader at 44px height and preserving gap: 4px so search-expand negative collapse margins stay aligned).
Update .headerActions:not(.headerActionsHidden)max-width to 120px (3 × 36px + 2 × 4px = 116px), keeping :not(.activitySlotHidden) / :not(.headerActionsHidden) guards so search expansion cleanly collapses all sibling slots to 0px.
Visual & Behavioral Verification
Verified in an isolated Web UI instance via Chrome CDP across mobile (390×844, 375×812) and desktop (1440×900), light/dark themes, and Chinese/English locales with 0 console errors:
Scenario
Before (center-to-center)
After (center-to-center)
Title Gap / Clipping
Search Expand & Collapse
Phone 390×844 zh dark (会话)
[32, 48, 48, 48] px
[40, 40, 40, 40] px
60px, unclipped
Expands to 284×36, collapses cleanly
Phone 375×812 en dark (Sessions)
[32, 48, 48, 48] px
[40, 40, 40, 40] px
29.1px, unclipped
Expands to 284×36, collapses cleanly
Desktop 1440×900 zh light (会话)
[32, 32, 32, 32] px
[32, 32, 32, 32] px
72px, unclipped
Expands to 256×30, collapses cleanly
Desktop 1440×900 en dark (Sessions)
[32, 32, 32, 32] px
[32, 32, 32, 32] px
41.1px, unclipped
Unchanged
(Sanitized before/after screenshots were captured and inspected locally for mobile dark zh, mobile dark en 375×812, and desktop light zh; maintainers can attach them to this PR if desired.)
This change evens out the spacing of the sidebar header icons on touch devices and in the mobile drawer. It only adjusts CSS sizes, and no concrete regression was found, so it is low risk to merge.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
标题“fix(web-ui): align spacing of sidebar threads header icons”准确描述了主要变更:修复侧边栏会话标题栏图标的间距。变更内容为 WorkspaceBrowser.module.css 中触屏与抽屉样式的尺寸调整,与标题一致。
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
Applicability reference: AGENTS.md: # Repository Guidelines `npm start` / `npm start web` rebuild and relaunch the user's Desktop / Web and may restart the shared Host; `npm stop` stops all local codexhost services across worktrees.
The focus-indicator concern does not hold. The Activity button's :focus-visible outline uses a negative offset, so it stays inside the button edge. The touch and drawer rules size that button and its visible slot to the same 36px limit, so the slot does not clip the focus ring.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes uneven horizontal spacing of the five action icons beside the sidebar Threads / Sessions header (
Activity,Search,New section,View options,Add workspace) on touch devices and in the mobile drawer.Root Cause
@media (hover: none), (pointer: coarse)and:global([data-phone-drawer]),.iconButton,.searchButton, and.searchSlotexpanded to44pxand.headerActionsexpanded to148px, while.activitySlotremained capped atmax-width: 28px(and lackedoverflow: hidden). As a result, the first (Activity)44pxbutton overflowed its28pxslot into the neighbor, producing uneven center-to-center spacing of[32px, 48px, 48px, 48px].320pxmax width →284pxinner header width on375px/390pxviewports), five44pxbuttons with4pxgaps require236px, leaving less than the width of the English"Sessions"label (~59px) + gap and causing.searchSlot(flex: 1; min-width: 0) to shrink.Changes
apps/web-ui/packages/client/ui-workspace/src/client/rows/WorkspaceBrowser.module.css:overflow: hiddento.activitySlotto match.headerActionsduring width collapse transitions.@media (hover: none), (pointer: coarse)and:global([data-phone-drawer]):.iconButton,.searchButton,.activitySlot:not(.activitySlotHidden),.searchSlot, and.searchconsistently to36px(keeping.sectionHeaderat44pxheight and preservinggap: 4pxso search-expand negative collapse margins stay aligned)..headerActions:not(.headerActionsHidden)max-widthto120px(3 ×36px+ 2 ×4px=116px), keeping:not(.activitySlotHidden)/:not(.headerActionsHidden)guards so search expansion cleanly collapses all sibling slots to0px.Visual & Behavioral Verification
Verified in an isolated Web UI instance via Chrome CDP across mobile (
390×844,375×812) and desktop (1440×900), light/dark themes, and Chinese/English locales with0console errors:center-to-center)center-to-center)390×844zh dark (会话)[32, 48, 48, 48]px[40, 40, 40, 40]px60px, unclipped284×36, collapses cleanly375×812en dark (Sessions)[32, 48, 48, 48]px[40, 40, 40, 40]px29.1px, unclipped284×36, collapses cleanly1440×900zh light (会话)[32, 32, 32, 32]px[32, 32, 32, 32]px72px, unclipped256×30, collapses cleanly1440×900en dark (Sessions)[32, 32, 32, 32]px[32, 32, 32, 32]px41.1px, unclipped(Sanitized before/after screenshots were captured and inspected locally for mobile dark zh, mobile dark en
375×812, and desktop light zh; maintainers can attach them to this PR if desired.)Validation
npx prettier --check apps/web-ui/packages/client/ui-workspace/src/client/rows/WorkspaceBrowser.module.css— passednpx vitest run --config tests/vitest.config.js apps/web-ui/packages/client/ui-workspace/test/— 2 test files / 11 tests passed[]) — passed