On this page

ADR-0307: Hierarchical Sub-App Mounting (app_compose)

Context

Tenon provides composable pure TUI primitives (tui, tui_layout, tui_shell) and a pure control-plane contract (app_actions, state_delta), but composing multiple independent App / ActionApp panes into one unified multi-pane workspace (such as an IDE or operator console with file browser, editor, terminal, and log panes) still required manual wiring for:

  1. Pane focus & layout management: focus ring cycling (ws.focus_next / ws.focus_prev), direct and directional focus (ws.focus, ws.focus_dir), zoom toggling (ws.zoom), per-pane Rect clipping, Caps.cluster propagation, and namespaced a11y_nodes.
  2. Action & state namespacing: merging child ActionSpecs under <prefix>.*, isolating per-pane state_rev, projecting composite state under /<id> for accurate RFC-6901 state_delta patches, and routing CLI subcommands (<bin> <id> ...).
  3. Fault isolation: preventing a trapping or faulty child pane from crashing or freezing healthy sibling panes, while rendering a clear recovery error card.
  4. Decoupled cross-pane communication: allowing one pane (e.g., a file tree) to notify another (e.g., an editor) without direct coupling or infinite feedback loops.

Decision

We introduce a pure (capabilities = []) library plugin plugins/app_compose/ and extend plugins/tui_shell/plugin.tn with cluster-aware error card rendering, strictly in pure Tenon with zero Rust compiler/runtime changes (ADR-0291):

1. Hierarchical Workspace Composition (app_compose.workspace)

2. Fault Isolation & Error Cards (app_compose.fault + tui_shell.plugin)

3. Pure Typed TopicBus (app_compose.topic)

Consequences