Repository navigation
fix(app): re-enable Check now after an update install fails - #4745
Conversation
…on dismiss Base UI keeps a dialog popup mounted (and partially opaque) until its exit animation or transition finishes, so the restart prompt and the command palette stayed visible for 100-200 ms after Keep working / Escape. Hide the popup with display:none as soon as it is closed; Base UI then unmounts it on the next frame.
After a failed install the updater status is error/install, which the automatic check treated like idle: the next focus/online/interval trigger (or an effect re-run once the 15-minute window had passed) re-checked, auto-downloaded the same update and left Settings' Check now disabled behind "Downloading update…". The update is already downloaded, so a background re-check cannot fix an installer failure; keep the failure and let the person retry from Settings.
…ownload loop Return to the app after the check interval before retrying from Settings, and assert Settings still shows the install failure with no new download. Apply the custom branding only for the final confirmed restart: the eval's dev-bridge branding does not survive the Den settings sync that opening Settings performs for a signed-out app (the failure loop visits Settings).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Warden review summary — ClearNative findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (13779 ms), confidentiality-review (13956 ms), spec-provenance-review (23661 ms), desktop-den-sync-review (17887 ms). Blockers
Advisories
Needs recheck
Observed review-thread metrics
Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority. |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (2df0042ea5ac11f36754b346086360d12da7c7d9). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
|
Passed · 10/10 tests · 15/15 assertions · 5 images Commit |
Deploying openwork with
|
| Latest commit: |
c6174ca
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3d1d0209.openwork.pages.dev |
| Branch Preview URL: | https://e2e-settings-check-now-after.openwork.pages.dev |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (c6174cafdaa5dffd0be9650c1fe2efe6d72f3361). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Resync with
|
Resolves evals/specs/background-desktop-update.e2e.test.ts after #4745 was squash-merged to dev (a7748b2): keep this PR's version, which is a superset of #4745 and #4761 and adds only its own step (automatic checks stay on through the first failed install, asserted, then are switched off inside iteration 0). The merged tree differs from dev in this spec only.
Root cause
Follow-on of triage cluster 7/K (
reports/e2e-red-2026-09-09/triage.md, "Dismiss-then-notSeeraces") and the trace in #4724: once dismissal is synchronous,background-desktop-updatetest 1 fails later at the install-failure loop added by #4714 (merged as Verification — Incomplete, spec never executed):click({role:"button", text:"Check now"})finds the Settings buttonvisible=true, hitTestOk=falsefor 30 s.Reproduced with a probe (local Electron, cherry-pick of #4724 on top of
origin/dev). Sequence afterRestart & updatefails:installUpdateAndRestartsetsupdateStatus = { state: "error", failedAction: "install" }— the button is enabled at this point.world.openSettings()mounts the Settings route →useDenSession'ssyncCurrentDenSettings→writeDenSettings→denSettingsChangedEvent→DesktopConfigProviderbumpssettingsVersion→ signed-out branch appliesDEFAULT_DESKTOP_CONFIG. The spec had injected custom branding through the dev bridge just before, so this re-apply has actions (brandAppName,brandLogoUrlcleared;document.title"Studio" → "OpenWork") and theconfigobject identity changes.useElectronUpdaterState's auto-check effect depends on that identity (viaresolvePolicyReleaseChannel→runCheckForUpdates) and re-runs, callingcheck().check()only skippedchecking | downloading | ready; the status waserror, and >15 min of mocked time had passed since the last automatic check, so it ranrunCheckForUpdates(undefined, false)→available→ auto-download →downloadingwith the mock'sfinishDownloadunresolved →Check nowdisabled (updateState === "downloading").The same happens for any real trigger (window focus/online/interval) after a failed install: the update is already downloaded, so a background re-check just re-downloads it and re-offers the same restart.
What changed
electron-updater-state.ts: the automatic check additionally skipsstate === "error" && failedAction === "install". Download failures are unchanged; manualCheck nowand the native menu request still run in that state.background-desktop-update.e2e.test.ts(claims re-expressed, nothing loosened):world.returnToApp()(focus + online, +16 min) before opening Settings, then asserts Settings showsCouldn't install the updateand thatchecks/downloadsdid not move — the observable form of "a failed install does not restart the download loop; the person retries from Settings". This step is red ondevand green here.customLogoLoaded,Restart Studio?) moves to the final confirmed restart, where it sat before fix(desktop): wait for native update readiness before restart #4714. The eval injects branding through the dev-only desktop-config bridge for a signed-out app, and that injection does not survive the Den settings sync that opening Settings performs (step 2 above), so assertingRestart Studio?inside a loop that visits Settings was never satisfiable. The failure loop asserts the defaultRestart OpenWork?prompt instead; the brand claim is still asserted once, as before.a42676ec1(fix(app): close the restart prompt and command palette synchronously on dismiss) as an unmodified cherry-pick (b2527b337): the spec cannot reach the failing step without it. Those two files are untouched here; once fix(app): close the restart prompt and command palette synchronously on dismiss #4724 lands ondevthe cherry-pick becomes a no-op in this diff.Proof
pnpm evals:e2e background-desktop-update --daytonawithOPENWORK_EVAL_REF=2df0042ea5ac11f36754b346086360d12da7c7d9(sandbox log:HEAD is now at 2df0042e test(evals): prove a failed install …):{"command":"evals:e2e","lane":"e2e","daytona":true,"placement":"daytona","engine":"legacy","surface":"legacy","case":null,"vision":"defer","files":["background-desktop-update"],"passed":2,"failed":0,"skipped":0,"skips":[],"consented":["OPENWORK_EVAL_E2E_TESTS"],"verdict":"passed"}updates download outside Settings and offer a persistent, optional restart(175 s) — trace shows bothsee(text=Couldn't install the update)→click(text=Check now)→eventually(the user re-downloads after the failed install through Settings)iterations passing, thensee(text=Restart Studio?)andeventually(restart only after confirmation).a confirmed update relaunch resumes only the unfinished task on its original engine(259 s)Also:
pnpm --dir apps/app typecheckexit 0.Noticed, not touched
check()runs on every effect re-run (any dependency identity change), not only on mount/focus/online/interval. The 15-minute guard hides this in practice; it surfaced here because the world advancesDate.now. Left as is.[data-sidebar-brand]/Notificationsare not rendered in the collapsed mac layout, the titlebarRestart to updateis covered byToggle Sidebar, and CDP clicks fire windowfocusevents when the Electron window is not frontmost (which trigger automatic checks). Daytona is unaffected.failedAction: "download") the next focus/online/interval trigger still auto-retries and auto-downloads. Loop 1 of the spec passes only because no such trigger occurs between the failure andCheck now; the spec does not claim otherwise.DEFAULT_DESKTOP_CONFIGon every Den settings sync, so a dev-bridge-injected desktop config (any eval using__openworkApplyDesktopConfigwithout a sign-in) is cleared when Settings opens.