fix-new-chat-3

Fix: new-chat dialog text inputs don't support arrow-key navigation / readline editing

Metadata

Statusabandoned
Assignedagent-1260
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Created2026-04-30T14:34:09.320980302+00:00
Started2026-04-30T14:34:39.977875862+00:00
Tagsfix,tui,ux,dialog,input, eval-scheduled

Description

Description

The new-chat dialog's text input fields (Name, Custom Model, Custom Endpoint URL when fix-new-chat lands) are primitive — no cursor navigation, no readline-style editing. This makes pasting + correcting URLs painful: users can only delete from the end, retype from scratch, etc.

User report 2026-04-30: 'the input field doesn't support arrow keys and editing like a normal CLI... so it seems i keep pasting the wrong thing?'

Expected (standard CLI text-input behavior)

  • Left / Right arrow — move cursor within input
  • Home / Ctrl+A — jump to start
  • End / Ctrl+E — jump to end
  • Backspace — delete char before cursor (not just the last char)
  • Delete — delete char after cursor
  • Ctrl+W — delete word backward
  • Ctrl+U — clear from cursor to start
  • Ctrl+K — clear from cursor to end

Implementation

Probably means swapping the dialog's text input widget for a fuller readline-style implementation. Ratatui has community widgets for this (e.g., tui-input crate, or a homerolled cursor-aware one). If the codebase already has one of these elsewhere (e.g., the wg add interactive prompts), reuse it.

Don't write a new minimal version — readline-correctness is one of those classic 'there's always one more keybinding' problems. Use a battle-tested widget.

Validation

  • Live smoke: open new-chat dialog, type a URL, hit Left arrow several times, observe cursor moves left within the input. Edit a character mid-string. Save the change.
  • Test all standard editing keybindings listed above
  • Paste-from-clipboard works with cursor positioning (paste inserts at cursor, not always at end)
  • No regression: typing into a chat (passthrough mode) still works as before — this fix is for dialog text inputs only
  • Same edit experience for the Name / Model / Endpoint fields (consistent across the dialog)
  • cargo build + cargo test pass
  • cargo install --path . was run before claiming done

Depends on

Required by

Log