cmux NEXT sidebar: rows take hover only inside their rounded pill, not the gap or corners

Merged
TE
17d ago
+251-11

Leo, on the nightly: moving the pointer up and to the left out of a sidebar row, it crossed the gap and the rounded corner of the row above. That row took the hover and showed its "..." and close buttons in his way.

A workspace or tab row in the sidebar now takes the hover only inside its pill: its frame inset by Metrics.space1 top and bottom, with corners rounded Metrics.space1 further in than the drawn ones. The gap between rows, the corners and the margin beside a row never hand the hover (or the workspace hover card) to a new row. The row already hovered keeps it across the gap up to its neighbor's pill, so a sweep down or up the list still never flickers (#20315). Clicks still split the gap between the two rows, as before. Headers, empty sections and blocks keep their whole tile.

  • SidebarLayout.hoverRow(at:current:frame:cornerRadius:inset:) is the one rule; SidebarListView.updateHover and the hover card's hoverCardWorkspace(at:) both use it.

Changelog

Fixed: The sidebar's gaps and rounded row corners no longer light the row above and put its buttons under the pointer.

Testing

Red then green, on the fleet (cmux-ci run --class light --script scripts/ci/package-test-lane.sh --arg=suite --arg=Packages/macOS/CmuxNext --arg=SidebarRowHoverInsetTests,SidebarRowHoverGapTests):

SidebarRowHoverInsetTests drives the real SidebarListView.updateHover in a window: the gap with nothing hovered hovers nothing; the row above's bottom-left corner doesn't take the hover from the row below; the margin beside a row doesn't hover it; a sweep up the list hovers each row once with no drop. SidebarRowHoverGapTests (the down sweep) now starts from the first row's middle, since a row's pill starts inside its frame.

Observed / Not run

Observed: the fleet runs above. Not run: the full CmuxNext suite (PRs here skip it).

Proof

PROOF_PENDING

šŸ¤– Generated with Claude Code


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


Summary by cubic

Fixes the cmux NEXT sidebar hover so workspace and tab rows take the hover only inside their rounded pill, not in the gap, corners, or the margin beside them. Moving the pointer up and left out of a row no longer lights the row above and puts its buttons in the way.

  • The hovered row keeps the hover across the gap up to its neighbor's pill, so sweeping up or down the list never flickers (#20315).
  • Clicks, the context menu, and middle-clicks act on the hovered row when one is hovered, so they never land on the row above; with nothing hovered, clicks still split the gap between rows.
  • Headers, empty sections, and blocks keep hovering over their whole tile, and the hover card follows the same row rule.
  • SidebarLayout.hoverRow is the single rule behind the list's hover, the hover card's target, and click targeting, with pill geometry covered by SidebarRowHoverInsetTests.