TUI input editor: Up recalls only the last prompt, no history search, Ctrl+U undoes, End is overloaded

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

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Start in src/ui/tui/keys.rs at the Up/Down history branch and src/ui/input.rs at handle_key; the issue reports a history navigation test and describes the current bindings. Review the footer hint and existing keybinding behavior before splitting the requested changes into manageable parts. Done means history navigation, search, readline clearing, accurate footer hints, and external editor behavior match the suggested direction.

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

Descrizione

area: ux bug priority: P2

Problems

  1. Up recalls only the most recent prompt. History navigation runs only if self.input.is_empty() (src/ui/tui/keys.rs, the Up/Down branch); after the first Up the prompt holds that entry, so the next Up moves the cursor instead of going further back. Checked with a test: after submitting first, second, third, Up → third, Up again → still third.
  2. No history search. Ctrl+R is bound to "toggle thinking".
  3. Ctrl+U undoes instead of clearing to line start. The textarea's emacs map is used as is (src/ui/input.rs, handle_key), so the readline reflex undoes the last edit. Ctrl+W/Ctrl+K work.
  4. End/Home are overloaded. The footer says "End or Ctrl+End to return to the bottom", but with text in the prompt End moves the cursor; you have to know Ctrl+End.
  5. No external editor for long prompts.

Observed running (3, 4) and by test (1) on main (40a2e78).

How others handle it

  • Oh My Pi: Up on an empty composer walks history; Ctrl+R opens an inline searchable history; Ctrl+U/Ctrl+K/Ctrl+W readline kills, Ctrl+_ undo; Ctrl+G opens $VISUAL/$EDITOR; all remappable in keybindings.yml, listed by /hotkeys.
  • Claude Code: Up/Ctrl+P walk history from the first row; Ctrl+R history search dialog; Ctrl+_ undo; Ctrl+G external editor; Ctrl+S stashes the prompt; ~/.claude/keybindings.json.

Suggested direction

  • Keep walking history while history_index is set and the cursor is on the first (Up) / last (Down) row.
  • Move thinking toggle off Ctrl+R (e.g. Ctrl+T, which omp uses) and give Ctrl+R to history search.
  • Readline semantics for Ctrl+U; undo on Ctrl+_ / Ctrl+Z.
  • Footer hint should name the key that actually works in the current state.
  • Ctrl+G: open the draft in $VISUAL/$EDITOR.
Lingua principale
Rust
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

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 GotinhaAzul/LocalHarness

Tutte le issue di GotinhaAzul/LocalHarness

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.