cc-haha/desktop/src-tauri/app-icon.svg
程序员阿江(Relakkes) 4ec0c622ce Prevent square app icons on older macOS builds
Older macOS versions can surface the bundled app icon without applying the
modern rounded-mask treatment, which exposed the legacy AI-generated white
background around the Claude Code Haha mark. This replaces the icon source with
a transparent-background vector mark and regenerates the bundled macOS and
cross-platform icon assets from that canonical source so packaging stays
consistent.

Constraint: Older macOS releases may display bundled icons without automatic corner masking
Constraint: The Tauri bundle references pre-rendered icon assets, so the source and generated files must stay aligned
Rejected: Patch only icon.icns | would leave PNG and ICO assets inconsistent across platforms
Rejected: Keep the AI icon and post-process the JPEG background | brittle extraction and no canonical source of truth
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: If the brand icon changes again, regenerate every file under desktop/src-tauri/icons from desktop/src-tauri/app-icon.svg in the same change
Tested: desktop bun run lint; desktop bun run test; extracted regenerated icon.icns to verify alpha transparency
Not-tested: Full packaged app launch in macOS Dock after rebuilding the desktop bundle
2026-04-21 14:01:47 +08:00

50 lines
1.5 KiB
XML

<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="brandStroke" x1="158" y1="136" x2="378" y2="390" gradientUnits="userSpaceOnUse">
<stop stop-color="#FF9568"/>
<stop offset="0.5" stop-color="#F07C54"/>
<stop offset="1" stop-color="#C65F35"/>
</linearGradient>
<linearGradient id="brandSpark" x1="256" y1="120" x2="256" y2="284" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFB08B"/>
<stop offset="0.55" stop-color="#FF885F"/>
<stop offset="1" stop-color="#E76A43"/>
</linearGradient>
</defs>
<g transform="translate(-31 -31) scale(1.12)">
<path
d="M161 191L226 255L161 320"
stroke="url(#brandStroke)"
stroke-width="38"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M353 176L402 188L348 356L308 345"
stroke="url(#brandStroke)"
stroke-width="35"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M224 343C246 362 275 363 298 344"
stroke="url(#brandStroke)"
stroke-width="20"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M302 259C312 246 327 247 336 255"
stroke="url(#brandStroke)"
stroke-width="18"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M256 136L266 176L306 167L274 197L303 225L264 217L256 257L248 217L209 225L238 197L206 167L246 176L256 136Z"
fill="url(#brandSpark)"
/>
</g>
</svg>