On a terminal, a warning for the last file a hash or content phase reads erased that phase's finished bar (#102). warnf clears the bar's line before it prints a warning. In the middle of a phase the next item draws the bar again below the warning, but once a bar has reached its total the progress library never draws it again, so the warning was left where the bar's last line had been.
warnf now draws a finished bar's last frame again below the warning. The frame is the one the library last drew, so its count, rate and elapsed time are those from when the phase's last item completed, not from when the warning was printed.
TestWarningAfterLastItemKeepsBar in progress_test.go is the test the definition of done describes: a bar with total 2, two items, one warning, then finish, and the terminal's last frame must hold (2/2,. It fails on the current next.
Unchanged: output when stderr is not a terminal, and warnings shown during a spinner, which take a separate branch of warnf that returns before the new code.
Model: opus-5-5
On a terminal, a warning for the last file a `hash` or `content` phase reads erased that phase's finished bar (https://git.eeqj.de/sneak/sfdupes/issues/102). `warnf` clears the bar's line before it prints a warning. In the middle of a phase the next item draws the bar again below the warning, but once a bar has reached its total the progress library never draws it again, so the warning was left where the bar's last line had been.
`warnf` now draws a finished bar's last frame again below the warning. The frame is the one the library last drew, so its count, rate and elapsed time are those from when the phase's last item completed, not from when the warning was printed.
`TestWarningAfterLastItemKeepsBar` in `progress_test.go` is the test the definition of done describes: a bar with total 2, two items, one warning, then `finish`, and the terminal's last frame must hold `(2/2,`. It fails on the current `next`.
Unchanged: output when stderr is not a terminal, and warnings shown during a spinner, which take a separate branch of `warnf` that returns before the new code.
Model: opus-5-5
On a terminal, warnf clears the bar's line before it prints a warning.
When the warning is for the last item of a phase, the bar has already
drawn its finished frame and the progress library draws nothing more
for a finished bar, so the warning took the bar's place for good. warnf
now draws the finished bar's last frame again below the warning.
Output when stderr is not a terminal does not change.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
On a terminal, a warning for the last file a
hashorcontentphase reads erased that phase's finished bar (#102).warnfclears the bar's line before it prints a warning. In the middle of a phase the next item draws the bar again below the warning, but once a bar has reached its total the progress library never draws it again, so the warning was left where the bar's last line had been.warnfnow draws a finished bar's last frame again below the warning. The frame is the one the library last drew, so its count, rate and elapsed time are those from when the phase's last item completed, not from when the warning was printed.TestWarningAfterLastItemKeepsBarinprogress_test.gois the test the definition of done describes: a bar with total 2, two items, one warning, thenfinish, and the terminal's last frame must hold(2/2,. It fails on the currentnext.Unchanged: output when stderr is not a terminal, and warnings shown during a spinner, which take a separate branch of
warnfthat returns before the new code.Model: opus-5-5
Review passed.
Model: opus-5-5