fix(ui): stop the install progress bar from garbling non-scroll-region terminals#155
Merged
Merged
Conversation
…minals StickyProgress reserved the bottom rows as a sticky status bar via a DECSTBM scroll region. On terminals that report a normal TERM but don't honour scroll regions, every newline scrolled the whole screen, so the reserved bar was dragged into the log and reprinted on every tick — the install read as repeated, overprinted garbage. Most visible during npm, whose fast per-package installs redraw the bar rapidly. IsScrollRegionSupported() only checked TTY + TERM + height; it could not detect actual scroll-region support, so it enabled the fragile path on the terminals that break it. Replace it with a plain in-place \r\033[K status line that trails top-to-bottom output on every terminal, and remove the scroll-region plumbing (scrollregion.go) and its failure mode entirely.
fullstackjam
enabled auto-merge (squash)
July 17, 2026 16:39
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.
What does this PR do?
Removes the scroll-region "sticky" progress bar; the install log now renders top-to-bottom on every terminal.
Why?
The install progress bar (
StickyProgress) reserved the bottom rows as a frozen status bar using a DECSTBM scroll region (\x1b[1;Nr). On terminals that report a normalTERMbut don't actually honour scroll regions, every newline scrolls the whole screen, so the reserved divider+status bar got dragged into the log and reprinted on every 80ms tick — the install read as repeated, overprinted garbage instead of clean top-to-bottom output.It was most visible during npm (its per-package installs finish fast, so the bar redraws rapidly), but the code is shared with brew, so both were affected.
IsScrollRegionSupported()only checked TTY +TERM+ terminal height — it never verified real scroll-region support, so it couldn't tell a supporting terminal from a non-supporting one.The fix drops the scroll-region path entirely and always draws a plain in-place
\r\033[Kstatus line that trails the output. Each package prints on its own line, in order, with one live spinner line at the bottom — on every terminal. This deletesscrollregion.goand its whole failure mode (net −262 lines).Testing
go vet ./...passesStickyProgresscode through a PTY and replaying the byte stream in a terminal emulator (pyte):make test-unit(L1, incl.archtest) green;e2e/vm-tagged build compiles.Cross-repo checklist
openboot.dev? — No.Notes for reviewer
docs/HARNESS.md"What's intentionally NOT in the harness" now records why the scroll region was removed and says not to reintroduce it;internal/ui/AGENTS.mddrops thescrollregion.gorow.npmStepDonecounts npm failures as "installed" in the summary line (bar.Increment()instead ofIncrementWithStatus(ok), unlike brew). That's a counting bug, not this rendering one, so it's left for a follow-up.