Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

ui.press("pageup") types "pageup" into the composer

Aperta
#120 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
testing-qa

Direzione di ricerca

Start in Ui.press in opencode-drive, where the chord-rejection check from #70 lives, and see why a bare key name like pageup falls through to text input. The key mapping is in OpenCode's packages/simulation/src/frontend/actions.ts (keyInput), which only maps names found in OpenTUI's mock KeyCodes; OpenTUI's kitty key table already has pageup and pagedown. Done when ui.press("pageup") either sends a real Page Up key or fails with UiPressError, and the reproduction in the issue no longer types text.

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

Descrizione

bug

Drive 2.1.3 (npm) against OpenCode V2 5cfe3b4271 and 9a31bcf630.

ui.press("pageup") sends the text pageup to the focused composer instead of a Page Up key. After 40 presses the composer read pageuppageuppageup… and the transcript never scrolled. Nothing failed, so the only symptom was a wrong measurement later in the script.

yield* ui.press("pageup")                        // typed as text
yield* ui.press("b", { ctrl: true, meta: true }) // ctrl+alt+b, the other session.page.up binding, works

Expected: Drive sends Page Up, or fails with UiPressError because the target cannot encode the key.
Actual: the key name is typed as text.

The fix for #70 rejects only chord syntax (/^(?:alt|cmd|ctrl|meta|mod|shift)\+/i in Ui.press). OpenCode's simulation keyInput (packages/simulation/src/frontend/actions.ts) maps a name only when it is a member of OpenTUI's mock KeyCodes. That table has no PAGEUP or PAGEDOWN, so mockInput.pressKey types the raw string. OpenTUI's kitty key table does have pageup and pagedown.

Related: #70.

Lingua principale
TypeScript
Stelle
35
Fork
6
Merge medio
4h 42m
PR unite (30g)
11

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 anomalyco/opencode-drive

Tutte le issue di anomalyco/opencode-drive

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.