From 7d62af0750c107c7ab33d746e0da0600d7784007 Mon Sep 17 00:00:00 2001 From: Felix Martin Date: Tue, 2 Jun 2026 12:23:54 -0400 Subject: [PATCH] Document foregroundTracker unavailable-state contract Co-Authored-By: Claude Sonnet 4.6 --- internal/evidence/foreground_tracker.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/evidence/foreground_tracker.go b/internal/evidence/foreground_tracker.go index 7afcbdb..44a6f0b 100644 --- a/internal/evidence/foreground_tracker.go +++ b/internal/evidence/foreground_tracker.go @@ -12,6 +12,8 @@ type foregroundTracker struct { // changed reports whether (available, hwnd, title) differs from the last // observation and records the new values. The first call always returns true. +// Callers pass the zero values (hwnd 0, title "") when available is false, so a +// steady "no foreground window" run does not re-emit. func (t *foregroundTracker) changed(available bool, hwnd uintptr, title string) bool { if t.primed && available == t.available && hwnd == t.hwnd && title == t.title { return false