BadgeRenderer
Compact status pill: `[label]`, the TUI analog of a badge chip in a web UI. Single-line by design; the label is truncated to fit the node width minus the brackets so the closing `]` is never dropped. ── EL COLOR NO SE APLICA AQUÍ, Y NO SALE DE LOS PROPS ────────────────────── Lo pone `TuiAnsiPainter` al final, y lo DEDUCE del texto entre corchetes: `ready`/`done` → success, `error`/`failed` → error, `claude|gpt|gemini` → azul, el resto → accent. Este renderer emite texto plano, como toda la capa (*«TuiString's contract is plain text, not styled output»*). La versión anterior de este bloque decía que el pintor «toma el `role` de los props». Era falso, y costó: quien fue a implementar el color por actor buscó un camino que no existe. Una descripción que promete un mecanismo inexistente es peor que ninguna — la ausencia se nota, la mentira no. Props: - `label` string Texto de la píldora. Default: ''. - `fill` string Relleno del contorno. Default: 'square'.
BadgeRenderer::supports()
public function supports(Milpa\Live\ValueObjects\Tui\TuiNode $node): boolTrue only for `badge` nodes — dispatch is by declared node type, never by where the node came from.
Parameters
| Name | Type | Description |
|---|---|---|
| $node | Milpa\Live\ValueObjects\Tui\TuiNode |
BadgeRenderer::render()
public function render(Milpa\Live\ValueObjects\Tui\TuiNode $node, Milpa\Live\ValueObjects\Tui\TuiRenderContext $context): Milpa\Live\ValueObjects\Tui\TuiFrameDraws the pill on one line, colouring it by the node's semantic role.
Parameters
| Name | Type | Description |
|---|---|---|
| $node | Milpa\Live\ValueObjects\Tui\TuiNode | |
| $context | Milpa\Live\ValueObjects\Tui\TuiRenderContext |