cmux NEXT: the native tooltip is the shared overlay glass

Merged
TE
14d ago
+330-106

Leo-ask: ask-d547ac77f0

Follows #23801 (landed as 0b71d5ea): this extends its scripts/cmux-next/check-overlay-glass.py. The branch now includes current base, so the diff is only this change.

Leo: "WHERE IS THE GLASS EVERYWHERE, all these hover tooltips and hover previews." The native themed tooltip (TooltipPanel, used for every themedToolTip / .themedHelp) drew AppKit's .toolTip blur under a dense popup-surface tint (at least 60%, about 70% in dark themes). That reads as a solid bubble. It now draws the glass the hover cards draw.

What changed

  • TooltipPanel: Glass.makeOverlayPanel(cornerRadius: 5, interactive: false) with samplesBehindWindow. That is Liquid Glass in the hovered view's theme tint (the panel adopts view.themeScope.fullStrength), the themed blur before macOS 26, and the opaque popup surface only under Reduce Transparency (through OverlaySurfaceView's material). Size, padding, the elevation-1 shadow, fade/rise, placement and ink are unchanged.
  • TooltipStyle carries only the ink and hint colors. Its fill, rim and frost are gone because the glass draws them.
  • Hover cards (HoverCardPanel: session, tab, workspace cards and the Update Ready highlights) are already the bare glass after #23801. Nothing more to change here.
  • Out of scope: system .help() tooltips, which AppKit draws.

Enforcement (scripts/cmux-next/check-overlay-glass.py, from #23801)

  • tooltip-material: NSVisualEffectView's .toolTip material is flagged. It is AppKit's own near-opaque tooltip bubble.
  • hover-window: a class named *Tooltip*, *HoverCard*, *HoverPreview*, *Preview* or *Peek* that subclasses NSPanel/NSWindow fails unless its file makes Glass.makeOverlayPanel.
  • TooltipPanel's popup-surface allowance is removed.
  • scripts/cmux-next/tests/check-overlay-glass.test.sh covers both rules with failing and passing fixtures. The new script run against the old TooltipPanel.swift reports [popup-surface], [hover-window] and [tooltip-material].
  • Tests: TooltipSurfaceTests.theSurfaceIsTheSharedGlassOrOpaqueUnderReduceTransparency checks the glass's scope, no card fill, the .opaque material only under Reduce Transparency, and the shadow. ThemedTooltipTests checks that the tooltip's glass draws in the button's scope.

Verified

  • python3 scripts/cmux-next/check-overlay-glass.py .: ok. bash scripts/cmux-next/tests/check-overlay-glass.test.sh: ok.
  • Compile: fleet cmux-ci compile-check --ref b55f49aea4478ad416ff35dc9f714ed74602c67c --app: passed (job e34b367ae41c38c97b1fb76a).

No capture: the tooltip is a separate panel that debug.window_snapshot does not include, and no control-socket command hovers a view to open one. TooltipSurfaceTests checks the glass material instead. Web side with screenshots: #23965.

Agent session: cosmic-gray

🤖 Generated with Claude Code