cmux-next: terminals show background art through the glass, like the other panes
With background art on, terminal panes painted their theme background solid over it, while chat, pages and the sidebar beside them stayed clear and showed the art through the window's one legible tint (#18358). Terminals now do the same: over art a terminal is glass like every other pane.
What changes
- Surfaces. Art makes a window see-through at any
appearance.backgroundOpacity(WindowBackdrop), but Ghostty'sbackground-opacitystayed 1, soGhosttyRuntimeSurfacePolicyleft the surfaces opaque. With art shown, eitherappearance.backgroundor a workspace's own pick (cx-t2x.5), the surfaces now draw a transparent default background, as they already do in a translucent window or under a terminal background override. The flag only changes when art turns on or off, so moving between paintings never reloads Ghostty. - Host.
TerminalHostViewread the config's opacity to decide whether to paint. It now readsWindowBackdrop.current, the art-aware check the panes use (panesPaintBackground). An opaque window still paints the theme background. - A terminal with its own theme. Where the window is see-through, a terminal whose room, workspace or own theme differs from the panes around it paints that theme's background at the window's tint. Before, it showed the window's tint in the window theme's color, which could put a light theme's dark text on a dark tint. Over art the tint is never below
legibleTintOpacity, the floor that keeps text readable on any art. - Readability. Text contrast comes from libghostty's
minimum-contrast, which since ghostty-next PR 36 measures against the real background atbackground-opacity 0. That is the same path a translucent window already takes (GhosttyGlassMinimumContrastTests).
Glass tour
A tour can now say which cmux-next.json the app launches with (settings). tour.py writes it to the tour's private work directory and points CMUX_NEXT_CONFIG_FILE at it, so cmux settings set in a tour writes there and never to the runner's own settings. The new glass tour opens a terminal with plain and ANSI colored text next to an agent chat, over the Great Wave. It then switches through Clay Orange, Soft Blue and their light pairs, over art and opaque. path_map.py picks it for changes to themes, glass, backdrops, window and surface backgrounds, the terminal host and Resources/cmux-themes.
Testing
swift build --target CmuxNextAppon cmux16 at e7797dee80f: builds, no new warnings in the changed files.tour.py --check scripts/cmux-next/media/tours: 4 tours, 31 steps, ok.path_map.pymaps this diff toglassandcore, andResources/cmux-themes/*toglass.- No unit test added (cmux-next no-unit-tests rule). The proof is the glass tour's before and after media on this PR.
Changelog
Fixed: Terminals show background art through the glass like the other panes, instead of painting a solid theme background over it
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Terminals now show background art through the glass like the other panes, instead of painting a solid theme background over it.
- Each terminal host builds the window backdrop around it, reports its window's see-through state to the runtime, and repaints when the scope around it changes, so workspace or room theme changes and moves stay correct.
- A terminal whose theme differs from the panes around it paints that theme's background at the window's tint, keeping its text readable over art; Reduce Transparency is honored.
- Ghostty config reloads happen only when the first host turns see-through, the last stops, or a host moves between superviews, so moving between paintings never reloads.
- Tours can launch with their own
cmux-next.jsonin a private work directory; a new glass tour covers terminals and cmux themes over art and opaque.