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

Aperta
#32 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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).

Lingua principale
Rust
Stelle
0
Fork
0
Merge medio
3h 30m
PR unite (30g)
25

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di publicusr/singularity

Tutte le issue di publicusr/singularity

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.