feat(desktop): "Relaunch now" on the v1→v2 flip notice
Closed
KI
2mo ago+248+248+012345678901234567890123456789-5-5-0123456789
Why
The auto-migration flips a machine to v2 on its next launch. As of 12 Sep, 227 people have completed the gate and are still on v1 because they have not relaunched; some run the app for days. The notice already tells them "Everything comes along on your next launch" and then gives them nothing to click. See the status page, decision 1.
What changes
FlipNoticeCardtakes an optional primaryaction; when present the dismiss cta renders as the secondary button. The post-flip welcome card is unchanged.V1FlipNoticeoffers Relaunch now (primary) and Later (dismiss). Relaunch tracksv1_flip_notice_relaunch, then calls a newsettings.relaunchAppprocedure.relaunchAppisapp.relaunch()+quitApp(), the normal quit path with cleanup, not the existing unusedrestartApp, which bypassesbefore-quitviaapp.exit(0).- "Relaunch now" added to the catalogs and translated in all 16 locales, matching each locale's existing "Restart" wording. "Later" already existed.
bun run check:i18npasses.
Verification
- New
V1FlipNotice.test.tsx(happy-dom + testing-library, real clicks): hidden until completion; shows on completion and tracksshown; Relaunch calls the procedure once and tracksrelaunch; Later dismisses without relaunching. Queries are render-bound because the module-levelscreencan be bound to the shared mock document by an earlier suite. bun testin apps/desktop: 3768 pass, 0 fail.tsc --noEmitclean. Biome clean.
Independent of #7480 (no overlapping files).
https://claude.ai/code/session_016NkfQLLDdHvrPS1BRJtfhj
Summary by cubic
Adds a "Relaunch now" action to the v1→v2 flip notice so users who completed the migration gate can relaunch immediately instead of waiting for their next app launch.
- Relaunching checks for a staged update first: when one is pending, it installs it so the updater restarts into the new version; otherwise it runs
app.relaunch()+quitApp(), so cleanup and DB flushes still run. The unusedrestartAppbypassesbefore-quitviaapp.exit(0). - The notice tracks
v1_flip_notice_relaunch; the dismiss button is relabeled "Later" and keeps the existingv1_flip_notice_dismissedtracking. FlipNoticeCardaccepts an optional primaryaction; when present the dismiss CTA renders as secondary. The post-flip welcome card is unchanged.- Adds unit tests for the relaunch logic and
V1FlipNoticebehavior; "Relaunch now" is translated in all 16 locales.
Summary by CodeRabbit
- New Features
- Added a “Relaunch now” option to the migration notice, which installs a ready update or restarts the app when no update is ready.
- Added a “Later” option to dismiss the notice without restarting.
- The app follows its normal shutdown process before restarting.
- Localization
- Added translations for the relaunch action across supported languages.