Repository navigation
cmux-next: dock columns keep an agent chat role (dock-column-role-v1) - #18169
Conversation
Red: set-column-dock and move-tab-to-column drop role, identify does not advertise dock-column-role-v1, the registry record drops it, and the app never sends it back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cmux-tui: ColumnDock gains an optional role (agent_chat), set with the pin by set-column-dock and move-tab-to-column, journaled and restored with it, dropped with it, and read as no role when unknown. identify advertises dock-column-role-v1. Spec and generated bindings updated. cmux next: DockSnapshot, the dock requests and the layout's DockColumn carry the role; no behavior uses it yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
This comment has been minimized.
This comment has been minimized.
|
Not verified: macOS jobs did not run: compile and app tests were skipped on CI passes on Written by |
|
Review (correctness read, nx-docked-column lane). One concrete defect: The agent_chat role is lost when a person re-docks the chat column. Suggested fix: when the column is already docked and the request omits |
…hat-role # Conflicts: # cmux-tui/bindings/cpp/.cmux-sdk-manifest.json # cmux-tui/bindings/cpp/include/cmux/raw/generated/models.hpp # cmux-tui/bindings/go/raw/.cmux-sdk-manifest.json # cmux-tui/bindings/go/raw/generated_commands.go # cmux-tui/bindings/go/raw/generated_events.go # cmux-tui/bindings/go/raw/generated_metadata.go # cmux-tui/bindings/go/raw/generated_presence_test.go # cmux-tui/bindings/go/raw/generated_types.go # cmux-tui/bindings/java/src/com/cmux/raw/.cmux-sdk-manifest.json # cmux-tui/bindings/java/src/com/cmux/raw/Protocol.java # cmux-tui/bindings/python/cmux/raw/_generated/.cmux-sdk-manifest.json # cmux-tui/bindings/python/cmux/raw/_generated/_schema.py # cmux-tui/bindings/python/cmux/raw/_generated/metadata.py # cmux-tui/bindings/rust/src/generated/.cmux-sdk-manifest.json # cmux-tui/bindings/rust/src/generated/commands.rs # cmux-tui/bindings/rust/src/generated/events.rs # cmux-tui/bindings/rust/src/generated/metadata.rs # cmux-tui/bindings/rust/src/generated/mod.rs # cmux-tui/bindings/rust/src/generated/types.rs # cmux-tui/bindings/typescript/src/raw/generated/.cmux-sdk-manifest.json # cmux-tui/bindings/typescript/src/raw/generated/commands.ts # cmux-tui/bindings/typescript/src/raw/generated/events.ts # cmux-tui/bindings/typescript/src/raw/generated/index.ts # cmux-tui/bindings/typescript/src/raw/generated/metadata.ts # cmux-tui/bindings/typescript/src/raw/generated/types.ts # cmux-tui/bindings/zig/src/raw/generated/.cmux-sdk-manifest.json # cmux-tui/bindings/zig/src/raw/generated/protocol.zig # cmux-tui/spec/commands.md
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 063fc3e. Configure here.
…hat-role # Conflicts: # cmux-tui/bindings/cpp/.cmux-sdk-manifest.json # cmux-tui/bindings/cpp/include/cmux/raw/generated/models.hpp # cmux-tui/bindings/cpp/src/raw/generated/protocol.cpp # cmux-tui/bindings/go/raw/.cmux-sdk-manifest.json # cmux-tui/bindings/go/raw/generated_commands.go # cmux-tui/bindings/go/raw/generated_events.go # cmux-tui/bindings/go/raw/generated_metadata.go # cmux-tui/bindings/go/raw/generated_presence_test.go # cmux-tui/bindings/go/raw/generated_types.go # cmux-tui/bindings/java/src/com/cmux/raw/.cmux-sdk-manifest.json # cmux-tui/bindings/java/src/com/cmux/raw/Protocol.java # cmux-tui/bindings/java/src/com/cmux/raw/SetColumnDockRequest.java # cmux-tui/bindings/python/cmux/raw/_generated/.cmux-sdk-manifest.json # cmux-tui/bindings/python/cmux/raw/_generated/_schema.py # cmux-tui/bindings/python/cmux/raw/_generated/client.py # cmux-tui/bindings/python/cmux/raw/_generated/metadata.py # cmux-tui/bindings/python/cmux/raw/_generated/models.py # cmux-tui/bindings/rust/src/generated/.cmux-sdk-manifest.json # cmux-tui/bindings/rust/src/generated/commands.rs # cmux-tui/bindings/rust/src/generated/events.rs # cmux-tui/bindings/rust/src/generated/metadata.rs # cmux-tui/bindings/rust/src/generated/mod.rs # cmux-tui/bindings/rust/src/generated/types.rs # cmux-tui/bindings/typescript/src/raw/generated/.cmux-sdk-manifest.json # cmux-tui/bindings/typescript/src/raw/generated/commands.ts # cmux-tui/bindings/typescript/src/raw/generated/events.ts # cmux-tui/bindings/typescript/src/raw/generated/index.ts # cmux-tui/bindings/typescript/src/raw/generated/metadata.ts # cmux-tui/bindings/typescript/src/raw/generated/types.ts # cmux-tui/bindings/zig/src/raw/generated/.cmux-sdk-manifest.json # cmux-tui/bindings/zig/src/raw/generated/protocol.zig # cmux-tui/crates/cmux-tui-core/src/model/layout_columns.rs # cmux-tui/crates/cmux-tui-core/src/mux/dock_columns.rs # cmux-tui/crates/cmux-tui-core/src/mux/tests/column_update.rs # cmux-tui/crates/cmux-tui-core/src/mux/tests/dock_columns.rs # cmux-tui/crates/cmux-tui-core/src/server.rs # cmux-tui/crates/cmux-tui-core/src/server/capabilities.rs # cmux-tui/crates/cmux-tui-core/src/server/dock_columns_tests.rs # cmux-tui/crates/cmux-tui-core/src/workspace_registry/resource_store/screen_rows.rs # cmux-tui/crates/cmux-tui-core/src/workspace_registry/resource_store/viewport.rs # cmux-tui/spec/sdk-schema.json
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Found 1 test failure on Blacksmith runners: Failure
|
… 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>

Summary
A dock column can now carry a role, and the only role is
agent_chat. This is groundwork for section D of the 2026-10-06 call: the agent chat becomes a docked region on the left (like the Codex app), and the app needs to know which dock is the chat dock.The role is an explicit, persisted flag rather than inferred from the column's tabs. Inference breaks when someone puts chats in a left dock by hand, or when a chat leaves the dock. An explicit role makes Dock/Undock and restart restore unambiguous.
ColumnDockgainsrole: Option<DockRole>.set-column-docktakes an optionalrole, andmove-tab-to-column'sdockpin carries one. The role lives and dies with the pin: undocking drops it. An unknown role is rejected (InvalidArgument, fieldrole). Stored roles decode leniently, so a newer role read by an older daemon becomes none instead of failing. It is advertised asdock-column-role-v1.dockin the registry viewport record, so the role rides along without a SQL migration.column.updatehas no role.sdk-schema.jsonandcommands.mddescribe the field. Bindings were regenerated in all 8 languages.DockSnapshot,SetColumnDockRequestand themove-tab-to-columnpin encode the role.CmuxNextLayout.DockColumnmaps it, andDaemonCapabilities.dockColumnRoleis optional.No behavior changes yet. A follow-up PR uses the role to open tools from the chat dock in the strip.
Testing
The tests were committed red before the fix (513ffb1). They are wire-level, so they compile on the old code.
Rust (
./scripts/verify-cmux-tui-hosted.sh --filter _roleon exact heads):dock_column_rejects_an_unknown_role,dock_column_role_capability_is_advertised,dock_column_role_is_kept_with_the_pin_and_dropped_with_it,move_tab_to_column_pins_the_new_column_with_its_role,a_registry_viewport_keeps_the_dock_roletest (linux);macOS lint and tests,Rust MSRV (1.91)andGo pane SDKpassedOn the green run,
lint (linux)failed only on the Rust god-file check. That failure is already onfeat-cmux-next(acpmuxprofiles.rsandrequests.rsare over the limit). Therelease-path dogfood artifacts / build aarch64-apple-darwinjob was refused by the runner hook because a fleet build was waiting for the host. That is infra, not a test result.After merging
permanent-dock-v1from base (21a8ef7, Lawrence's permanent docked column):ColumnDockandset-column-dockcarry bothroleandpermanent, and both capabilities are advertised../scripts/verify-cmux-tui-hosted.sh --filter dock_columnon head 0c2a49f passed:lint (linux),test (linux)(the role tests and the permanent-dock tests ran) andmacOS lint and tests(run).Swift:
scripts/measure/suite-runner.shon a fleet runner.EncodingTests.dockRequestsCarryTheDockRoleandDockColumnMappingTests.theAgentChatRoleSurvivesTheLayoutfailedEncodingTests,DockColumnMappingTests,DaemonCapabilityExportTests,DockColumnCapabilityTestsLocal: the SDK schema and codegen drift checks passed, and
verify-local.py --only swift-syntax --swift-changedpassed. The fullverify-local.pyfails onlocalization,localization-defaultsandpackage-groups. Those failures come from files this PR does not touch (string catalogs, the mismatch list, the workspace package groups).User-facing strings: none.
Not run: a review sub-agent (lane rule: no sub-agents). No live check, because nothing visible changes.
Changelog
none
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes dock column identification by adding an optional
roleto dock columns, withagent_chatthe only role, so the app can tell which dock is the chat column without inferring it from its tabs.set-column-dockandmove-tab-to-column, and dropped when the column is unpinned.dockJSON in the registry record, so no SQL migration is needed.dock-column-role-v1; unknown roles are rejected withInvalidArgument, and an unknown role in a stored record reads as no role instead of failing.Written for commit d636ad8. Summary will update on new commits.
Note
Medium Risk
Touches persisted layout state and mux protocol fields, but the capability is optional and older daemons/clients ignore unknown roles; runtime layout rules are unchanged until follow-up UI logic lands.
Overview
Introduces
dock-column-role-v1, an optionalroleon docked viewport columns so clients can mark the agent chat column (agent_chat) without inferring it from tab content.The daemon and wire protocol gain
roleonset-column-dock,move-tab-to-column'sdockpin, andScreen.columns[].dock. The role is kept with the pin, cleared on undock or when re-pinning without a role, rejected for unknown values, and decoded leniently in stored viewport JSON.ColumnDock::newand related call sites were updated to carry the new field alongside existing dock metadata.Cmux Next maps the role through
DockSnapshot,DockColumn,DockRole, andLayoutMapping, and advertisesdockColumnRoleas an optional daemon capability. SDK schema, commands.md, and generated bindings (all languages) were regenerated; IR SHA bumped.No product behavior uses the role yet—that is left to a follow-up (e.g. keeping new tools out of the chat dock).
Reviewed by Cursor Bugbot for commit d636ad8. Bugbot is set up for automated code reviews on this repo. Configure here.