Repository navigation
feat(planning): honor REVDIFF_TMUX_WINDOW in the plan-review launcher - #421
Merged
Merged
Conversation
omarkhan
marked this pull request as ready for review
October 28, 2026 20:50
umputun
requested changes
Oct 29, 2026
umputun
left a comment
Owner
There was a problem hiding this comment.
one blocker and a rebase before this can go in.
plugins/revdiff-planning/scripts/launch-plan-review.sh:131- tmux expandsnew-window -nas a format, so a plan file namedp#(touch pwned).mdrunstouch pwnedwhen the window opens. Master escapes this for the popup title in the same file and for the diff launcher's window name (6bdab2b), so after a rebase this would be the only unescaped one. Fix:-n "${OVERLAY_TITLE//\#/##}", plus aplan review windowrow inTestTmuxTitlesEscapeFormatCharswithREVDIFF_TMUX_WINDOW=1.plugins/revdiff-planning/scripts/launch-plan-review.sh:129-130- the comment says-dplusselect-windowkeeps-Pprinting the window id, but-Pprints it either way. Fix: give the real reason (it matches the diff-review backend), or drop-dand the extraselect-window.
the rebase conflicts in app/revdiff/testdata/plugin-exit-code/fake-overlay-backend.sh. Keep master's FAKE_TMUX_TITLE_FILE loop ahead of your new case dispatch, otherwise the new test row records nothing.
With REVDIFF_TMUX_WINDOW=1 under tmux, launch-plan-review.sh opens the review in a server-owned tmux window instead of a display-popup, matching the diff-review launcher's opt-in: the window opens focused, the prior active window is restored on exit, and the review survives a client disconnect. Any other value keeps the popup; there is no agent-deck auto-detection in the planning launcher. The branch is inlined rather than sourcing agentdeck-window.sh: the planning plugin installs standalone and a user-layer launcher override would not find a sibling script. Co-Authored-By: Claude Opus 5.5 <[email protected]>
tmux expands new-window -n as a format, so a plan file named p#(touch pwned).md ran a command when the review window opened. Escape it with ##, matching the popup title and the diff launcher's window name. Drop -d and the follow-up select-window: -P prints the window id with or without -d, so the pair only made the new window active in two steps. Co-Authored-By: Claude Opus 5.5 <[email protected]>
omarkhan
force-pushed
the
planning-tmux-window
branch
from
November 3, 2026 16:42
67b22a2 to
30dc446
Compare
Contributor
Author
umputun
added a commit
that referenced
this pull request
Nov 3, 2026
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.
I use both the
revdiffandrevdiff-planningplugins in Claude Code inside tmux. The newREVDIFF_TMUX_WINDOWenvironment variable (added in #262) is very helpful: I can start arevdiffsession, detach from the tmux session, then resume later.REVDIFF_TMUX_WINDOWdoesn't work for therevdiff-planningplugin however, which continues to usedisplay-popup. This pull request extends the tmux window functionality added in #262 torevdiff-planning.Claude-generated PR description follows:
Summary
REVDIFF_TMUX_WINDOW=1(added in #262 for the diff-review launcher) now applies to therevdiff-planninglauncher too. Under tmux,launch-plan-review.shopens the plan review in a server-owned tmux window instead of adisplay-popup:Why inline instead of sourcing
agentdeck-window.shThe planning plugin installs standalone and can't reach the diff-review plugin's scripts, so sharing would need a third copy of the file plus the helpers it expects from its caller. A user-layer override in
${CLAUDE_PLUGIN_DATA}/scripts/would also not find a sibling script and would silently fall back to the popup. The inline branch matches how this launcher already duplicates each backend's tail.Tests
TestPlanLauncherTmuxWindowOptIn: window mode with annotations / clean / failure exits (tmux call order, exit code, output, no leaked sentinel), plus0and unset falling back todisplay-popup. Fails against the launcher without this change.new-window,select-window,display-messageandlist-windows; the existing popup path is unchanged (TestShellLaunchersPreserveAnnotationExitCodepasses)./bin/bash -nand shellcheck clean.🤖 Generated with Claude Code