Skip to content

fix: pass capture-pane flags separated, drop dead b/w fallback#37

Merged
quazardous merged 1 commit into
mainfrom
fix/psmux-capture-pane-separated-flags
May 28, 2026
Merged

fix: pass capture-pane flags separated, drop dead b/w fallback#37
quazardous merged 1 commit into
mainfrom
fix/psmux-capture-pane-separated-flags

Conversation

@quazardous

Copy link
Copy Markdown
Owner

Summary

  • Switch capture-pane call sites from -ep (clustered) to -e -p (separated). psmux <= v3.3.4 silently dropped POSIX short-flag clusters in its capture-pane CLI dispatcher (exit 0 + empty stdout). Upstream fix is in psmux commit 72d08aa (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.
  • Drop the dead-after-fix b/w fallback in src/pane.ts:captureOnce (text="" → retry without -e) — it only existed because of the cluster bug.
  • Refresh the now-stale comment in src/api/agents.ts:215-216 (Caveat psmux : capture-pane may handle -e differently) and the matching reference in frontend/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:

  • Fixes the symptom on every psmux version, not just post-72d08aa.
  • Makes the fallback dead code, so we can remove it.

Test plan

  • npm run typecheck clean.
  • On graphite with locally-built psmux from upstream master (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.
  • Web terminal on graphite renders with ANSI colors (visual check once daemon reload picks up the new build).

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.
@quazardous quazardous changed the title fix: pass capture-pane flags separated (), drop dead b/w fallback fix: pass capture-pane flags separated, drop dead b/w fallback May 28, 2026
@quazardous quazardous merged commit f817f7b into main May 28, 2026
@quazardous quazardous deleted the fix/psmux-capture-pane-separated-flags branch May 28, 2026 05:25
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