fix(settings): gate updater controls by capability#1613
Open
shizhigu wants to merge 1 commit intodifferent-ai:devfrom
Open
fix(settings): gate updater controls by capability#1613shizhigu wants to merge 1 commit intodifferent-ai:devfrom
shizhigu wants to merge 1 commit intodifferent-ai:devfrom
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
@shizhigu is attempting to deploy a commit to the Different AI Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
0820a83 to
490adbe
Compare
490adbe to
6a11dd3
Compare
6a11dd3 to
5e5ad51
Compare
5e5ad51 to
1d627a7
Compare
Collaborator
|
@benjaminshafii can you check if this is solved in your recent commits |
1d627a7 to
95a0e94
Compare
95a0e94 to
b4d9113
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Settings -> Updates can run in three different contexts: web, Electron dev, and packaged desktop. Only the packaged desktop app can actually check and install updates, but the settings page still showed active updater controls in unsupported contexts. That made the desktop dev app look broken with errors like
Electron update checks are available only in the Electron desktop app.What changed
Evidence
Before, unsupported desktop/runtime states still showed updater controls and failed after clicking Check:
After, unsupported Electron dev builds show the passive state directly and hide controls that cannot work there:
Test plan
bun test apps/app/tests/updater-capability.test.tsnode --check apps/desktop/electron/updater.mjs && node --check apps/desktop/electron/preload.mjspnpm --dir apps/desktop check:electronpnpm --dir apps/desktop typecheck:electronpnpm --filter @openwork/app typecheckpnpm --filter @openwork/app buildpnpm --filter @openwork/desktop package:electron:dirgit diff --check origin/dev...HEADNotes
This does not change release manifests, signing, notarization, or the GitHub update feed. Recent release-workflow commits on
devhandle the feed side; this PR only fixes the Settings capability model.Known limits:
electron-updateronly loads whenapp.isPackagedis true.latest.json. That belongs in the release workflow verifier, not this settings view.