Skip to content

Refresh tmux panes after process replacement notices - #167

Merged
tony merged 3 commits into
masterfrom
fix/78-pane-process-monitor
Dec 5, 2026
Merged

tony merged 3 commits into
masterfrom
fix/78-pane-process-monitor

Conversation

@tony

@tony tony commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Refs #78

What changed, and why:

Use TmuxPaneSync.watch_process() to refresh a pane when tmux reports a changed PID or dead state. The observer installs the capture into the existing terminal and advances its epoch. Some tmux releases can deliver replacement bytes before the passive notice. If you coordinate respawn, call resync() before issuing respawn-pane and send its returned pause command after the replacement starts.

Checks run:

On Linux, Ruff formatting and lint, ty for Python 3.12 through 3.15, the full pytest suite with doctests, compiled Ghostty comparisons, and the Sphinx warnings-as-errors build passed.

Tool use:

Codex prepared the change and ran the local checks. A separate Codex reviewer replayed the changed behavior and checked the publication tree against the reviewed patch.

tony added a commit that referenced this pull request Dec 3, 2026
why: Readers need the behavior and scope of this change at release.

what:
- Add the unreleased entry for PR #167
- Preserve previously published notes and the parent branch's entries
@tony
tony marked this pull request as ready for review December 3, 2026 01:39
@tony
tony force-pushed the fix/78-pane-process-monitor branch from 124512e to 7e4872d Compare December 3, 2026 23:58
tony added 3 commits December 5, 2026 07:48
why: A pane can keep its ID when tmux replaces its process.

what:
- Watch the pane's PID and dead state through control subscriptions.
- Request a fresh capture and advance the terminal epoch.
- Document caller-led respawn and passive notification timing.

Refs #78
why: Replacement output can arrive before tmux reports the change of
     process.

what:
- Describe process notifications and how a caller can mark a known
  respawn.
why: Match begin_attach() by signaling unsupported tmux server
     capabilities with ProtocolError instead of ValueError.

what:
- Raise libvt.exc.ProtocolError in TmuxPaneSync.watch_process() when
  tmux_version is earlier than 3.2.
- Update watch_process() Raises docstring and test_tmux.py expectation.
@tony
tony force-pushed the fix/75-control-command-ownership branch from 4b300fd to ddfe332 Compare December 5, 2026 13:49
@tony
tony force-pushed the fix/78-pane-process-monitor branch from 7e4872d to 7ccee23 Compare December 5, 2026 13:49
@tony
tony changed the base branch from fix/75-control-command-ownership to master December 5, 2026 13:57
@tony
tony merged commit 7b2310d into master Dec 5, 2026
18 checks passed
@tony
tony deleted the fix/78-pane-process-monitor branch December 5, 2026 20:41

This branch was successfully deployed

1 active deployment
docs — 7ccee23b Deployed Dec 5, 2026 by tony via build (3.14) #444
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