Touchpad scrolling: smooth, and the wheel scrolls the view instead of the highlight (D86)

Đang mở
#32 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
cli

Hướng nghiên cứu

Start with term::WheelBursts in crates/client/src/term.rs, which folds repeated wheel reports within 8 ms, and with scroll::moved/scroll::window, which move the highlight. Record a touchpad swipe and a wheel notch in Ghostty, then add failing tests next to wheel/tests.rs and check the pty wheel-all case. Done when touchpad swipes scroll smoothly, the wheel keeps one notch per step, and CLAUDE.md matches the new rule.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement ready-for-agent

Found on the first ARM run (the Mac's touchpad in Ghostty): scrolling a list with the touchpad is jerky, and picking one entry is hard.

Why (read from the code, not yet measured)

  • The terminal mouse protocol reports wheel up/down only, no distance, so the Client can't tell a touchpad from a wheel.
  • term::WheelBursts (crates/client/src/term.rs) drops any repeat within 8 ms of a burst's first report, to fold Ghostty's 3 reports per wheel notch (mouse-scroll-multiplier = discrete:3) back into one notch. A touchpad swipe is a stream of reports at uneven gaps (Ghostty's precision multiplier), so some get dropped and some don't: uneven speed and jumps.
  • In lists the wheel moves the highlight and the window follows it (scroll::moved/scroll::window), so a swipe drags the selection along and landing on a row is fiddly.

Decision (D86, owner: "lets try it")

The wheel and the touchpad scroll the view; the highlight follows the pointer on hover; a click picks the row. Keys keep moving the highlight as today. Smooth touchpad scrolling (no dropped or bunched reports) without breaking the one-notch-one-step wheel.

What to do

  1. Record a real touchpad swipe's report timing in Ghostty (fast flick, slow drag, a stop) and a wheel's, and replay both in tests (red first) next to wheel/tests.rs.
  2. Tell the two apart by timing where it's possible, or treat every report as a step and fold only Ghostty's exact triple.
  3. The view-scroll model above for every list (the wheel::Widget and app::Page arms; pty wheel-all shows them all); update the CLAUDE.md wheel rule if it changes.
  4. Check with a mouse wheel on the PC and the touchpad on the Mac.

Order (round 2026-11-23): after the Pane-moving rethink (#21).

Ngôn ngữ chính
Rust
Star
0
Fork
0
Merge trung bình
3 giờ 30 phút
Pull request đã merge (30 ngày)
25

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của publicusr/singularity

Tất cả issue của publicusr/singularity

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.