feat: timed warm-up scheduling#79
Conversation
Lets users pick specific times of day to warm up every account, giving control over when 5-hour usage windows start instead of relying solely on the window-reset auto warm-up loop. - Global enabled flag + list of HH:MM times persisted in localStorage - 30s scheduler fires once per scheduled minute per day; a missed time (e.g. while the machine is asleep) is skipped rather than warmed late, and weekly-exhausted accounts are skipped - Timed control popover in the main window header to toggle and manage times
emreertunc
left a comment
There was a problem hiding this comment.
I found a functional blocker, so I don’t think this is ready to approve yet.
The timed scheduler runs checkTimedWarmup() immediately when the effect mounts. If the current minute matches a configured time, it marks that time as fired before calling runTimedWarmup(). But runTimedWarmup() reads targets from accountsRef.current, which can still be empty during initial app load. In that case no accounts are warmed, but the scheduled time is still considered fired for the day, so opening or reloading the app during the scheduled minute can silently skip the timed warm-up.
Relevant code: src/App.tsx, around runTimedWarmup and the timed scheduler effect.
There is also a smaller related issue: TIMED_WARMUP_LEDGER_STORAGE_KEY is defined but unused, so the once-per-day fire ledger is only in memory. A reload or reopen during the same scheduled minute can allow duplicate firing.
Also, README has a small typo: sinlge should be single.
Summary
Adds a Timed warm-up mode so you can pick specific times of day to warm up
all accounts, instead of relying only on the existing window-reset auto warm-up.
This gives control over when your 5-hour usage windows start rather than
letting them drift.
What's new
feature on/off and manage a list of
HH:MMtimes (e.g.08:00,13:00,18:00).weekly limit is exhausted.
localStorage.the machine is asleep) is skipped rather than warmed late at the wrong moment.
Notes
(it can live in the tray) and the machine awake. The README documents using
macOS
caffeinatefor this.warm-up is independent and can be used alongside them.
tsc,pnpm build, andcargo fmt --checkall pass.Docs
Adds a Warm-Up section to the README explaining the manual / automatic /
timed modes.