diff --git a/src/ui/app.rs b/src/ui/app.rs index ec53bcd..dd063a5 100644 --- a/src/ui/app.rs +++ b/src/ui/app.rs @@ -185,6 +185,19 @@ impl AppMode { } } +/// Document state slice: the workbook and its IO bookkeeping. Distinct from +/// `Workbook` itself (which is pure document semantics in `improvise-core`) +/// because `file_path` and `dirty` are persistence-layer concerns. Filled in +/// by improvise-x2c (vb4 step 2). +#[derive(Debug, Default)] +pub struct ModelState {} + +/// UI session-state slice: mode, cursors, panels, buffers, navigation stacks, +/// and other per-session state that does not persist to disk. Filled in by +/// improvise-ew0 (vb4 step 3). +#[derive(Debug, Default)] +pub struct ViewState {} + pub struct App { pub workbook: Workbook, pub file_path: Option, @@ -472,6 +485,15 @@ impl App { mod tests { use super::*; + /// improvise-3vr: ModelState and ViewState are the named slices of App + /// state introduced by the vb4 refactor. Step 1 only requires that the + /// types exist and are constructible; subsequent steps move fields in. + #[test] + fn model_state_and_view_state_are_constructible() { + let _: ModelState = ModelState::default(); + let _: ViewState = ViewState::default(); + } + fn two_col_model() -> App { let mut wb = Workbook::new("T"); wb.add_category("Row").unwrap(); // → Row axis