Repository navigation
Description
Summary
I put the pointer on the PR badge in a sidebar thread row. A tooltip opens with two lines. The second line shows the PR state and the check counts. This line is almost invisible. In the Default theme in dark mode, its contrast with the tooltip background is 1.15:1. I expected text that I can read, with a contrast of 4.5:1 or more.
Versions and environment
- bb 0.48.0, desktop app, macOS 27.2
- Built-in Default theme, dark mode. Light mode also has the problem.
- The
threadRowMetadataexperiment is on. TheshowRowMetadatathread-list preference is on. - The thread environment branch has an open GitHub PR with check results.
Steps to reproduce
- Run
bb theme reset. Then in Settings → Appearance, set Theme to Dark. - Run
bb settings experiment threadRowMetadata true. - Run
bb thread-list prefs set showRowMetadata true. - Use a thread whose environment branch has an open GitHub PR with check results.
- In the sidebar, put the pointer on the
#<number>PR badge in the second line of that thread row. - Read the second line of the tooltip. It shows the PR state and the check counts.
Expected vs actual
Actual, Default theme, dark mode, measured in the running app:
tooltip background oklch(0.82 0 0)
line 1, PR title oklch(0.2178 0 0) contrast 9.98:1
line 2, PR status oklch(0.78 0 0) contrast 1.15:1
Actual, Default theme, light mode, calculated from the theme tokens:
tooltip background oklch(0.27 0 0)
line 2, PR status oklch(0.44 0 0) contrast 1.94:1
Expected: line 2 is easy to read on the tooltip background, with a contrast of 4.5:1 or more.
Evidence
Observed:
- The tooltip markup on
mainatde5ef8fgives line 2 thetext-muted-foregroundclass:bb/plugins/github-pr-status/ui/PullRequestRowMetadata.tsx
Lines 106 to 114 in de5ef8f
<TooltipContent side="top" className="max-w-72"> <div className="truncate"> #{pullRequest.number} {pullRequest.title} </div> <div className="text-muted-foreground"> {describePullRequestStatus(pullRequest)} {counts === null ? null : ` · ${counts}`} </div> </TooltipContent> TooltipContentdraws each tooltip withbg-primaryandtext-primary-foreground:"z-50 max-w-[min(20rem,var(--radix-tooltip-content-available-width))] overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground break-words animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", - Theme tokens for light mode:
bb/apps/app/src/components/ui/theme.css
Lines 486 to 498 in de5ef8f
--primary: oklch(0.27 0 0); --primary-foreground: oklch(1 0 0); /* Subtle fill. secondary and accent share one low-emphasis step a touch more * prominent than the card; they stay separate tokens for their distinct * component slots (secondary surfaces vs. highlight/hover), not for a look. */ --secondary: color-mix(in oklch, var(--ink) 8%, var(--canvas)); --secondary-foreground: var(--ink); --accent: color-mix(in oklch, var(--ink) 8%, var(--canvas)); --accent-foreground: var(--ink); --muted: color-mix(in oklch, var(--ink) 11%, var(--canvas)); /* Secondary text tiers. Sit at ~7.4:1 and ~5.9:1 on the white background * while keeping muted darker than subtle so the hierarchy survives. */ --muted-foreground: oklch(0.44 0 0); - Theme tokens for dark mode:
bb/apps/app/src/components/ui/theme.css
Lines 728 to 737 in de5ef8f
--primary: oklch(0.82 0 0); --primary-foreground: oklch(0.2178 0 0); /* Subtle fill: secondary and accent share one step; muted is a distinct step * more prominent (in light too), so the ramp reads the same in both themes. */ --secondary: color-mix(in oklch, var(--ink) 13%, var(--canvas)); --secondary-foreground: var(--ink); --accent: color-mix(in oklch, var(--ink) 13%, var(--canvas)); --accent-foreground: var(--ink); --muted: color-mix(in oklch, var(--ink) 16%, var(--canvas)); --muted-foreground: oklch(0.78 0 0); - How I measured: I opened the bb web UI from the local server in Chrome with the dark color scheme. I put the pointer on the PR badge. I read
getComputedStylefor the tooltip content and for each line. A canvas changed each color to sRGB, and I calculated the WCAG 2 contrast ratio. For light mode, I used the token values with the same formula.
Likely cause:
--muted-foregroundis a text tone for the--canvassurface. The tooltip uses the inverted--primaryfill, so the muted tone is close to the fill in both modes. Line 1 inheritstext-primary-foregroundand has no problem.- A rule in a custom theme confirms the cause. With this rule, line 2 has 5.33:1 in dark mode and 7.61:1 in light mode, measured the same way:
[data-radix-popper-content-wrapper] > .bg-primary {
--muted-foreground: color-mix(in oklch, var(--primary-foreground) 70%, var(--primary));
}Possible fixes:
- Give line 2 a tone from the tooltip foreground, such as
text-primary-foreground/75. - Or set
--muted-foregroundinTooltipContentas in the rule above. Then muted text is easy to read in all tooltips.
What you ruled out
- Not a custom or plugin theme.
bb theme showprintedActive: Default (default)when I measured. - Not a native OS tooltip. The tooltip is the Radix
TooltipContentfrom shared-ui, and the colors above are computed styles. - The tooltip markup on
mainatde5ef8fis the same as in the 0.48.0 bundle. I did not runmainor 0.48.1. - No duplicate. I searched open and closed issues for "tooltip contrast", "tooltip muted", "tooltip hard to read", "PR tooltip", and "contrast".
Suggested priority and effort (optional)
Low. Each PR badge tooltip in the Default theme has the problem, a custom theme rule works around it, and no data is lost. Effort is probably Low because the fix changes one class name.
Checks
- I reproduced this on the latest release or on
main, or I say above that I could not. - I searched open and closed issues for the same problem.
- If an agent wrote this, the body ends with
> AGENT GENERATEDand links the thread or report.
Claude Code wrote this report in the local bb thread thr_uzievrycep. The thread is not shared.
AGENT GENERATED
Activity
Make the PR badge tooltip status line readable (get-bb#6682)