Skip to content

feat(ui): run post-flush command without an output file - #339

Merged
umputun merged 1 commit into
masterfrom
post-flush-without-output
Aug 28, 2026
Merged

feat(ui): run post-flush command without an output file#339
umputun merged 1 commit into
masterfrom
post-flush-without-output

Conversation

@umputun

@umputun umputun commented Aug 28, 2026

Copy link
Copy Markdown
Owner

O now runs --post-flush-command when no output file is set, so a single config line gives an in-session copy of the annotations:

post-flush-command = pbcopy

that works in every session, including a bare revdiff HEAD~1, with no per-launch flags and no output file.

the -o requirement was never a design decision. #277 added the hook coupled to --output, and its author said in that thread that running it standalone made sense as a follow-up but would have grown the diff. Nothing validated the coupling, it was just the early return at the top of handleFlushOutput.

behavior now, by what is configured:

  • output file only: unchanged, writes the file, same hints
  • command only: formats the snapshot, writes no file, sends it to the command on stdin
  • both: writes the file, then sends the exact string WriteFile returned, so the file and the command cannot drift
  • neither: status hint naming both options, nothing happens

an empty store is checked before any of that, so O with no annotations still says so rather than running a command with nothing to send. Tests cover all four modes plus hook-only success and failure.

docs updated in step: the flag description no longer claims it requires -o, and README, site/docs.html, the Claude and Codex reference pages, the Pi skill note, docs/ARCHITECTURE.md and the gotchas entry all say what the flag actually does now. README also gains the pbcopy recipe, which was the thing #336 could not find, with xclip -selection clipboard for X11 and wl-copy for Wayland, and OSC 52 kept as the answer for ssh and multiplexers.

docs/backlog/post-flush-clipboard-route-undocumented.md is deleted here, since this is the change that documents the route.

Related to #336. Follow-up to #277.

decouple the configured hook from file output so O can send the full
snapshot directly to a command. File-backed flush behavior and hints
stay unchanged.

Related to #336

Follow-up to #277
Copilot AI lite review requested due to automatic review settings August 28, 2026 19:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@umputun
umputun merged commit 02e9e07 into master Aug 28, 2026
5 checks passed
@umputun
umputun deleted the post-flush-without-output branch August 28, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants