Skip to content

feat: rich tooltips on token budget bar segments#241

Open
Slyker wants to merge 1 commit into
tashfeenahmed:mainfrom
Slyker:feat/token-bar-tooltips
Open

feat: rich tooltips on token budget bar segments#241
Slyker wants to merge 1 commit into
tashfeenahmed:mainfrom
Slyker:feat/token-bar-tooltips

Conversation

@Slyker

@Slyker Slyker commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

What

Adds rich tooltips to the monthly token budget bar segments. Hovering any colored segment shows:

  • DisplayName
  • platform
  • X remaining tokens (hidden if 0)
  • Y quota (hidden if 0)

The gray "used" segment shows total consumed tokens.

Why

The native title attribute doesn't render on 10px-high bar segments. The Tooltip component renders via createPortal to document.body, bypassing overflow-hidden clipping. The className='h-full flex' override replaces the default inline-flex, giving the wrapper span proper block-level sizing so it fills the parent div and mouse events fire correctly.

Changes

  • client/src/pages/FallbackPage.tsx: TokenUsageBar segments now wrapped in <Tooltip className='h-full flex'>

Replaces native title attributes with Tooltip components on the bar
segments. Each segment shows on hover: DisplayName, platform, remaining
tokens, and quota. The Used segment shows total consumed.

Tooltip wrapper uses className='h-full flex' to properly fill the flex
bar layout without breaking segment visibility.

IDEMPOTENCY: ts-0
@Slyker

Slyker commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author

Should we only show active models in this section ?

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