Skip to content

cmux-tui: a left dock undocks on the left (cx-x7pl) - #18931

Merged
teamleaderleo merged 3 commits into
feat-cmux-nextfrom
op-next-call-x7pl
Oct 10, 2026
Merged

teamleaderleo merged 3 commits into
feat-cmux-nextfrom
op-next-call-x7pl

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Undocking the agent chat dock put the chat on the far right of the strip, even though it was docked on the left. The dock is created by moving the chat tab into a new column pinned to the left edge. With no anchor column, move-tab-to-column appends the new column after the last one and then pins it. The dock draws on the left, but its place in the column order is last, so clearing the pin scrolled it in on the right.

A column that a tab move pins to the left edge now leads the column order, so undocking it puts it first in the strip, on the left where it was shown. Right, top and bottom docks keep their place. Columns pinned with set-column-dock aren't moved.

A left dock made before this change is still last in the column order, so it still undocks on the right until it's docked again.

The other half of cx-x7pl, the drop ring staying on screen after a drop, is fixed in #18925.

Verification

a_tab_moved_into_a_left_dock_undocks_on_the_left (cmux-tui CLI test, real daemon over its socket) moves a tab into a new left-docked column, undocks it with set-column-dock, and requires that column to lead the strip. Run with scripts/verify-cmux-tui-hosted.sh --filter a_tab_moved_into_a_left_dock_undocks_on_the_left:

Not tried in the app with a live chat dock.

Changelog

  • Fixed: undocking the agent chat dock puts it on the left of the strip, not the right.

Captures

  • Native before/after (archive): cx-x7pl left undock. A tab moved into a new left dock column, then Undock Column: before, it moves to the far right; after, it stays on the left.

🤖 Generated with Claude Code


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


Summary by cubic

Fixes the agent chat dock undocking on the wrong side: a left-docked column now leads the column order, so undocking it scrolls it in on the left where it was shown, instead of on the far right.

  • Left docks created before this change keep their old order and still undock on the right until docked again.
  • Right, top, and bottom docks are unaffected; columns pinned with set-column-dock aren't moved.
  • Adds a CLI test that moves a tab into a new left-docked column, undocks it, and requires it to lead the strip.

Written for commit 21435b3. Summary will update on new commits.

View guided diff Turn on auto-fix


Note

Low Risk
Localized layout-order adjustment only when creating a left dock via tab drag; covered by a new daemon integration test.

Overview
Fixes left-docked columns created via move-tab-to-column appearing at the far right of the strip after undock. New columns were still appended last in layout_columns while drawing on the left, so clearing the dock scrolled them in on the wrong side.

After pinning a left dock during tab drag in apply_tab_drag, the new column is moved to index 0 in the column list and the layout projection is synced. Other dock edges and set-column-dock pinning are unchanged; existing left docks keep their old order until re-docked.

Adds a Unix CLI integration test that docks a tab on the left, undocks with set-column-dock, and asserts the column leads the strip.

Reviewed by Cursor Bugbot for commit 21435b3. Bugbot is set up for automated code reviews on this repo. Configure here.

teamleaderleo and others added 2 commits October 9, 2026 19:38
…x7pl red)

Through a real daemon: a tab moves into a new column docked left, the
column is undocked, and it must lead the strip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o it undocks on the left (cx-x7pl)

move-tab-to-column with no anchor put the new column after the last one,
then pinned it left. The left dock drew on the left, but its place in the
order was the far right, so undocking it (the agent chat dock) scrolled it
in on the right. A column pinned left by the move now leads the order.

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

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f894eb2b-efac-48f8-a4e6-9aea8d852bca

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…call-x7pl

# Conflicts:
#	cmux-tui/crates/cmux-tui/tests/cli.rs
@blacksmith-sh

This comment has been minimized.

@blacksmith-sh

This comment has been minimized.

@teamleaderleo
teamleaderleo merged commit 5266485 into feat-cmux-next Oct 10, 2026
228 of 259 checks passed
@teamleaderleo
teamleaderleo deleted the op-next-call-x7pl branch October 10, 2026 04:27
lawrencecchen added a commit that referenced this pull request Oct 10, 2026
… before cx-x7pl [cx-tqes]

move_tab_to_column_pins_the_new_column_with_its_role (added with
dock-column-role-v1, ef830a5 #18169) read the new column at index 1:
move-tab-to-column with no anchor put it after the last column. #18931
(5266485, cx-x7pl) changed that on purpose: a column pinned left by
the move now leads the order, so undocking the agent chat dock scrolls it
in on the left. The pin and its role are still written (the column is at
index 0 now); only the old position is gone. #18710 (a0ddb9c) is not
the cause: the moved column has one pane, which the chat-dock split rule
allows.

The test is an in-process unit test that asserts the removed order, so it
is deleted, not fixed (no-unit-tests rule). The daemon behavior test
tests/cli/left_dock_undock.rs (#18931) now moves the tab with role
agent_chat and asserts that the new column leads the order with
{edge: left, mode: docked, role: agent_chat}, so the role pin keeps a
check at the socket boundary.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
artifacts — 21435b39 Deployed Oct 10, 2026 by teamleaderleo via publish tree-addressed cmux-tui #3381
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant