Repository navigation
fix(core): redraw reflowed prompt rows after a resize - #655
Open
vibhor-aggr wants to merge 1 commit into
Open
vibhor-aggr wants to merge 1 commit into
vibhor-aggr wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: f0bbf66 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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?
Fixes the visible stale header in #625. When narrowing a terminal wraps an already printed line, the renderer can no longer skip a common prefix by its old row number. It now clears the reflowed rows still in reach of the cursor and redraws the frame. When the printed lines still fit, it keeps the existing line diff. It does not try to clear scrollback.
On tmux 3.3a, I replayed the reporter's six-option prompt twice and compared it with fresh panes at the same selection. On main, two visible rows still contained the old hint at 40×30, both before and after Down. With this change every visible row matched at 40×30 and 80×24, and the scrollback counts stayed at 5 and 32. Separate runs checked preceding output, default tab stops, colored wide characters and joined emoji. I also replayed #577 and its merge base; their captures were identical for this sequence.
Type of change
Checklist
pnpm testpasses (or targeted tests for my change)pnpm formathas been run (underlyingbiome check --writeon the changed TypeScript files)Local verification: the core suite passed 194 tests; the prompts suite passed 639 with 4 Windows-only skips (Linux, Node 24.16.0, cached Vitest 3.2.6). The core TypeScript check and Biome 2.5.12 checks passed. I did not run the monorepo build.
AI-generated code disclosure