10 10 ##
Commands / tools / settings 13 - - `/footer`: toggle footer visibility.
13 + - `/footer`: toggle footer visibility in TUI mode.
15 15 - `ctrl+alt+f`: toggle footer visibility.
19 19 - `session_shutdown`
21 - - listens for `footer:segment` and `footer:probe`.
22 - - emits runtime-scoped `footer:ready` capability announcements.
21 + - listens for `footer:segment`.
27 -Owns the Pi footer through `ctx.ui.setFooter()`.
26 +Owns the Pi footer through `ctx.ui.setFooter()` only when both `ctx.hasUI` is true and `ctx.mode` is `tui`.
27 +RPC keeps UI capability for protocol interactions but does not mount the terminal footer.
28 +JSON and print modes have no UI and do not mount it.
29 30 Visible footer has two lines normally and adds a third under LLM-segment pressure:
33 34 - line 2: the second `llm` flow row, shown only when content overflows line 1.
35 36 `footer:segment` payloads use `id`, `text`, and `zone` (`workspace` or `llm`).
36 -Optional fields: `variants`, `icon`, `color`, `bar`, `suffix`, `group`, `separator`, and `order`.
37 +Optional fields: `variants`, `icon`, `color`, `bar`, `suffix`, `group`, `separator`, `gap`, `order`, and an `accept` callback.
38 39 Adjacent segments with the same `group` stay together during line flow.
39 -Grouped segments use a space internally unless a segment supplies the separator that precedes it.
40 +Grouped segments use one space internally unless a segment supplies a larger `gap` or the separator that precedes it.
41 42 Send `{ id, text: undefined }` to remove a segment.
43 -Segments sort by `order`; default is `50`.
44 +Segments sort by `order`, then by `id` so equal-priority segments remain deterministic; default order is `50`.
44 45 Current session name is inserted in the `workspace` zone with order `0.5`.
46 47 Render requests are coalesced.
47 -Segments received before footer mount retry until the footer is available.
48 +Segments received before footer mount are retained for the first render without polling.
49 +Malformed updates are ignored without replacing previously valid segments.
50 +A producer rendering failure hides only that segment.
48 51 Branch changes trigger rerender.
50 53 Display text strips ANSI/control characters, collapses whitespace, and stays
54 57 Progress bars render 10 block cells on a dim track.
55 58 Bar values clamp to `0..100`.
57 -Publishes capability state at `Symbol.for("@bugabinga/pi-ext-footer")`:
58 -`{ version: 1, loaded: true }`.
59 -On quit/reload shutdown, `loaded` becomes `false`.
60 +The footer calls `accept` synchronously after validating and retaining an update, including updates received before mount.
61 +TUI producers use that acknowledgement to clear their `ctx.ui.setStatus()` fallback; without acknowledgement they remain independently useful through status text.
62 +Acknowledgement remains local to the runtime event bus, so nested runtimes cannot affect one another.
61 -Hidden mode swaps in a zero-height footer stub.
64 +Hidden mode swaps in a footer component with no rendered content.
65 +Pi fullscreen mode may still reserve layout space for that empty component.
62 66 Shutdown clears segments and footer context.