Energy: poll the branch only while active, cut widget reloads !462

merged merged by cmc on 2026-11-22 19:13 UTC · krz/orgstar:issue-216-energy into main

Discussion

cmc
  • Mac mode line: reads .git/HEAD every 5 s only while the window appears active (appearsActive), and once when it becomes active again.
  • iOS widgets: reloadAllTimelines while locked only when the locked state changed since the last update (or on the first update); when unlocked, also on a lock change, so unlocking refreshes widgets even if the snapshot is unchanged. Decision in AgendaSnapshot.reloadsWidgets, tested.
  • Mac widgets: the 2 s pause moved from updateReminders into the task that runs both, so the widget refresh is debounced with reminders off too.

swift test, both Xcode builds green.

Closes #216