Skip to content

th-f88a55: white template tray icon + connect switcher in Settings - #337

Open
brentrager wants to merge 1 commit into
mainfrom
th-traymenu-settings
Open

th-f88a55: white template tray icon + connect switcher in Settings#337
brentrager wants to merge 1 commit into
mainfrom
th-traymenu-settings

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

Tray icon (the ask: "white letters, too hard to see")

The menu-bar th mark was the teal→blue brand mark — low-contrast on a dark menu bar — and wasn't a macOS template image. Now:

  • tray.png / tray@2x.png are blackened (opaque→black, alpha preserved).
  • icon.setTemplateImage(true) — macOS renders a template icon white on a dark menu bar, black on a light one, adapting to the theme. Always legible.

Connect switcher in Settings (the ask: "can that option also be in settings")

The daemon switcher (This Mac / discovered tailnet daemons like smoo-hub) was tray-only. Settings → Connection now has it:

  • A minimal Electron preload/IPC bridge (window.bigSmooth = listDaemons + connectTo) — the renderer couldn't drive the app before (no preload/IPC).
  • sandbox: false so the ESM preload loads (Electron 40); the exposed surface is just those two contextBridge methods.
  • Browser PWA (no bridge) degrades to a pointer at the menu-bar app.
  • Renders from the served SPA, so it shows wherever that daemon's build includes it (locally now; on smoo-hub after its next redeploy).

Verification

  • pnpm typecheck (desktop) clean; SPA vite build green; oxfmt clean.

🤖 Generated with Claude Code

- Tray icon: the teal th mark was low-contrast on a dark menu bar and not a
  macOS template. Blacken the icon (opaque->black, alpha kept) + setTemplateImage
  so macOS renders it white on dark / black on light — legible + theme-adaptive.
- Settings connect: the daemon switcher (This Mac / tailnet daemons) was
  tray-only. Add it to Settings > Connection via a minimal preload/IPC bridge
  (window.bigSmooth: listDaemons + connectTo; sandbox:false for the ESM preload).
  Browser PWA (no bridge) degrades to a pointer at the menu-bar app.

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

changeset-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 17b0edb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@smooai/smooth Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

1 participant