TUI::NavStack(T)
A navigation stack of app-defined entries (typically a union of record
types, one per screen/state). Captures the push/pop/current idiom and
the "delegate a key to the active widget, only pop if it wasn't
consumed" bubbling rule that recurs anywhere a stack of views is
keyboard-navigable.
Deliberately minimal: push/pop are plain stack primitives an app can
also call directly when it needs to bypass the normal flow (e.g. to push
a modal without triggering a rebuild-on-change side effect elsewhere, in
order to preserve in-progress state on the widget being covered).
Constructors
Instance methods
The "delegate to child, pop only if unconsumed" idiom for Esc:
nav.handle_esc(child.handle_key(ev)) { pkg_list.focused = true }
Replaces the entry at the bottom of the stack (index 0) in place, leaving anything pushed on top untouched — for a root screen whose structure changes based on runtime state (e.g. a side panel that appears/disappears).