feat(desktop): "Relaunch now" on the v1→v2 flip notice

Closed
KI
2mo ago
+248-5

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

  • FlipNoticeCard takes an optional primary action; when present the dismiss cta renders as the secondary button. The post-flip welcome card is unchanged.
  • V1FlipNotice offers Relaunch now (primary) and Later (dismiss). Relaunch tracks v1_flip_notice_relaunch, then calls a new settings.relaunchApp procedure.
  • relaunchApp is app.relaunch() + quitApp(), the normal quit path with cleanup, not the existing unused restartApp, which bypasses before-quit via app.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:i18n passes.

Verification

  • New V1FlipNotice.test.tsx (happy-dom + testing-library, real clicks): hidden until completion; shows on completion and tracks shown; Relaunch calls the procedure once and tracks relaunch; Later dismisses without relaunching. Queries are render-bound because the module-level screen can be bound to the shared mock document by an earlier suite.
  • bun test in apps/desktop: 3768 pass, 0 fail. tsc --noEmit clean. 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 unused restartApp bypasses before-quit via app.exit(0).
  • The notice tracks v1_flip_notice_relaunch; the dismiss button is relabeled "Later" and keeps the existing v1_flip_notice_dismissed tracking.
  • FlipNoticeCard accepts an optional primary action; when present the dismiss CTA renders as secondary. The post-flip welcome card is unchanged.
  • Adds unit tests for the relaunch logic and V1FlipNotice behavior; "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.