From 43175e07309f1e97a6f86f37582e8de1d90f2602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Papp?= Date: Mon, 8 Jun 2026 17:34:18 +0200 Subject: [PATCH] Move no-op rationale into empty function bodies Replace the doc comments above the empty no-op stubs (bindTrayClick, startTrayTheme, noopSessionWatcher.Dismiss/Close) with short in-body comments explaining why each is empty. --- client/internal/engine_sessionwatch_js.go | 9 +++++++-- client/ui/tray_click_other.go | 13 ++++--------- client/ui/tray_theme_other.go | 11 ++++------- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/client/internal/engine_sessionwatch_js.go b/client/internal/engine_sessionwatch_js.go index 98a0c1da7..50e148ab9 100644 --- a/client/internal/engine_sessionwatch_js.go +++ b/client/internal/engine_sessionwatch_js.go @@ -35,5 +35,10 @@ func (w noopSessionWatcher) Update(deadline time.Time) error { return nil } -func (noopSessionWatcher) Dismiss() {} -func (noopSessionWatcher) Close() {} +func (noopSessionWatcher) Dismiss() { + // No-op: only suppresses the timer-driven final-warning, which this stub never arms. +} + +func (noopSessionWatcher) Close() { + // No-op: no timers to stop and no state to unwind; the recorder is cleared via Update(zero). +} diff --git a/client/ui/tray_click_other.go b/client/ui/tray_click_other.go index 231986a47..df2dc5afe 100644 --- a/client/ui/tray_click_other.go +++ b/client/ui/tray_click_other.go @@ -2,12 +2,7 @@ package main -// bindTrayClick is a no-op on macOS and Linux. On macOS the native -// NSStatusItem auto-shows the menu on left-click; on Linux the -// StatusNotifierItem host paints the menu independently. Binding an -// OnClick→OpenMenu handler is both unnecessary there and actively harmful on -// macOS, where OpenMenu routes through NSStatusItem's blocking [button -// mouseDown:] on the serial main GCD queue and freezes the tray and webview -// until the menu closes (commit c77e5cef8). Windows opts in via the sibling -// tray_click_windows.go file. -func bindTrayClick(*Tray) {} +func bindTrayClick(*Tray) { + // No-op: macOS/Linux native trays open the menu on click themselves. + // Only Windows needs an explicit handler (tray_click_windows.go). +} diff --git a/client/ui/tray_theme_other.go b/client/ui/tray_theme_other.go index a0d20f7ab..86a8eae73 100644 --- a/client/ui/tray_theme_other.go +++ b/client/ui/tray_theme_other.go @@ -2,10 +2,7 @@ package main -// startTrayTheme is a no-op off Linux: macOS uses template icons (the OS -// recolours them per menubar appearance) and Windows ships colored PNGs, so -// neither needs the freedesktop colour-scheme probe that the Linux build -// uses to choose between the black and white monochrome silhouettes. Left -// callable so NewTray can invoke it unconditionally; panelDark stays nil and -// panelIsDark returns its default. -func (t *Tray) startTrayTheme() {} +func (t *Tray) startTrayTheme() { + // No-op off Linux: macOS template icons and Windows colored PNGs need no + // colour-scheme probe. panelDark stays nil; panelIsDark uses its default. +}