Skip to main content

trusty_code_tui/widgets/
mod.rs

1//! ratatui widgets that render [`crate::app::ReplApp`] state.
2//!
3//! Why: DOC-50 §3.1 groups the actual `Frame`-drawing functions under
4//! `widgets/` (as distinct from [`crate::render`], whose functions take
5//! plain strings and never see `ReplApp`) so "reads app state and draws a
6//! `Rect`" has one obvious home. Each submodule here is a
7//! behavior-preserving, generalized port of one tagent `repl/tui/*.rs` file
8//! (see each submodule's doc comment for its specific source).
9//!
10//! What: [`scrollback`] (chat pane, from tagent's `chat.rs`),
11//! [`input_composer`] (the prompt row, also from `chat.rs`), [`banner`]
12//! (startup splash, from `banner.rs`), and [`status_line`] (the engine-
13//! supplied statusline, new in this slice — tagent's `status.rs` equivalent
14//! is NOT ported, since it hardcodes an OpenRouter cost formula the shared
15//! crate must never contain; see DOC-50 §3.2 and Q9).
16//!
17//! # Spec References
18//! - [`SPEC-TTUI-03~draft`](../../../docs/specs/DOC-50-tcode-tui-claude-code-clone.md#SPEC-TTUI-03~draft) — §3.1 module layout (`widgets/`).
19//! - [`SPEC-TTUI-05~draft`](../../../docs/specs/DOC-50-tcode-tui-claude-code-clone.md#SPEC-TTUI-05~draft) — Slice 4 deliverable (§5, Slice 4).
20
21pub mod banner;
22pub mod input_composer;
23pub mod scrollback;
24pub mod status_line;