Add automatic app update check setting#557
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 10ffc41b86
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
xkonjin
left a comment
There was a problem hiding this comment.
Code Review — Auto Update Check Setting
Overall clean implementation. A few observations:
-
useEffectdependency array inuseUpdater.ts: AddingautoCheckOnMountto the deps array of the startup-check effect means toggling the setting at runtime will re-trigger (or suppress) the check. If the user flips the toggle while the app is open,checkForUpdatesfires again. This is probably fine but worth noting — if you only want it on mount, consider a ref instead. -
Settings section props threading: The
SettingsAboutSectionnow receives the fullappSettingsobject and spreads it back with one field toggled via...appSettings, automaticAppUpdateChecksEnabled: !appSettings.automaticAppUpdateChecksEnabled. This works, but if another settings update is in-flight, you could overwrite it. A callback-style updater (prev => ({ ...prev, field: !prev.field })) would be safer against race conditions. -
Test coverage: Good — the new
renderAboutSectionhelper and theuseUpdatertest forautoCheckOnMount: falsecover the happy paths. One gap: no test for what happens when the setting is toggled from true to false while an update check is already in progress. -
Default value:
trueis the right default for auto-update checks. The Rust-sideDefaultimpl and the TSbuildDefaultSettingsare consistent — nice.
Minor: the test file now imports getAppBuildType and isMobileRuntime (lines 16, 21) — these seem unrelated to this PR (pre-existing mock gaps?). Not blocking, just noisy.
|
I've addressed the review comments. |
Added an option in
Aboutto toggle auto update.I'm using a locally built, modified version and don't want to trigger auto-updates. I believe this is a common use case.