Skip to content

Replace CorveilBrandmark PNG with SVG for crisper rendering#185

Merged
dhilgaertner merged 3 commits intomainfrom
feature/crow-183-brandmark-svg
Apr 22, 2026
Merged

Replace CorveilBrandmark PNG with SVG for crisper rendering#185
dhilgaertner merged 3 commits intomainfrom
feature/crow-183-brandmark-svg

Conversation

@dhilgaertner
Copy link
Copy Markdown
Contributor

@dhilgaertner dhilgaertner commented Apr 22, 2026

Summary

  • Swap the 1.6 MB CorveilBrandmark.png for an 8.5 KB SVG so the brandmark stays sharp at every rendered size (About window 140 pt, sidebar 120 pt, Manager tab header).
  • Keep the existing BrandmarkImage loader shape — macOS 14 NSImage(contentsOf:) handles SVG natively, so only the withExtension: arg and the .copy(...) resource path change.
  • Touches: Package.swift, Sources/Crow/App/AboutView.swift, Packages/CrowUI/Sources/CrowUI/CorveilTheme.swift, plus the asset swap under Sources/Crow/Resources/.

Closes #183

Test plan

  • make build succeeds
  • Open the About window — brandmark is crisp at 140 pt on Retina
  • Manager tab header (SessionDetailView) renders the brandmark cleanly
  • Sidebar top-left (SessionListView) shows the brandmark at 120 pt with 0.7 opacity, no raster fuzz
  • Toggle System Settings → Appearance between Light and Dark; colors look correct against CorveilTheme.bgDeep / bgSurface
  • No "unable to decode image data" warnings at launch

🤖 Generated with Claude Code

The brandmark shipped as a 1.6 MB raster and looked soft at the sizes
it actually renders (About window at 140 pt, sidebar at 120 pt, Manager
tab header). Swap in an 8.5 KB SVG; macOS 14 NSImage loads it natively,
so the only other change is the bundle-lookup extension in the two
loader sites.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dhilgaertner dhilgaertner requested a review from dgershman as a code owner April 22, 2026 16:01
Copy link
Copy Markdown
Collaborator

@dgershman dgershman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code & Security Review

Critical Issues

None.

Security Review

Strengths:

  • SVG is clean — no embedded <script>, javascript: URIs, event handlers, <foreignObject>, or other XSS vectors
  • Image is loaded via NSImage(contentsOf:) from a bundled resource, not from user-supplied or remote content

Concerns:

  • None

Code Quality

  • The change is minimal and mechanical: three "png""svg" swaps plus the asset swap. Low risk.
  • AboutView.loadBrandmark() (Sources/Crow/App/AboutView.swift:62) is a copy-paste of BrandmarkImage.load() (Packages/CrowUI/Sources/CrowUI/CorveilTheme.swift:83). Pre-existing duplication, not introduced here, but worth consolidating in a follow-up.
  • SVG is 8.5 KB vs the deleted 1.6 MB PNG — nice size reduction.
  • No missing newline at end of SVG file (minor, cosmetic).

Summary Table

Priority Issue
🟢 Green Pre-existing: AboutView.loadBrandmark() duplicates BrandmarkImage.load() — consider reusing
🟢 Green SVG file missing trailing newline

Recommendation: Approve — clean, low-risk asset swap with significant file size savings. No security or correctness concerns.

dhilgaertner and others added 2 commits April 22, 2026 14:37
Local builds write into vendor/ghostty, making `git status` flag it as
"modified content" on every working copy. Set ignore = dirty on the
submodule stanza so only actual pinned-commit changes surface.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dhilgaertner dhilgaertner merged commit a26d85f into main Apr 22, 2026
2 checks passed
@dhilgaertner dhilgaertner deleted the feature/crow-183-brandmark-svg branch April 22, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace CorveilBrandmark PNG with SVG for crisper rendering

2 participants