fix(pty-proxy): scope proxy screen restore to its own terminal via ex… - #3679
Open
davidolrik wants to merge 1 commit into
Open
fix(pty-proxy): scope proxy screen restore to its own terminal via ex…#3679davidolrik wants to merge 1 commit into
davidolrik wants to merge 1 commit into
Conversation
Contributor
Greptile SummaryThis PR scopes pty-proxy screen restoration to the terminal that owns the snapshot. The main changes are:
Confidence Score: 4/5Unknown proxy TTY ownership can still allow a foreign screen snapshot to be restored.
crates/atuin/src/command/client/search/interactive.rs Important Files Changed
Reviews (1): Last reviewed commit: "fix(pty-proxy): scope proxy screen resto..." | Re-trigger Greptile |
davidolrik
force-pushed
the
3566-fix-nested-repaint
branch
2 times, most recently
from
July 27, 2026 23:48
16795f7 to
0d31eef
Compare
davidolrik
force-pushed
the
3566-fix-nested-repaint
branch
from
July 28, 2026 08:46
0d31eef to
8b9f4e4
Compare
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.
Summary
Fixes the redraw corruption reported in #3566: activating the atuin search popup inside a terminal multiplexer pane (e.g. herdr) paints content from outside the pane — sidebars, other panes — into it on exit.
Root cause
atuin pty-proxymirrors the shell's output into a vt100 screen model and serves snapshots over a unix socket, exportingATUIN_PTY_PROXY_SOCKETandATUIN_PTY_PROXY_ACTIVE=1into the shell's environment. Environment variables are inherited by every descendant, so a multiplexer launched from a proxied shell passes both into every pane it creates.The init guard only started a fresh proxy when
ATUIN_PTY_PROXY_ACTIVEwasunset or
$TMUXchanged, so panes of any non-tmux multiplexer kept pointing atthe outer proxy.
atuin searchpopup mode then fetched the outer proxy'sfull-terminal screen — including the multiplexer's chrome — and
restore_popup_areablitted those full-width rows into the pane on exit.Fix
We now export
ATUIN_PTY_PROXY_TTY, and whenever the shells tty differes from it we spawn a new proxy.This means that any multiplexer that uses a new tty for each pane will get a new pty-proxy for each pane.
As I am not a rust expert, I had a bit of help from Claude.
Closes #3566
Checks