Skip to content

feat(leantui): let embedders override the welcome banner#3610

Open
EronWright wants to merge 1 commit into
docker:mainfrom
EronWright:leantui-config-banner
Open

feat(leantui): let embedders override the welcome banner#3610
EronWright wants to merge 1 commit into
docker:mainfrom
EronWright:leantui-config-banner

Conversation

@EronWright

@EronWright EronWright commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

What

The lean TUI's welcome banner is hardcoded ASCII art ("docker agent")
and is not derived from Config.AppName (which is only used as a text
label elsewhere). Embedders that reuse the lean TUI therefore can't brand
the welcome screen with their own art.

This adds an optional Config.Banner []string:

  • When unset (nil/empty), the built-in bannerLines art is used, so
    existing behavior is unchanged.
  • When set, commitWelcome renders the provided lines in place of the
    built-in art, reusing the same top/left padding, accent styling, and
    help footer — so a custom banner looks native and the embedder only
    has to supply the raw art.

It's a []string (pre-split lines) to match the existing bannerLines
shape and the per-line render loop; each line ideally fits within ~56
columns like the built-in art.

Tests

Adds TestCommitWelcomeUsesConfiguredBanner, asserting a configured
banner renders at the correct padded offset and replaces (does not
append to) the built-in art.

The lean TUI's welcome banner was hardcoded ("docker agent") and ignored
Config.AppName, so embedders couldn't brand it. Add an optional
Config.Banner []string; commitWelcome falls back to the built-in
bannerLines when unset, so existing behavior is unchanged.
@aheritier aheritier added area/tui For features/issues/fixes related to the TUI kind/feat PR adds a new feature (maps to feat:). Use on PRs only. labels Jul 11, 2026
@EronWright EronWright marked this pull request as ready for review July 11, 2026 21:04
@EronWright EronWright requested a review from a team as a code owner July 11, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tui For features/issues/fixes related to the TUI kind/feat PR adds a new feature (maps to feat:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants