Skip to content

TUI testing fixes: discovery picker + focus/navigation UX#5

Merged
harder merged 2 commits into
mainfrom
harder/fix/discovery-picker-rendering
Jun 18, 2026
Merged

TUI testing fixes: discovery picker + focus/navigation UX#5
harder merged 2 commits into
mainfrom
harder/fix/discovery-picker-rendering

Conversation

@harder

@harder harder commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Fixes found by driving the real TUI in a pseudo-terminal (tmux) to test all workflows after #4 merged. Two commits; every fix verified live.

Commit 1 — discovery picker rendering

  1. Skill labels invisible — checklist content size was width 1, clipping every row to the glyph. Now sized from the labels.
  2. Selection count frozen / Space·A·N dead — wrong CheckBox event; subscribe ValueChanged. Verified: Space112/113, A113/113, Nselect at least one skill (Install disabled).

Commit 2 — focus / navigation / discovery UX

  1. Esc quit the app at root with no confirmation (Terminal.Gui's default). Now swallowed at the top-level list with a "Press q to quit" hint; modals/Doctor/Updates/search keep their own Esc.
  2. Installed tab focused the filter field, so advertised global hotkeys (?, d, x) were typed into it. Now focuses the skill list on activation/startup (deferred FocusList() beats TG's post-reflow default). Verified: ? opens Help at startup.
  3. Esc left stray filter text (list stuck at "no matches"). Esc on a non-empty Installed filter now clears it; empty-filter Esc still does Back.
  4. [root] namespace tag in names. gh lists [root] name<TAB>desc; the tag is decoration. Stripping it fixes the picker label and per-name subset installs (root → bare name, else ns/name).
  5. Stale "discovering skills in …" status after cancelling the picker — now reset.

Testing

  • Every fix exercised in a live tmux session (search → A picker, Esc at root, ? at startup, f/Esc filter clear, picker labels/toggles).
  • 521 unit tests pass (+18 across both commits).
  • ⚠️ Per-name subset install (#6) is verified by parsing/unit test, not an actual multi-skill install; the --all path (all selected) is the common case.

🤖 Generated with Claude Code

harder and others added 2 commits June 18, 2026 12:08
Live TUI testing of the per-repo discovery picker surfaced two bugs:

- Skill labels were invisible: the scroll FrameView's content size was
  set to width 1 (`new Size(1, count)`), clipping every checkbox to its
  glyph. Compute the content width from the (bounded) labels so names
  and truncated descriptions render; long descriptions are capped.
- The "N/M selected" count never updated and Space/A/N appeared dead:
  the checkbox change event is `ValueChanged` in this Terminal.Gui
  version (an earlier wrong guess was dropped to get it compiling), so
  nothing recomputed the count. Subscribe each box's ValueChanged to
  RefreshValidity. Verified live: Space → 112/113, A → 113/113,
  N → "select at least one skill" with Install disabled.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Follow-up to the live TUI testing pass. All verified by driving the
real binary in a pseudo-terminal.

- Esc no longer quits the app at root. Terminal.Gui's default
  quit-on-Esc exited with no confirmation; swallow Esc in the window
  shortcut handler (modals/Doctor/Updates/search field still handle it
  themselves) and hint "Press q to quit".
- Installed tab now focuses the skill list on activation/startup, not
  the filter field. Previously the filter held focus and swallowed
  advertised global hotkeys (?, d, x). A deferred FocusList() beats
  Terminal.Gui's post-reflow default.
- Esc on a non-empty Installed filter clears it (the list is
  live-filtered, so stray text left it stuck at "no matches"); an empty
  filter still falls through to the normal Back shortcut.
- Strip gh's "[namespace] " tag from listed skill names. gh emits
  "[root] name<TAB>desc"; the bracket is display decoration, so the
  picker showed "[root] name" and per-name subset installs would have
  passed an unresolvable argument. Root → bare name, others → ns/name.
- Discovery picker no longer leaves a stale "discovering skills in …"
  status after the picker is cancelled.

Tests: +8 (NormalizeSkillName cases, root-namespace parse). 521 pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@harder harder changed the title Fix discovery picker: render labels + live selection count TUI testing fixes: discovery picker + focus/navigation UX Jun 18, 2026
@harder harder merged commit 88e82a6 into main Jun 18, 2026
6 checks passed
@harder harder deleted the harder/fix/discovery-picker-rendering branch June 18, 2026 19:56
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