Page through the TUI's lists with PgUp and PgDn - #527
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Section headers currently cause the cursor to shift screen rows, contrary to the documented paging behavior.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds PgUp/PgDn navigation to paginated TUI lists.
Changes:
- Implements page-wise navigation for mail, Screener, and contact lists.
- Preserves pagination loading behavior.
- Adds tests and TUI documentation.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
internal/tui/content.go |
Adds paging algorithms. |
internal/tui/mail.go |
Routes page keys across mail lists. |
internal/tui/screener.go |
Adds Screener paging. |
internal/tui/contacts.go |
Routes contact-list page keys. |
internal/tui/contacts_list.go |
Adds contact paging methods. |
internal/tui/tui_test.go |
Tests paging behavior and routing. |
docs/tui.md |
Documents page keys. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+436
to
+442
| row := c.cursor - c.scrollOff | ||
| scrollOff := min(c.scrollOff+c.visibleItemsFrom(c.scrollOff), c.lastWindowStart()) | ||
| if scrollOff <= c.scrollOff { | ||
| c.cursor = count - 1 | ||
| } else { | ||
| c.scrollOff = scrollOff | ||
| c.cursor = min(scrollOff+row, count-1) |
Comment on lines
+35
to
+36
| PgUp and PgDn move a screen at a time through any list — a box, a search, a bundle, The | ||
| Screener or your contacts — keeping the cursor on the same row of the screen. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dhh
force-pushed
the
tui-page-keys-in-lists
branch
from
September 29, 2026 20:10
489c80f to
e176300
Compare
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.


PgUp and PgDn did nothing in the TUI's lists; only the journal handled them. A long Imbox could only be moved through one thread at a time.
lastWindowStart). On the first window, PgUp moves the cursor to the first thread.contentListgets its ownpageDown/pageUpbuilt onvisibleItemsFrom. The Screener and contacts have fixed-height rows and share a smallpageByhelper.docs/tui.mdmentions the keys. New tests cover paging a posting list both ways, stopping at the ends, a list shorter than the window,pageBy's cases, and the keys reaching the list through the mail view.🤖 Generated with Claude Code