Skip to content

feat(tui): tole-tui crate skeleton; bare tole opens it (inline rendering) - #505

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

ajianaz merged 1 commit into
developfrom
feat/tui-skeleton

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

What (description of the change)

TUI skeleton (#459, epic #464 Phase 1 start): new crate crates/tole-tui (ratatui 0.30 minimal-features + crossterm 0.29 events-only) — presentation + event loop only, depending on tole-core; tole-cli depends on it behind a default tui feature.

  • Bare tole (argv count == 1, checked before clap) on a TTY (stdin AND stdout, IsTerminal) opens the TUI; non-TTY keeps today's help exactly. Without the tui feature, behavior is byte-identical to develop (cfg-gated).
  • Inline viewport rendering (scrollback kept, NO alternate screen). Skeleton scope: 3-line placeholder frame, resize redraw, quit via Ctrl+C twice (first press shows a hint; any other key disarms) or /quit + Enter, panic-safe terminal restore via a Drop guard (raw mode off + viewport leave on unwind).
  • Minimal TuiHost trait (label + approver; tole-cli supplies a deny-all approver). Provider/storage accessors deliberately deferred to feat(tui): MVP — streaming transcript, editor, footer, inline approvals, Esc cancel #460 — Provider is &mut and stateful, a skeleton cannot hand it over sensibly.
  • Release plumbing (orchestrator addition, found by the implementer's publish-risk note): .github/workflows/publish.yml now publishes tole-tui between core and cli (same idempotent already-published classification); order core -> tui -> cli since tole-cli pins tole-tui by version.

Why (the problem you're solving)

Closes #459 — there was no interactive terminal UI; tole chat is a plain line REPL. This lands the crate skeleton the TUI epic (#464) builds on (#460 MVP transcript/editor/footer/approvals next).

Testing (how you verified this works)

  • Five tole-tui unit tests: Ctrl+C twice quits; another key disarms the first Ctrl+C; /quit + Enter quits; any other line + Enter does not quit; one loop test covers render/resize/quit.
  • Gates run by the implementer AND independently re-run by the orchestrator (own target dir): cargo fmt --all -- --check clean; cargo clippy --workspace --all-targets -- -D warnings clean; cargo test --workspace --no-fail-fast 1004 passed / 0 failed; cargo test -p tole-core -p tole-cli --no-default-features rc 0 (868/0 per implementer); cargo build -p tole-cli --no-default-features OK (acceptance: builds without the TUI); cargo build -p tole-cli (default, links the TUI) OK. publish.yml validated YAML-clean.
  • Terminal restore on panic/SIGINT is verified via the Drop-guard design + the loop unit test; a REAL-TTY manual check remains for a human (documented in docs/tui.md): frame renders, resize redraws, double-Ctrl+C and /quit exit, scrollback intact and echo normal after exit, terminal still usable after an injected panic.
  • Honest notes / deviations: bare tole means NO arguments at all (tole --config x with no subcommand still gets clap's usage error — making the subcommand optional would touch ~10 match sites; say the word if that variant is wanted). Uteke rooms read: tole-dev / uteke-conventions / codecoradev-conventions full, codecora-workflow-standard grep-only (too large). ratatui/crossterm are NEW dependencies (first TUI deps in the workspace).

@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 force-pushed the feat/tui-skeleton branch 2 times, most recently from 2e79247 to b56df26 Compare November 4, 2026 00:18
Inline-viewport TUI skeleton (ratatui + crossterm): placeholder frame, resize redraw, Ctrl+C twice or /quit to exit, drop-guard terminal restore. tole-cli launches it for bare `tole` on a TTY behind the default `tui` feature.
@ajianaz
ajianaz merged commit 48c3b34 into develop Nov 4, 2026
16 checks passed
@ajianaz
ajianaz deleted the feat/tui-skeleton branch November 4, 2026 00:30
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): tole-tui crate skeleton; bare tole opens it (inline rendering)

1 participant