Skip to content

Fix collapsed ResourceBar track and unstyled Hub brand tokens in OSS - #1919

Merged
nadaverell merged 2 commits into
mainfrom
fix/resourcebar-tooltip-and-brand-tokens
Sep 28, 2026
Merged

nadaverell merged 2 commits into
mainfrom
fix/resourcebar-tooltip-and-brand-tokens

Conversation

@nadaverell

@nadaverell nadaverell commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Two display bugs found during the Claude Design sync (#1918), both verified in a real browser before and after.

ResourceBar track collapses when it has a tooltip

Tooltip's wrapper is inline-flex, so the bar row inside it sized to its content and the flex-1 track got no room.

Measured in Chromium, 300px container:

Case Before After
inline + tooltip (Capacity Actual Usage rows) 2px 228px
stacked + tooltip (ResourcesView pod CPU/memory cells) 73px 300px
inline, no tooltip 228px 228px
stacked, no tooltip 300px 300px

Fix: the bar row gets w-full when a tooltip is set, and the tooltip branch is wrapped in a block div. The wrapper is inline-level, so without it two bars in one nowrap cell (Capacity's CPU + MEM) share a line and the second spills into the next column. The inline layout's track also gets a 64px floor (min-w-16); its only use is that auto-layout table cell, where the track otherwise has no preferred width. The no-tooltip path is unchanged apart from that floor.

Live check (build from this branch):

  • EKS skh-nonprod, Capacity → pool general → Nodes & claims: CPU/MEM usage bars stacked, 98px tracks at 1920px (64px floor at 1280px), inside the cell. The table no longer overflows horizontally at 1920px (it did on main).
  • GKE nonprod-cluster-us-east1, Pods list: CPU/memory tracks fill the cell (128px of 160px, the full content box), uniform across rows.

Hub brand tokens undefined in OSS

--color-radar-accent and --color-brand-{50,500,950} are defined only in Radar Hub's @theme (its emerald sub-brand). In OSS they resolve to nothing, so these 16 sites render unstyled: ChecksView links, focus rings, selected states; IssuesView; AuditFindingsTable links; FilterPill brand tone; HomeView; Omnibar focus.

Fix: each use falls back to OSS's own accent (var(--color-radar-accent,var(--accent)), tints to --accent-muted). Defining the tokens in k8s-ui's theme instead could override Hub's values depending on stylesheet order; call-site fallbacks can't.

Computed colors in Chromium:

Link Pill background
OSS light rgb(74,124,201) (Radar blue) blue at 12%
OSS dark rgb(106,159,224) blue at 18%
Hub (tokens defined) rgb(16,185,129) (emerald, unchanged) #ecfdf5 (unchanged)

Every changed class was confirmed to still compile to the intended CSS property with Tailwind v4.

Live on GKE (dark and light): 239 Checks links and 12 expanded Issues links compute to rgb(106,159,224) / rgb(74,124,201), and the check-row focus ring is the accent at 40%.

Checks

  • make tsc clean
  • k8s-ui: 4016 tests pass
  • web home/ui: 45 tests pass

Note

Low Risk
Visual and layout-only changes with CSS variable fallbacks; no security, data, or API behavior changes.

Overview
Fixes two OSS display regressions from the design sync: ResourceBar tracks that collapse when a tooltip is present, and brand accent styling that disappears where Hub-only CSS variables are undefined.

ResourceBar: When tooltip is set, the bar row now uses w-full so the flex track can grow, inline tracks get a min-w-16 floor, and the tooltip is wrapped in a block container so stacked CPU/MEM bars in tight table cells stay on separate lines instead of sharing one inline-flex row.

Accent tokens: Call sites that referenced --color-radar-accent and --color-brand-* now use CSS fallbacks to OSS --accent / --accent-muted (Checks, Issues, Audit findings links, FilterPill brand tone, Home “View all”, Omnibar hero focus). Hub keeps its emerald values when those tokens are defined.

Reviewed by Cursor Bugbot for commit 60f4592. Bugbot is set up for automated code reviews on this repo. Configure here.

ResourceBar: inside Tooltip's inline-flex wrapper the bar row sized to
its content, so the track collapsed — to ~2px in the inline layout
(Capacity's Actual Usage rows) and to the label width in the stacked
layout (pod CPU/memory cells in ResourcesView). The row now fills the
wrapper when a tooltip is set; the no-tooltip path is unchanged.

Brand tokens: --color-radar-accent and --color-brand-{50,500,950} are
Radar Hub's @theme tokens and undefined in Radar OSS, leaving links,
focus rings, selected states and FilterPill's brand tone unstyled.
Each use now falls back to OSS's --accent / --accent-muted; Hub's own
definitions still take precedence.
@nadaverell
nadaverell requested a review from hisco as a code owner September 28, 2026 09:00
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Fix tooltip-wrapped ResourceBar width and OSS brand styling

🐞 Bug fix 🕐 10-20 Minutes

Grey Divider

AI Description

• Restore full-width ResourceBar tracks when a tooltip wraps the bar, without changing unwrapped
 bars.
• Fall back to OSS accent colors where Hub-only brand tokens are undefined, preserving Hub styling.
Diagram

graph TD
  Tooltip["Tooltip wrapper"] --> Row["ResourceBar row"] --> Track["Bar track"]
  Hub["Hub tokens"] --> Fallback["Token fallbacks"] --> Styles["UI accent styles"]
  OSS["OSS accents"] --> Fallback
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Define brand defaults in the shared theme
  • ➕ Centralizes fallback definitions instead of repeating them at call sites.
  • ➖ Stylesheet ordering could cause shared defaults to override Hub's intended brand colors.

Recommendation: Keep the call-site fallbacks: they preserve Hub token precedence regardless of stylesheet order while restoring OSS styling. The tooltip-specific width change likewise avoids altering bars without tooltips.

Files changed (7) +18 / -16

Bug fix (7) +18 / -16
AuditFindingsTable.tsxRestore OSS accent color for cluster links +1/-1

Restore OSS accent color for cluster links

• The clickable cluster name now falls back to the OSS accent when the Hub accent token is absent.

packages/k8s-ui/src/components/audit/AuditFindingsTable.tsx

ChecksView.tsxRestore accent styling throughout checks +8/-8

Restore accent styling throughout checks

• Search and card focus rings, selected cluster controls, reference links, and resource links now use the OSS accent if the Hub token is undefined.

packages/k8s-ui/src/components/checks/ChecksView.tsx

IssuesView.tsxRestore issue focus and resource-link colors +2/-2

Restore issue focus and resource-link colors

• Issue row focus rings and linkable resource names now fall back to the OSS accent.

packages/k8s-ui/src/components/issues/IssuesView.tsx

FilterPill.tsxRestore the brand pill tone in OSS +1/-1

Restore the brand pill tone in OSS

• Active brand pills now use OSS muted accents for light and dark backgrounds and the OSS accent for borders when Hub brand tokens are unavailable.

packages/k8s-ui/src/components/ui/FilterPill.tsx

ResourceBar.tsxPrevent tooltip-wrapped tracks from collapsing +4/-2

Prevent tooltip-wrapped tracks from collapsing

• Both inline and stacked bar rows receive full width when wrapped in a tooltip, giving their tracks room to render. Bars without tooltips retain their existing classes.

packages/k8s-ui/src/components/ui/ResourceBar.tsx

HomeView.tsxRestore the Problems panel focus ring in OSS +1/-1

Restore the Problems panel focus ring in OSS

• The View all button's focus ring now falls back to the OSS accent when the Hub token is absent.

web/src/components/home/HomeView.tsx

Omnibar.tsxRestore hero Omnibar focus styling in OSS +1/-1

Restore hero Omnibar focus styling in OSS

• The hero input's focus border and shadow now fall back to the OSS accent while retaining Hub brand colors when defined.

web/src/components/ui/Omnibar.tsx

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (2) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Three brand fills skip theme utilities 📘 Rule violation ⚙ Maintainability
Description
TONE_ACTIVE.brand and the selected-cluster chip and checkbox set their backgrounds with
bg-[var(...)] rather than approved theme background utilities. When those filters are active, all
three edited fills are maintained separately from the shared background palette.
Code

packages/k8s-ui/src/components/ui/FilterPill.tsx[55]

+  brand:   'bg-[var(--color-brand-50,var(--accent-muted))] border-[var(--color-radar-accent,var(--accent))] text-theme-text-primary dark:bg-[var(--color-brand-950,var(--accent-muted))]',
Evidence
Rule 3036653 limits background color utilities to four theme utilities. The modified brand pill,
selected chip, and checkbox classes instead use arbitrary CSS-variable background utilities.

Rule 3036653: Use theme background tokens instead of hardcoded utility color classes
packages/k8s-ui/src/components/ui/FilterPill.tsx[55-55]
packages/k8s-ui/src/components/checks/ChecksView.tsx[343-343]
packages/k8s-ui/src/components/checks/ChecksView.tsx[1013-1013]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The edited brand filter backgrounds use direct-variable utilities instead of approved theme background utilities.
## Fix Focus Areas
- packages/k8s-ui/src/components/ui/FilterPill.tsx[55-55]
- packages/k8s-ui/src/components/checks/ChecksView.tsx[343-343]
- packages/k8s-ui/src/components/checks/ChecksView.tsx[1013-1013]
## Recommended Fix
Use appropriate approved theme background utilities for these selected states; retain accent borders where needed to distinguish them.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Hero search focus uses a raw shadow 📘 Rule violation ⚙ Maintainability
Description
Omnibar edits the hero input’s focus-within:shadow-[...] color-mix expression instead of using a
theme shadow utility. Focusing that input applies a one-off four-pixel ring alongside
shadow-theme-sm, leaving the focus shadow outside the shared shadow tokens.
Code

web/src/components/ui/Omnibar.tsx[546]

+          ? `min-h-14 px-5 rounded-2xl bg-theme-surface border border-theme-border shadow-theme-sm transition-[color,background-color,border-color,box-shadow] duration-[140ms] ${TW_EASE_UI} focus-within:border-[var(--color-brand-500,var(--accent))] focus-within:shadow-[0_0_0_4px_color-mix(in_srgb,var(--color-brand-500,var(--accent))_15%,transparent)]`
Evidence
Rule 3036687 excludes raw Tailwind shadow utilities from modified components. The changed hero input
class edits an arbitrary focus-within shadow while using a theme utility for its base shadow.

Rule 3036687: Use theme shadow utility tokens instead of raw Tailwind shadow classes
web/src/components/ui/Omnibar.tsx[546-546]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The edited hero search focus shadow is an arbitrary Tailwind utility rather than a theme shadow utility.
## Fix Focus Areas
- web/src/components/ui/Omnibar.tsx[546-546]
## Recommended Fix
Define a reusable theme shadow token for the brand focus ring, preserving its Hub and OSS colors, and apply its utility to the hero input.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can turn on the rule miner and Qodo learns your standards from review history

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread packages/k8s-ui/src/components/ui/FilterPill.tsx
Comment thread web/src/components/ui/Omnibar.tsx
Live check on the Capacity pool Nodes table showed the first fix's
side effect: Tooltip's wrapper is inline-level, so once each bar filled
its width the CPU and MEM rows of a nowrap cell sat on one line and the
second spilled into the next column. A block div around the tooltip
branch keeps sibling bars stacked. In that auto-layout table the track
also has no preferred width, so the inline layout gets a 64px floor.
@nadaverell
nadaverell merged commit 7efd611 into main Sep 28, 2026
9 checks passed
@nadaverell
nadaverell deleted the fix/resourcebar-tooltip-and-brand-tokens branch September 28, 2026 14:06
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