fix: pass capture-pane flags separated, drop dead b/w fallback#37
Merged
Conversation
psmux <= v3.3.4 silently dropped POSIX short-flag clusters in the capture-pane CLI dispatcher (returned exit 0 + empty stdout), so the `-ep` form we used at both call sites lost ANSI on graphite. Upstream fix landed in psmux commit 72d08aa via PR psmux/psmux#326. Switch both call sites (src/pane.ts captureOnce, src/api/agents.ts SSE tick) to the separated `-e -p` form — works on every psmux version, not just post-72d08aa. With the cluster form gone, the b/w fallback in captureOnce (text="" retry without -e) is dead code and removed. Also updates the stale "Caveat psmux : capture-pane may handle -e differently — to validate with #467" comment in agents.ts now that the caveat is gone, and the matching reference in TerminalView.vue.
3 tasks
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
capture-panecall sites from-ep(clustered) to-e -p(separated). psmux <= v3.3.4 silently dropped POSIX short-flag clusters in itscapture-paneCLI dispatcher (exit 0 + empty stdout). Upstream fix is in psmux commit72d08aa(PR fix: capture-pane CLI expands POSIX short flag clusters psmux/psmux#326) but no release was cut yet; separated form works on every version.src/pane.ts:captureOnce(text="" → retry without -e) — it only existed because of the cluster bug.src/api/agents.ts:215-216(Caveat psmux : capture-pane may handle -e differently) and the matching reference infrontend/src/components/TerminalView.vue:8.Why
graphite (Windows) was running v3.3.4 from WinGet which pre-dates the fix, so the daemon hit the cluster bug and dropped to b/w via the fallback. Separating the flags at the aiball call sites:
72d08aa.Test plan
npm run typecheckclean.72d08aa):psmux capture-pane -e -p -t <session>→ 2191 bytes, ANSI escapes present.psmux capture-pane -ep -t <session>→ 2191 bytes (now works too post-fix).psmux capture-pane -p -t <session>→ 1363 bytes, no escapes.