Skip to content

fix(desktop): wait for native update staging and verify installation - #8346

Merged
waleedlatif1 merged 2 commits into
stagingfrom
codex/desktop-update-lifecycle
Sep 26, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
codex/desktop-update-lifecycle

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Wait for native Squirrel staging before offering restart, including when a newer release replaces an already staged update. Retain an older staged build only while its native feed is still valid, and let failed native staging retry safely. Handle background check failures independently of native failures so they cannot cancel a confirmed restart.
  • Record the staged version atomically and compare it with the version running on the next launch, so an interrupted installation is distinguishable from a completed upgrade.
  • Exercise real Electron and MacUpdater downloads, replacement failures, cached retries, and installation checkpoints. This follows Electron's native update lifecycle.

Type of Change

  • Bug fix

Testing

  • 870 desktop tests; desktop type check and build.
  • Real Electron/MacUpdater integration test, demonstrated failing against the original updater. JSON checks and HTTP request evidence are written to DESKTOP_UPDATER_REPORT_PATH or Playwright test results.
  • Native verification and signed bundle replacement are simulated in the integration fixture; a signed release upgrade remains release validation.
  • Repository lint, all 51 audits, block-registry checks, and docs-manifest check.
  • Full local Electron run: 56 passed, 3 packaged-only skips, and 4 browser/password-picker failures. All 4 passed on focused reruns; the unpackaged shell exits updater initialization before the changed logic.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 26, 2026 10:20pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 7 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High risk] Changes how the desktop app stages and verifies software updates.

The PR appears safe to merge based on the reviewed changes.

Summary

The PR waits for native Squirrel staging before offering a restart, tracks staged versions across launches, and adds unit and real-Electron coverage for replacement, retry, and installation outcomes.

  • Since the previous review, error handling separates request failures from native failures, and the integration test explicitly requests its replacement check.
  • Both previous Greptile threads are resolved; neither finding remains outstanding.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Validated update] --> B[Download archive]
  B --> C[Native staging]
  C -->|Confirmed| D[Ready to restart]
  C -->|Native failure| E[Error and retry]
  D --> F[Install on restart or quit]
  F --> G[Compare checkpoint on next launch]
Loading

Reviews (2) · Last reviewed commit: "fix(desktop): distinguish refresh failur..."

Comment thread apps/desktop/src/main/updater.ts Outdated
Comment thread apps/desktop/e2e/updater.spec.ts Outdated
@waleedlatif1
waleedlatif1 force-pushed the codex/desktop-update-lifecycle branch from dfbf711 to 4f89858 Compare September 26, 2026 22:20
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 7 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit affbc6d into staging Sep 26, 2026
27 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/desktop-update-lifecycle branch September 26, 2026 22:25

This branch was previously deployed

1 inactive deployment
Preview — 4f898587 Deployed Sep 26, 2026 by vercel[bot]
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