Render panel header icons through the resolved-icon path (#8352)
Closed
IT
2mo ago+164+164+012345678901234567890123456789-9-9-0123456789
Summary
- What changed? Markdown viewer and file preview header controls (typography/font size, refresh, preview/text toggle, copy as Markdown/HTML, revert, save, open-externally) and the header's leading file icon now render through
CmuxResolvedIconImage/CmuxResolvedIconRenderer— the explicit-bitmap-context path introduced in #7729 that verifies the drawn output contains visible pixels and re-renders on appearance changes. PreviouslyPanelHeaderIconGlyphdrew a shared, cached templateNSImagevia SwiftUIImage(nsImage:).renderingMode(.template). - Why? Another surface of #8352 / #7725 / #4476: on macOS 15, template-image tinting intermittently rasterizes fully transparent while the buttons stay laid out and clickable (reported in the markdown preview header on macOS 15.6). The glyph tint is now always an explicit
NSColor: the panel's theme foreground threaded down via apanelHeaderIconTintenvironment key fromPanelFilePathHeader(the NSView-backed icon resolves the window appearance, not the panel's SwiftUIcolorSchemeoverride), falling back tosecondaryLabelColor. Disabled buttons keep the color at reduced alpha.
Testing
- How did you test this change? Added
cmuxTests/PanelHeaderIconGlyphTests.swift(Swift Testing): request construction (symbol source, size, explicit tint, disabled-alpha, fallback tint), theme-tint derivation, and a parameterized test rendering every header symbol throughCmuxResolvedIconRendererunder bothaquaanddarkAqua, asserting the renderer's visible-pixel verification succeeds. No red/green regression-commit pair: the underlying failure is an OS-level appearance-race during template rasterization that cannot be reproduced deterministically in CI; the renderer-level visibility test is the meaningful behavioral guard. - Localization audit: icon rendering only; no user-facing strings added or changed (all
String(localized:)labels, help text, and accessibility labels untouched), so noLocalizable.xcstringsor web message catalog changes.
Demo Video
Not available — see the Xcode toolchain limitation above; the fix targets an intermittent macOS 15 rasterization race that cannot be captured on demand.
- Video URL or attachment: —
Review Trigger (Copy/Paste as PR comment)
@codex review
@coderabbitai review
@greptile-apps review
@cubic-dev-ai review
Checklist
- I tested the change locally
- I added or updated tests for behavior changes
- I updated docs/changelog if needed (none needed)
- I requested bot reviews after my latest commit (copy/paste block above or equivalent)
- All code review bot comments are resolved
- All human review comments are resolved
Fixes the markdown-preview-header surface of #8352 (related: #7725, #4476).
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by cubic
Render all panel header icons through the resolved-icon path to prevent invisible glyphs on macOS 15. Fixes #8352 for markdown and file preview headers, including the leading file icon.
- Bug Fixes
- Route
PanelHeaderIconGlyphand the header’s leading icon throughCmuxResolvedIconImage/CmuxResolvedIconRendererwith visible-pixel verification and appearance re-rendering. - Apply explicit tints from the panel theme via a
panelHeaderIconTintenvironment value, falling back tosecondaryLabelColor; disabled buttons reduce alpha. - Add
PanelHeaderIconGlyphTeststo validate request construction and ensure all header symbols render visibly inaquaanddarkAqua.
- Route
Summary by CodeRabbit
- Style
- Updated panel header icons to follow the active theme and surrounding interface styling more consistently.
- Improved icon tinting across light and dark appearances.
- Disabled icons now appear with appropriately reduced emphasis.
- Refined “Open With” and font picker controls to use contextual styling while preserving existing accessibility labels, help text, and behavior.