Skip to main content

Module tui

Module tui 

Source
Expand description

Interactive terminal UI for browsing and gating the canned-response corpus.

Launch with canonic tui. Pure state helpers are unit-tested with [ratatui::backend::TestBackend]; the live loop uses crossterm.

Structsยง

App
Application state for the corpus browser (testable without a real terminal).
ListEntry
One row in the browser list (filtered view over the full corpus).

Enumsยง

Focus
Which pane / modal is focused.

Constantsยง

ACCENT ๐Ÿ”’
Teal-ish accent matching the Shibuya / canonic brand.
BAD ๐Ÿ”’
MUTED ๐Ÿ”’
OK ๐Ÿ”’
WARN ๐Ÿ”’

Functionsยง

centered_rect ๐Ÿ”’
draw ๐Ÿ”’
help_text ๐Ÿ”’
load_focusing
Open path as a single-file corpus view (load parent dir, select that id).
render_test_frame
Render one frame to a test backend (for structural UI tests).
restore_terminal ๐Ÿ”’
run_loop ๐Ÿ”’
run_tui
Run the interactive TUI until the user quits.
setup_terminal ๐Ÿ”’