fix(run): return a real N-line tail, not the prompt redraw - #42
Merged
Conversation
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
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.
Closes #35.
The
tailon arunresult 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:
jobTailnow cuts the captured region at the job's exit sentinel (the log-file path inreadJobLogalready 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).