Group cmux TUI context menu actions
Merged
LA
3mo ago+297+297+012345678901234567890123456789-69-69-01234567890123456789
Summary
- group pane actions into current tab, creation, browser, pane layout, and ID sections
- render non-clickable separators and skip them during keyboard and mouse navigation
- update Rust TUI docs and smoke coverage for the new row layout
Testing
- ZIG=/opt/homebrew/Cellar/zig/0.15.2_1/bin/zig cargo test -p cmux-tui (223 passed)
- ZIG=/opt/homebrew/Cellar/zig/0.15.2_1/bin/zig cargo clippy -p cmux-tui --all-targets -- -D warnings
- isolated smoke-tui runtime replay through context-menu actions (SMOKE OK)
Scope
- Rust cmux-tui only
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.
Summary by cubic
Grouped context-menu actions in cmux-tui into sections with visible, non-clickable separators. When space is tight, the menu drops only extra separators so all actions remain visible.
-
New Features
- Pane menu groups: current tab, creation, browser (when available, adds “Activate” for external), layout, and IDs.
- Workspace menu groups rename/close and separates copy ID; screen menu groups rename/close.
- Separators draw as
├─┤; Up/Down and hit-testing skip them; Enter and clicks only activate actions.
-
Refactors
- Added
MenuItem;ContextMenunow holdsVec<MenuItem>and builds from grouped actions. - Introduced
pane_context_menu_groups(...), selection helpers that skip separators, andfit_to_rows(...)to manage separator collapse and bounds-safe selection.
- Added
Summary by CodeRabbit
- New Features
- Context menus are now grouped into sections with visible separator rows.
- Keyboard and mouse interactions treat separator rows as non-activating, ensuring Enter/right-click actions only trigger real items.
- Bug Fixes
- Improved rendering for separator rows and refined label drawing to match grouped layout.
- Documentation
- Expanded context-menu documentation with the grouped pane menu contents and described ID-copy actions.
- Tests
- Strengthened smoke/UI snapshot assertions and added unit coverage for grouped composition and navigation behavior.