tui: permission prompt diff has no keyboard scrolling
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 83/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust
- Lĩnh vực
- accessibility, frontend
Hướng nghiên cứu
Bắt đầu tại packages/cli-rs/crates/tui/src/routes/session/permission.rs, đọc question_layer để xem các phím tắt của lời nhắc và edit_body để xem ScrollBox của diff; so sánh với các lệnh cuộn hiện có trong trình xem /diff. Thêm các lệnh bàn phím có thể ánh xạ lại để cuộn từng dòng, từng trang, đến đầu và đến cuối bằng các giá trị mặc định được đề xuất, sau đó xác minh rằng có thể đọc diff quyền dài bằng các phím đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 230k
- Fork
- 31.3k
- Merge trung bình
- 5 giờ 59 phút
- Pull request đã merge (30 ngày)
- 473
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của anomalyco/opencode
-
area/web platform/ios type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anomalyco/opencode#67504 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Plain source starting with `let ftype` is attached as video/mp4Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởarea/core platform/macos status/repro-simulated type/bug version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anomalyco/opencode#67448 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tui: permission prompt does not display message set by permission.evaluate hookCó thể đã có người làm @ningsiyuan1024 đã nhận hôm nay. Đang mởarea/tui platform/macos status/repro-simulated type/bug version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
anomalyco/opencode#67437 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/desktop type/feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anomalyco/opencode#67414 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/desktop platform/macos type/feature version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
anomalyco/opencode#67266 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của anomalyco/opencode
Issue tương tự
-
Amélioration du résumé regĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
MTES-MCT/monitorenv#3257 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
salesforce/sa11y#1022 ·
-
Kartographer map markers lose their geo: link on non-English wikisCó thể đã có người làm @playlikeboy đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
openzim/mwoffliner#3014 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Report: Bloomberg HTĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ardia-browser/ardia#5810 ·
Maintainer thường phản hồi trong vòng 1 ngày