Expand description
Interactive-tree state machine for haz init per
AUX-003..AUX-005.
This module owns the pure data structures and state transitions
the interactive scaffold flow needs; the TUI runtime lives in a
sibling module and drives this model in response to keystrokes.
Keeping the model pure (no terminal IO, no filesystem reads)
makes the AUX-004 rules exhaustively unit-testable.
The model represents the cwd-rooted directory subtree as a
Node tree with per-node SelectionState and a single
focused position. Navigation, expansion, and state cycling are
all expressed as tree mutations; the driver re-renders the
Tree::visible_nodes list after each mutation.
Structs§
- Node
- A single visible filesystem directory inside the interactive tree.
- Tree
- The interactive-tree state.
- Visible
Node - A node currently visible in the tree view, paired with its
depth and
AUX-004-rule-2 lockout flag.
Enums§
- Cycle
Outcome - Outcome of an attempted
Tree::cycle_focusedcall. - Expand
Outcome - Outcome of an attempted
Tree::try_expand_focusedcall. - Hidden
Kind - Why a directory was treated as hidden by the TUI driver.
- Selection
State - One of the three selection states
AUX-003defines for a directory node. Cycling goesNone->Project->ProjectsParent->None.