Ship in-app auto-update with electron-updater
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 15/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- github-actions, macos, rust, tauri, typescript
Direzione di ricerca
Start with the updater flow in desktop/src/stores/updateStore.ts and the existing configuration in desktop/src-tauri/tauri.conf.json, then trace the release and smoke workflows in release.yml and smoke-test.yml. The issue names the affected UI, Rust portable-mode paths, and tests; read those sections and the linked issue #112 before estimating the platform work. Done means signed update artifacts and latest.json are verified, portable data survives updates, and the About page tests cover the update controls.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
DreamCoder cannot update itself. Users have to notice a new release, download the installer and reinstall by hand.
Most of the updater is already in the tree. It came with the code inherited from cc-haha v0.3.1 and was never switched on:
- Rust:
tauri-plugin-updaterandtauri-plugin-process(desktop/src-tauri/Cargo.toml:19-20), registered inlib.rs.prepare_for_update_install(lib.rs:480-491) stops the sidecar before installing, andcancel_update_installundoes it. - Permissions:
capabilities/default.jsonalready grantsupdater:defaultandprocess:allow-restart. - Frontend:
desktop/src/stores/updateStore.tschecks 5 s after launch, downloads with progress, prepares, installs and relaunches.components/shared/UpdateChecker.tsxshows the popup and is mounted inAppShell.tsx. Both have tests. - Windows installer: the NSIS pre-install hook (
windows-installer-hooks.nsh) also stops running sidecars.
What blocks it:
- The public key is cc-haha's.
plugins.updater.pubkeyintauri.conf.jsonis the same minisign key (ID9B9B0D11A79E1F36) as in cc-haha v0.3.1. We don't hold its private key. It must be replaced before any endpoint is added. Otherwise the holder of that private key could sign updates our users would accept. - No endpoint.
plugins.updater.endpointsis[]. As a result, the check on every launch fails and the error is swallowed (updateStore.ts:173-187). - No update files.
release.ymlbuilds withcreateUpdaterArtifacts:falseand uploads only the.dmgand the-setup.exe. - The About page hides it.
AboutSettings.tsx:71-75only shows "updates not available". The strings for "Check now" and "last checked" exist (en.ts:1377-1387) but nothing renders them.
Blocker found along the way: portable mode on macOS
When portable mode is chosen without picking a folder, data goes next to the executable (lib.rs:316-321, main.rs:31-34). On macOS that is inside DreamCoder.app/Contents/MacOS/. The macOS updater replaces the whole .app, so this data would be deleted on the first update. On Windows it sits in the install folder. Whether it survives an NSIS update needs a test.
This has to be fixed before the updater ships. One option is never storing data inside the bundle on macOS. The other is refusing to update while in portable mode.
Design
Signing:
- Generate our own key with
bun x tauri signer generate. - Store the private key and its password as GitHub secrets (
TAURI_SIGNING_PRIVATE_KEY,TAURI_SIGNING_PRIVATE_KEY_PASSWORD). Keep an offline backup: if the key is lost, existing installs can no longer be updated. - Put the public key in
tauri.conf.json.
This is separate from Apple or Windows code signing. The updater checks only this signature, so it works with the current ad-hoc signed and unsigned builds.
Endpoint: https://github.com/GoDiao/dreamcoder/releases/latest/download/latest.json. /releases/latest/ skips drafts and pre-releases, so a release reaches users only once it is published.
Release workflow:
- Tag builds pass the signing secrets and drop
createUpdaterArtifacts:false. Pull-request builds keep the override, because fork PRs get no secrets. - Upload the update files as well:
- macOS:
DreamCoder.app.tar.gzand its.sig. - Windows: the
-setup.exe, which doubles as the update file, and its.sig.
- macOS:
- A new job runs after
smokeand writeslatest.jsonwithjq. It contains the version, the notes from the CHANGELOG section (without the install instructions), the date, and the URL and signature text fordarwin-aarch64andwindows-x86_64. The job uploadslatest.jsonto the draft. - Tags containing
-(for examplev0.6.0-beta.1) are created as pre-releases, so/latest/never offers them. - Publishing stays manual, as today.
Smoke test:
- Check that both
.sigfiles exist and verify against the public key. - On macOS, unpack the
.tar.gzand run the samecodesignandallow-jitchecks as for the.dmg. The sidecar must keep the JIT entitlement after an update (see #112).
App:
- Keep the silent check on launch and the popup.
- Restore an "App updates" section on the About page: current version, "Check now", last checked time, "Update now" with progress.
- Update
desktop/src/__tests__/generalSettings.test.tsx:1318-1330. updateStorealso has an update proxy setting with no UI (settingsStore.ts:356-362). Either give it a field or remove it.
Platform notes
macOS:
- The app downloads the update itself, so no quarantine flag is expected and Gatekeeper should not prompt again. To verify on a real machine.
- Each ad-hoc build has a different code hash. Privacy permissions (Files & Folders, Automation) or keychain access may be asked for again after an update. To verify.
Windows:
- Default per-user install in
%LOCALAPPDATA%\DreamCoder, so no admin prompt.installMode: "passive"shows a small progress window. update.install()starts the installer and exits the app. The installer starts the app again itself, so the "restarting" state never shows on Windows.
Data: the updater never touches ~/.dreamcoder. Storage migrations run on every server start based on file schema, not app version (persistentStorageMigrations.ts), so upgrading is safe.
Plan
One PR:
- Fix portable mode on macOS.
- New key and endpoint in
tauri.conf.json. release.yml: signing, update files, pre-release tags, thelatest.jsonjob.smoke-test.yml: signature and entitlement checks for the update files.- About page update section and tests.
- CHANGELOG, and a line in the release notes that later updates arrive in the app.
The maintainer has to generate the key and add the two secrets. That step can't be done from a PR.
Verification
- CI: the smoke test checks above, and
latest.jsonvalidated withjq: version equals the tag, both platforms present, URLs point at assets on the release. - Manual, on macOS: install the release before the updater one, then update to a test release through the app. Check that sessions, settings and the sidecar (
/api/statusversion) are fine afterwards. Repeat in portable mode. - Windows needs community verification, as in #114.
Costs
- The first release with the updater can't arrive through the app: users on v0.5.0 install it by hand once.
- Losing the private key means users have to reinstall manually.
- macOS may ask for permissions again after each update until we have a Developer ID.
Open questions
- Publish manually after smoke (proposed), or publish automatically once smoke passes?
- A beta channel now, or later?
- Portable mode on macOS: move the data out of the bundle, or refuse to update?
- Add Intel macOS to the build matrix?
- Lingua principale
- TypeScript
- Stelle
- 490
- Fork
- 47
- Merge medio
- 9h 38m
- PR unite (30g)
- 75
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di GoDiao/dreamcoder
-
Agent teams: in-process teammates never claim tasks from the team's task listForse già presa @Sagar07Kr l’ha presa 5 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
GoDiao/dreamcoder#163 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[good first issue] UX polish — friendlier copy for error toasts and empty statesForse già presa @iamcipherdev l’ha presa 12 giorni fa. Apertaarea:i18n area:ux difficulty:1 good first issue mentor-available
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
GoDiao/dreamcoder#9 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Add more provider presets (Groq / OpenRouter / SiliconFlow / etc.)Forse di nuovo libera @01iamysf l’ha presa 19 giorni fa e non c’è nessuna pull request aperta. Apertaarea:desktop area:provider difficulty:1 good first issue mentor-available
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
GoDiao/dreamcoder#6 · 6 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Dev mode can't find the bundled ripgrep: align desktop/binaries with the packaged layoutForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaarea:desktop bug difficulty:2 good first issue help wanted
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
GoDiao/dreamcoder#195 ·
I maintainer di solito rispondono entro 1 giorno
-
Move desktop UI components to shadcn/ui (Radix) and Pierre DiffsForse già presa @GoDiao l’ha presa 2 giorni fa. Apertaarea:desktop area:ux enhancement
GoDiao/dreamcoder#191 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di GoDiao/dreamcoder
Issue simili
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
lingdojo/kana-dojo#33286 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
friction
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 77/100
kentcdodds/kody#4499 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
hemilabs/ui-monorepo#2605 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 6 giorni
-
build.yml: macOS arm64 DMG fails, cargo missing on the macos-26 runner imageForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
getopenscreen/openscreen#1423 ·
I maintainer di solito rispondono entro 1 giorno