Repository navigation
mux: TUI docs section - #7328
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThis PR replaces the extensive mux README with a condensed overview and moves detailed documentation into a new ChangesDocumentation overhaul
Estimated code review effort: 2 (Simple) | ~10 minutes Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 warning)
✅ Passed checks (23 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Greptile SummaryThis PR introduces
Confidence Score: 5/5Docs-only change with no production code touched; safe to merge. Every changed file is a Markdown document. No Swift, Rust, TypeScript, or configuration code is modified, so there is no risk to runtime behavior, concurrency, persistence, or security. mux/docs/protocol.md contains branch-specific wording ("this checkout", "this branch") on lines 802–804 that will read as stale once merged. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[mux/README.md\noverview + links] --> B[mux/docs/README.md\nindex]
B --> C[getting-started.md\nbuild, run, attach, sockets]
B --> D[concepts.md\ntree, focus, tabs, surfaces]
B --> E[keyboard.md\nprefix, bindings, remapping]
B --> F[mouse.md\nclick, drag, scrollbars, menus]
B --> G[configuration.md\nfull mux.json reference]
B --> H[protocol.md\nJSON-lines socket API]
B --> I[browser-panes.md\nCDP, rendering, input]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[mux/README.md\noverview + links] --> B[mux/docs/README.md\nindex]
B --> C[getting-started.md\nbuild, run, attach, sockets]
B --> D[concepts.md\ntree, focus, tabs, surfaces]
B --> E[keyboard.md\nprefix, bindings, remapping]
B --> F[mouse.md\nclick, drag, scrollbars, menus]
B --> G[configuration.md\nfull mux.json reference]
B --> H[protocol.md\nJSON-lines socket API]
B --> I[browser-panes.md\nCDP, rendering, input]
Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile |
| cargo test | ||
| ``` | ||
|
|
||
| This branch does not contain `scripts/mux-dev.sh`; use the `cargo run -p mux-tui` commands above for local, headless, and attach workflows. |
There was a problem hiding this comment.
This sentence refers to "This branch" as if the reader is on the feature branch, but the note will read as stale and confusing once these docs are merged into main or viewed from any other checkout. Either remove the sentence entirely (the
cargo run commands above already cover the workflow) or restate it without the branch reference.
| This branch does not contain `scripts/mux-dev.sh`; use the `cargo run -p mux-tui` commands above for local, headless, and attach workflows. | |
| Use the `cargo run -p mux-tui` commands above for local, headless, and attach workflows. |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
…, protocol, browser panes) Written by GPT 5.5 against this branch's code; README slims to overview + links, all behavior claims verified in-source (protocol v5, Keys::default bindings, collapse chain, scrollbar drag semantics, browser endpoints). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…alogs, platform support Written by GPT 5.5; every claim verified against this branch's code (protocol 6 + replay-carrying resize frames, non-v6 refusal, key defaults and alt_shortcuts/array/none config, move_tab/move_workspace drag paths, TextInput dialogs). README re-slimmed after the merge overwrote the earlier slimming. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
e358f7d to
1b74eab
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@mux/docs/getting-started.md`:
- Around line 46-52: The socket path example in the getting-started docs
conflicts with the actual fallback order. Update the default socket path example
near the socket-path explanation to reflect the full lookup chain used by the
socket resolution logic and smoke-attach behavior, or remove the single-path
example entirely; make sure it aligns with the session-derived path handling in
this section and the fallback order implemented by the socket selection flow.
In `@mux/README.md`:
- Line 35: The README’s socket-path description is incomplete and mismatches the
actual fallback logic used by mux/spec/transports.md and
mux/scripts/smoke-tui.py. Update the documented default socket location to
reflect the real resolution order from XDG_RUNTIME_DIR to TMPDIR to /tmp, and
make the sentence about the default socket path consistent with the socket
lookup implemented by the transport and smoke test code.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 92b3da4a-cb93-4c83-af60-1df4e738a095
📒 Files selected for processing (9)
mux/README.mdmux/docs/README.mdmux/docs/browser-panes.mdmux/docs/concepts.mdmux/docs/configuration.mdmux/docs/getting-started.mdmux/docs/keyboard.mdmux/docs/mouse.mdmux/docs/protocol.md
| The default socket path is: | ||
|
|
||
| ```text | ||
| $TMPDIR/cmux-mux-<uid>/<session>.sock | ||
| ``` | ||
|
|
||
| The usual default is `$XDG_RUNTIME_DIR/cmux-mux-<uid>/main.sock` when `XDG_RUNTIME_DIR` is set, then `$TMPDIR/cmux-mux-<uid>/main.sock`, then `/tmp/cmux-mux-<uid>/main.sock`. `--session <name>` changes the final file name. `--socket <path>` bypasses the session-derived path. Server-started child processes receive `CMUX_MUX_SOCKET` with the socket path. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Fix the socket example so it matches the fallback chain.
The block at Lines 46-50 shows only $TMPDIR/..., but the rest of this section and mux/scripts/smoke-attach.py fall back through XDG_RUNTIME_DIR, TMPDIR, and /tmp. Please update or remove the example so it doesn't contradict the actual lookup order.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@mux/docs/getting-started.md` around lines 46 - 52, The socket path example in
the getting-started docs conflicts with the actual fallback order. Update the
default socket path example near the socket-path explanation to reflect the full
lookup chain used by the socket resolution logic and smoke-attach behavior, or
remove the single-path example entirely; make sure it aligns with the
session-derived path handling in this section and the fallback order implemented
by the socket selection flow.
| ``` | ||
|
|
||
| Colors are `#rrggbb`, `#rgb`, or an xterm-256 index. The selection colors default to the user's Ghostty config (`selection-background`/`selection-foreground` from the platform paths above), falling back to a dark grey. `sidebar_rail` controls the active workspace rail, `sidebar_active_bg` its two-row background, `tab_rail` the active tab chip rail, `tab_bg` inactive solid tab chips, and `tab_active_bg` overrides the focused/unfocused active tab chip backgrounds when set. Tabs are numbered `1 2 3…` by default; recognized agent programs (the `agents` list) surface after the number, `show_titles` restores full process titles, and a user-assigned tab name overrides both. `sidebar.max_width` defaults to `0` for unlimited, while live drag still leaves at least 40 columns for panes. `scrollbar.position` is `"column"` by default or `"border"` for the old right-border overlay. Browser config is optional: `chrome_binary` overrides binary discovery, `cdp_url` accepts `ws://...` or `http://host:port`, `discover` defaults to true, `discover_ports` defaults to `[9222]`, `user_data_dir` overrides the launched profile path, and `ephemeral` restores temporary-profile behavior. When `ephemeral` is true it takes precedence over `user_data_dir`: cmux creates and later deletes a fresh temp profile and never deletes the configured directory. Every prefix/modeless binding is remappable via `keys` (formats: `"c"`, `"%"`, `"ctrl+b"`, `"alt+enter"`, `"tab"`, `"backtab"`, `"pageup"`); values may be a string, an array of strings, or `"none"` to unbind. Set `"alt_shortcuts": false` to remove default Alt chords without blocking user-configured Alt chords. `1`-`9` stay fixed to tab selection. The old key name `"rename-pane"` is still accepted as an alias for `"rename-tab"`. | ||
| The default session is `main`. Default sockets live at `$TMPDIR/cmux-mux-<uid>/<session>.sock`; use `--socket <path>` for an explicit path. Detach from an attached TUI with prefix `d`, which is `Ctrl-b d` by default. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Align the documented socket default with the real fallback order.
mux/spec/transports.md and mux/scripts/smoke-tui.py both resolve the session socket from XDG_RUNTIME_DIR, then TMPDIR, then /tmp, so this README sentence is incomplete and points readers at the wrong path on many hosts.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@mux/README.md` at line 35, The README’s socket-path description is incomplete
and mismatches the actual fallback logic used by mux/spec/transports.md and
mux/scripts/smoke-tui.py. Update the documented default socket location to
reflect the real resolution order from XDG_RUNTIME_DIR to TMPDIR to /tmp, and
make the sentence about the default socket path consistent with the socket
lookup implemented by the transport and smoke test code.
Adds
mux/docs/as the TUI's own documentation section (getting started, concepts, keyboard, mouse, full mux.json reference, control-socket protocol, browser panes) and slimsmux/README.mdto an overview with links. Docs-only; every behavioral claim was verified against this branch's code. Targets the feature branch, not main.🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Low Risk
Documentation-only reorganization with no runtime or API code changes.
Overview
Introduces
mux/docs/as the dedicated TUI documentation hub and turnsmux/README.mdinto a short overview with links to build, run, and dev commands.Content that lived in the monolithic README is split into focused pages: getting started, concepts, keyboard, mouse, full
mux.jsonreference, control-socket protocol v6 (attach streams, events, compatibility), and browser panes.docs/protocol.mdnotes thatmux/spec/is not in this checkout and points readers atmux-core/src/server.rsas the command source of truth until a formal spec lands.Reviewed by Cursor Bugbot for commit b3f1ed5. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit