Skip to content

fix(cli): restore action bar top margin when no status items#11

Merged
tux86 merged 1 commit into
mainfrom
fix/action-bar-spacing
Jun 11, 2026
Merged

fix(cli): restore action bar top margin when no status items#11
tux86 merged 1 commit into
mainfrom
fix/action-bar-spacing

Conversation

@tux86

@tux86 tux86 commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Bug

App decided the action bar's top margin with statusItems ? 0 : 1. An empty array is truthy, so when there are no status items — the common case, since the status row is only populated when an update banner is available — the status bar was correctly hidden (statusItems.length > 0), but the action bar still got marginTop={0} and sat cramped directly against the content.

Meanwhile the loading screen (which passes no statusItems at all → undefined) got marginTop={1}, so spacing was inconsistent between screens.

Fix

Introduce a single hasStatusItems = !!statusItems && statusItems.length > 0 flag and use it for both the status-bar render guard and the action-bar margin. Now the action bar keeps its top margin whenever the status bar isn't shown.

  • One-line behavioral fix + small DRY cleanup
  • bun run lint, bun test (8 pass), bun run build, node dist/cli.js --version all green

This is a fix: → it will produce a 1.3.1 Release PR via release-please (also serving as the first end-to-end test of the new release pipeline).

The action bar used `statusItems ? 0 : 1` to decide its top margin, but an
empty array is truthy — so when there were no status items (the common case,
no update banner) the status bar was not rendered yet the action bar still got
margin 0, leaving it cramped against the content. Gate on length via a shared
`hasStatusItems` flag so the action bar keeps its top margin in that case.
@tux86 tux86 merged commit 7189bba into main Jun 11, 2026
2 checks passed
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.

1 participant