anomalyco / anomalyco/opencode
web: holding PageUp/PageDown scrolls at a crawl
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Holding PageUp/PageDown in the V2 web UI scrolls very slowly. A single press pages normally; holding the key barely moves the viewport. ArrowUp/ArrowDown have the same problem.
Cause: packages/ui/src/components/scroll-view.tsx handles scroll keys with viewportRef.scrollBy({ top: ±amount, behavior: "smooth" }) on every keydown. OS auto-repeat re-fires every ~30–50ms, and each smooth scrollBy aborts the in-flight smooth animation and restarts it from the current offset, so the viewport only advances the first slow ease-in frames.
Fix: use behavior: "auto" for keyboard paging, or accumulate a pending target and update the smooth destination instead of restarting the animation per repeat.
Plugins
None
OpenCode version
2.0.8
Steps to reproduce
- Open a session with more than one screen of messages in the V2 web UI.
- Press and hold PageUp.
Observed: crawls upward. Expected: continuous page-per-repeat. Tapping PageUp repeatedly pages correctly.
Screenshot and/or share link
n/a
Operating System
Windows 11 (WSL2; Linux 6.18 x86_64)
Terminal
n/a (web UI, Chromium)
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.
Research direction
Start in packages/ui/src/components/scroll-view.tsx and inspect the keyboard scroll handler using viewportRef.scrollBy. Reproduce the issue in the V2 web UI by holding PageUp, PageDown, or an arrow key, then verify that repeated key events produce continuous page-sized movement without restarting smooth scrolling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 90/100