tui: permission prompt diff has no keyboard scrolling
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 83/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- accessibility, frontend
Research direction
Start in packages/cli-rs/crates/tui/src/routes/session/permission.rs, reading question_layer for prompt key bindings and edit_body for the diff ScrollBox; compare with the /diff viewer’s existing scroll commands. Add remappable keyboard commands for line, page, first, and last scrolling with the suggested defaults, then verify the tall permission diff can be read using those keys.
Written by the indexing model from the issue text.
Description
Summary
The permission prompt in the Rust TUI has no keyboard scrolling. Its diff body only scrolls with the mouse wheel, so a change that is taller than the visible area cannot be fully read from the keyboard before approving it.
Environment
- opencode version: 2.4.3
- Client: TUI
- Model and provider: Not relevant
- OS: Darwin 27.0.0 (darwin arm64)
- Terminal: tmux 3.8, TERM=tmux-256color, COLORTERM=truecolor
- Shell: /bin/zsh
- Install/channel: Homebrew, latest
- Active plugins: none
Reproduction
- Set edits to
ask("session": { "permissions": "prompt" }incli.json). - Ask the agent for an edit whose diff is taller than the prompt area.
- Press
ctrl+f(permission.prompt.fullscreen) to expand the prompt. - Press
j,k,up,down,pageup,pagedown,ctrl+dorctrl+u. - Nothing moves. Only the mouse wheel scrolls the diff.
Reproduces consistently.
Expected Behavior
Keyboard scrolling works in the permission prompt the same way it does in the /diff viewer, which already binds diff.up to k,up and diff.down to j,down. The commands should also be remappable in cli.json, like every other TUI command.
Suggested command IDs, following the existing permission.prompt.fullscreen:
permission.prompt.line.up/permission.prompt.line.down— defaultk,upandj,downpermission.prompt.page.up/permission.prompt.page.down— defaultpageup,ctrl+uandpagedown,ctrl+dpermission.prompt.first/permission.prompt.last— defaultgg,homeandshift+g,end
Actual Behavior
The prompt keymap layer registers only these commands:
app.exitandpermission.prompt.fullscreenleft,handright,lto move between options, added when there is more than one optionreturnto select,escapeto reject
The diff body is a ScrollBox with no keyboard bindings on it. See packages/cli-rs/crates/tui/src/routes/session/permission.rs, question_layer for the bindings and edit_body for the scroll box.
Additional Context
This is the only place to read a change before it is applied, so no keyboard scroll means approving after reading only the visible part, or reaching for the mouse.
Related, all closed or unrelated to the current code:
- #50903, closed as
NOT_PLANNEDbecause it was reported on opencode 1.18.32 (v1). The behaviour is the same on the current V2 Rust TUI, confirmed above on 2.4.3. - #7961, closed as
NOT_PLANNED. - PR #58671,
feat(tui): scroll permission diff with pageup and pagedown, closed without merge. It targeted the old TypeScript TUI. - #28191 asks for a configurable default expanded state and height for the same prompt.
- Dominant language
- TypeScript
- Stars
- 230k
- Forks
- 31.3k
- Avg merge
- 6h 58m
- Merged PRs (30d)
- 471
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from anomalyco/opencode
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
area/tui type/feature version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
anomalyco/opencode#67749 · 1 comment ·
Maintainers usually reply within 1 day
-
area/web platform/ios type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
anomalyco/opencode#67504 · 1 comment ·
Maintainers usually reply within 1 day
-
Plain source starting with `let ftype` is attached as video/mp4May be free again A pull request for this issue was closed without being merged. Openarea/core platform/macos status/repro-simulated type/bug version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
anomalyco/opencode#67448 · 1 comment ·
Maintainers usually reply within 1 day
-
tui: permission prompt does not display message set by permission.evaluate hookPossibly taken @ningsiyuan1024 claimed this 1 day ago. Openarea/tui platform/macos status/repro-simulated type/bug version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
anomalyco/opencode#67437 · 4 comments ·
Maintainers usually reply within 1 day
All issues in anomalyco/opencode
Similar issues
-
area:vscode bug has repro platform:macos platform:vscode regression
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDOpencheck:passed streams:add
Difficulty 1/5 Under an hour Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
effort/l priority/p1 risk/high triage/core
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
iflytek/skillhub#1188 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Fission-AI/OpenSpec#2337 ·
Maintainers usually reply within 1 day
-
Edit Network Properties can't be closed in a narrow windowPossibly taken @hridhinvarkeyjoseph claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cytoscape/cytoscape-web#1027 ·
Maintainers usually reply within 1 day