Commit 98ed9c5
Route pane menu actions through a guarded dispatcher (#507)
* Provide a pure cockpit pane menu contract
The cockpit needs the dmux-style pane menu model before any terminal/backend execution is wired. This keeps the menu state, rendering, key handling, and compatibility export reusable and deterministic while leaving backend actions as selected action ids only.
Constraint: User requested no backend execution in this task
Rejected: Include pane action dispatcher changes | separate sibling work is dirty in the same worktree and exceeds the pure menu model scope
Confidence: high
Scope-risk: moderate
Directive: Do not wire these action ids to pane/worktree mutation without a separate backend execution task and focused safety coverage
Tested: node --test test/cockpit-pane-menu.test.js test/cockpit-menu.test.js test/cockpit-control.test.js test/cockpit-keybindings.test.js
Tested: node --test test/cockpit-pane-menu.test.js test/cockpit-menu.test.js test/cockpit-control.test.js test/cockpit-keybindings.test.js test/tmux-session.test.js test/agents-start-dry-run.test.js
Tested: openspec validate agent-codex-dmux-pane-context-menu-2026-04-30-13-54 --type change --strict
Not-tested: npm test is red in existing broad suites: 441/454 passing, 12 failing, 1 skipped
* Route pane menu actions through a guarded dispatcher
Pane menu actions needed one owner surface before wiring more terminal/backend behavior. The dispatcher keeps backend operations explicit, routes merge through gx agents finish, and leaves unsupported items visible as structured status results instead of raw errors.
Constraint: Pane menu actions must not bypass Guardex PR/worktree safety.
Rejected: Keep expanding action-runner.js inline | it hid backend and safety boundaries in one large switch.
Confidence: high
Scope-risk: moderate
Directive: Do not route create-pr or merge through direct git commands; keep PR/finish flows guarded.
Tested: npm test (485 pass, 1 skip, 0 fail); node --test dispatcher/kitty focused 28/28; openspec validate agent-codex-dmux-pane-context-menu-2026-04-30-13-54 --type change --strict; git diff --check
Not-tested: Real terminal backend hide/isolate implementations; no live interactive tmux/Kitty UI session exercised.
---------
Co-authored-by: NagyVikt <nagy.viktordp@gmail.com>1 parent 4e43438 commit 98ed9c5
21 files changed
Lines changed: 1747 additions & 618 deletions
File tree
- src
- agents
- cockpit
- test
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
192 | 198 | | |
193 | 199 | | |
194 | 200 | | |
| |||
0 commit comments