Skip to content

feat(desktop): in-app Check for Updates / Update Now in Settings - #128

Merged
siracusa5 merged 2 commits into
mainfrom
c/settings-page-updates-d8aa57
Aug 11, 2026
Merged

feat(desktop): in-app Check for Updates / Update Now in Settings#128
siracusa5 merged 2 commits into
mainfrom
c/settings-page-updates-d8aa57

Conversation

@siracusa5

Copy link
Copy Markdown
Collaborator

Summary

  • Settings → General now has a live "Check for Updates" control backed by the desktop app's existing electron-updater, and an "Update Now" button once a download completes — previously the only way to trigger a check was the app-menu dialog flow, and Settings showed just a toggle plus a static version number.
  • New renderer-facing status channel: apps/desktop/src/main/updater.mjs forwards autoUpdater events (checking-for-update / update-available / download-progress / update-downloaded / error) through trusted IPC (updates:get-status / updates:check / updates:install, both windows) to window.__CC_DESKTOP.updates in the preload bridge. Additive — the menu's dialog-driven checkInteractive() is untouched and drives the same autoUpdater singleton.
  • Browser/live mode gets a lighter parallel in the same row: a manual GitHub-releases check (checkForUpdate(..., { force: true }), bypassing the session cache UpdatePill relies on) with a link to the new release, since there's nothing to install in a browser. Demo mode shows nothing, matching the existing UpdatePill gating.

Affected area

  • Core engine / MCP / write path
  • Console
  • Site
  • Playground or local demo surfaces
  • Docs / specs / contributor workflow
  • Packs
  • Desktop app (apps/desktop)

Validation

  • npm test (root)
  • npm --prefix apps/console run typecheck
  • npm --prefix apps/console test (428 passed, incl. new coverage for both the desktop bridge flow and the browser manual-check flow)
  • npm --prefix apps/console run build
  • npm --prefix apps/site run build
  • apps/desktop: npm test (104 passed), npm run test:navigation, npm run test:cli-status
  • apps/desktop: npm run smoke — blocked locally by the already-running packaged /Applications/ContextCake.app holding the single-instance lock (shared userData path); relying on CI's clean runner for this one, will watch the required desktop CI job.

Compatibility

  • Root commands still work, or the PR explains the migration path.
  • No root npm dependencies were added.
  • Generated files are ignored or intentionally committed.

Sign-off

siracusa5 and others added 2 commits August 10, 2026 23:54
The desktop app already runs electron-updater, but the only way to check
was the app-menu dialog flow — Settings itself only showed a toggle and a
static version number. Adds a renderer-facing status channel
(updater.mjs → trusted IPC → preload → SettingsView) so Settings can show
live check/download/install progress and offer "Check for Updates" /
"Update Now" inline, without touching the existing menu-driven dialogs.

Live/browser mode gets a lighter parallel: a manual GitHub-releases check
with a link to the new release, since there's nothing to install there.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: John Siracusa <siracusa5@users.noreply.github.com>
Two independent adversarial reviews of PR #128 flagged that installNow()
called autoUpdater.quitAndInstall() with zero confirmation, unlike the
existing menu-driven checkInteractive() dialog flow it sits beside — an
instant, unprompted quit for a genuinely trusted user clicking the
button, and an unconfirmed way for any script running in a trusted
renderer to force the app to quit. Adds the same native
"Relaunch to Update" / "Cancel" dialog checkInteractive() already uses.

Everything else both reviews raised (status races, missing rate limits,
role scoping) was judged pre-existing risk, out of scope, or too
low-probability to be worth the added complexity.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: John Siracusa <siracusa5@users.noreply.github.com>
@siracusa5
siracusa5 merged commit 02ff02d into main Aug 11, 2026
11 of 13 checks passed
@siracusa5
siracusa5 deleted the c/settings-page-updates-d8aa57 branch August 11, 2026 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant