Skip to content

fix(app): show Dock icon + menu-bar item reliably#7

Open
ShadowEsu wants to merge 2 commits into
mainfrom
claude/brave-heisenberg-atsilf
Open

fix(app): show Dock icon + menu-bar item reliably#7
ShadowEsu wants to merge 2 commits into
mainfrom
claude/brave-heisenberg-atsilf

Conversation

@ShadowEsu

Copy link
Copy Markdown
Owner

Problem

The built desktop app didn't show a Dock icon or a menu-bar item on macOS.

Root cause: the build shipped with no bundled icon assets. dist/assets/ was empty because the root .gitignore rule build/ also matched app/build/, so the app's source icons were never committed on this branch. At runtime trayTemplate.png loaded as an empty image → new Tray(emptyImage) created a zero-width, invisible menu-bar item, and there was no Dock icon. (Codex trunk had already fixed this; this branch simply diverged before that work landed.)

Solution

  • Commit the real designed assets in app/build/ (icon.png 1024², icon.icns, trayTemplate.png 32² template, entitlements.mac.plist) and fix .gitignore so app/build/ source assets are tracked — matching codex trunk's approach.
  • main.ts: call app.dock?.show() on macOS; extract a resilient createTray() that falls back to an embedded glyph when the asset is missing and is wrapped in try/catch so a tray failure can never abort the floating bar / companion window / global shortcut.
  • New pure module src/core/trayIcon.ts (embedded base64 fallback + a tiny PNG validator) with unit tests guaranteeing the fallback is always a valid, non-empty, square PNG.
  • scripts/build.mjs: warn loudly when an icon asset is missing instead of swallowing the error.

Tests

  • npm run typecheck — pass
  • npm run build — pass (now copies real icons into dist/assets/)
  • npm test — 15/15 pass (4 new tray-icon tests)

Run on a Linux runner, so the toolchain checks above are green but the actual macOS Dock/menu-bar appearance and DMG packaging were not exercised here.

Risk

Low. Adds icon assets, a defensive fallback, and a gitignore correction; removes no working behavior. Renderer/UI and network paths are untouched.

Follow-up

  • Verify on a real Mac: launch the .app, confirm the Dock icon + menu-bar item appear, then package the DMG.
  • This branch is behind codex trunk on app/; decide between continued surgical ports vs. a reviewed merge before resuming the vibe-island redesign.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XppKQSzGjDtp3sAGi6qJvJ


Generated by Claude Code

The built app shipped with no bundled icon assets: dist/assets/ was empty
because the root .gitignore's `build/` rule also matched app/build/, so the
source icons were never committed. At runtime trayTemplate.png loaded as an
empty image, so new Tray() created a zero-width, invisible menu-bar item, and
there was no Dock icon.

- Commit the real designed assets in app/build/ (icon.png, icon.icns,
  trayTemplate.png, entitlements.mac.plist) and fix .gitignore so app/build/
  source assets are tracked (matching codex trunk).
- main.ts: call app.dock?.show() on macOS; extract a resilient createTray()
  that falls back to an embedded glyph when the asset is missing and is wrapped
  in try/catch so a tray failure can't abort the bar/companion/shortcut.
- Add pure src/core/trayIcon.ts (embedded fallback + PNG validator) and tests.
- build.mjs: warn loudly when an icon asset is missing instead of silently
  swallowing the error.
- Docs: app/CHANGELOG.md + docs/automation continuity notes.

Typecheck, build, and 15/15 unit tests pass. macOS Dock/menu-bar appearance
and packaging still need verification on a real Mac (not runnable in CI here).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XppKQSzGjDtp3sAGi6qJvJ
@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
unvibe-site Error Error Jul 22, 2026 6:16pm

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XppKQSzGjDtp3sAGi6qJvJ
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.

2 participants