mirror of
https://github.com/openai/codex.git
synced 2026-11-25 23:30:49 +00:00
Add a `badge` element to the statusline UI tree and TypeScript contract. It renders one string as a padded, single-line label with normalized whitespace. The optional `color` accepts `secondary` (the default), `info`, `success`, `warning`, or `danger`. The renderer uses the active theme for the label and blends the fill with the surrounding background when its color is known. Badges wrap as a unit. When a line limit requires an ellipsis after earlier content, a trailing badge that cannot fit is dropped. At the viewport edge, the right padding can clip while the full label remains visible. ## Testing Add rendering tests for wrapping, clipping, theme colors, and linked badges, along with checks for UI tree limits and the TypeScript contract. GitOrigin-RevId: be9e9799d6832976d325ba5fda48f5793dbbc722