Skip to content

OMNIS-36: Polish the TUI after the first reviews - #45

Merged
JtheGunner merged 9 commits into
mainfrom
chore/OMNIS-36-tui-polish-from-reviews
Oct 7, 2026
Merged

JtheGunner merged 9 commits into
mainfrom
chore/OMNIS-36-tui-polish-from-reviews

Conversation

@JtheGunner

Copy link
Copy Markdown
Owner

OMNIS-36

Polishes the TUI with the points deferred from the reviews of OMNIS-31 to OMNIS-34, plus a finding from manual testing of the options editor: the text cursor could not be seen or moved.

Changes

  • Text fields: the filter and the option value editor keep a cursor (left/right, home/end, ctrl+a/e, delete), accept bracketed paste (cleaned of control characters) and show the real terminal cursor, also while a long value is scrolled.
  • Cleaning: sanitize is now modedit.Clean; omnishell list uses it for table and JSON, and ModuleView.Unavailable and the filter header are cleaned too.
  • Layout: status messages wrap over up to three lines (the real "install one of those shells first" message is now fully readable at 80 columns), "Terminal too small" is cut to the terminal width, wrapped detail lines get a hanging indent, and the Host line says an OS-only module can still be enabled but apply skips it.
  • Plan screen: long lines and errors wrap and scroll, y/Enter only hand over while the plan is on screen, a is ignored (with a note) while an earlier plan is computed, and the footer says apply asks again.
  • Robustness: an external SIGINT ends the UI quietly; after a successful write whose re-read fails, a toggle shows the written state, and the options screen locks its value keys (r reads again) and still counts the change.
  • apply: prints "Nothing to apply: ..." when it finds nothing to do (also when run directly, not only after a hand-off).
  • Docs and config: README, CLAUDE.md and CHANGELOG updated, tui --help has no line over 80 characters, .gitattributes protects the golden files from whitespace stripping.

Commits

  • feat: move the cursor and paste in the TUI text fields
  • fix: clean manifest text before it reaches the terminal
  • fix: wrap long status messages and cap the too-small notice
  • fix: indent wrapped detail lines under their value
  • fix: wrap, scroll and guard the plan screen
  • fix: keep the TUI truthful when a re-read fails after a write
  • fix: say so when apply finds nothing to do after a TUI hand-off
  • docs: describe the TUI polish and wrap the tui help text
  • fix: count a written option after a failed re-read and explain the ignored plan key

Test plan

Run locally: go vet ./..., go test ./... -race, golangci-lint v2.13.2 (0 issues), all six release targets build, go.mod and go.sum unchanged. Driven in a pseudo-terminal with a throwaway HOME: the cursor is shown and moves with the left key.

For a reviewer, in a real terminal with a scratch HOME:

  1. omnishell tui, o on fzf, Enter on default_opts: the cursor is visible, left/right/home/end move it, typing and pasting insert at the cursor.
  2. / in the browser: move the cursor and paste into the filter.
  3. Try to enable zshonly on a bash-only host: the full message is readable.
  4. a on a long plan: lines wrap and scroll; do not confirm y unless you want apply to run.

The filter and the option value editor kept the cursor at the end of
the text, drew it as a fake underscore and ignored paste. Both now
keep a cursor position, handle left/right/home/end/delete, accept
bracketed paste (cleaned of control characters) and show the real
terminal cursor, also while a long value is scrolled.
Move the control-character cleaning into modedit.Clean so that
omnishell list uses it too, and clean ModuleView.Unavailable and the
filter header in the TUI.
A rejection such as the managed-shells message was cut at 80 columns.
The footer now wraps it over up to three lines, and the body shrinks by
the same amount. The "Terminal too small" line is cut to the terminal
width.
Also say in the Host line that a module that only lacks OS support can
still be enabled, but apply skips it.
Long plan lines and errors wrap instead of being cut, and the error
scrolls like the plan. y/enter only hand over to apply while the plan is
on screen, a second plan is not requested while one is still being
computed, and the footer says apply asks again.
A toggle whose write succeeded but whose status re-read failed now shows
the written state, and the options screen locks its value keys (r reads
again) instead of computing the next change from stale rows. An external
SIGINT ends the UI quietly.
Rewrap the tui --help text to 80 columns, mention the OS-only case in the
README and Host line, name Enter next to y in CLAUDE.md, rewrap the
changelog entry and keep editors from stripping the golden files.
…nored plan key

Review findings: an option whose write succeeded but whose re-read failed
was missing from the header's change count, and pressing a while an earlier
plan was still being computed looked like a dead key.
@JtheGunner
JtheGunner merged commit ff4b970 into main Oct 7, 2026
4 checks passed
@JtheGunner
JtheGunner deleted the chore/OMNIS-36-tui-polish-from-reviews branch October 7, 2026 17:07
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