Skip to content

Unify TUI input editing in Tui::InputField - #135

Merged
tobi merged 1 commit into
mainfrom
tui-input-main
Aug 13, 2026
Merged

Unify TUI input editing in Tui::InputField#135
tobi merged 1 commit into
mainfrom
tui-input-main

Conversation

@tobi

@tobi tobi commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Standalone TUI cleanup, based on main — not stacked on the Spinel PRs.

Steal from tobi/try-cli: one real input widget instead of four copy-pasted editors. try-cli's tui_push/tui_pop is an ANSI style stack; Ruby's Screen/Section/Line layout stays as-is. This only ports the input layer.

  • Tui::InputField#handle_key used by search, rename, graduate, and the YES prompt
  • Left/Right move the cursor; Ctrl-U kill-to-start; Delete-forward; Ctrl-H backspace
  • Reverse-video cursor #to_s unchanged (existing screenshots still match)
  • CSI/mouse sequences drained so trackpad junk doesn't land in the filter
  • Small at_exit restore if we crash while the TUI is up

MRI: ruby -c clean, rake unit 131/131, spec/tests/runner.sh ./try.rb 399/399 (original 397 plus two keyboard tests).

Supersedes the TUI half of #134 (that one was stacked on Spinel). The Spinel stack stays #130#131#133.

Steal try-cli's editor keys (arrows, Ctrl-U, Delete) into one Spinel-safe widget used by search, rename, graduate, and delete prompts, with emergency terminal restore on crash.
@tobi
tobi merged commit 5036c84 into main Aug 13, 2026
1 check 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