codeburn/windows/src
iamtoruk 75b1d14423 feat(windows): no background refresh while nobody can see the tray
A locked session or sleeping displays kept the refresh loop spawning a Node
process every two minutes for a figure nobody could look at. The mac stops
on screensDidSleep and refreshes on didWake; this is the Windows half of
that.

The notifications need a window to be delivered to, so there is a hidden one
on a thread of its own with its own message pump, in the shape of the dock's
cursor thread. It registers for session change (lock and unlock), for the
console display state, and for suspend and resume. A message-only window
would not do here: WM_POWERBROADCAST is not delivered to one.

The loop keeps its timer while the machine is unattended and skips the fetch,
so the first tick after the screens come back finds fresh numbers even if a
notification was never delivered. Waking, unlocking or the screens coming
back refreshes at once, in every mode but Manual, as on the mac. An open
popover clears a latched flag on its own, since it is proof the screens are
on.
2026-09-01 23:00:09 -07:00
..
components feat(windows): the update badge and the CLI update banner in the popover 2026-09-01 22:14:54 -07:00
lib feat(windows): no background refresh while nobody can see the tray 2026-09-01 23:00:09 -07:00
settings feat(windows): Check for Updates in the tray menu and in About 2026-09-01 22:16:39 -07:00
App.tsx feat(windows): no background refresh while nobody can see the tray 2026-09-01 23:00:09 -07:00
dock.css feat(windows): a Connect button and footer lines in the dock bubble 2026-09-01 21:43:07 -07:00
Dock.tsx feat(windows): the rail turns mid-drag when the edge in reach turns 2026-09-01 21:55:50 -07:00
dockGeometry.ts feat(windows): the squircle gauge shape 2026-09-01 21:15:12 -07:00
main.tsx feat(windows): a settings window, with General, About and provider panes 2026-09-01 19:49:37 -07:00
providerIcons.tsx feat(windows): provider panes gain config directories, cadence and API keys 2026-09-01 20:00:42 -07:00
Settings.tsx feat(windows): Check for Updates in the tray menu and in About 2026-09-01 22:16:39 -07:00
styles.css feat(windows): the update badge and the CLI update banner in the popover 2026-09-01 22:14:54 -07:00