cmux-next sidebar: a long group or list shows its first rows then Show N more
This branch is built on #23633 (the Done fold); until that merges, the diff here includes it. The S5 commits: dc4d3f2 (the test), e212336, then d770b56 (test) and d6c52f8 (fix) for the review's finding, c903dc2 (the string catalog kept in base order) and 80da4b3 (off by default).
This is slice S5 of Leo's sidebar-organization ask (item A, per-group "Show more").
What changes
A group's members, or a section's loose rows, longer than the row limit show their first rows, then a "Show N more" row. Click it to list every row, with a "Show fewer" row at the end that folds them again.
- Always shown: rows that need you (the Priority view's needs-you state,
SidebarWorkspace.agentChip) and the active workspace stay shown past the limit, in their order. - No "Show 1 more": a list one row over the limit shows whole.
- With the Done fold: Done workspaces fold first (#23633) and count toward neither the limit nor "Show N more"; the Done row comes after the Show more row.
- Not limited: while filtering, with the session tree, in Group by Folder (as for the Done fold), or while a drag runs (drops resolve by the drawn rows' model indexes, as for the Done fold).
- A section's groups always show: its limit counts only its loose workspaces; groups and items are never hidden behind its Show more row (the first review's BLOCK, fixed in d6c52f8 after its red test d770b56).
- What redraws: a row starting or stopping to need you is a row move past the limit (
SidebarModel.movesRows, moved toSidebarModel+RowMoves.swift). A group past the limit folds by a full layout instead of the splice. Changing the limit lays the list out again. - The row: the same quiet chevron row as "Done (N)" (
SidebarDoneFoldRowView), no drop target, no rename; its list's menu on right-click. Open state is the list's view state (SidebarListView.openShowMore). - Setting: Debug tunable
sidebar.groupRowLimit, 0 (off) by default; set it (10 reads well) to turn Show more on. A default of 10 hid rows that existing behavior depends on (SidebarCloseWhileScrolledTestsscrolls to row 20 of 40 and failed on a display host at d6c52f8), so turning it on by default is its own change. - Strings: "Show %lld more" and "Show fewer", in all 21 locales.
Capture
14 loose workspaces, the limit set to 10 through debug.tunables, "Task 01" active: the first 10 rows, the active row kept past the limit, then "Show 3 more".
Capture steps-5f31262a71 at 1db910810772 (fleet build, capture mini, text checked for private data)
| Light | Dark |
|---|---|
![]() | ![]() |
The fix after it (d6c52f8) changes only sections that hold groups, so this capture still shows the head's behavior.
Tests
Tests/CmuxNextAppTests/SidebarShowMoreTests.swift (committed first):
- a long group shows its first rows then Show more, which counts the rest;
- rows that need you and the active one stay shown;
- an open list shows every row then Show fewer;
- one row over the limit shows whole;
- 0 turns it off;
- Done workspaces fold below Show more;
- loose rows limit too;
- groups past a section's limit stay shown (with the active workspace inside one);
- a long group is not spliced;
- the strings.
Red then green on the fleet (scripts/ci/run-swift-testing-suites.sh Packages/macOS/CmuxNext): groupsPastASectionsLimitStayShown fails at d770b56 and passes at d6c52f8. The fleet compile passed at 1db9108; the compile at 80da4b3 is running.
Takes back #23633: not a take-back. S5 adds .showMore to S4's case .doneFold line in SidebarRowViewPool.swift, so the Show more row reuses the done-fold row view; S4's behavior is unchanged.
Changelog
- Added: A long sidebar group or list shows its first rows and a "Show N more" row.
Agent session: cosmic-gray
🤖 Generated with Claude Code

