1
//! Per-tab state holders. Kept intentionally thin right now — the TUI
2
//! scaffolding ships with placeholder views for each tab and the
3
//! individual tab implementations grow in follow-up work as the server
4
//! commands needed by each view get promoted out of the web crate.
5

            
6
pub mod nms;
7
pub mod nms_eval;
8

            
9
use crate::app::Tab;
10

            
11
/// Short, one-line human description of what a tab will eventually do.
12
/// Rendered as placeholder body text until per-tab views land.
13
#[must_use]
14
22
pub fn placeholder_body(tab: Tab) -> &'static str {
15
22
    match tab {
16
2
        Tab::Accounts => "Accounts — list, create, view hierarchy.",
17
1
        Tab::Transactions => "Transactions — list, create multi-split entries.",
18
1
        Tab::Commodities => "Commodities — list, create.",
19
16
        Tab::Reports => "Reports — balance / activity / breakdown, with chart pane.",
20
1
        Tab::Config => "Config — view and edit TUI / server configuration.",
21
1
        Tab::Console => "Console — interactive nomiscript REPL.",
22
    }
23
22
}
24

            
25
#[cfg(test)]
26
mod tests {
27
    use super::*;
28

            
29
    #[test]
30
1
    fn every_tab_has_placeholder_text() {
31
6
        for tab in Tab::ALL {
32
6
            let body = placeholder_body(tab);
33
6
            assert!(!body.is_empty());
34
        }
35
1
    }
36
}