Fix uneven provider chip heights in menubar header#268
Open
ozymandiashh wants to merge 2 commits intogetagentseal:mainfrom
Open
Fix uneven provider chip heights in menubar header#268ozymandiashh wants to merge 2 commits intogetagentseal:mainfrom
ozymandiashh wants to merge 2 commits intogetagentseal:mainfrom
Conversation
Claude/Codex chips reserve a 6pt quota-bar slot under the label (3pt spacing + 3pt bar) regardless of connection state to keep the strip from jumping when the user signs in. Chips for providers without a quota source (All / Cursor / Droid / Gemini / Copilot / etc.) skip that slot, so they're 6pt shorter. The outer HStack was using its default .center alignment, so the shorter chips' labels ended up roughly 3pt below the Claude/Codex labels. Switching to .top alignment puts every chip at the same y and aligns all labels on a shared horizontal line. Closes getagentseal#267
The previous patch aligned chip labels to the top so Claude/Codex (28pt, with the reserved bar slot) and Gemini/All/Cursor/etc. (22pt, without it) would still share a label baseline. That hid the height inequality while every chip carried the muted secondary background. The moment one chip flipped to the orange brand-accent active state, the 6pt height delta became obvious: a Codex-active chip towered over a Gemini-inactive one, and a Gemini-active chip looked stubby next to a Codex-inactive one. Measured the chips at runtime via a temporary GeometryReader and confirmed: Claude/Codex 28pt, Gemini/All 22pt. Reserve the slot (3pt spacing + 3pt bar) on every chip and hide the bar with opacity 0 for providers that don't have a quota source. Now every chip is 28pt regardless of provider or active state, and the "don't jump 6pt on Connect" behavior for Claude/Codex still holds.
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.
Summary
The provider chip strip in the menubar popover renders chips at two different heights:
Measured at runtime with a temporary
GeometryReader:When every chip carries the muted
Color.secondary.opacity(0.08)background the 6pt delta is barely visible. The moment one chip flips to the orange brand-accent active state, the inequality becomes obvious (see screenshots on #267): a Codex-active chip towers over a Gemini-inactive one, a Gemini-active chip looks stubby next to a Codex-inactive one, and label baselines drift across the row.Fix
Two complementary changes:
AgentTabreserves the quota-bar slot on every chip, not just.claude/.codex. Providers without a live quota source render the bar withopacity(0); the 3pt frame still occupies space so every chip ends up at the same 28pt height. The original "don't jump 6pt on Connect" behavior for Claude/Codex still holds because their slot was already reserved unconditionally.AgentTabStripaligns the outerHStackto.topas a defensive measure so any future chip variant that ends up shorter still keeps its label on the shared baseline.Net effect: every chip is the same height regardless of provider or active state, and labels sit on a shared horizontal line.
Test plan
swift buildclean on Apple Silicon (Xcode 16 toolchain)GeometryReaderprint that all chips report identical height; visual check confirms uniform chip strip with Codex / Gemini / Claude active in turnCloses #267