cmux NEXT webviews: every hover card stays glass (test)

Merged
TE
14d ago
+199-0

Keeps every web hover card glass, so none of them can turn solid again unseen.

Leo-ask: ask-d547ac77f0

Audit (feat-cmux-next at 556e8d09). Every hover preview in the web UI is already glass, and none needed a fix:

Hover cardMaterial
Link and pull request card (chips/LinkHoverCard.tsx; also the PR dock bars).ui-glass; plain glass uses the tooltip tint and blur (styles.css .cv-link-preview)
Session reference card (started/SessionHoverCard.tsx).ui-card.ui-glass
New Tab suggestion row card (newtab/StageCards.tsx).ui-card.ui-glass
Thread minimap mark preview (threadMinimap/PreviewCard.tsx)tooltip tint over --surface-blur (#23782)

Until now, no test stopped these from going solid. A background: var(--surface-popup), a backdrop-filter: none, or a render that dropped .ui-glass would have passed CI. The minimap and session cards had their own checks; the link, PR and New Tab cards had none.

Change. Adds webviews/test/hover-cards-glass.test.ts, which fails when:

  • one of these components stops rendering the shared glass class on its card root, or
  • any stylesheet under webviews/src gives a hover card's root a fill that isn't glass (background, background-color, --glass-tint), or turns off its blur (backdrop-filter, --glass-backdrop).

Reduce Transparency rules are exempt: the shared tokens make every glass solid there anyway. A fixture checks that the scan catches each solid form and lets glass, child elements (__open, -body) and Reduce Transparency through.

Left out on purpose:

  • The Home channels message action bar (.hc-msg-toolbar) opens on hover but is solid --surface-popup. popup-surface.test.ts deliberately pins it solid, and #23066 (lucasr1b, menus/popovers glass) changes that test, so this PR doesn't touch it.
  • The chief-usage chart readout (.cu-tooltip) and the optchat-inspector glossary tip are tooltips, and the tooltip lane owns them.
  • The markdown link bubble opens from the caret, not on hover.

Verification (huge-blue, bun 1.3.14):

  • bun test test/hover-cards-glass.test.ts: 3 pass.
  • Mutation check: removing ui-glass from the PR card's className fails test 1, and adding .nt-hovercard { background: var(--surface-popup) } fails test 2. Both were reverted afterwards.
  • pr-overlap: no open PR overlaps.

No capture: test only, nothing on screen changes.

Agent session: cosmic-gray

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Adds a regression test that keeps every web hover card glass, so none can silently turn solid again.

The audit found all hover cards (link, PR, session, New Tab, minimap) already use glass, and adds webviews/test/hover-cards-glass.test.ts to guard that. The test fails when a hover card component drops the shared glass class, or when any stylesheet under webviews/src gives a hover card's root a non-glass fill or turns off its blur. Reduce Transparency rules are exempt. A fixture check verifies the scan catches each solid form and allows glass, child elements, and Reduce Transparency. Test-only change; nothing on screen changes.