Skip to content

feat(tui): steering and follow-up queue, collapsible output, @file, markdown/diff - #509

Merged
ajianaz merged 1 commit into
developfrom
feat/tui-steering
Nov 4, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/tui-steering

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

What (description of the change)

TUI steering + readable output (#462, epic #464 Phase 2):

  • Steering + follow-up queue: while a turn runs, Alt+Enter queues the draft (queue rows shown above the editor; Alt+Up pops one back; after the turn settles the head auto-submits, one at a time); Esc cancels the turn AND returns the whole queue to the editor (nothing lost). Enter during a run steers via the existing soft-interrupt machinery (feat(harness): soft interrupt — inject owner message into a running session without cancelling it #377 InterruptQueue): the honest semantics disclosed — the draft is delivered through the shipped interrupt path, NOT a new mid-turn text-injection protocol (no tole-core protocol invented).
  • Ctrl+O expands/collapses tool output; Ctrl+T shows/hides reasoning (transcript-level flags; scrollback is append-only so collapse affects how later blocks render — disclosed, not retroactive).
  • @ file search: panel over the cwd (substring filter, capped walk, skip .git/target/node_modules, insert-at-end — the editor has no cursor, disclosed).
  • Markdown styling of answers: minimal inline (bold/code spans/headings/fenced blocks as styled ratatui spans) — no new dependency crate; split-across-wrap pairs unstyled (deferred).
  • Unified-diff coloring for write/edit tool results: the tool's own +/-/@@ lines render green/red/dim (tole-core caps the preview at 200 chars — respected, not changed). Diff text sanitized BEFORE styling.
  • All new surfaces render through the sanitize module (paths, queue rows, diff lines, file panel).

Why (the problem you're solving)

Closes #462 — working alongside the agent needs steering, a follow-up queue, and readable output; this is Phase 2 of the TUI epic (#464).

Testing (how you verified this works)

  • Acceptance pty e2e (new, in crates/tole-cli/tests/tui_e2e.rs — now 5 tests): queue while running -> head auto-runs after settle; cancel returns the queue to the editor; steering path exercised via the mock provider. Unit tests: queue state machine, key dispatch, toggles, file panel, markdown/diff styling.
  • Gates run by the implementer AND independently re-run by the orchestrator (own target dir): fmt clean; clippy --workspace --all-targets -- -D warnings clean; cargo test --workspace --no-fail-fast 1090 passed / 0 failed (implementer's first run hit 4 load flakes — 3 pty timeouts + the known failed_append_poisons_until_reopen Locked{pid} class; each passes isolated, clean second run, and the orchestrator rerun confirms 1090/0); bare profile 893 / 0; e2e 5 / 5; attribution grep 0.
  • Local cora verdict on the commit: "No issues found" (pre-commit hook, second attempt); the CI Cora Review remains the merge gate (local LLM tier was flaky 504 earlier today).
  • Deferred explicitly: markdown tables/nested lists/italics/links, retroactive collapse of already-printed rows, @ insertion at cursor (no editor cursor yet), fuzzy file matching, diff cap (200 chars, tole-core).

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 0c2889b into develop Nov 4, 2026
16 checks passed
@ajianaz
ajianaz deleted the feat/tui-steering branch November 4, 2026 04:33
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.

feat(tui): steering and follow-up queue, collapsible output, @file, markdown/diff

1 participant