fix(sidebar): every trailing mark and control on one column and one slot pitch
Leo, 2026-10-29: "I SAID THE SHIT WAS MISALIGNED LAST FUCCKING NIGHT ... I ALREADY FUCKING LAID OUT THE DETAILS LAST NIGHT ... FUCKING JUST DO IT"
What was misaligned on the sidebar's right edge (a hovered row's ⋮ ⌄ ✕ above rows with unread dots and the red ⓘ):
- A hovered workspace row stepped 22 pt from its ✕ to its ⌄ (the column's
space2gap), then 20 pt to its ⋮. A group header steps 20 pt (controlSize + space1). So a row's ⌄ and ⋮ sat 2 pt left of the header's ⋮ and + above them. - The row badge (unread dot, error ⓘ, stack) floored its x to whole points. At a fractional sidebar width (any dragged width) its dot sat up to 1 pt left of the ✕ and the header chevron above it.
- A listed tab's unread dot next to its status sat at an ad hoc
space2gap, not on the next slot.
The fix:
SidebarStyle.trailingSlotPitch(controlSize + space1) andtrailingSlotCenterX(rowWidth:slot:). Slot 0 is the trailing column. Each slot to its left steps one pitch.- Controls left of a column mark start one controls' gap (
space1) from the column's slot. A mark wider than the slot (a stack) keeps itsspace2gap. - The row badge snaps to the device pixel grid instead of flooring.
- A tab's dot beside its status takes slot 1.
- A group header's ⋮ and + center on slots 1 and 2. In comfortable density its 20 pt buttons used to step 21 pt, a point off a hovered row's ⌄.
- A row with nothing to disclose (workspace tabs on, no tabs) keeps no hidden chevron slot, so its hover ⋮ takes slot 1 instead of slot 2 beside an empty one.
- The
.evenclose spot's shift applies only when the mark sticks out of the column slot, so it no longer moves a cluster that already sits on the grid.
Test: SidebarTrailingSlotTests, every density at widths 220.5, 247.25, 263.75 and 301.5 pt.
- Every row kind's trailing mark is on the column within half a backing pixel.
- Every hovered control, on rows and group headers, is centered on
column - slot × pitch. - A tab's dot beside its status takes slot 1.
Red at the test commit: the hovered ⌄ is at 181.5 against slot 1 at 183.5, and the tab dot is at 187.5 against 183.5. Green at the head, together with SidebarTrailingColumnTests, SidebarRowTrailingStatusTests, SidebarTabGroupControlsTests and SidebarTabLineTests (fleet runs at head and at base).
Grid: the trailing column is the existing trailingColumnCenterX line (horizontalInset + controlSize/2 from the row's end), which every mark and the header chevron already share. Second-and-further marks step trailingSlotPitch. Leading lines and row pitch: leading not mine.
Risk: small. Geometry only on the sidebar's trailing controls, at most 2 pt. No behavior change.
Before (base c00c3219):
| Light | Dark |
|---|---|
![]() | ![]() |
After (head 03932523): the dots and the ⓘ sit on the column (nearest pixel, not floored). The hovered-row step (22 pt to 20 pt) is in the test numbers above; the capture's pointer cannot hover a badge-preview row.
| Light | Dark |
|---|---|
![]() | ![]() |
Agent session: agent session
🤖 Generated with Claude Code
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes sidebar trailing controls so hovered row buttons (⋮ ⌄ ✕), row badges, and tab dots all sit on one column and slot grid instead of drifting up to 2 pt off alignment.
- Adds
trailingSlotPitchandtrailingSlotCenterXso every control snaps to the same slot spacing the group headers already use. - Centers a hovered group header's ⋮ and + on the same slots, and drops the hidden chevron slot on rows with nothing to disclose so their hover menu takes slot 1.
- Snaps row badges to the nearest backing pixel instead of flooring to whole points, which put unread dots up to 1 pt off the column at fractional sidebar widths.
- Places a tab's unread dot next to its status on slot 1 rather than an ad hoc gap.
- Applies the
.evenclose-spot shift only when a mark sticks out of its column slot, so already-aligned clusters don't move.
Migration
Geometry-only change to the sidebar's trailing controls, at most 2 pt. No behavior changes. Adds SidebarTrailingSlotTests covering every density at fractional widths.



