fix(cli): restore action bar top margin when no status items#11
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Appdecided the action bar's top margin withstatusItems ? 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 gotmarginTop={0}and sat cramped directly against the content.Meanwhile the loading screen (which passes no
statusItemsat all →undefined) gotmarginTop={1}, so spacing was inconsistent between screens.Fix
Introduce a single
hasStatusItems = !!statusItems && statusItems.length > 0flag 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.bun run lint,bun test(8 pass),bun run build,node dist/cli.js --versionall greenThis is a
fix:→ it will produce a1.3.1Release PR via release-please (also serving as the first end-to-end test of the new release pipeline).