Repository navigation
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe V1 migration notice now has a translated “Relaunch now” action and a “Later” dismissal action. The settings router delegates relaunch handling to update-aware logic. Tests cover notice visibility, tracking, relaunch, and dismissal. ChangesV1 Flip Relaunch
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant User
participant V1FlipNotice
participant electronTrpcClient
participant settingsRouter
participant relaunchApp
participant UpdateInstaller
participant ElectronApp
participant quitApp
User->>V1FlipNotice: Clicks "Relaunch now"
V1FlipNotice->>electronTrpcClient: relaunchApp.mutate()
electronTrpcClient->>settingsRouter: Invoke relaunchApp
settingsRouter->>relaunchApp: Pass update and relaunch callbacks
relaunchApp->>UpdateInstaller: Check readiness
alt Update ready
relaunchApp->>UpdateInstaller: installUpdate()
else Update not ready
relaunchApp->>ElectronApp: relaunch()
relaunchApp->>quitApp: quit()
end
settingsRouter-->>electronTrpcClient: Return success
Merge Risk: ⚪ Minimal · up to The relaunch paths have no identified issue requiring a fix before merge. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new button uses existing desktop relaunch and update capabilities. The application, rather than the button, decides whether an update is ready. No new security exposure was established, but caller restrictions and some failure behavior remain unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
|
No installed development build can load this pull request as an update: its native fingerprint is |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
|
Dev-app verification over CDP, with one gap to close before merge. Verified: the notice renders with Relaunch now (primary) and Later; a real click on Relaunch now quits through the graceful path (all three host-services log Not verified: that relaunched instance exits within about a second in dev, both under turbo and with electron-vite run directly, and its main.log ends at the browser-bridge line with no error. So the landing on v2 after the relaunch is unobserved. Needs one run in a packaged build, or a dev main with logging around the early exit, before this merges. Screenshots and the session write-up: https://app.superset.sh/page/v1-v2-migration-day-12-september-br7w3x |
The flip lands on the next launch, and 227 people have completed the gate and are still on v1 waiting for one. The notice already says so; now it offers the relaunch. The button goes through the normal quit path (app.relaunch + quitApp) so cleanup and DB flushes run, unlike the unused restartApp which bypasses before-quit. "Later" keeps the old dismiss. Fires v1_flip_notice_relaunch so the funnel can count it. The card gets an optional primary action; the post-flip welcome card is unchanged. "Relaunch now" is translated in all 16 locales. Rebased on main after #7480, whose optInV2 pin holds the surface on v1 until relaunch; the relaunch is exactly that relaunch, so the two compose with no code change. The relaunched instance only dies in dev: electron-vite exits with the old Electron (ps.on('close', process.exit)), taking the renderer dev server with it, and the new instance's dev-only parent-exit poll quits it within a second. A production build relaunches, stays up, and lands on v2 with the welcome card. Claude-Session: https://claude.ai/code/session_016NkfQLLDdHvrPS1BRJtfhj Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
07ac09d to
2adbc17
Compare
|
Closing the gap from the 12 Sep dev-app verification: "the relaunched instance exits within about a second in dev, so the landing on v2 is unobserved." Why it died in dev (harness only, not the feature). Two dev-only mechanisms:
Neither runs in a packaged app: Observed landing, production build. Setup:
A first run came up blank after the relaunch. The cause was my local API missing the newer Branch. Rebased on main (#7480, #7514, #7649 etc.) with no conflicts and no code change. #7480's Update (c70f812): the pending-update race was real, and it's fixed. Reproduction. Two packaged builds (1.30.2 and 1.30.3) from this branch, signed with a throwaway self-signed identity so Squirrel.Mac accepts the update. Both designated requirements are
(Use main.log's Fix. Re-run on c70f812. In Isolation. Test builds were packaged with |
With an update downloaded, quitting hands the install to Squirrel.Mac (autoInstallOnAppQuit), and app.relaunch() started the old bundle in the same second. Reproduced with two locally signed builds and a localhost feed: the relaunched process came up as 1.30.2 about 1.3s before ShipIt finished swapping in 1.30.3 beneath it, then found 1.30.3 again, re-downloaded it and staged a second install for the next quit. Relaunch now routes through installUpdate() when an update is staged, so Squirrel restarts into the new version (1.30.3, "Updated: 1.30.2 → 1.30.3", no re-download). The quit still runs before-quit cleanup. With no staged update it relaunches as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Closing. Anyone who could see this button is already on a build that contains it, and any quit (including installing an update) flips a gated user anyway. Data on 2026-09-26: the 210 gated-but-not-relaunched users have a median wait of 1.6 days (max 6.5), and 90% of devices flip within ~8 days of their gate on their own. Not worth the extra surface. The staged-update relaunch race found while verifying this only exists with this button, so it closes with it. Branch kept (flip-notice-relaunch, c70f812) if we want it later. |
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).bun run check:i18npasses.Verification
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.
app.relaunch()+quitApp(), so cleanup and DB flushes still run. The unusedrestartAppbypassesbefore-quitviaapp.exit(0).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.V1FlipNoticebehavior; "Relaunch now" is translated in all 16 locales.Written for commit c70f812. Summary will update on new commits.
Summary by CodeRabbit