Skip to content

fix(client): run an overdue update check when the window comes back - #2947

Merged
openai0229 merged 1 commit into
mainfrom
fix/update-check-catch-up
Sep 21, 2026
Merged

openai0229 merged 1 commit into
mainfrom
fix/update-check-catch-up

Conversation

@openai0229

Copy link
Copy Markdown
Contributor

A hidden renderer does not run its timers, and macOS can nap the whole process, so the 30m/1h/2h/4h/6h schedule stopped while the app was in the background (verified: a 30 minute timer never fired over a 30 minute background window, while the same build with a 1 minute interval fired normally).

  • the schedule now tracks when the next check is due
  • on visibilitychange (visible only) and focus, an overdue check runs immediately and the normal cadence continues from there
  • a re-entrancy guard prevents the two events from starting two checks

Verified with yarn test:update-check-schedule (due-time helpers) and test:hot-update; real-device background verification is still pending.

A hidden renderer does not run its timers and macOS can nap the whole process,
so the 30m/1h/2h/4h/6h schedule silently stopped while the app sat in the
background. The schedule now remembers when the next check is due and runs it
as soon as the window is visible and focused again, then continues the normal
cadence. A re-entrancy guard keeps the visibility and focus events from running
two checks at once.
@openai0229
openai0229 requested a review from a team as a code owner September 21, 2026 03:07
@openai0229 openai0229 moved this to In Review in Chat2DB Community Sep 21, 2026
@openai0229
openai0229 merged commit eac29bd into main Sep 21, 2026
18 of 21 checks passed
@openai0229
openai0229 deleted the fix/update-check-catch-up branch September 21, 2026 03:09
@openai0229 openai0229 moved this from In Review to Done in Chat2DB Community Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant