Skip to main content

Module model

Module model 

Source
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.
VisibleNode
A node currently visible in the tree view, paired with its depth and AUX-004-rule-2 lockout flag.

Enums§

CycleOutcome
Outcome of an attempted Tree::cycle_focused call.
ExpandOutcome
Outcome of an attempted Tree::try_expand_focused call.
HiddenKind
Why a directory was treated as hidden by the TUI driver.
SelectionState
One of the three selection states AUX-003 defines for a directory node. Cycling goes None -> Project -> ProjectsParent -> None.