From 790c2dd603c6f9afb73797f281d07ac38b2df971 Mon Sep 17 00:00:00 2001 From: iamtoruk Date: Wed, 2 Sep 2026 03:27:43 -0700 Subject: [PATCH] fix(windows): the tray shows the logo alone unless the number icon is asked for The number beside the logo is a second tray icon, the only way the notification area can carry text, and two icons read as clutter. It is now opt-in: a fresh install shows the logo, the figure stays in the tooltip and at the top of the tray menu, and the settings toggle brings the number icon back. Anyone who already chose either way keeps that choice. Startup no longer restores a badge from the status cache unless the setting asks for one. --- windows/src-tauri/src/lib.rs | 7 ++++++- windows/src/lib/appSettings.ts | 11 +++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/windows/src-tauri/src/lib.rs b/windows/src-tauri/src/lib.rs index 1e80c60b..e332f055 100644 --- a/windows/src-tauri/src/lib.rs +++ b/windows/src-tauri/src/lib.rs @@ -591,7 +591,12 @@ fn restore_tray_status(app: &AppHandle) { if let Some(tooltip) = status.tooltip.as_deref() { apply_tray_tooltip(app, tooltip); } - if let Some(badge) = status.badge.as_deref() { + // The number icon is opt-in; without the setting the tray shows the logo alone. + let badge_wanted = settings::read() + .get("trayBadge") + .and_then(serde_json::Value::as_bool) + .unwrap_or(false); + if let (true, Some(badge)) = (badge_wanted, status.badge.as_deref()) { // Never restored dimmed: whether a paired device answers is this session's question, // and the first refresh dims it again if it still cannot be reached. let _ = apply_tray_badge(app, Some(badge), false); diff --git a/windows/src/lib/appSettings.ts b/windows/src/lib/appSettings.ts index 82da045c..efa9420c 100644 --- a/windows/src/lib/appSettings.ts +++ b/windows/src/lib/appSettings.ts @@ -110,7 +110,9 @@ export const DEFAULT_SETTINGS: AppSettings = { menubarScope: 'local', accent: 'ember', theme: 'system', - trayBadge: true, + // Off by default: a second tray icon for the number reads as clutter beside the logo, so + // the figure lives in the tooltip and the menu until someone asks for it. + trayBadge: false, usageRefreshSeconds: -1, quotaCadenceSeconds: 120, terminal: 'windowsTerminal', @@ -166,7 +168,12 @@ function migrated(raw: Record): Record { const saved = readSetting('theme') if (saved === 'dark' || saved === 'light') next.theme = saved } - if (next.trayBadge === undefined && readSetting('trayBadge') === 'off') next.trayBadge = false + if (next.trayBadge === undefined) { + // The badge used to default on; anyone who chose either way keeps their choice. + const saved = readSetting('trayBadge') + if (saved === 'on') next.trayBadge = true + if (saved === 'off') next.trayBadge = false + } return next }