-
Notifications
You must be signed in to change notification settings - Fork 454
Description
Description
The --extra-cmd feature allows users to add custom labels to the HUD (e.g. auth status, custom metrics). However, the extraLabel is only rendered in compact mode via renderSessionLine() in session-line.ts:204-205.
In the default expanded layout, renderExpanded() iterates over elementOrder and calls renderElementLine() for each element — but extraLabel is never referenced in this path, so it silently disappears.
Expected behaviour
extraLabel should be displayed in both compact and expanded layouts.
Suggested fix
Append extraLabel to the project line in src/render/lines/project.ts, after the session name and before the empty-check:
if (ctx.extraLabel) {
parts.push(dim(ctx.extraLabel));
}This keeps it consistent with compact mode (where it appears on the session/project line) and doesn't require adding a new HudElement type.
Reproduction
- Configure
--extra-cmdwith any command that returns{"label": "test"} - Use the default expanded layout
- The label is not displayed
Switch to "lineLayout": "compact" and the label appears.