You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(desktop): require consent for application updates (#161)
## Related Issue
Owner-directed implementation; no separate issue.
## Problem
Desktop update checks could start a download, and a downloaded update
could install during a normal quit. The app also did not give users one
durable place to see release details, download progress, skipped
versions, or restart state.
## What changed
- Make every automatic and manual check discovery-only. Only **Download
update** can download, and only **Restart to update** can install.
- Add version-specific skip, notification, pending-install, and
completion receipts. A normal quit never installs an update.
- Add an update notification and **Settings > Advanced > Version &
updates** states for checking, fetching, live progress, downloaded,
skipped, disabled, and errors.
- Stop active desktop work through the normal shutdown coordinator
before installation. A shutdown failure cancels installation.
- Validate macOS and Windows signatures plus update manifest version,
URLs, sizes, and SHA-512 values before a draft release can publish.
The next tagged Windows release requires one supported Windows signing
credential set in repository secrets. The workflow fails before
packaging if it is absent or incomplete.
## Verification
- `pnpm run build`
- `pnpm test` — 1,223 files passed; 20,360 tests passed
- `pnpm lint` — 0 errors; 3,230 existing warnings
- `pnpm run typecheck`
- `nix build .#pythinker-code`
- `node scripts/check-nix-workspace.mjs` — all 18 workspaces present
- `pnpm run check:web` — 670 Linux-canonical shipped assets match source
fingerprint
- `pnpm --dir docs run build`
- Independent security review and public-identifier audit: no findings
## Checklist
- [x] I have read the
[CONTRIBUTING](https://github.com/PyModel/pythinker-code/blob/main/CONTRIBUTING.md)
document.
- [x] This is owner-directed work; no related issue is required.
- [x] I have added tests that prove the feature works.
- [x] Ran `gen-changesets` skill; added a patch changeset.
- [x] Ran `gen-docs` skill; updated and built the desktop guide.
Changelog sync waits for the release, as required by `sync-changelog`.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added explicit desktop update controls for checking, downloading,
pausing/skipping, viewing release notes, and restarting to install.
* Added live download progress, transfer details, update status, retry
actions, and completion notifications.
* Added update management controls and diagnostics to Settings.
* **Bug Fixes**
* Improved safe shutdown and cleanup before installing updates.
* Strengthened desktop release signing and artifact verification for
macOS and Windows.
* **Documentation**
* Clarified update behavior, signing, verification, and restart
requirements.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Copy file name to clipboardExpand all lines: apps/desktop/README.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,17 +66,19 @@ rmdir "$MOUNT_POINT"
66
66
67
67
### Windows
68
68
69
-
Run `pnpm run dist:win` on a native Windows x64 host; cross-building from macOS is not possible because the staged Host closure contains platform-gated native packages. The output is `dist/Pythinker-<version>-x64-Setup.exe`, an assisted NSIS installer that defaults to a per-user install, offers a per-machine option that requires elevation, and lets you select the installation directory. The existing certificate-file signing path uses `WIN_CSC_LINK`and `WIN_CSC_KEY_PASSWORD`.
69
+
Run `pnpm run dist:win` on a native Windows x64 host; cross-building from macOS is not possible because the staged Host closure contains platform-gated native packages. The output is `dist/Pythinker-<version>-x64-Setup.exe`, an assisted NSIS installer that defaults to a per-user install, offers a per-machine option that requires elevation, and lets you select the installation directory. The certificate-file signing path uses `WIN_CSC_LINK`, `WIN_CSC_KEY_PASSWORD`, and `WINDOWS_SIGNING_PUBLISHER_NAME`. The full publisher name is stored in the packaged updater configuration so electron-updater verifies future installers against it.
70
70
71
71
#### Azure Artifact Signing
72
72
73
-
Windows artifacts are signed through Azure Artifact Signing when `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, `AZURE_SIGNING_ENDPOINT`, `AZURE_SIGNING_ACCOUNT`, `AZURE_SIGNING_CERT_PROFILE`, and `AZURE_SIGNING_PUBLISHER_NAME` are all set; they are unsigned when none are set. The credential variables are read from the environment; the four `AZURE_SIGNING_*` variables map to `azureSignOptions.endpoint`, `azureSignOptions.codeSigningAccountName`, `azureSignOptions.certificateProfileName`, and `azureSignOptions.publisherName`, respectively. Setting only some of the seven variables is a hard error by design.
73
+
Windows artifacts are signed through Azure Artifact Signing when `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, `AZURE_SIGNING_ENDPOINT`, `AZURE_SIGNING_ACCOUNT`, `AZURE_SIGNING_CERT_PROFILE`, and `AZURE_SIGNING_PUBLISHER_NAME` are all set; they are unsigned when neither signing method is set. The credential variables are read from the environment; the four `AZURE_SIGNING_*` variables map to `azureSignOptions.endpoint`, `azureSignOptions.codeSigningAccountName`, `azureSignOptions.certificateProfileName`, and `azureSignOptions.publisherName`, respectively. Setting only part of either signing method, or setting both methods, is a hard error.
74
+
75
+
Tagged releases require one complete Windows signing method. CI verifies the installer and packaged app with electron-updater's Authenticode verifier before upload. Both platform jobs also recompute every size and SHA-512 value in `latest.yml` or `latest-mac.yml`. The final job downloads the draft assets and repeats both manifest checks before publication. Manual workflow runs remain private workflow artifacts and cannot publish an unsigned build.
74
76
75
77
## Known limitations
76
78
77
79
The first desktop assembly uses a loopback HTTP Host. The renderer and Host protocol remain unchanged so the application can replace the transport with the IPC carrier reserved by the GUI architecture without changing product features.
78
80
79
-
The signed installer path currently targets macOS. Linux packaging creates an unpacked application; its installer format and distribution signing remain release work.
81
+
Linux packaging creates an unpacked application; its installer format and distribution signing remain release work.
0 commit comments