Skip to content

feat: switch TUI from full-screen to inline viewport#8

Merged
uinstinct merged 1 commit into
mainfrom
fix/issue-7
Jun 13, 2026
Merged

feat: switch TUI from full-screen to inline viewport#8
uinstinct merged 1 commit into
mainfrom
fix/issue-7

Conversation

@archon-instinct

Copy link
Copy Markdown

Summary

  • Replace ratatui::init() (alternate-screen full-screen mode) with ratatui::init_with_options(TerminalOptions { viewport: Viewport::Inline(24) }) in src/main.rs
  • The TUI now renders inline, directly below the invoked command, instead of taking over the full terminal
  • Scrollback buffer and prior terminal output remain visible throughout the session

Changes

src/main.rs — one-line swap of the terminal init call:

  • ratatui::init()ratatui::init_with_options(ratatui::TerminalOptions { viewport: ratatui::Viewport::Inline(24) })
  • Keyboard enhancement protocol setup/teardown is unchanged
  • ratatui::restore() is unchanged and leaves the terminal clean

The inline height of 24 rows accommodates the most demanding screen (RenameForm, which has 13 fixed-height rows + a Fill(1) list), leaving 11 rows for the author list. All other screens are less constrained.

Verification

  • src/tui/render.rs layouts use Constraint::Fill(1) throughout, so they adapt to the inline area without any layout changes
  • Integration tests in tests/main_integration_test.rs test pre-TUI error paths (not-a-repo, not-a-TTY) and are unaffected by the viewport mode change
  • ratatui::Viewport::Inline and ratatui::TerminalOptions are stable public API since ratatui 0.25; confirmed available in the locked ratatui 0.30.0

Fixes #7

Use ratatui::init_with_options with Viewport::Inline(24) so the UI
renders below the invoked command rather than taking over the full
screen. Scrollback and prior terminal output remain visible.
@uinstinct uinstinct marked this pull request as ready for review June 13, 2026 06:54
@uinstinct uinstinct merged commit 5d77ddb into main Jun 13, 2026
1 check passed
@uinstinct uinstinct deleted the fix/issue-7 branch June 13, 2026 06:54
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.

use an inline tui instead of full screen

1 participant