cmux NEXT sidebar: one row gap after groups, folders and pins; the pin lines up with the rows
Leo, on the cmux NEXT sidebar: "ALL THIS RELATIVELY UNNECESSARY SPACING AFTER GROUPS AND AFTER PINS". Every two consecutive rows in the sidebar list are now one row spacing apart (space1, 2 pt), including under a group's last member, under a Group by Folder folder's last row, under the Pinned block's last row (or its drop zone during a drag) and under the session tree's last pinned chat. Before, each of those ends added its own gap on top of the row spacing:
| After | Before (compact / comfortable) | Now | Added by |
|---|---|---|---|
| a group's last row | + groupBottomPadding 6 / 8 pt | 0 | #15513 (21da8301, the first custom sidebar) |
| a folder's last row (Group by Folder) | + groupBottomPadding 6 / 8 pt | 0 | #18132 (3a01a385) |
| the Pinned block (pinned workspaces, pinned groups' block) | region bottom padding 4 pt + list topPadding 4 / 6 pt, instead of the row spacing | the row spacing | b4da8469 (sidebar-v2 client "band spacing", Lawrence, 2026-10-14) |
| an emptied block's drop zone (or the drop's gap there), titled or not | + topPadding 4 / 6 pt, or + sectionSpacing 8 / 12 pt for an untitled one | 0 | b4da8469 |
| Group by Status under the Pinned block | + sectionSpacing 8 / 12 pt | the row spacing | Group by Status |
| the session tree's pinned chats | + sectionSpacing 8 / 12 pt | 0 | #22323 (efe95ba3) |
groupBottomPadding is gone from SidebarLayoutMetrics and SidebarDensityTokens (no other reader). A list block now has no bottom padding: the list puts its row spacing (or the next block's own top edge, unchanged) under the block's last item. SidebarLayout.make carries what follows a document section (afterBlock): the row spacing under a bare block, nothing under its drop zone or drop gap (that row already ends with it), a section gap under its groups; Group by Status takes the same (statusRows(spacing:)). Gaps between sections that have headers, and between two top blocks, are unchanged. The fold splice (SidebarLayout.folding) and the double-click-in-empty-space target follow the same rule, so a fold still splices to exactly what make lays out.
Pinned row: its pin was drawn in a 12 pt square at the rows' content inset, and the pin glyph's ink sits about 3 pt inside that square, so the pin read as indented from the other rows' text and icons. The pin is now placed by its measured ink (SidebarGlyphInk, already used for icon-only items): the ink starts exactly where an unpinned row's icon or title starts and centers on the row the way that row's content does. The pinned row's icon and title move with the pin (same gap after it as before). Vertical centering was already right; it is now asserted.
Risk: low-to-normal (risk:normal). Spacing constants and one glyph offset in the cmux NEXT sidebar; no row model, data or layout-engine change, and no setting. What could go wrong: a row or the drag's drop gap a few points off in a section/block combination the tests do not cover (the drag hit test reads the drawn rows and gapShift, which keep their meaning). Undo is a revert; nightly carries the fix forward.
Adopted from its closed owner lane (cosmic-gray/sidebar-rows); brought onto feat-cmux-next at 0c1814b668e. The one conflict (SidebarListView+Drag.swift) was a comment edit inside group-reorder code base has since removed; base's side taken. Checked against the open sidebar PRs: #24513 (merged, group line chrome) and #24371 (pinned workspaces as list rows, hold) do not change these gaps.
Tests
SidebarUniformRowSpacingTests (CmuxNextAppTests), each committed before its fix:
- pure layout, at both densities: the gap under a group's last row, under a folded group, under a folder, under the Pinned block and under the pinned chats equals
rowSpacing; a fold splice equalsmake; a drop's gap alone under the Pinned block moves the rows below by exactlygapShift. - the Pinned drop zone (and the drop's gap in its place), with a 24 pt block and with an untitled 0 pt one: the next row follows by
rowSpacing. Group by Status under a bare Pinned block and under its drop zone: the first status header follows byrowSpacing. - the drawn sidebar (a real
SidebarViewwith a Pinned block of two workspace rows, a group and loose rows), at both densities: the measured gaps between the last pinned row and the next row, and between the group's last row and the next row, equal the row spacing; the pin's ink starts at an unpinned row's content x and centers on its row as that row's content does.
SidebarStatusGroupingTests.aStatusSectionsLastRowAndTheNextHeaderKeepTheRowSpacing: a status section's end adds no padding.
Observed / Not run
- Red, on the fleet at b4ea25bd (the first test commit, base code):
cmux-ci run --class light --script scripts/ci/run-swift-testing-suites.sh --arg Packages/macOS/CmuxNext(step 4730433c).SidebarUniformRowSpacingTestsfailed with 15 issues, each the old gap or the pin offset. - Red, on the fleet at 47a426ae (drop-zone test, before its fix): step 8f3c5004,
theRowUnderThePinnedDropZoneKeepsTheRowSpacing8 pt over the row spacing (gap and zone). Red at e0f6eaba (untitled drop zone and Group by Status tests, before their fix): step 4e0a235b, 8 pt (0 pt block, zone and gap) and 6 / 8 pt (status header under the block / its drop zone). - Green at 06251dd5 (head code): step d86954a1,
SidebarUniformRowSpacingTestspasses (all cases). The package run itself exits 1 on other suites (ActionRun, BrowserTabMirror, ScreenReplace and others): see the base comparison comment. scripts/cmux-next/prepush-gate.pyat the head: no new violations (the Sidebar-Look owner check passes: the commits are logged inplans/cmux-next/sidebar-owner.md, which gains a "Row gaps" target).- Review: Codex gpt-6-astra at xhigh, four rounds; rounds 1 and 2 found the drop zone and Group by Status cases above (fixed with tests first).
- Not run locally: no Swift builds on this host.
Capture
Steps file (fleet build, capture mini): Home pinned, a workspace "Pinned one", a loose row, a new group with two members, then a loose row. Before is base 0c1814b668e, after is d9c103d22e79 (the later commits change only drag/drop-zone and Group by Status spacing, which this scene does not show). Under the pinned Home row the row pitch drops from 32 to 26 pt (compact, the extra 6 pt gone), the group's members and the row after the group sit one row spacing apart, and the pin moves left to the rows' text start.
After steps-192f41d575 at d9c103d22e79 (fleet build, capture mini, text checked for private data)
| Light | Dark |
|---|---|
![]() | ![]() |
Before at base 0c1814b668e1
| Light | Dark |
|---|---|
![]() | ![]() |
Changelog
Changed: The cmux NEXT sidebar keeps one even gap between rows, with no extra space after groups, folders or pinned rows, and the pin on a pinned row lines up with the other rows.
🤖 Generated with Claude Code
Agent session: agent session



