Open real auxiliary panes on the native terminal backend - #1222
Merged
Conversation
Dev-server and git-operation panes were raw tmux splits against dev3-task-<id>, a session a native task never has. The git panes threw; the dev-server split failed inside a best-effort catch, so the dev script kept running invisibly in a tmux session a native task should never touch at all. Add a backend-neutral seam that owns auxiliary panes: it derives ownership from the command a pane was launched with (as the tmux code already did), replaces the pane a purpose already owns instead of stacking a second one, and hands focus back to the pane that had it. Route the dev server and the shared git-operation pane through it, and make the dev server's liveness, status and teardown read the right host per backend. Also fixes two leaks the same blind spot caused: task teardown skipped the dev server entirely on native, and the agent hand-off prompts (rebase conflicts, Create PR, Commit, scheduled messages) were tmux-only, so they silently did nothing.
Backend matrix over the seam, the dev server and the agent hand-off: the native paths must make zero tmux calls, must not stack a second pane on a repeated action, and must leave the agent pane focused. The tmux cases assert the split arguments unchanged, so the old behaviour stays pinned. Renderer: an auxiliary pane is named in the narrow pane pager and in the close-pane picker instead of falling back to "Pane N".
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.
On a task using the native terminal backend, starting the dev server or running
Rebase never produced a visible pane. Both actions split into
dev3-<id>, a tmuxsession a native task does not have. The two halves failed differently, which is
why one bug looked invisible and the other looked broken:
dev3-dev-<id>, thenfailed the viewer split inside a best-effort
catch. The server ran with portsbound and no pane anywhere — including a tmux session a native task should never
touch at all.
tmux split-window failedinstead of doing anything.The seam
src/bun/task-aux-panes.tsowns every pane an action opens. It picks tmux split vsnative SplitTree pane, replaces the pane a purpose already owns instead of stacking
a second one, and hands focus back to the pane that had it — the native coordinator
makes a new pane active on split, so the agent would otherwise lose input.
Ownership is derived, never stored: a pane is re-found by matching the command it
was launched with, exactly as the tmux code already did with
#{pane_start_command}.Nothing is cached in RAM (which a restart would lose while the pane lives on) and
nothing new is written under
~/.dev3.0/. Pane labels fall out of the same lookup,so the narrow pager and the close-pane picker can say "Dev Server" instead of "Pane 2".
Callers supply what each backend runs, because they differ: the tmux dev-server pane
runs a re-attach loop into a nested session, while the native pane runs the dev script
itself. tmux behaviour is unchanged and pinned by tests asserting the split arguments.
Two leaks the same blind spot caused
lifecycle/executor.tskillDevServerexplicitly skipped native tasks, with acomment claiming a native task owns no dev server. It does — the whole dev-server
process tree and its pool ports leaked on teardown.
exitCopyModeAllPanesprobed tmux on native tasks.Behaviour
An action that genuinely cannot run fails honestly: starting the dev server with no
live terminal reports "the task terminal is not running, so it has no pane to split"
and creates no tmux session and no hidden process. That is precisely the case that
used to start an invisible one.