Skip to content

Fix menu bar glyph not showing: draw with NSBezierPath#20

Merged
inhaq merged 1 commit into
mainfrom
fix/menubar-glyph-rendering
Jun 26, 2026
Merged

Fix menu bar glyph not showing: draw with NSBezierPath#20
inhaq merged 1 commit into
mainfrom
fix/menubar-glyph-rendering

Conversation

@inhaq

@inhaq inhaq commented Jun 26, 2026

Copy link
Copy Markdown
Owner

This pull request was created by @kiro-agent on behalf of @inhaq 👻

Comment with /kiro fix to address specific feedback or /kiro all to address everything.
Learn about Kiro Web


Follow-up to #19, which merged before the rendering fix landed.

Problem

The glyph added in #19 was embedded as a base64 PNG loaded via NSImage(data:). MenuBarExtra does not scale a bitmap NSImage, and SwiftUI's resize modifiers don't apply to it, so the icon rendered oversized/blank and never appeared in the menu bar.

Fix

Redraw the same logo-derived glyph (speech-bubble ring + tail + waveform) with NSBezierPath through a sizing drawing handler — the same approach the previous working StampedMenuBarIcon used. This yields a crisp, correctly-sized template image that MenuBarExtra renders reliably and macOS auto-tints for light/dark bars. No bitmap, no base64.

Testing

  • Verified the translated coordinates render identically to the previously-approved glyph by simulating the exact draw calls.
  • Not built in CI here (Linux sandbox lacks macOS AppKit/SwiftUI). Please run make, fully quit the old menu-bar process, and relaunch to confirm the icon appears.

Summary by CodeRabbit

  • Improvements
    • Updated the menu bar icon to be drawn dynamically, improving consistency with macOS appearance and tinting.
    • Refined the icon’s visual rendering for a cleaner, more reliable look.

MenuBarExtra does not scale a bitmap NSImage loaded from PNG data, so the
base64 image rendered oversized/blank and never appeared. Redraw the same
logo-derived glyph (bubble ring + tail + waveform) via a sizing drawing
handler, matching the proven template-image approach, so it renders crisp
and correctly sized.
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d6f943e9-7c46-4362-ac5a-48c0a77050da

📥 Commits

Reviewing files that changed from the base of the PR and between dbc0565 and bf0345a.

📒 Files selected for processing (1)
  • Sources/App.swift

📝 Walkthrough

Walkthrough

The menu bar icon image now comes from a drawing handler instead of an embedded base64 PNG. It still uses an 18×18 template image, but the bubble ring, hole, tail, and waveform are rendered with paths.

Changes

Menu bar icon rendering

Layer / File(s) Summary
Programmatic icon drawing
Sources/App.swift
The template icon is drawn with NSBezierPath, clear compositing, and waveform strokes while preserving the 18×18 size and template tinting.

Estimated review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • inhaq/fluent#19: Updates the same menu bar icon path from an embedded PNG approach to programmatic NSImage drawing.

Poem

I hop by the menu bar, soft and bright,
A bubble of paths in the moonlit night.
No tiny PNG tucked in a seam,
Just swooshy wave lines in a rabbit dream.
🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: replacing the menu bar glyph image with an NSBezierPath drawing approach to fix rendering.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/menubar-glyph-rendering

Comment @coderabbitai help to get the list of available commands.

@inhaq inhaq merged commit 60d3510 into main Jun 26, 2026
2 checks passed
@inhaq inhaq deleted the fix/menubar-glyph-rendering branch June 26, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant