## Problem
Studio tracks completion of recovery setup, but there are no events for
copying or downloading the codes.
## Solution
Track both actions in the shared recovery-code dialog. Record a copy
after the clipboard write succeeds and a download when the browser
starts it. The events carry no recovery-code values.
## Review instructions
1. Open [Recovery
codes](https://supabase.com/dashboard/account/security#recovery-codes)
on this branch's Studio preview with a disposable MFA account. Select
**Generate recovery codes** or **Regenerate** if it already has a set.
2. In **Save your recovery codes**, select **Copy**, then **Download**.
Check the browser network panel for `recovery_codes_copied` and
`recovery_codes_download_clicked` in the telemetry requests
(`telemetry/event`).
## Problem
MFA setup and backup status are difficult to scan, and unverified
factors can appear as configured authenticators.
## Solution
- Show only verified authenticators (non-abandoned setup), with a clear
setup state when none are configured.
- Show backup guidance from the shared recovery checks and emphasise the
most relevant MFA action once those checks succeed.
- Align authenticator rows with the existing controls, use removal icons
with tooltips, and prevent removal when recovery-code status cannot be
confirmed.
| Before | After |
| --- | --- |
| <img width="1024" height="759" alt="7693"
src="https://github.com/user-attachments/assets/1deb07ef-91ce-481b-87f6-4baa7b023f94"
/> | <img width="1024" height="759" alt="18215"
src="https://github.com/user-attachments/assets/f17248a2-2001-4d95-ba28-3f16b75af0fb"
/> |
| <img width="1024" height="759" alt="Security Account Supabase"
src="https://github.com/user-attachments/assets/ede61c84-0baa-4139-9773-0953a05cbd94"
/> | <img width="1024" height="759" alt="14038"
src="https://github.com/user-attachments/assets/58ab1a70-0392-4706-8df3-2ba078c5a8ba"
/> |
## Review instructions
1. Open [MFA
settings](https://studio-staging-git-dnywh-recovery-mfa-status-supabase.vercel.app/dashboard/account/security#mfa)
without a verified authenticator. Confirm the setup empty state offers
“Set up MFA”.
2. Use an account with one authenticator and healthy codes. Check the
backup warning, aligned icon row, and remove tooltip.
## Validation
14 focused tests passed, including Auth SDK network responses and failed
recovery-status reads keeping removal unavailable. Formatting passed.
Focused ESLint passed with the locally incompatible TanStack
exhaustive-deps rule disabled; standard lint is blocked by the installed
plugin rejecting the current rule options. Full local typecheck still
reports errors in untouched panel and MCP files; none remain in this
PR's changed files.
## Problem
A recovery reminder should let users save codes and add a backup
authenticator independently, with clear loading and completed states.
## Solution
Add an optional authenticator task for accounts with one verified
factor. Keep completed rows visible, use text shimmers while loading,
and dismiss an untouched takeover when a successful refresh confirms the
gap is resolved. Continue and Skip dismiss through the same callback
used by the layout takeover.
| State | Screenshot |
| --- | --- |
| Loading | <img width="654" height="800" alt="40913"
src="https://github.com/user-attachments/assets/d75585f0-5d00-46db-9ec7-1305da0f7464"
/> |
| Multiple issues | <img width="654" height="800" alt="Supabase"
src="https://github.com/user-attachments/assets/8342667c-ecce-4271-a418-41295ebba223"
/> |
| One issue fixed | <img width="654" height="800" alt="15927"
src="https://github.com/user-attachments/assets/693c37fe-e955-4c9d-b866-1c60743a31b8"
/> |
| Both issues fixed | <img width="654" height="800" alt="59618"
src="https://github.com/user-attachments/assets/46140e95-b686-41ab-a5ea-94016f7eda29"
/> |
## Review instructions
**This PR’s own deploy preview cannot show the takeover.** Review its
diff here, but test the assembled stack on [#51643’s staging
preview](https://studio-staging-git-dnywh-account-recovery-interstitial-supabase.vercel.app/dashboard/organizations).
The controller only mounts in #51643.
Before each scenario: use a non-SSO staging test account with MFA
verified; check `enableAccountRecoveryInterstitial` and
`enableAuthRecoveryCodes` are both true in the staging dev toolbar, then
close the toolbar and other dialogs. Clear
`account-recovery-reminder:<userId>` from DevTools Application → Local
Storage **for that preview origin**, then reload the dashboard.
1. Use a test account with missing codes and exactly one verified
authenticator. Cancel Add authenticator, then reopen and enrol a test
authenticator. Confirm only that row completes and Skip for now becomes
Continue. Generate and acknowledge codes; both completed rows stay
visible. These actions change the test account.
2. **Separate exhausted-code scenario:** use an account that still has
exactly one verified authenticator. Override GET
`/factors/recovery-codes` in DevTools Network: retain JSON fields, set
`remaining` to `0`, clear snooze and reload. An account with two
verified authenticators will not trigger for exhausted codes. Disable
overrides before live actions.
3. For the codes-only layout, use an account with two verified
authenticators and genuinely missing codes. Repeat at a narrow viewport.
Loading, unavailable and externally resolved states have component-test
coverage; healthy or failed reads must not trigger a takeover.