feat: add disable update checks setting in the general settings#1627
feat: add disable update checks setting in the general settings#1627Starz099 wants to merge 2 commits intoCapSoftware:mainfrom
Conversation
| const settings = await generalSettingsStore.get(); | ||
| const isDisabled = settings?.disableUpdateChecks ?? false; | ||
|
|
||
| if(isDisabled) { | ||
| setUpdateError("Update checks are currently disabled."); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Setting only checked in update.tsx, but automatic update check in new-main/index.tsx:920 (createUpdateCheck) ignores this setting - updates will still be checked on app launch
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src/routes/(window-chrome)/update.tsx
Line: 15-21
Comment:
Setting only checked in `update.tsx`, but automatic update check in `new-main/index.tsx:920` (`createUpdateCheck`) ignores this setting - updates will still be checked on app launch
How can I resolve this? If you propose a fix, please make it concise.|
Hey! Thanks so much for the contribution. Will make a proper review soon. Just checking why you need this option? When releasing new updates our goal is to fix important bugs (sometimes critical) etc - would love to hear your thoughts here 😄 |
| const settings = await generalSettingsStore.get(); | ||
| const isDisabled = settings?.disableUpdateChecks ?? false; | ||
|
|
||
| if(isDisabled) { |
There was a problem hiding this comment.
Using updateError for the “disabled” state shows the manual download/support copy below, which reads like a failure.
| if(isDisabled) { | |
| if (isDisabled) { | |
| setUpdateError( | |
| "Automatic update checks are disabled. Re-enable them in Settings, or download the latest version from cap.so/download.", | |
| ); | |
| return; | |
| } |
| export type StudioRecordingMeta = { segment: SingleSegment } | { inner: MultipleSegments } | ||
| export type StudioRecordingStatus = { status: "InProgress" } | { status: "NeedsRemux" } | { status: "Failed"; error: string } | { status: "Complete" } | ||
| export type SystemDiagnostics = { macosVersion: MacOSVersionInfo | null; availableEncoders: string[]; screenCaptureSupported: boolean; metalSupported: boolean; gpuName: string | null } | ||
| export type SystemDiagnostics = { windowsVersion: WindowsVersionInfo | null; gpuInfo: GpuInfoDiag | null; allGpus: AllGpusInfo | null; renderingStatus: RenderingStatus; availableEncoders: string[]; graphicsCaptureSupported: boolean; d3D11VideoProcessorAvailable: boolean } |
There was a problem hiding this comment.
This file looks generated, and this SystemDiagnostics shape change (macOS → Windows + GPU diagnostics) feels unrelated to the update-setting change. Worth double-checking this was intentionally regenerated from the canonical source and isn’t platform-specific output (e.g. generated on Windows) that could break other builds.
…tate signal in /update route
| const generalSettings = await generalSettingsStore.get(); | ||
|
|
||
| if (generalSettings?.disableUpdateChecks ?? false) return; | ||
|
|
There was a problem hiding this comment.
Nice to see the startup update check gated too. One small thing: if generalSettingsStore.get() throws, it currently shows the “Unable to check for updates” dialog even though the updater check never ran. You can make settings-load failures non-fatal and also clean up the whitespace-only lines.
| const generalSettings = await generalSettingsStore.get(); | |
| if (generalSettings?.disableUpdateChecks ?? false) return; | |
| let disableUpdateChecks = false; | |
| try { | |
| disableUpdateChecks = | |
| (await generalSettingsStore.get())?.disableUpdateChecks ?? false; | |
| } catch (e) { | |
| console.warn("Failed to load general settings:", e); | |
| } | |
| if (disableUpdateChecks) return; |
| try { | ||
| const generalSettings = await generalSettingsStore.get(); | ||
|
|
||
| if (generalSettings?.disableUpdateChecks ?? false) { | ||
| setUpdatesDisabled(true); | ||
| return; | ||
| } | ||
|
|
There was a problem hiding this comment.
Same idea here: separating settings-load errors from updater-check errors avoids showing “Unable to check for updates” just because settings couldn’t be read.
| try { | |
| const generalSettings = await generalSettingsStore.get(); | |
| if (generalSettings?.disableUpdateChecks ?? false) { | |
| setUpdatesDisabled(true); | |
| return; | |
| } | |
| let disableUpdateChecks = false; | |
| try { | |
| disableUpdateChecks = | |
| (await generalSettingsStore.get())?.disableUpdateChecks ?? false; | |
| } catch (e) { | |
| console.warn("Failed to load general settings:", e); | |
| } | |
| if (disableUpdateChecks) { | |
| setUpdatesDisabled(true); | |
| return; | |
| } |
| <Show when={updatesDisabled()}> | ||
| <div class="flex flex-col gap-4 items-center text-center max-w-md"> | ||
| <p class="text-[--text-primary]">Update checks are currently disabled.</p> | ||
| <p class="text-[--text-tertiary]">To enable updates, go to General Settings and disable "Disable Update Checks".</p> | ||
| <Button onClick={() => navigate("/")}>Go Back</Button> | ||
| </div> | ||
| </Show> |
There was a problem hiding this comment.
Minor formatting nit: this block’s indentation is a bit off compared to the rest of the file and will likely get rewritten by the formatter.
| <Show when={updatesDisabled()}> | |
| <div class="flex flex-col gap-4 items-center text-center max-w-md"> | |
| <p class="text-[--text-primary]">Update checks are currently disabled.</p> | |
| <p class="text-[--text-tertiary]">To enable updates, go to General Settings and disable "Disable Update Checks".</p> | |
| <Button onClick={() => navigate("/")}>Go Back</Button> | |
| </div> | |
| </Show> | |
| <Show when={updatesDisabled()}> | |
| <div class="flex flex-col gap-4 items-center text-center max-w-md"> | |
| <p class="text-[--text-primary]">Update checks are currently disabled.</p> | |
| <p class="text-[--text-tertiary]"> | |
| To enable updates, go to General Settings and re-enable update checks. | |
| </p> | |
| <Button onClick={() => navigate("/")}>Go Back</Button> | |
| </div> | |
| </Show> |
This mainly comes from cases where users intentionally stay on a specific version (for stability, compatibility, or workflow reasons). Repeated update prompts can become disruptive when they’ve already decided not to upgrade. The goal isn’t to discourage updates, but to give users control, they can still manually check whenever they choose to upgrade. Happy to adjust wording/UX if you’d prefer this framed differently. |
Fixes #1607 Add a setting to always ignore updates.
Summary
This PR introduces a user setting that allows disabling automatic update checks.
When enabled, the application will skip checking for updates entirely.
Changes
disable_update_checksinGeneralSettingsStoreToggleSettingItemupdate.tsxto skip update checks via an early return when the setting is enabledupdates.tsx.new-main/index.tsxto skip automatic update checks on app startup when disabledResult
Users now have full control over whether the app performs update checks.
Preview