Skip to content

Sidebar PR badge tooltip: the status line has 1.15:1 contrast in the Default dark theme #6674

Closed

Description

@johnnyhperkins

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 threadRowMetadata experiment is on. The showRowMetadata thread-list preference is on.
  • The thread environment branch has an open GitHub PR with check results.

Steps to reproduce

  1. Run bb theme reset. Then in Settings → Appearance, set Theme to Dark.
  2. Run bb settings experiment threadRowMetadata true.
  3. Run bb thread-list prefs set showRowMetadata true.
  4. Use a thread whose environment branch has an open GitHub PR with check results.
  5. In the sidebar, put the pointer on the #<number> PR badge in the second line of that thread row.
  6. 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 main at de5ef8f gives line 2 the text-muted-foreground class:
    <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>
  • TooltipContent draws each tooltip with bg-primary and text-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:
    --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:
    --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 getComputedStyle for 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-foreground is a text tone for the --canvas surface. The tooltip uses the inverted --primary fill, so the muted tone is close to the fill in both modes. Line 1 inherits text-primary-foreground and 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-foreground in TooltipContent as 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 show printed Active: Default (default) when I measured.
  • Not a native OS tooltip. The tooltip is the Radix TooltipContent from shared-ui, and the colors above are computed styles.
  • The tooltip markup on main at de5ef8f is the same as in the 0.48.0 bundle. I did not run main or 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 GENERATED and 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

  1. added a commit that references this issue on Oct 30, 2026
    84e2129
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions