fix(sidebar): a remote group's machine mark is its rows' size

Merged
TE
3d ago
+108-3

Leo (2026-11-02), on collapsing a remote group in the NEXT sidebar: "the sizes of the icons for groups and workspaces aren't the same size anymore they should be".

What changed

  • #29833 (ce08a58da9d) drew each workspace row's machine mark at a status mark's size (SidebarStyle.statusGlyphSize). It left the group header's trailing machine mark, added with the remote group in 4ef89f17eba, at SidebarStyle.leadingGlyphSide, so a remote group's mark drew bigger than the marks on the rows under it. The two sizes have differed since then.
  • GroupHeaderRowView now draws the rows' own mark image, WorkspaceRowView.machineMarkImage(SidebarMachineMark(machine), side:), at the rows' size. machineMarkSide gives that size for the default trailing look; the non-default leading look keeps the icon column's glyph size.
  • A group's own icon (glyph) and a workspace icon already share SidebarStyle.iconColumnBox. The new test pins that too.

Spec: leo-workspace design/sidebar.md (the machine mark sits in the trailing column at a status mark's size). The owner note is updated.

Test

SidebarGroupIconSizeTests runs at compact and comfortable density and every sidebar.textSize:

  • aGroupsIconIsItsRowsIconsSize: the group icon frame equals the workspace icon frame.
  • aRemoteGroupsMachineMarkIsItsRowsSize: the header's machine mark frame and image size equal the member row's, centered on the bar.

Observed / Not run

  • Ran python3 scripts/cmux-next/prepush-gate.py: no new violations.
  • Not run locally: the Swift build and tests. This lane host has no fleet client, so they run in this PR's CI. On base, aRemoteGroupsMachineMarkIsItsRowsSize should fail with mark boxes of 12 vs 10 pt (compact).

Changelog

Fixed: a remote group's machine icon is the same size as its workspaces' machine icons.

Risk: low. One glyph size and image on a remote group's header.

šŸ¤– Generated with Claude Code

Agent session: agent session


Autofix with [code]smith
Open in [code]smith Ā· Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the NEXT sidebar so a remote group's machine mark renders at the same size as the marks on its workspace rows — they had drifted out of sync since rows moved to the status-mark size.

  • Group headers now draw their own machine mark image at the status-mark size, so it no longer depends on the rows' mark (which #32688 removes); the non-default leading look keeps the icon column's glyph size.
  • Adds SidebarGroupIconSizeTests pinning the group icon and machine mark boxes to their rows' at each density and text size. The mark image rasters at the 12 pt icon floor, so the test checks the box, not the image's pixels.