Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
The fix works. I reproduced the bug on the base and confirmed it's gone with this change by running the #59612 reproduction from source with the simulated model.
- On the base, PageDown, PageUp and
ctrl+alt+fclose the/btwanswer. - With this change, they scroll the answer by exactly one page and the dialog stays open. The dialog's raw key handler doesn't scroll a second time, and Esc still closes the dialog.
test/btw-scroll.test.tsxpasses here. Run against the base it fails, so it catches the regression.typecheck:tscpasses.
Public API: unchanged. The change only adds dialog-layer commands that reuse the existing session.page.up/session.page.down ids and their configured keybinds.
No blocking concerns.
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
1 task done
Author
|
Hi, following up on this fix for Page Up and Page Down dismissing the |
This branch has not been deployed
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.


Issue for this PR
Closes #59612
Type of change
What does this PR do?
Page Up and Page Down currently dismiss the
/btwanswer because the session's paging commands run while the dialog is open. Register the paging commands in the dialog's modal layer so they scroll the answer instead. Configured shortcuts continue to work, and the physical page keys still scroll when those shortcuts are remapped.How did you verify your code works?
bun test --timeout 30000 test/btw-scroll.test.tsx --rerun-each 10inpackages/tui: 20 passes on Windows. Covers default and custom keys, physical Page Down after remapping, and paging the transcript after the dialog closes.bun typecheckandbun run typecheck:tscinpackages/tui: passed.bun run check: passed on Windows after temporarily substituting the contents of the trackedcustom-elements.d.tssymlink, which Git had checked out as a plain text file.Visual
Screenshots / recordings
Before: recording from the issue. After: character-frame rendering from the TUI regression test after Page Down:
Checklist