Lines
100 %
Functions
66.67 %
Branches
//! Per-tab state holders. Kept intentionally thin right now — the TUI
//! scaffolding ships with placeholder views for each tab and the
//! individual tab implementations grow in follow-up work as the server
//! commands needed by each view get promoted out of the web crate.
use crate::app::Tab;
/// Short, one-line human description of what a tab will eventually do.
/// Rendered as placeholder body text until per-tab views land.
#[must_use]
pub fn placeholder_body(tab: Tab) -> &'static str {
match tab {
Tab::Accounts => "Accounts — list, create, view hierarchy.",
Tab::Transactions => "Transactions — list, create multi-split entries.",
Tab::Commodities => "Commodities — list, create.",
Tab::Reports => "Reports — balance / activity / breakdown, with chart pane.",
Tab::Config => "Config — view and edit TUI / server configuration.",
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn every_tab_has_placeholder_text() {
for tab in Tab::ALL {
let body = placeholder_body(tab);
assert!(!body.is_empty());