Skip to content

feat(ui): input-dock polish — queue, recall, mouse scroll, live status#15

Merged
lavindeep merged 1 commit into
ui-reworkfrom
feat/ui-input-dock
Jun 28, 2026
Merged

feat(ui): input-dock polish — queue, recall, mouse scroll, live status#15
lavindeep merged 1 commit into
ui-reworkfrom
feat/ui-input-dock

Conversation

@lavindeep

Copy link
Copy Markdown
Owner

Branch 9 (final feature branch) of the full-screen TUI rework (UI v2, design §31.18).

What

The input-dock polish slice:

  • One-message queue: a dock submit while a turn is in flight is staged (one slot, latest replaces) and shown as a faint queued: chip above the dock; it fires at turn end via a new TurnRunner.on_idle hook (_mark_doneon_idle_fire_pending, which clears the slot before dispatching → no loop). A Ctrl-C that cancels the turn also drains the slot ("stop everything").
  • Up-arrow recall: Up in an empty dock with a staged message pulls it back into the box to edit/discard/re-send; otherwise the default Up applies.
  • Mouse-wheel scroll: a _PaneControl intercepts SCROLL_UP/DOWN into the same cursor-line model as PageUp/PageDown (3 lines/notch).
  • Live status: the bar reads status_fn() per render (one runtime.status() call), so a mid-session /model use (cloud indicator), /profile use, /cwd set, and context growth reflect immediately; the cloud indicator stays driven by is_egressing (unspoofable). branch stays build-time.
  • ASCII fallbacks for the new chip.

The _submit keybinding was refactored to extract _dispatch_line (the slash/turn routing), preserving the approval-gate-first / /exit / slash-routing order from branches 6–8. Default (non-app) session stays byte-identical (all new params default absent).

Tests

Queue stage/fire/replace, Up-arrow recall + both passthrough cases, mouse scroll pin/resume + non-scroll delegate, live status + static fallback, ASCII chip, and a real-thread _mark_doneon_idle integration test. Phase gate green: ruff + format clean, mypy --strict clean (80 files), 1428 passed.

Live validation (gemma4:31b-cloud)

Staged a follow-up during a turn → queued: chip; it auto-fired at turn end. Up-arrow recalled a staged message into the dock. Ctrl-C cancelled a turn and drained the queue (the staged line did not fire). Live cloud indicator confirmed.

DESIGN §31.18 added.

Stage a submit while a turn is in flight as a one-message queue (a faint
'queued' chip above the dock); Up-arrow in an empty dock recalls it to edit
or discard; it fires at turn end via a new TurnRunner.on_idle hook. Mouse-wheel
scroll drives the same cursor-line model as PageUp/PageDown. The status bar
reads live values per render (model, profile, cloud indicator, context %),
so a mid-session /model use or /profile use reflects immediately. ASCII
fallbacks for the new glyphs.

Adds DESIGN section 31.18.
@lavindeep lavindeep merged commit 06714a2 into ui-rework Jun 28, 2026
2 checks passed
@lavindeep lavindeep deleted the feat/ui-input-dock branch June 28, 2026 11:36
lavindeep added a commit that referenced this pull request Jul 2, 2026
feat(ui): input-dock polish — queue, recall, mouse scroll, live status
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