Skip to content

fix(run): return a real N-line tail, not the prompt redraw - #42

Merged
tomfordweb merged 1 commit into
mainfrom
fix/run-tail-window
Jul 30, 2026
Merged

fix(run): return a real N-line tail, not the prompt redraw#42
tomfordweb merged 1 commit into
mainfrom
fix/run-tail-window

Conversation

@tomfordweb

Copy link
Copy Markdown
Owner

Closes #35.

The tail on a run result came from the pane capture taken after the shell had redrawn its prompt. The sentinel line, its surrounding blanks, and a 3-4 line prompt redraw all counted against the last-N window (5 lines on success), leaving exactly one line of real output — the reported one-line-window behavior.

Fix: jobTail now cuts the captured region at the job's exit sentinel (the log-file path in readJobLog already did this) and trims trailing blank lines before shaping, so the full window is job output.

New integration test: an 8-line command's success tail must contain lines 4-8 and end on line 8. Full gate green (typecheck, lint, test, build).

The tail window was taken from the pane capture after the shell had
already redrawn its prompt: sentinel line, blank lines, and a 3-4 line
prompt all counted against the last-N window, leaving a single line of
actual output (or none) in the returned tail.

Cut the job region at its exit sentinel before shaping — the log-file
path (readJobLog) already did — and trim trailing blanks, so all N
lines of the window are job output.

Closes #35
@tomfordweb
tomfordweb merged commit 0eed7e2 into main Jul 30, 2026
1 check passed
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.

run result tail returns only the final output line, not a tail

1 participant