Skip to content

feat(tui): --banner-file replaces the startup banner, with animated frames - #4578

Draft
ALLiDoizCode wants to merge 2 commits into
docker:mainfrom
ALLiDoizCode:feat/banner-file
Draft

ALLiDoizCode wants to merge 2 commits into
docker:mainfrom
ALLiDoizCode:feat/banner-file

Conversation

@ALLiDoizCode

@ALLiDoizCode ALLiDoizCode commented Oct 13, 2026 •

Copy link
Copy Markdown

What

A new run flag, --banner-file <path>, draws the art in a text file where the full TUI draws the Docker Agent banner on an empty conversation.

  • A line holding only a form feed (\f) separates frames. A file with several frames plays them in a loop, one every 100ms, until the conversation starts.
  • Lines may carry ANSI color sequences. Frames are padded to one size, so the art does not move as it plays.
  • Art larger than the chat area is cropped around its center, so a backdrop sized for a large terminal fills a small one. (The default banner is still left out when it does not fit.)
  • With no flag, nothing changes: the default banner is drawn as before.

Why

Projects that ship an agent on top of docker-agent can already put their name on the TUI with --app-name, but the opening screen still says DOCKER AGENT. The only thing that takes the banner's place today is welcome_message, which is Markdown drawn once, so art has to go in a code block and cannot move.

We hit this in spaceturtle, whose banner is an animated pixel turtle. We currently carry this change as a patch on v1.150.0 and would rather not.

How

  • pkg/tui/banner: a Banner type (Default, Parse, Load, FrameAt). Lines, Width and Height stay for the lean TUI and existing tests.
  • pkg/tui/page/chat: WithBanner. The page subscribes to the shared animation runtime only while an animated banner is visible, marks a tick dirty only when the frame index changes, and gives the subscription up once the conversation replaces the banner. A static banner never subscribes.
  • pkg/tui: WithBanner, passed through chatPageOpts so new tabs get it too.
  • cmd/root: the flag, loaded before the TUI starts so a bad file is an error, not a silent fallback. Files over 16 MiB are refused.
  • Docs: the CLI flag table and the TUI page.

Testing

  • Unit tests for parsing, padding, looping and loading, and for the chat page: a custom banner replaces the default, an animated one advances with the animation clock and redraws only on a frame change, and the tick is released when the conversation starts.
  • go test on pkg/tui/... and cmd/root, golangci-lint run on the changed packages and go run ./lint . pass locally. I did not run the whole of task test.
  • By hand: a 240-frame, 240x64 colored banner plays in the full TUI, cropped to the chat area, and stops on the first message.

Not done

  • The lean TUI keeps the default banner.
  • The frame interval is fixed at 100ms. I left out a second flag for it; happy to add one, or to move this to user settings or the agent config if you prefer that shape.

🤖 Generated with Claude Code

…rames

Embedders can already rename the TUI with --app-name, but the art drawn on an
empty conversation is fixed. --banner-file draws a text file in its place. A
line holding only a form feed separates frames; several frames play in a loop
on the shared animation tick, one every 100ms, until the conversation starts.
The page subscribes to the tick only while an animated banner is visible and
marks a tick dirty only on a frame change.

Signed-off-by: Jonathan Green <dev.jonathan.green@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ALLiDoizCode
ALLiDoizCode requested a review from a team as a code owner October 13, 2026 13:56
@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. status/needs-signed-commits Some commits in the PR are signed with a valid SSH/GPG key labels Oct 13, 2026
@aheritier

Copy link
Copy Markdown
Collaborator

👋 Some commits in this PR are not signed and verified by GitHub. Please sign your commits with a GPG or SSH key registered in your GitHub account, then force-push.

Commits that are not verified: aab31fe

See GitHub’s guide on signing commits for setup instructions. I’ve added status/needs-signed-commits; it will be removed automatically once every commit in this PR carries a valid GitHub-verified signature.

A banner larger than the chat area was left out, as the default one is. Art
read from a file is now cut down around its center instead, so a backdrop
sized for a large terminal fills a small one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jonathan Green <dev.jonathan.green@gmail.com>
@aheritier

Copy link
Copy Markdown
Collaborator

Please don't make claude as co-author (and use docker agent, you'll see it's awesome :) )

@aheritier aheritier left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sign your commits and remove claude as co-author ( we don't care of it, we all use agents )

@aheritier aheritier added status/needs-signed-commits Some commits in the PR are signed with a valid SSH/GPG key and removed status/needs-signed-commits Some commits in the PR are signed with a valid SSH/GPG key labels Oct 13, 2026
@aheritier

Copy link
Copy Markdown
Collaborator

👋 Some commits in this PR are not signed and verified by GitHub. Please sign your commits with a GPG or SSH key registered in your GitHub account, then force-push.\n\nCommits that are not verified: aab31fe, 1c79bfe\n\nSee GitHub's guide on signing commits for setup instructions. I've added status/needs-signed-commits; it will be removed automatically once every commit in this PR carries a valid GitHub-verified signature.

This branch has not been deployed

No deployments
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. status/needs-signed-commits Some commits in the PR are signed with a valid SSH/GPG key

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants