Skip to content

Fix clipped Daily Cost chart tooltip on Usage settings#55

Merged
mgoldsborough merged 2 commits intomainfrom
fix/usage-tooltip-card-clip
Apr 20, 2026
Merged

Fix clipped Daily Cost chart tooltip on Usage settings#55
mgoldsborough merged 2 commits intomainfrom
fix/usage-tooltip-card-clip

Conversation

@mgoldsborough
Copy link
Copy Markdown
Contributor

Summary

  • Daily Cost bar chart tooltip on /settings/usage was clipped at the card edge and appeared to sit behind the next card.
  • Root cause: base Card styles in web/src/components/ui/card.tsx include overflow-hidden, which clips the absolutely-positioned tooltip once it extends past the card bounds.
  • Fix: pass className="overflow-visible" on just the Daily Cost card so its tooltip can overflow.

Test plan

  • Open /settings/usage and hover each bar in the Daily Cost chart — full tooltip (including 'Total' and calls line) renders on top, not clipped by the card below.
  • Confirm other Cards (Stats, By Model, Daily Breakdown) render unchanged.

The hover tooltip in CostChart sits inside a <Card>, which has
overflow-hidden in its base styles — so the tooltip was being
clipped at the card edge and appearing to sit behind the next
card below it. Override overflow on just this card.
QA follow-up on #55:
- Anchor the tooltip to the closer edge (0% or -100% transform) when the
  hovered bar is within 15% of either chart boundary. Without this, the
  fixed translate(-50%, 0) anchor lets the popover spill past the card
  now that overflow is visible.
- Bump tooltip z-index to z-20 as belt-and-suspenders against future
  sibling cards that might introduce their own stacking contexts.
@mgoldsborough mgoldsborough added the qa-reviewed QA review completed with no critical issues label Apr 20, 2026
@mgoldsborough mgoldsborough merged commit 8b87e6a into main Apr 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

qa-reviewed QA review completed with no critical issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant