anomalyco / anomalyco/opencode
TUI: Page up/down scrolls half a page ("half page" scrolls a quarter) — intended or doc error?
@kommander is already working on this.
Since Aug 23, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
Description
Description
The page-scroll commands scroll half of what their names and keybind descriptions say:
| Command | Keybind description | Actual scroll |
|---|---|---|
session.page.up / session.page.down |
"Scroll messages up/down by one page" | half a viewport (scroll.height / 2) |
session.half.page.up / session.half.page.down |
"Scroll messages up/down by half page" | a quarter of a viewport (scroll.height / 4) |
- Behavior:
packages/tui/src/routes/session/index.tsx:758,768,798,808—scroll.scrollBy(±scroll.height / 2)and/ 4 - Descriptions:
packages/tui/src/config/keybind.ts:135-140
Since pageup/pagedown are bound by default to session.page.up/session.page.down, every PageUp press moves half a screen — noticeably less than editors, pagers, and other TUIs.
Git history doesn't reveal intent either way: the amounts come from the TUI migration commit 96bdeb3 ("OpenTUI is here", Oct 2025) with no comment, and the "one page" / "half page" descriptions were added months later in a0fc27e (May 2026), so the two sides were never aligned.
Question for maintainers: is the halving intentional (e.g. to keep reading context, like tmux copy mode)? Then the keybind descriptions should be fixed to say "half page" / "quarter page". If not, I'm happy to send a PR making PageUp/Down scroll a full viewport and the half-page commands scroll half.
Plugins
none
OpenCode version
1.18.21 (also verified the behavior on 1.17.9)
Steps to reproduce
- Open a session with more than one screen of messages
- Press
PageUp→ content scrolls up only half a screen - Press
Ctrl+Alt+U("half page up") → scrolls only a quarter of a screen
Operating System
Windows 11
Terminal
Windows Terminal
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.