Skip to content

feat(cli/tui): wrapping input, bottom-pinned bar, live streaming, richer rendering#3

Merged
Broccolito merged 1 commit into
mainfrom
feat/cli-tui-ux-overhaul
Jun 19, 2026
Merged

feat(cli/tui): wrapping input, bottom-pinned bar, live streaming, richer rendering#3
Broccolito merged 1 commit into
mainfrom
feat/cli-tui-ux-overhaul

Conversation

@Broccolito

Copy link
Copy Markdown
Collaborator

Summary

Overhauls the interactive CLI (ratatui) session UX so it reads and behaves like a modern chat front-end.

  • Wrapping, growing input box — long lines soft-wrap onto continuation rows and the box grows (up to 10 rows) instead of clipping overflow; the cursor tracks the wrapped position.
  • Bottom-pinned input bar — the status/input/hints cluster is fixed at the bottom of the window so it no longer slides down as the conversation grows; the history pane fills the space above and scrolls.
  • Live token streaming — assistant text now renders token-by-token as a live preview and commits as Markdown when complete (replacing the whole-message coalescer in this path), so streaming is visible and tables/code/lists still render correctly.
  • Type while the agent works — full input editing stays live during a response; Enter queues the message (shown as “N queued” in the box title) and it runs automatically after the current turn. Ctrl-C stops the in-flight turn.
  • User vs agent differentiation — user turns render as a left-barred, softly-shaded block.
  • Slash palette — Enter (not only Tab) accepts the highlighted entry instead of submitting the raw half-typed token.
  • Box-drawing tables — GFM tables render as aligned tables.

Implementation notes

commit_stream_to_session borrows &mut Conversation (a disjoint session field) rather than &mut CliSession, so it doesn't conflict with the reply stream's outstanding immutable borrow of session.agent.

Testing

9 session::tui unit tests pass, including new coverage for input wrapping/growth, the streaming preview→commit cycle, and box-drawing table rendering. Also verified on-screen by driving the built binary in tmux: bottom-pinned input, multi-row wrapping, the slash palette, a streamed response with a box-drawing table and shaded user turn, and typing-while-streaming with the queued follow-up running next.

🤖 Generated with Claude Code

…her rendering

Overhaul the interactive CLI (ratatui) session UX so it reads and behaves
like a modern chat front-end:

- Input box: soft-wrap long lines onto continuation rows and grow the box
  height (up to 10 rows) instead of clipping the overflow off the right
  edge; the cursor tracks the wrapped position. Adds wrap_cells/input_rows.
- Layout: pin the status/input/hints cluster to the bottom of the window so
  the input bar no longer slides down as the conversation grows; the history
  pane flexibly fills the space above and scrolls to keep the latest output
  in view.
- Live streaming: consume the raw reply stream and render assistant text
  token-by-token as a live preview, committing it as Markdown once the run
  completes (replaces the whole-message coalescer in this path) — so
  streaming is visible AND tables/code/lists still render correctly.
- Type while the agent works: full input editing stays live during a
  response; Enter queues the message (surfaced as "N queued" in the box
  title) and it is submitted automatically after the current turn finishes.
  Ctrl-C stops the in-flight turn.
- User vs agent: render the user's own turns as a left-barred, softly-shaded
  block so they are instantly distinguishable from the agent's reply.
- Slash palette: Enter (not only Tab) now accepts the highlighted entry
  instead of submitting the raw half-typed token, so arrow-key selection
  actually applies.
- Markdown: render GFM tables as aligned box-drawing tables.

commit_stream_to_session borrows &mut Conversation (a disjoint session
field) rather than &mut CliSession, so it does not conflict with the reply
stream's outstanding immutable borrow of session.agent.

Tests: add coverage for input wrapping/growth, the streaming preview ->
commit cycle, and box-drawing table rendering (9 tui tests pass).
@Broccolito Broccolito merged commit df1a53e into main Jun 19, 2026
2 checks passed
@Broccolito Broccolito deleted the feat/cli-tui-ux-overhaul branch June 20, 2026 08:42
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