Repository navigation
fix(desktop): poll for updates every 4 hours, not 4 minutes - #28481
tao12345666333 wants to merge 1 commit into
Conversation
pingdotgg#2546 translated AUTO_UPDATE_POLL_INTERVAL_MS (4 * 60 * 60 * 1000) to the string "4 minutes", so packaged builds check for updates 360 times a day instead of 6 and emit update-check spans, logs, and state events at that rate. Restore the 4-hour interval.
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — Desktop update checks will run every four hours instead of every four minutes, while the startup check remains unchanged. Human confirmation is needed for the new default cadence and its slower discovery of available releases. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Set the polling interval apps/desktop/src/updates/DesktopUpdates.ts |
AUTO_UPDATE_POLL_INTERVAL changes from four minutes to four hours. |
Estimated code review effort: 2 (Simple) | ~5 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested labels: size:S
Suggested reviewers: t3dotgg
Merge Risk: 
Minimal · up to f3902
-
The update polling cadence matches the intended six checks per day.
Pre-merge checks: 
4
-
Check name Status Explanation Title check The title clearly and concisely describes the main change: restoring desktop update polling from 4 minutes to 4 hours. Description check The description covers the problem, change, scope and approval rationale, verification details, test limitations, and expected effect. It is complete and directly related to the one-line fix. Linked Issues check Issue #28480(directly linked) requires packaged desktop builds to poll for updates every 4 hours, not every 4 minutes. The whole-PR diff (merge base 80a2351 to head f390218) changes one line in…Out of Scope Changes check The whole-PR diff against the merge base contains a single changed line: the AUTO_UPDATE_POLL_INTERVALconstant in apps/desktop/src/updates/DesktopUpdates.ts. This change directly implements the lin…Full details: Linked Issues check
-
Explanation
Issue
#28480(directly linked) requires packaged desktop builds to poll for updates every 4 hours, not every 4 minutes. The whole-PR diff (merge base 80a2351 to head f390218) changes one line in apps/desktop/src/updates/DesktopUpdates.ts:57:const AUTO_UPDATE_POLL_INTERVAL = "4 minutes";becomesconst AUTO_UPDATE_POLL_INTERVAL = "4 hours";. The reviewed head file confirms this value. The issue cites the pre-Effect value4 * 60 * 60 * 1000(main.ts at aa219be^), which is 4 hours, so the change restores the intended cadence. The issue requests no automated tests, and the optional jitter is not required. The string form matches the existing"15 seconds"constant at line 56. The PR description states that Effect Duration acceptshours?; I did not independently verify that parser behavior in this review, but the existing string-duration form in the same file supports it. Non-coding verification steps (packaged-build observation, test-suite run) are outside the coding requirements.
Full details: Out of Scope Changes check
-
Explanation
The whole-PR diff against the merge base contains a single changed line: the
AUTO_UPDATE_POLL_INTERVALconstant in apps/desktop/src/updates/DesktopUpdates.ts. This change directly implements the linked issue#28480requirement. No other files, behaviors, or declarations change. The PR description says the 15-second startup check and poller loop are unchanged, and the diff confirms this.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Problem
#2546 (port desktop app to Effect) translated
const AUTO_UPDATE_POLL_INTERVAL_MS = 4 * 60 * 60 * 1000;fromapps/desktop/src/main.tsintoconst AUTO_UPDATE_POLL_INTERVAL = "4 minutes";atapps/desktop/src/updates/DesktopUpdates.ts:57, dropping the hours-to-minutes factor. Packaged builds now check for updates 360 times a day instead of 6.Each check emits a
desktop.updates.checkForUpdatesspan (reason: poll) and adesktop.updates.handleCheckingForUpdatespan, writes updater log lines, publishes twodesktopUpdateStatustelemetry messages (checking→no-update, since state updates are not deduplicated) and twoUPDATE_STATE_CHANNELbroadcasts, and requests the GitHub Releases update feed. Real traces show the resulting 4-minute cadence; the timing table in #14259 quotes it directly. Reported in #28480.Change
One line:
AUTO_UPDATE_POLL_INTERVALgoes from"4 minutes"back to"4 hours", matching the pre-Effect value. The 15-second startup check and the poller loop itself are unchanged.Scope and approval
A very small, focused fix for an obvious regression, so it qualifies for the small-fix exception without a prior discussion. #28480 establishes the defect with the git history and trace evidence. No other behavior changes.
Verification
git show aa219be713^:apps/desktop/src/main.tsshowsconst AUTO_UPDATE_POLL_INTERVAL_MS = 4 * 60 * 60 * 1000;.git log -L 56,58:apps/desktop/src/updates/DesktopUpdates.tsshows the line only changed in aa219be and was untouched since, so"4 minutes"is a translation slip rather than an intended default."4 hours"matches Effect's duration regexp (hours?) in.repos/effect-smol/packages/effect/src/Duration.ts, the same string form as the neighboring"15 seconds"at line 56.DesktopUpdates.test.tsandremoteUpdateFlow.test.tscallupdates.check("poll")directly and assert no cadence, so this constant cannot change their outcomes.vp run check:changeddo not run in my checkout (nonode_modules; the pinned pnpm 12.14.0 binary fails to launch), and I did not observe the resulting 4-hour cadence in a packaged build.Fixes #28480.
Written with Factory Droid (deepseek-v4-flash).