fix(desktop): allow updater-controlled relaunch - #4721
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved Straightforward bug fix that allows Electron's auto-updater to complete its relaunch sequence by adding a flag to bypass quit-prevention when the updater triggers the quit. Changes are self-contained with comprehensive test coverage. You can customize Macroscope's approvability policy. Learn more. |
## What's Changed * Make mobile Thread List v2 the default by @juliusmarminge in pingdotgg/t3code#4717 * Fix mobile showcase workflow without Clerk by @juliusmarminge in pingdotgg/t3code#4718 * Fix relay credential lookup for unlinked environments by @juliusmarminge in pingdotgg/t3code#4692 * Settle merged PR threads immediately by @t3dotgg in pingdotgg/t3code#4704 * feat(web): add maria's sidebar header artwork toggle by @maxktz in pingdotgg/t3code#4652 * feat(web): add appearance settings category by @maxktz in pingdotgg/t3code#4715 * fix(desktop): allow updater-controlled relaunch by @0x4bs3nt in pingdotgg/t3code#4721 **Full Changelog**: pingdotgg/t3code@v0.0.30-nightly.20260728.930...v0.0.30-nightly.20260728.931 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.30-nightly.20260728.931
* fix(mobile): threads load snapped to bottom on iOS (pingdotgg#4689) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> * feat: default sidebar v2 on for nightly and dev builds (pingdotgg#4491) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(web): 33 web UI fixes (pingdotgg#4700) * Make mobile Thread List v2 the default (pingdotgg#4717) * Fix mobile showcase workflow without Clerk (pingdotgg#4718) * Fix relay credential lookup for unlinked environments (pingdotgg#4692) Co-authored-by: codex <codex@users.noreply.github.com> * Settle merged PR threads immediately (pingdotgg#4704) * feat(web): add maria's sidebar header artwork toggle (pingdotgg#4652) * feat(web): add appearance settings category (pingdotgg#4715) * fix(desktop): allow updater-controlled relaunch (pingdotgg#4721) * fix(web): prevent diff panel scroll jumping (pingdotgg#4724) * Link inline code file paths in chat markdown (pingdotgg#4726) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> * Fix Android showcase capture and rebuild v2 queued rows (pingdotgg#4730) Co-authored-by: Claude <noreply@anthropic.com> * fix(nix): refresh pnpm dependency hash --------- Co-authored-by: Theo Browne <me@t3.gg> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Max Katz <me@maxkatz.me> Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-authored-by: codex <codex@users.noreply.github.com> Co-authored-by: jan <hi@4bs3nt.com>
* Add OTA update checks to mobile settings (pingdotgg#4686) * fix(mobile): threads load snapped to bottom on iOS (pingdotgg#4689) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> * feat: default sidebar v2 on for nightly and dev builds (pingdotgg#4491) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(web): 33 web UI fixes (pingdotgg#4700) * Make mobile Thread List v2 the default (pingdotgg#4717) * Fix mobile showcase workflow without Clerk (pingdotgg#4718) * Fix relay credential lookup for unlinked environments (pingdotgg#4692) Co-authored-by: codex <codex@users.noreply.github.com> * Settle merged PR threads immediately (pingdotgg#4704) * feat(web): add maria's sidebar header artwork toggle (pingdotgg#4652) * feat(web): add appearance settings category (pingdotgg#4715) * fix(desktop): allow updater-controlled relaunch (pingdotgg#4721) * fix(web): prevent diff panel scroll jumping (pingdotgg#4724) * Link inline code file paths in chat markdown (pingdotgg#4726) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> * Fix Android showcase capture and rebuild v2 queued rows (pingdotgg#4730) Co-authored-by: Claude <noreply@anthropic.com> * perf(server): negotiate permessage-deflate on the websocket (pingdotgg#4705) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-authored-by: Theo Browne <me@t3.gg> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Max Katz <me@maxkatz.me> Co-authored-by: codex <codex@users.noreply.github.com> Co-authored-by: jan <hi@4bs3nt.com>
## What's Changed * Add OTA update checks to mobile settings by @juliusmarminge in pingdotgg/t3code#4686 * fix(mobile): threads load snapped to bottom on iOS by @t3dotgg in pingdotgg/t3code#4689 * feat: default sidebar v2 on for nightly and dev builds by @t3dotgg in pingdotgg/t3code#4491 * fix(web): 33 web UI fixes by @maxktz in pingdotgg/t3code#4700 * Make mobile Thread List v2 the default by @juliusmarminge in pingdotgg/t3code#4717 * Fix mobile showcase workflow without Clerk by @juliusmarminge in pingdotgg/t3code#4718 * Fix relay credential lookup for unlinked environments by @juliusmarminge in pingdotgg/t3code#4692 * Settle merged PR threads immediately by @t3dotgg in pingdotgg/t3code#4704 * feat(web): add maria's sidebar header artwork toggle by @maxktz in pingdotgg/t3code#4652 * feat(web): add appearance settings category by @maxktz in pingdotgg/t3code#4715 * fix(desktop): allow updater-controlled relaunch by @0x4bs3nt in pingdotgg/t3code#4721 * fix(web): prevent diff panel scroll jumping by @0x4bs3nt in pingdotgg/t3code#4724 * Link inline code file paths in chat markdown by @juliusmarminge in pingdotgg/t3code#4726 * Fix Android showcase capture and rebuild v2 queued rows by @juliusmarminge in pingdotgg/t3code#4730 * perf(server): negotiate permessage-deflate on the websocket by @t3dotgg in pingdotgg/t3code#4705 * docs: overhaul agent guidance by @t3dotgg in pingdotgg/t3code#4782 * Prevent sidebar row labels from truncating by @juliusmarminge in pingdotgg/t3code#4789 * perf(server): gzip large thread snapshots by @t3dotgg in pingdotgg/t3code#4788 * fix(web): stashed prompts now survive switching providers by @t3dotgg in pingdotgg/t3code#4787 * Fix Git ref refresh resource storms by @juliusmarminge in pingdotgg/t3code#4727 * perf(server): trim stale context-window rows and drop dead replay RPC by @t3dotgg in pingdotgg/t3code#4791 * fix(web): defer command palette filesystem navigation by @juliusmarminge in pingdotgg/t3code#2109 * fix(release): skip scripts during Vercel installs by @t3dotgg in pingdotgg/t3code#4796 * refactor(client): share filesystem browse navigation by @juliusmarminge in pingdotgg/t3code#4797 * fix(mobile): defer filesystem navigation by @juliusmarminge in pingdotgg/t3code#4799 * refactor(server): use native HTTP compression streams by @juliusmarminge in pingdotgg/t3code#4798 * Remove Connect waitlist and add GA announcement tooling by @juliusmarminge in pingdotgg/t3code#4691 **Full Changelog**: pingdotgg/t3code@v0.0.29...v0.0.30 ## What's Changed * Add OTA update checks to mobile settings by @juliusmarminge in pingdotgg/t3code#4686 * fix(mobile): threads load snapped to bottom on iOS by @t3dotgg in pingdotgg/t3code#4689 * feat: default sidebar v2 on for nightly and dev builds by @t3dotgg in pingdotgg/t3code#4491 * fix(web): 33 web UI fixes by @maxktz in pingdotgg/t3code#4700 * Make mobile Thread List v2 the default by @juliusmarminge in pingdotgg/t3code#4717 * Fix mobile showcase workflow without Clerk by @juliusmarminge in pingdotgg/t3code#4718 * Fix relay credential lookup for unlinked environments by @juliusmarminge in pingdotgg/t3code#4692 * Settle merged PR threads immediately by @t3dotgg in pingdotgg/t3code#4704 * feat(web): add maria's sidebar header artwork toggle by @maxktz in pingdotgg/t3code#4652 * feat(web): add appearance settings category by @maxktz in pingdotgg/t3code#4715 * fix(desktop): allow updater-controlled relaunch by @0x4bs3nt in pingdotgg/t3code#4721 * fix(web): prevent diff panel scroll jumping by @0x4bs3nt in pingdotgg/t3code#4724 * Link inline code file paths in chat markdown by @juliusmarminge in pingdotgg/t3code#4726 * Fix Android showcase capture and rebuild v2 queued rows by @juliusmarminge in pingdotgg/t3code#4730 * perf(server): negotiate permessage-deflate on the websocket by @t3dotgg in pingdotgg/t3code#4705 * docs: overhaul agent guidance by @t3dotgg in pingdotgg/t3code#4782 * Prevent sidebar row labels from truncating by @juliusmarminge in pingdotgg/t3code#4789 * perf(server): gzip large thread snapshots by @t3dotgg in pingdotgg/t3code#4788 * fix(web): stashed prompts now survive switching providers by @t3dotgg in pingdotgg/t3code#4787 * Fix Git ref refresh resource storms by @juliusmarminge in pingdotgg/t3code#4727 * perf(server): trim stale context-window rows and drop dead replay RPC by @t3dotgg in pingdotgg/t3code#4791 * fix(web): defer command palette filesystem navigation by @juliusmarminge in pingdotgg/t3code#2109 * fix(release): skip scripts during Vercel installs by @t3dotgg in pingdotgg/t3code#4796 * refactor(client): share filesystem browse navigation by @juliusmarminge in pingdotgg/t3code#4797 * fix(mobile): defer filesystem navigation by @juliusmarminge in pingdotgg/t3code#4799 * refactor(server): use native HTTP compression streams by @juliusmarminge in pingdotgg/t3code#4798 * Remove Connect waitlist and add GA announcement tooling by @juliusmarminge in pingdotgg/t3code#4691 **Full Changelog**: pingdotgg/t3code@v0.0.29...v0.0.30 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.30
What Changed
before-quit-for-updateevent.preventDefault().Why
T3 Code’s lifecycle handler cancelled every
before-quitevent, including quits initiated by Electron’s updater. On macOS, this interrupted the native install-and-relaunch sequence, causing “Restart to update” to close the app without reopening it.Recognizing Electron’s dedicated update-quit signal keeps normal shutdown safeguards intact while allowing the updater to own its install and relaunch sequence.
Checklist
Note
Low Risk
Small, targeted change to quit handling with platform regression tests; normal user-initiated quits still use the existing graceful shutdown path.
Overview
Fixes “Restart to update” closing the app without relaunching (especially on macOS) by not treating updater-driven quits like user quits that need graceful shutdown.
The desktop app was calling
preventDefault()on everybefore-quitunless a normal quit had already been allowed. Electron’s updater first emitsbefore-quit-for-update, thenbefore-quitas part of install/relaunch—blocking that second event breaks the updater’s sequence.ElectronAppnow exposesonBeforeQuitForUpdate, a scoped subscription toautoUpdater’sbefore-quit-for-update(register on acquire, remove on release).DesktopLifecyclesets anupdaterQuitAllowedflag when that fires so the nextbefore-quitis allowed through withoutpreventDefault()or the shutdown-and-retry-quit path. Ordinary quits are unchanged.Regression tests cover scoped updater listeners, lifecycle behavior on darwin/win32/linux, and test doubles for the new service method.
Reviewed by Cursor Bugbot for commit bed368e. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Allow updater-controlled relaunch by not blocking
before-quitafterbefore-quit-for-updateonBeforeQuitForUpdateto theElectronAppservice interface, implemented viaEffect.acquireReleaseto scope a listener onElectron.autoUpdater'sbefore-quit-for-updateevent in ElectronApp.ts.updaterQuitAllowedflag in DesktopLifecycle.ts that is set when the updater firesbefore-quit-for-update, allowing the subsequentbefore-quitevent to proceed rather than being cancelled.before-quitevents were blocked unlessquitAllowedwas set via the normal quit flow; now updater-initiated quits bypass that block.Macroscope summarized bed368e.