feat: jump to session via terminal adapter registry (cmux/tmux/iTerm2)#138
Open
Valgard wants to merge 1 commit into
Open
feat: jump to session via terminal adapter registry (cmux/tmux/iTerm2)#138Valgard wants to merge 1 commit into
Valgard wants to merge 1 commit into
Conversation
Enter previously jumped to a session only inside tmux. Replace the inline
tmux logic with a TerminalJumper registry (src/jump/, one adapter per file):
- cmux: read CMUX_WORKSPACE_ID from the agent process env, then
`cmux select-workspace --workspace <uuid>`
- tmux: the existing pane-switch, refactored; "PID not in any pane" is now
NotApplicable so other backends can try
- iTerm2: match the process's controlling tty to an iTerm2 session and focus
it via AppleScript (select pane/tab/window + activate)
resolve() walks jumpers() in order; the three-way JumpAttempt
(NotApplicable/Jumped/Failed) makes the adapters composable. Parsing and the
registry loop are unit-tested (15 new tests).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Enter"jump to session" worked only inside tmux. This refactors the inline tmux logic into aTerminalJumperregistry undersrc/jump/(one adapter per file) and adds two backends:CMUX_WORKSPACE_IDfrom the agent process env, thencmux select-workspace --workspace <uuid>.NotApplicableso other backends can try).How
resolve()walksjumpers()in order (cmux → tmux → iTerm2). The three-wayJumpAttempt(NotApplicable/Jumped/Failed) makes adapters composable — first applicable wins,NotApplicablefalls through. Backends are mutually exclusive by controlling tty.Tests / verification
cargo clippy -- -D warnings,cargo test(180 passed),cargo build --release.Notes
AGENTS.md(Key Bindings + new "Terminal Jump" section).Closes #137