Skip to content

cmux-next sidebar: a click moves no row, and a move changes the order once - #22960

Merged
teamleaderleo merged 4 commits into
feat-cmux-nextfrom
cmux/sidebar-one-move
Oct 21, 2026
Merged

teamleaderleo merged 4 commits into
feat-cmux-nextfrom
cmux/sidebar-one-move

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

In progress: the test commit is pushed, and the fix is next.

Leo (2026-10-20): moving between sidebar rows or clicking them causes "unnecessary multi-sidebar walks": the rows jump, then settle. The rule:

Causes found (planned fixes)

  • Collapsed groups: a collapsed group shows its selected member as its one row. Clicking any row outside the group removed that row, so every row below it moved up, including the one just clicked. The fix keeps that member shown until the group is folded or opened again.
  • Rows that change in the same moment as a click: a selection change and a row change arriving together reloaded the list at once, with no hold under the pointer. So a pending reorder nobody asked for showed up on the click. The fix draws only the selection and holds the row change, as for any change nobody asked for.
  • Switching to a workspace: switching ran a full pass over every row whenever the target's content wasn't parked, even if its row was already listed. The fix runs that pass only for a workspace that isn't listed yet.
  • Moves on the daemon path: a move on the daemon path (no personal order) had no pending edit, so each move-workspace echo showed an intermediate order. The fix adds the same pending edit the personal path uses.

Test

Tests/CmuxNextAppTests/SidebarClickMovesNoRowTests.swift:

  • Selecting rows outside a collapsed group keeps every row's top.
  • A click doesn't show a reorder that arrived in the same moment.
  • A move through SidebarRows shows exactly two orders, the start and the final one, across the partial echo, the final echo and the settle.

Commit 89cfe6f adds the tests alone; the first two should fail on base.

Observed / Not run

  • Observed: prepush-gate.py reports no new violations.
  • Not run yet: the Swift compile and the tests (CI and the fleet).

Changelog

  • Fixed: Clicking a sidebar row no longer moves other rows, and a move lands in one step.

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 sidebar rows jumping then settling on clicks and moves: a click or selection now moves no row, and a move changes the order exactly once.

  • Collapsed groups keep drawing the member the selection leaves (revealedMembers, tracked per group) until the group folds or opens, even across a later full layout, so clicking elsewhere removes no row.
  • A selection arriving with a row change nobody asked for draws the selection only; rows wait under the pointer like any other such change.
  • Switching to a workspace whose row is already listed skips the full walk of every row.
  • A reorder on the daemon path shows through a pending edit, so no command echo shows an intermediate order.
  • Adds tests in SidebarClickMovesNoRowTests.swift covering the collapse-group click, a full layout after it, a refold forgetting the member, a click landing with a waiting reorder, and a move drawing only the start and final orders.

Written for commit 4b1b954. Summary will update on new commits.

View guided diff Turn on auto-fix

…the order once

Red on base: selecting a row outside a collapsed group drops the group's shown member, and a
reorder nobody asked for shows with the click.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

owner: 01a15bf1-fd7b-72c2-917a-29462227f501 on cosmic-gray

@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 4b1b954: 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=pr22960 -f ref=cmux/sidebar-one-move -f platform=macos -f backend_mode=local

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

CI passes on 4b1b95457d (run 39551710352 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.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

… once

- A collapsed group keeps drawing a member the selection leaves (revealedMembers) until it folds
  or opens, so a click elsewhere removes no row.
- A selection that arrives with a row change nobody asked for draws the selection only; the rows
  wait under the pointer like any other such change.
- Switching to a workspace whose row is listed skips the walk of every row.
- A reorder on the daemon path shows through a pending edit, so no command echo shows a step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / defaults-snapshot is red on 23 of 23 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 and others added 2 commits October 20, 2026 22:09
…when it opens; the tests cover a full layout and the held change

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo
teamleaderleo merged commit 33ce33c into feat-cmux-next Oct 21, 2026
@teamleaderleo
teamleaderleo deleted the cmux/sidebar-one-move branch October 21, 2026 05:51
@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:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant