Skip to content

feat(tui): mouse clicks and hover, bounded values, config set-password - #148

Merged
damusix merged 5 commits into
nextfrom
fix/tui-clicks-overflow-secrets
Nov 12, 2026
Merged

damusix merged 5 commits into
nextfrom
fix/tui-clicks-overflow-secrets

Conversation

@damusix

@damusix damusix commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Mouse support for the TUI, plus the long-value and password fixes that came with it.

  • Clicks: forms, confirm dialogs, every [key] Label hint (a click presses the key, so the focused screen answers as it would the key), earlier breadcrumb crumbs, the idle search row, and the file picker, log viewer, SQL history/clear and known-users rows.
  • Hover: whatever a click acts on gets a background a step off the terminal's own (asked for at startup via OSC 11; ANSI bright black if the terminal does not answer), and the text keeps its color. This needs ?1003 motion reports (one per cell the pointer crosses, noticeable over slow SSH); ui.mouse: false turns all of it off.
  • Long values truncate with … instead of wrapping and pushing the action row off screen; an open text field scrolls around its cursor.
  • x empties a highlighted password field. A blank password on the config edit form still keeps the stored one (its placeholder says so).
  • noorm config set-password <name> [value] [--stdin] rotates a stored password headlessly under config:write; it never prints the password.

Guards: busy screens refuse crumb clicks, confirmations make hints inert, a double click presses once, and handlers that act on any key ignore mouse reports (motion would otherwise close help).

mouse-rows.test.tsx mocks getSettingsManager process-wide, so CI runs it in its own step.

Not done: [D] Delete all in the debug list shares its key with the global dry-run toggle.

Hover on a white theme and on Solarized Light (the shade is derived from each theme's background; the text is unchanged):

White: list row

White: footer hint

White: form field

Solarized Light: list row

Solarized Light: form button

Long values truncate with … and an open field scrolls to the cursor:

Browse: title, name, host and password truncate; actions stay on screen

Host open for editing scrolls to the cursor

Forms and confirm dialogs ignored the mouse. A long value wrapped onto
extra rows, and Form budgets one row per field, so the action row and
hints were pushed off screen.

- Form: click a field, toggle a checkbox, click Submit/Cancel, wheel,
  double-click to edit; Confirm: click Yes/No. useRowMouse gains
  matchColumn for targets that share a line.
- Values truncate with an ellipsis in Form, SelectList, Panel titles,
  StatusList, FilePicker, log rows and Home rows; TextInput scrolls
  around its cursor. Toast and the Home access warning stay wrapped:
  their tail carries the repair-access hint.
- x empties a highlighted password field. A blank password on the
  config edit form still keeps the stored one, as its placeholder says.
- noorm config set-password <name> [value] [--stdin]: headless password
  rotation under the config:write policy; never prints the password.
Every [key] Label hint presses its key on a click, through Ink's input emitter, so the focused component answers as it would the key. Breadcrumb crumbs, list rows and the idle search row are clickable; whatever a click acts on is shaded on hover.

- Hover needs ?1003 motion reports, which reach every useInput handler: any-key handlers now ignore mouse reports.
- Guards: busy screens refuse crumb clicks, confirmations make hints inert, a double click presses once.
@damusix damusix changed the title feat(tui): clickable forms, bounded long values, config set-password feat(tui): mouse clicks and hover, bounded values, config set-password Nov 12, 2026
noorm ui asks the terminal for its background (OSC 11) before Ink starts and shades a step off it, lighter on a dark theme and darker on a light one. Terminals that do not answer keep ANSI bright black. Hover no longer un-dims form labels and buttons.
DB Explore and Debug category rows press their number (zero-count rows stay inert), the table detail footer and SQL editor hints are clickable, and "Press a to add ..." prompts press their key. ProtectedConfirm's buttons are click targets of their own because its modal guard blocks hint wrappers.
@damusix
damusix marked this pull request as ready for review November 12, 2026 06:07
@damusix
damusix merged commit e220731 into next Nov 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant