codeburn/windows/src/components
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
..
ActivitySection.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
AgentTabStrip.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
CollapsibleSection.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
DropMenu.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
EmptyProviderState.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
ErrorToast.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
FindingsSection.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
FooterBar.tsx windows: cfg-gate the tray badge so the Linux build has no dead code 2026-08-18 04:37:27 -07:00
ForecastInsight.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
HeroSection.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
Icons.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
InsightPills.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
LoadingOverlay.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
ModelsSection.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
NoDataState.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
PeriodTabs.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
PlanInsight.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
PulseInsight.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
SettingsPanel.tsx windows: cfg-gate the tray badge so the Linux build has no dead code 2026-08-18 04:37:27 -07:00
SetupState.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
StarBanner.tsx windows: fix the security and correctness findings from the import audit 2026-08-18 04:10:07 -07:00
StatsInsight.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00
TrendInsight.tsx windows: import the Tauri tray app as the Windows menubar 2026-08-18 04:00:59 -07:00