Skip to content

feat(tui): add Ctrl+L visual clear screen keeping recent turns - #988

Open
hakula139 wants to merge 1 commit into
mainfrom
feat/tui-clear-screen
Open

hakula139 wants to merge 1 commit into
mainfrom
feat/tui-clear-screen

Conversation

@hakula139

Copy link
Copy Markdown
Member

Summary

  • Add CommandId::ClearScreen (Ctrl+L) in Keymap and /clear-screen [N] in CommandRegistry.
  • Trigger Terminal::clear() on AppAction::ClearScreen in the TUI runner for a full terminal redraw without mutating session history or LLM context.
  • Hide earlier turns above a muted -- N earlier turns hidden -- divider, keeping the most recent N turns visible (default 2, configurable via App::with_clear_keep_turns or /clear-screen N).
  • Slice transcript lines to the visible viewport window in render_transcript so Paragraph only renders visible rows.

Test plan

  • nix develop -c run-hooks (all hooks passed, including rustfmt, clippy, cspell)
  • nix develop -c cargo doc --no-deps (0 warnings)
  • nix develop -c cargo llvm-cov --workspace --show-missing-lines (94.77% workspace line coverage, 100% patch coverage on added lines)

Related

@hakula139 hakula139 self-assigned this Dec 1, 2026
@codecov

codecov Bot commented Dec 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.04306% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/ox-tui/src/runner.rs 93.33% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

Clear screen and keep long TUI sessions fast in tmux

1 participant