codeburn/windows/src-tauri
iamtoruk 76c63cbfd1 windows: cfg-gate the tray badge so the Linux build has no dead code
The spend badge is a second tray icon carrying the number as its bitmap, which
only the Tauri tray backend provides; Linux runs its own SNI tray and has no
equivalent. The module was compiled there anyway, so every item in it - and the
two tray ids in lib.rs - tripped dead_code under clippy -D warnings on the
ubuntu leg.

- `mod tray_badge` and TRAY_ID / BADGE_TRAY_ID are now cfg(not(linux)), so the
  code is absent on Linux rather than present and unused.
- `set_tray_badge` reports the badge as unsupported on Linux instead of
  returning a success that never happened.
- The frontend hides the control wherever it is unsupported, behind
  TRAY_BADGE_SUPPORTED in lib/platform.ts - one constant, three call sites
  (the settings row, the footer menu item, and the effect that would otherwise
  invoke the command).
- AppState's `linux_tray` field is dropped: it was written and never read, which
  is the same lint one file over. init_tray_linux already owns the handle.

Checked rather than reasoned: `cargo clippy --all-targets -- -D warnings` passes
on macOS, and a scratch copy of the crate with the linux/macos cfg arms swapped
(so a normal macOS clippy selects everything a Linux build would keep, and drops
everything it would drop) also passes. Reinstating the ungated `mod tray_badge`
in that copy reproduces the exact CI failure, so the check is real. It stubs
tray_linux.rs, whose ksni and png deps do not build here - that file is still
only covered by CI's ubuntu leg.
2026-08-18 04:37:27 -07:00
..
capabilities windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
icons windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
src windows: cfg-gate the tray badge so the Linux build has no dead code 2026-08-18 04:37:27 -07:00
build.rs windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
Cargo.lock windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
Cargo.toml windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
tauri.conf.json windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00