feat(desktop): pre-flip notice + post-flip welcome for migrated v1 users

Merged
KI
4mo ago
+285-1

What

The migration's only visible seam, handled as one branded arc — both cards share a FlipNoticeCard shell that carries the import wizard's visual identity (WelcomePage's dithered warm-gradient cover, sharp corners, title on the cover), and both sell the upgrade instead of listing caveats:

  1. V1FlipNotice (pre-flip) — shown on the v1 surface only once this machine is provably flipping at next launch (completion marker written this session; D5 makes the flip unconditional from there).

    A better Superset is ready — "Superset has been upgraded: faster, cleaner, and built around your projects. Everything comes along on your next launch." + amber callout: "Running terminal sessions won't carry over."

  2. V2FlipWelcome (post-flip) — first v2 boots, until acknowledged.

    Welcome to the new Superset — "Same Superset, upgraded. Everything came with you: projects and workspaces in the sidebar, and fresh terminals in each workspace's old folders."

Follows up on #5821 (F5: the flip previously landed with no explanation).

Screenshots (CDP captures of the shipped build)

Pre-flip notice — in context on the v1 surface, appears mid-session the moment migration completes:

pre-flip card on v1

pre-flip closeup

Post-flip welcome — first v2 boots, survives reload until dismissed:

welcome on v2

welcome closeup

Precision baseline — v1 surface before completion, no card:

v1 before completion

Why not the server-side pre-update notice

desktop_notices renders on the already-shipped old build, which only filters by version/platform/channel — it can't see surface or flag state, so it would warn every updater while only the flag cohort migrates. These cards are precise by construction: flag-excluded domains, unflagged users, v2-native users, and machines whose gate never completes see neither.

How

  • markV1MigrationComplete dispatches a v1-migration-completed window event on first completion (notice appears mid-session, no polling) and arms the welcome flag (consumed on dismiss, so it survives reloads).
  • Shared FlipNoticeCard shell: lazy-loaded Dithering shader cover (same ramp as the import wizard), body isolated below, primary CTA.
  • Tracks v1_flip_notice_shown/dismissed, v2_flip_welcome_shown/dismissed (org-keyed, counted once per org).

Verification

Both cards CDP-verified end-to-end (transcripts in comments):

  • Pre-flip: absent before completion → appears mid-session via the real markV1MigrationComplete path → dismiss works. The #5821 rollout flag gate verified live as a side effect.
  • Post-flip: renders with the welcome flag armed → survives reload → dismiss consumes → gone.
  • Negative cohorts: existing v2 users, unflagged v1 users, and gate-blocked (stuck) v1 users all see neither card.
  • The CDP pass caught a real mount bug (welcome card's layout edit had silently no-op'd) — fixed and re-verified. 41 unit tests green; the CI Test failure from leaked test shims is fixed (shims now scoped).