Skip to content

fix(version): prevent ASCII logo from wrapping in banner#73

Merged
EricFernandezPort merged 1 commit into
mainfrom
fix/version-banner-logo-wrap
Jun 5, 2026
Merged

fix(version): prevent ASCII logo from wrapping in banner#73
EricFernandezPort merged 1 commit into
mainfrom
fix/version-banner-logo-wrap

Conversation

@avivstern-port

@avivstern-port avivstern-port commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Problem

port version rendered the Port ASCII logo botched — the art wrapped and shattered into misaligned blocks.

Root cause

In internal/output/banner.go, the banner is assembled with JoinVertical(Center, …) and then wrapped in a container constrained to Width(logoWidth).

The tagline "Port CLI · Agentic Engineering Platform" is 41 columns wide, but the ASCII logo is only 38. JoinVertical pads every line out to the widest element (41), then the outer container clamped the block back to 38 — narrower than its own content — forcing every line (including the padded logo rows) to wrap.

Fix

Derive the width from the widest piece of content (max(logoWidth, taglineWidth)) and use it for both the separator and the outer container, so nothing wraps.

Before:
image

After:
image

Testing

  • Added TestBannerDoesNotWrapLogo regression test.
  • go test ./internal/output/..., go vet ./..., go build ./... all pass.
  • Verified port version renders the logo cleanly.

🤖 Generated with Claude Code

The tagline ("Port CLI · Agentic Engineering Platform", 41 cols) is wider
than the ASCII logo (38 cols). JoinVertical padded every line to the widest
element, then the outer container clamped the block back to the logo width,
forcing every line — including the padded logo rows — to wrap and shattering
the art.

Derive the width from the widest piece of content (max of logo and tagline)
and use it for both the separator and the outer container so nothing wraps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@avivstern-port avivstern-port marked this pull request as ready for review June 4, 2026 20:00
@EricFernandezPort EricFernandezPort merged commit b72525d into main Jun 5, 2026
4 checks passed
@EricFernandezPort EricFernandezPort deleted the fix/version-banner-logo-wrap branch June 5, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants