Skip to content

feat(tui): queue strip — always-visible queued prompts, ^Q controls - #43

Merged
jkyberneees merged 1 commit into
mainfrom
feat/queued-prompt-panel
Aug 29, 2026
Merged

feat(tui): queue strip — always-visible queued prompts, ^Q controls#43
jkyberneees merged 1 commit into
mainfrom
feat/queued-prompt-panel

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Round-2 follow-on: the always-visible queue panel (A10 continued past the visibility-only increment in #42).

What it does

  • One row per queued prompt, always visible directly above the input — held prompts were invisible between submit and drain.
  • ^Q focus mode: ↑↓/jk select · ←→/hl move · d delete · esc/ back to the composer. Only latches when prompts are queued; drops focus automatically when the queue drains.
  • ▲ ▼ ✕ per-row mouse controls: reorder, delete, or click a row body to select it.
  • Overflow tail past 8 rows (names the hidden selection while focused); cancel returns held prompts to the input for editing (existing behavior, now strip-aware).

Correctness details

  • Mouse controls render only with --mouse — glyphs without terminal mouse tracking are dead pixels; mouseless runs get a ^q manage hint row that becomes the key legend while focused.
  • Hit-testing in terminal cells, not byte offsets — multibyte prompt text (emoji/CJK) shifted every byte-based hit zone by 2 cells per glyph, so moved up and moved down. Both the dispatcher and the test helper now compute display-width columns; covered with ASCII and multibyte prompts.
  • Layout math stays tri-party consistent: View, inputAreaHeight, and mouse offsets all derive from queueStripHeight.
  • F1 help card teaches ^Q; README synced.

Verification

  • go test -race -count=1 ./... — all 7 packages ok (~38s tui)
  • go vet clean, go fmt clean
  • New tests: cell-accurate clicks (▲▼✕ incl. clamped edge), hidden-controls-without-mouse, hint-row inertness, F1 coverage, plain-mode parity, focus latch/unlatch, overflow windowing

Queued prompts were invisible between submit and drain: a footer count
was the only trace. The strip puts one row per held prompt directly
above the input — where the eyes already are — with ▲▼✕ mouse controls
and a ctrl+q keyboard focus mode (↑↓/jk select · ←→/hl move · d delete
· esc back). Rows fold into an overflow tail past 8, cancel returns
held prompts to the composer, and the strip collapses to zero rows
when the queue runs dry.

Mouse controls render only when the terminal tracks the mouse
(--mouse) — glyphs without tracking are dead pixels. The hit test
works in terminal cells, not byte offsets: multibyte prompt text used
to shift every hit zone so ▼ moved up and ✕ moved down. Mouseless runs
get a ^Q hint row that becomes the key legend while focused, and the
F1 card now teaches the binding.
@jkyberneees
jkyberneees merged commit 026b518 into main Aug 29, 2026
7 checks passed
@jkyberneees
jkyberneees deleted the feat/queued-prompt-panel branch August 29, 2026 14:04
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