cmux NEXT hover cards: the glass panels' rounder corners, and a real blur before macOS 26

Merged
TE
17d ago
+70-8

Summary

Leo wants the hover card in iOS's refracting-glass style. The card already is the app's one overlay glass (OverlaySurfaceView from #21785: themed Liquid Glass with its own refraction and rim on macOS 26, vibrancy before it, the solid surface under Reduce Transparency), so this PR uses that system rather than adding one. It fixes two things that kept the card from looking like glass:

  • Shape. The card had a menu's 8 pt corners (PopupStyle). It now takes the floating glass panels' continuous radius (Metrics.panelCornerRadius, 12 pt, 10 pt compact; the palette and dialogs use it), and its shadow follows the same shape. The radius is re-read on every show, so a density change applies to the next card. Workspace and tab hover cards share the panel, so both change; so does the update card, which feat-cmux-next now shows in the same panel (5cac4ded4672), and its morph mask follows the radius. The debug hover card gallery draws the same radius.
  • Blur before macOS 26. Each card is the whole content of its own clear child window, and the vibrancy fallback blended .withinWindow, so it had nothing under it to blur and drew a flat material. OverlaySurfaceView.samplesBehindWindow makes it blend .behindWindow, so the sidebar or terminal under the card shows through blurred, as the tooltip and drag ghost already do. An overlay inside a window (a find bar) keeps blurring within it.

Unchanged: the theme tint and its density (glassOverlayTintStrength, 1.25x the chrome glass tint), which is what keeps text readable over busy content; the text colors (primary title and reply, secondary metadata, from WorkspaceHoverCardSurfaceTests); the highlight and refraction, which Liquid Glass draws itself. I didn't add a hand-drawn rim to the fallback.

Testing

Regression first, on the fleet (cmux-ci run --class light --script scripts/ci/package-test-lane.sh --arg=suite --arg=Packages/macOS/CmuxNext --arg=<suites>):

  • Red at c19d55996cf3 (test only, --red, HoverCardGlassTests): failed as expected (fleet step 1647f9f5b057cbe9cb783c29): the card's glass and shadow host were 8 pt against Metrics.panelCornerRadius 10 pt, and the forced vibrancy blended .withinWindow; the within-window control test passed
  • Green at c2f9d26a5541 (HoverCardGlassTests, WorkspaceHoverCardSurfaceTests, HoverCardFlushTests, HoverCardPanelMotionTests, UpdateCardHoverParityTests, UpdateReadyCardLayoutTests, HoverCardRowTests): all 7 suites passed, exit 0 (fleet step c7355daecc13f5b0b3d5c049). 032c96718391 then merges feat-cmux-next 43223883ff91 and drops a stale autofix of schemas/defaults/cmux-next.json; it changes none of this PR's files

HoverCardGlassTests: the card's glass and its shadow host take Metrics.panelCornerRadius; with the vibrancy material forced, the card's blur samples behind its window; a plain overlay surface still blends within its window. WorkspaceHoverCardSurfaceTests now expects the panel radius.

python3 scripts/verify-local.py --affected origin/feat-cmux-next --swift-changed origin/feat-cmux-next: localization-defaults and feature-flags pass; package-groups fails identically on the base (6c0365c7453e).

An independent review subagent found no blockers. Its nits (the update card missed the density refresh, the gallery still drew 8 pt, stale comments) are fixed in c2f9d26a5541. 85a91c3b5cd8 merges feat-cmux-next 048c296cf710, which deleted the separate update notes panel (this PR's edit to it went with it) and added the card morph; the morph's mask now takes the card radius. Fleet suites on that head: not run: the fleet step (594ca1956ed6) stopped before the tests because feat-cmux-next 048c296cf710's web bundles don't build (missing translations for settings.layout.focusPaneOnScroll), a base break outside this PR.

Observed / Not run

Observed: the fleet runs above and the static checks. Not run: the look itself on a Mac. CI Macs run macOS 26, which takes the Liquid Glass path, so the .behindWindow fallback during the card's slide between rows has only been checked by reading. Check it in a tagged build with CMUX_NEXT_DEBUG_LEGACY_MATERIAL=1.

Changelog

Changed: Hover cards have the rounder corners of the app's other glass panels, and on macOS 14 and 15 they blur what is under them.

Proof

The media-tour label tours hover-card (session and tab cards, light and dark, over art) before and after.

🤖 Generated with Claude Code