Repository navigation
fix: open the requested tmux session instead of the session picker - #70
Merged
Merged
Conversation
A terminal tab opened for a named tmux session passed it only as a command to type after login. With Auto tmux on and more than one session on the host, the backend sends the session list for the picker and never types that command, so the requested session was dropped. The tab now also asks for a direct attach (tmuxAttachSession); the command stays as the fallback for a backend without the tmux service. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
AI review | Looks safe to merge The change passes a tmux session name as a direct-attach prop to the terminal component so it bypasses the session picker when Auto tmux is enabled. It includes matching frontend tests and contains no security risks or rule violations. Reviewed 581e9b2. AI can be wrong, a maintainer still decides. Comment |
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.
Problem
In Tmux Monitor, the "attach in a terminal tab" button (the triangle on a session row) should open that session. On a host with Auto tmux on and more than one tmux session, the new tab shows the "TMUX SESSIONS" picker instead, and the session that was asked for is forgotten. Picking it by hand works.
Cause
terminal.openputs the session intab.data.tmuxSession.TerminalTabContent(andTerminalApp, for the?view=terminal&tmuxSession=browser tab) turn that intoexecuteCommand(tmux attach-session -t '=<name>') only. In the backend's connect handler, Auto tmux is checked before post-shell commands: with several sessions it sendstmux_sessions_availableand returns without callingrunPostShellCommands, soexecuteCommandis never typed.With Auto tmux off, or with a single session, the problem does not show.
Fix
Both components now also pass the session as
tmuxAttachSession, the direct-attach request that Tmux Monitor's inline view already uses. The backend takes its existingtmux_direct_attachbranch and attaches without asking.executeCommandis kept, so a backend without the tmux service behaves as before.No backend change.
Testing
frontend.jsof 1.3.0 in both places: the button now opens the chosen session directly, and a plain new terminal on the same host still shows the picker.mainhas no section for the next version yet. Happy to add one where you want it.🤖 Generated with Claude Code