Skip to content

cmux-next sidebar: pinned rows end where the other rows do (row trim) - #23478

Merged
teamleaderleo merged 2 commits into
feat-cmux-nextfrom
ssv2/pinned-trim
Oct 21, 2026
Merged

teamleaderleo merged 2 commits into
feat-cmux-nextfrom
ssv2/pinned-trim

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

The pinned Home and App Store rows end where the sidebar's other rows end. Since #22733 every list row stops SidebarStyle.rowTrailingTrim (8 pt) short of the list's right inset. The pinned rows draw in a block row, which lays out its own items across the full width, so their pills ran 8 pt past the group header and the workspace rows. This is the SidebarPinnedRowWidthTests red on feat-cmux-next.

What changes

  • SidebarRegionMetrics.trailingTrim (0 by default): a region's list rows end that much short of its right edge. Cards and the tile and inline arrangements are unchanged.
  • The list's blocks (SidebarView+Sections) set it to rowTrailingTrim. The fixed bands outside the list keep their full width.

Tests

No capture: the change is 8 pt on two pinned rows' right edge, measured exactly by the test above; a native capture needs a fleet Mac, and the Mac queue is stalled right now.

Risk: low. One new metric, 0 everywhere except the list's blocks.

Agent session: cosmic-gray

🤖 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 pinned Home and App Store rows in the cmux-next sidebar ending 8 pt past the other list rows, so all rows now stop together at SidebarStyle.rowTrailingTrim short of the right inset.

The list's blocks now draw their rows trailingTrim short of the right edge via a new SidebarRegionMetrics.trailingTrim (0 everywhere except the list blocks); the fixed bands outside the list keep their full width. Updates SidebarPinnedRowWidthTests, which still asserted the pre-#22733 layout, to expect the group header at the trimmed edge and to keep checking the pinned pills match the header's span across all densities and widths.

Written for commit 02b3b9b. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 2 commits October 21, 2026 07:44
…e (failing)

SidebarPinnedRowWidthTests still wanted the group header to end at the
list's right inset; since #22733 every list row ends rowTrailingTrim
short of it, as SidebarRowGutterTests learned in #23304. The pinned Home
and App Store pills must end at the same place, and do not yet: they run
8 pt past the header at every density and width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d18-aabc-7850-af29-f0655b1d2a1a&host=cosmic-gray
#22733 ends every list row SidebarStyle.rowTrailingTrim short of the
right inset, but a block row (the pinned Home and App Store) lays out
its own items across the full row, so their pills ran 8 pt past the
group header and the workspace rows. SidebarRegionMetrics gets a
trailingTrim (0 by default), which the list's blocks set to the row
trim; a block's list rows end that much short. The fixed bands outside
the list keep their full width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d18-aabc-7850-af29-f0655b1d2a1a&host=cosmic-gray
@teamleaderleo teamleaderleo added the risk:low Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by subsession-visibility-2 on cosmic-gray · session

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 02b3b9b: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr23478 -f ref=ssv2/pinned-trim -f platform=macos -f backend_mode=local

Not verified: macOS jobs did not run: compile and app tests were skipped on 02b3b9bac0; ci-status is green without them.

CI passes on 02b3b9bac0 (run 39619886909 attempt 1).
macOS jobs did not run: compile and app tests were skipped: Fast static checks skipped (the macos job needs both to succeed). Re-run CI once they pass, before merging.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW: red check: Script tests (pin-cmux-tui, embed-cef, ensure-cef store) (+1 more) is not red on the base 203a136; do not merge until green; see lane-rules

Tour of 02b3b9bac0 (run)

Both apps run cmux-tui from 48cfc9b (tree 5715f67083f1): the merge base's own tree 077ab7e6aca3 was not published yet.

Path-selected interactions

Interaction Changed paths
pinned-tabs Packages/macOS/CmuxNext/Tests/CmuxNextAppTests/SidebarPinnedRowWidthTests.swift
core Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Sections/SidebarRegionLayout.swift
Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Views/SidebarView\+Sections.swift

Core UI (before): DEGRADED — 19 ok, 1 unavailable

tour

Video (mp4)

# Step Result Command
1 Launch ok
2 New workspace ok cmux workspace new --name Tour
3 Type in the terminal ok cmux workspace name:Tour screen current pane current tab current terminal current write --text "echo hello from the cmux-next tour\r"
4 A command reports progress: tab loading spinner ok cmux workspace name:Tour screen current pane current tab current terminal current write --text "clear; printf '\\033]9;4;3\\007'; sleep 900\r"
5 Split right ok cmux action run splitRight
6 Split down ok cmux action run splitDown
7 New terminal tab ok cmux action run newSurface
8 Browser tab ok cmux tab new-browser --url https://example.com
9 Hide the sidebar ok cmux action run toggleSidebar
10 Show the sidebar ok cmux action run toggleSidebar
11 Notification ok cmux notify --title Tour --body "Hello from CI"
12 Notifications panel ok cmux action run showNotifications
13 Agent chat ok cmux agent new-chat
14 Agent workspace ok cmux workspace new --name Agent
15 Agent starts ok cmux workspace name:Agent screen current pane current tab current terminal current write --text "clear; printf '\\033]7501;state=working\\033\\\\'; sleep 8; printf '\\033]7501;state=done\\033\\\\'; sleep 900\r"
16 An agent works: row working spinner ok cmux workspace new --name Notes
17 The agent finishes: done mark in the spinner's place ok
18 Session tree: keycaps on the first rows ok cmux settings set sidebar.sessionTree true
19 Session tree back off for later tours ok cmux settings set sidebar.sessionTree false
20 Profile menu unavailable: exited 1 (the menu shot needs a screen capture route) cmux action run sidebar.profileMenu
Screenshots (15)

1. Launch
Launch

2. New workspace
New workspace

3. Type in the terminal
Type in the terminal

4. A command reports progress: tab loading spinner
A command reports progress: tab loading spinner

5. Split right
Split right

6. Split down
Split down

7. New terminal tab
New terminal tab

8. Browser tab
Browser tab

9. Hide the sidebar
Hide the sidebar

11. Notification
Notification

12. Notifications panel
Notifications panel

13. Agent chat
Agent chat

16. An agent works: row working spinner
An agent works: row working spinner

17. The agent finishes: done mark in the spinner's place
The agent finishes: done mark in the spinner's place

18. Session tree: keycaps on the first rows
Session tree: keycaps on the first rows

### Core UI \(after\): DEGRADED — 19 ok, 1 unavailable

tour

Video (mp4)

# Step Result Command
1 Launch ok
2 New workspace ok cmux workspace new --name Tour
3 Type in the terminal ok cmux workspace name:Tour screen current pane current tab current terminal current write --text "echo hello from the cmux-next tour\r"
4 A command reports progress: tab loading spinner ok cmux workspace name:Tour screen current pane current tab current terminal current write --text "clear; printf '\\033]9;4;3\\007'; sleep 900\r"
5 Split right ok cmux action run splitRight
6 Split down ok cmux action run splitDown
7 New terminal tab ok cmux action run newSurface
8 Browser tab ok cmux tab new-browser --url https://example.com
9 Hide the sidebar ok cmux action run toggleSidebar
10 Show the sidebar ok cmux action run toggleSidebar
11 Notification ok cmux notify --title Tour --body "Hello from CI"
12 Notifications panel ok cmux action run showNotifications
13 Agent chat ok cmux agent new-chat
14 Agent workspace ok cmux workspace new --name Agent
15 Agent starts ok cmux workspace name:Agent screen current pane current tab current terminal current write --text "clear; printf '\\033]7501;state=working\\033\\\\'; sleep 8; printf '\\033]7501;state=done\\033\\\\'; sleep 900\r"
16 An agent works: row working spinner ok cmux workspace new --name Notes
17 The agent finishes: done mark in the spinner's place ok
18 Session tree: keycaps on the first rows ok cmux settings set sidebar.sessionTree true
19 Session tree back off for later tours ok cmux settings set sidebar.sessionTree false
20 Profile menu unavailable: exited 1 (the menu shot needs a screen capture route) cmux action run sidebar.profileMenu
Screenshots (15)

1. Launch
Launch

2. New workspace
New workspace

3. Type in the terminal
Type in the terminal

4. A command reports progress: tab loading spinner
A command reports progress: tab loading spinner

5. Split right
Split right

6. Split down
Split down

7. New terminal tab
New terminal tab

8. Browser tab
Browser tab

9. Hide the sidebar
Hide the sidebar

11. Notification
Notification

12. Notifications panel
Notifications panel

13. Agent chat
Agent chat

16. An agent works: row working spinner
An agent works: row working spinner

17. The agent finishes: done mark in the spinner's place
The agent finishes: done mark in the spinner's place

18. Session tree: keycaps on the first rows
Session tree: keycaps on the first rows

### Pinned tabs \(before\): PASS — 10 ok

tour

Video (mp4)

# Step Result Command
1 Launch ok
2 New workspace ok cmux workspace new --name Pins
3 Second terminal tab ok cmux action run newSurface
4 Third terminal tab ok cmux action run newSurface
5 Browser tab: four tabs ok cmux tab new-browser --url https://example.com
6 Pin the browser tab: it moves to the start as an icon-only tab ok cmux action run palette.toggleTabPin
7 Select the next tab ok cmux action run nextSurface
8 Pin a terminal tab: it joins the pinned tabs ok cmux action run palette.toggleTabPin
9 Close Other Tabs from a pinned tab keeps both pinned tabs ok cmux action run closeOtherTabsInPane
10 Unpin the terminal: it returns to the normal tabs ok cmux action run palette.toggleTabPin
Screenshots (7)

1. Launch
Launch

2. New workspace
New workspace

5. Browser tab: four tabs
Browser tab: four tabs

6. Pin the browser tab: it moves to the start as an icon-only tab
Pin the browser tab: it moves to the start as an icon-only tab

8. Pin a terminal tab: it joins the pinned tabs
Pin a terminal tab: it joins the pinned tabs

9. Close Other Tabs from a pinned tab keeps both pinned tabs
Close Other Tabs from a pinned tab keeps both pinned tabs

10. Unpin the terminal: it returns to the normal tabs
Unpin the terminal: it returns to the normal tabs

### Pinned tabs \(after\): PASS — 10 ok

tour

Video (mp4)

# Step Result Command
1 Launch ok
2 New workspace ok cmux workspace new --name Pins
3 Second terminal tab ok cmux action run newSurface
4 Third terminal tab ok cmux action run newSurface
5 Browser tab: four tabs ok cmux tab new-browser --url https://example.com
6 Pin the browser tab: it moves to the start as an icon-only tab ok cmux action run palette.toggleTabPin
7 Select the next tab ok cmux action run nextSurface
8 Pin a terminal tab: it joins the pinned tabs ok cmux action run palette.toggleTabPin
9 Close Other Tabs from a pinned tab keeps both pinned tabs ok cmux action run closeOtherTabsInPane
10 Unpin the terminal: it returns to the normal tabs ok cmux action run palette.toggleTabPin
Screenshots (7)

1. Launch
Launch

2. New workspace
New workspace

5. Browser tab: four tabs
Browser tab: four tabs

6. Pin the browser tab: it moves to the start as an icon-only tab
Pin the browser tab: it moves to the start as an icon-only tab

8. Pin a terminal tab: it joins the pinned tabs
Pin a terminal tab: it joins the pinned tabs

9. Close Other Tabs from a pinned tab keeps both pinned tabs
Close Other Tabs from a pinned tab keeps both pinned tabs

10. Unpin the terminal: it returns to the normal tabs
Unpin the terminal: it returns to the normal tabs

Tours are data in scripts/cmux-next/media/tours: add a step or a tour file to show your feature.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (independent subagent, correctness first): SHIP at 02b3b9bac08fb39a9fb8b0b4e75cbd52d9e19d9b

Traced the geometry for the test's .builtIn top section under the default look: the plain list branch, uncarded. The pinned pills now span inset to W − inset − trim, which is exactly the depth-0 group header's pill. The test correction still catches the original overflow, so it is a correction, not a loosening. SidebarListBlocks is built in one place; the bands outside the list keep trim 0. Two cosmetic leftovers, not blocking: a block's section header and app rows keep the full width, and drag.restFrame and the list-gap settle frame ignore the trim, as they have since #22733.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-k4nzn created for this PR by the cmux coordinator.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / defaults-snapshot is red on 18 of 20 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (independent subagent, correctness first): SHIP at 02b3b9b

(Corrects the earlier receipt, which named the same commit with a mistyped full SHA. The review covered this head: 3f4d310 failing test, 02b3b9b fix.)

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Fleet run at 02b3b9b (cmux-ci step 5d6cb492, aws-m4pro-9): SidebarPinnedRowWidthTests passes, all 12 cases. On base 74b91c1 it fails all 12 (fleet step d2caf693). The one red here, the cmux-next checks aggregator, comes from tests/test_guard_hooks_from_base.py hitting a maintenance.lock rmtree race in its temp-repo cleanup: a script-test flake this Swift-only diff does not touch. Merging.

@teamleaderleo
teamleaderleo merged commit 0ba04dd into feat-cmux-next Oct 21, 2026
@teamleaderleo
teamleaderleo deleted the ssv2/pinned-trim branch October 21, 2026 16:30
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:low Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant