cmux-next sidebar: unbroken Edge-style group line, theme-color headers, header +, spam-click toggle (cx-q5jw)

Merged
TE
1mo ago
+109-62

Summary

Sidebar group polish from the 10-09 call and Leo's 10-10 notes on cx-q5jw, plus the default-color part of cx-25az.

  • Unbroken line (Edge style). Member rows now start right of their group's line (SidebarStyle.groupGutter), so hover and selection fills never cover it. Tab rows no longer draw their own rail at a different x and color. One line per group runs from under the header to the last member.
  • Theme colors, no pastels.
    • The header bar and the line use the theme's ANSI color itself, kept readable over the sidebar. The ink is black or white, whichever has more contrast.
    • A group with no color uses the sidebar's tonal step and primary text.
    • New groups get colors in a stable theme order (GroupColor.automaticOrder: red, green, yellow, magenta, cyan, then orange and pink). Blue is still never auto-picked.
  • Header +. It shows on hover next to the more button and runs workspaceGroup.newWorkspace, the same action as the editor's New Workspace in Group.
  • Spam clicks toggle. Fast clicks on the group chip now go open, closed, open.
    • Before, the third click landed within a double-click interval of the second click's close and was treated as the click that closed the editor, so the editor stayed shut.
    • Clicks are now matched by event number; a mouse-up shares its mouse-down's number.
  • Less left space. Member titles start just right of the line instead of a half-row indent.

Not in this PR (follow-ups on cx-q5jw): keeping the active workspace visible under a collapsed group, and dropping into a collapsed group. The color picker with custom hex and emoji (cx-25az) is a separate PR.

  • Review fixes:
    • No + on an empty group. A click on it raced the editor closing on a new group, which then went.
    • The + is hidden, not only transparent, until hover, so a click there before any hover still collapses the group.
    • Header buttons draw in the header's ink.
    • The + is clamped in a narrow sidebar.
    • The tab-drop line inside a group starts right of the line.

Testing

  • No test added. The no-unit-tests rule applies, and the debug socket doesn't expose sidebar row or line frames, so there is no behavior boundary to assert on.
  • Fleet compile and CmuxNext suites run on the head. The hosted Swift canary is the compile gate.
  • Not yet checked on a Mac: the look in light and dark themes and the spam-click toggle.

Changelog

Changed: Sidebar group lines run unbroken beside the members, group headers use the terminal theme's colors and have a + for a new workspace, and fast clicks on a group's name toggle its editor.

Showcase

group line before after

Open the live gallery

šŸ¤– Generated with Claude Code