Skip to content

Fix uneven provider chip heights in menubar header#268

Closed
ozymandiashh wants to merge 2 commits into
getagentseal:mainfrom
ozymandiashh:fix/agent-tab-baseline-misalignment
Closed

Fix uneven provider chip heights in menubar header#268
ozymandiashh wants to merge 2 commits into
getagentseal:mainfrom
ozymandiashh:fix/agent-tab-baseline-misalignment

Conversation

@ozymandiashh
Copy link
Copy Markdown
Contributor

@ozymandiashh ozymandiashh commented May 7, 2026

Summary

The provider chip strip in the menubar popover renders chips at two different heights:

  • Claude / Codex reserve a 6pt quota-bar slot (3pt spacing + 3pt bar) under the label so the strip doesn't jump 6pt the moment the user signs in: 28pt tall.
  • All / Cursor / Droid / Gemini / Copilot / etc. skip that slot: 22pt tall.

Measured at runtime with a temporary GeometryReader:

Chip active size
All 84 × 22
Gemini 95 × 22
Codex 98.5 × 28
Claude 108.5 × 28

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:

  1. AgentTab reserves the quota-bar slot on every chip, not just .claude / .codex. Providers without a live quota source render the bar with opacity(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.
  2. AgentTabStrip aligns the outer HStack to .top as 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 build clean on Apple Silicon (Xcode 16 toolchain)
  • Local install: confirmed via GeometryReader print that all chips report identical height; visual check confirms uniform chip strip with Codex / Gemini / Claude active in turn
  • Reviewer: visual check on a build with at least one provider with a visible quota bar (Claude/Codex signed in) and one without (Gemini/Copilot) in the same row, both inactive and active states

Closes #267

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.
@ozymandiashh ozymandiashh changed the title Fix Gemini provider chip vertical misalignment in menubar header Fix uneven provider chip heights in menubar header May 7, 2026
@AgentSeal AgentSeal added needs-testing needs-validation PR requires validation against real-world usage before review and removed needs-testing labels May 12, 2026
@iamtoruk
Copy link
Copy Markdown
Member

This was already fixed on main. Closing as superseded. Thanks @ozymandiashh.

@iamtoruk iamtoruk closed this May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-validation PR requires validation against real-world usage before review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Menubar popover: Gemini provider chip vertically misaligned in header row

3 participants