Skip to content

Fix/tmux manager dead pane on restart#105

Merged
an0nn30 merged 2 commits into
mainfrom
fix/tmux-manager-dead-pane-on-restart
Apr 7, 2026
Merged

Fix/tmux manager dead pane on restart#105
an0nn30 merged 2 commits into
mainfrom
fix/tmux-manager-dead-pane-on-restart

Conversation

@an0nn30

@an0nn30 an0nn30 commented Apr 7, 2026

Copy link
Copy Markdown
Owner

What does this PR do?

Type of change

  • Bug fix
  • New feature
  • Performance improvement
  • Refactor / cleanup
  • Documentation
  • Other (describe below)

Testing

  • Builds without errors (cargo build --release -p conch_tauri)
  • Tested on macOS / Windows / Linux (circle what applies)
  • No regressions in existing functionality

Notes for reviewer

an0nn30 added 2 commits April 7, 2026 12:11
Root cause: portable-pty's UnixMasterWriter::drop() sends newline +
EOF (Ctrl-D) to the PTY master when dropped. When the PTY hosts a
tmux attach-session, that EOF is forwarded by the tmux client to the
active pane inside the tmux session, causing the pane's shell to exit
cleanly with status 0. This only affects panes the user 'clicked
into' because tmux forwards input to the active pane.

Fix: implement Drop on PtyBackend that:
1. Sends SIGHUP explicitly to the child process group for proper
   hangup signaling
2. Replaces the writer with a no-op sink and forgets the original to
   prevent the EOF write from executing

The writer's FD is leaked but closed when the master PTY FD drops or
when the process exits. This path only runs during window/app cleanup.
When a plugin sets a tab title via applyTabTitle, mark the tab with
pluginRenamed=true. The onTitleChange callbacks in tab-manager.js now
skip overwriting when this flag is set, preventing shell OSC escape
sequences from replacing the plugin's intended tab name.
@an0nn30 an0nn30 merged commit 059110a into main Apr 7, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant