Conversation
64873ba to
f75429f
Compare
6c60b0e to
c2cca02
Compare
f719832 to
fa7a3da
Compare
3ea8a3a to
46d78ad
Compare
fc2597a to
bcaae6d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 67 out of 69 changed files in this pull request and generated 9 comments.
Suppressed comments (1)
packages/fxa-settings/src/pages/Signin/SigninTotpCode/container.tsx:150
- This effect can navigate to
/while either OAuth error branch below is being rendered. Previously those error returns occurred before the redirect guard, so this changes the behavior from displaying the error to silently leaving the page. Preserve both error guards in the effect.
| await expect(async () => { | ||
| await this.codeInput.fill(code); | ||
| await expect(this.codeInput).toHaveValue(code); | ||
| }).toPass({ timeout: 15000 }); |
| return; | ||
| } | ||
|
|
||
| // INSUFFICIENT_AAL is handled by the auth client's global error |
There was a problem hiding this comment.
Question: I know this came up in a previous review, but looking at this again these INSUFFICIENT_AAL changes seem unrelated to the upgrade and I wonder if we should omit (incl. new tests, l10n string)?
There was a problem hiding this comment.
Looks like we can, but there are still minor updates to the file since ReactDOM.render was removed in 19. LMK your thoughts!
| "prettier": "^3.5.3", | ||
| "react": "18.3.1", | ||
| "react-dom": "18.3.1", | ||
| "react": "19.0.8", |
There was a problem hiding this comment.
The git commit message has a buried note about pining to 19.08 vs the more recent React 19 version - if this is necessary even with the Strict mode disabling, it should be noted in the PR description and with a code comment. The commit message also includes unspecified Jira ticket numbers - that should be updated.
For ref, the ticket to re-enable strict mode (and possibly bump React to 19.2+, though not noted in current description) is FXA-14313
| </React.StrictMode>, | ||
| document.getElementById('root') | ||
| const root = createRoot(document.getElementById('root') as HTMLElement); | ||
| // StrictMode disabled: PagePasskeyAdd auto-starts the ceremony in a |
There was a problem hiding this comment.
Suggestion: Simplify comment to
TODO: re-enable strict mode in FXA-14313
| if (!uid || !sessionToken) { | ||
| navigateWithQuery('/signin', { replace: true }); | ||
| return; | ||
| // Navigate from an effect; a render-phase navigation races the commit. |
There was a problem hiding this comment.
Nit: I feel like we could clean up all the "navigate from an effect" comments. These explain the changes in the PR but won't be helpful in the future.
| return <AppLayout cmsInfo={integration.getCmsInfo()} loading />; | ||
| } | ||
|
|
||
| // we only care about "verified" here, not "exists" |
There was a problem hiding this comment.
Ask: I feel like some of our helpful comments like this one were stripped out... Can we re-add, maybe have Claude do a pass of the diff and re-add the lost context like this?
| ] | ||
| ); | ||
|
|
||
| // Users must be already authenticated on this page. |
There was a problem hiding this comment.
Another example of lost context...
| @@ -0,0 +1,4 @@ | |||
| # Shown inside the MFA dialog when the account needs a higher authentication | |||
There was a problem hiding this comment.
We have removed this update, so it is no longer needed :)
a039ac2 to
1b091d7
Compare
vpomerleau
left a comment
There was a problem hiding this comment.
Thanks for the updates!
This pull request: - Upgrades React and react-dom to 19 (pinned to `19.0.8`), with `@types/react` 19 and `@testing-library/react` 16 - Switches `fxa-settings` to `createRoot`; `ReactDOM.render` is gone in React 19 - Moves render-phase `navigate()` calls into effects across 13 containers — a concurrent root commits asynchronously, so navigating during render races the commit - Replaces the hand-rolled `Symbol.for('react.element')` in the SVG Jest transform with `createElement`, and consolidates the duplicated transform into `fxa-react` - Migrates `useFormState` to `useActionState` in `CouponForm`, dispatching the auto-apply through `startTransition` - Drops `@material-ui/core` (peers on React ^16/^17) and rebuilds the avatar zoom control as a native range input - Removes `@testing-library/react-hooks`, which has no React 19 support, in favour of RTL's `renderHook` - Fixes functional-test page objects that assumed the route committed with the URL Other information - **React is pinned to 19.0.8, not 19.2.x.** 19.2.8 reproducibly failed six passkey and 2FA functional tests that pass on 19.0.8, on two independent branches. The cause is not diagnosed; bumping to 19.2.x should be its own change. (FXA-14313) - **`StrictMode` is disabled** in `fxa-settings/src/index.tsx`. `PagePasskeyAdd` starts its WebAuthn ceremony in a mount effect and the double-invoke aborts it. Fixing that effect's cleanup and restoring StrictMode is follow-up work. (FXA-14313) Closes PAY-3887
This pull request
19.0.8), with@types/react19 and@testing-library/react16[fxa-settings](https://mozilla-hub.atlassian.net/browse/FXA-settings)tocreateRoot;ReactDOM.renderis gone in React 19navigate()calls into effects across 13 containers — a concurrent root commits asynchronously, so navigating during render races the commitSymbol.for('react.element')in the SVG Jest transform withcreateElement, and consolidates the duplicated transform into[fxa-react](https://mozilla-hub.atlassian.net/browse/FXA-react)useFormStatetouseActionStateinCouponForm, dispatching the auto-apply throughstartTransition@material-ui/core(peers on React ^16/^17) and rebuilds the avatar zoom control as a native range input@testing-library/react-hooks, which has no React 19 support, in favour of RTL'srenderHookOther information
functional tests that pass on 19.0.8, on two independent branches. The cause is not diagnosed;
bumping to 19.2.x should be its own change. (FXA-14313)
StrictModeis disabled in[fxa-settings](https://mozilla-hub.atlassian.net/browse/FXA-settings)/src/index.tsx.PagePasskeyAddstarts its WebAuthnceremony in a mount effect and the double-invoke aborts it. Fixing that effect's cleanup and
restoring StrictMode is follow-up work. (FXA-14313)
Closes PAY-3887
Issue that this pull request solves
Closes: PAY-3887
Checklist
Put an
xin the boxes that apply