Repository navigation
Raise test tools and the offline banner above required 2FA. - #102955
neerajbachani wants to merge 10 commits into
Conversation
Portal only the focused test-tools screen so Cmd/Ctrl+D stays usable on that overlay without losing the stack context that was crashing the modal.
|
@thelullabyy Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e82b687355
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Document the overlay banner and test setup, and dim the portaled test-tools frame on native so the backdrop is not left under the overlay.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-10-18.at.14.36.29.mov |
Portaling the tools out of the native modal left an empty white screen over them, and safe-area padding on the fixed-height offline row clipped the text.
CSpell rejects "Portaling" in the native test-tools comments.
|
@thelullabyy PR is ready for review |
|
@MelvinBot Deep review |
Deep reviewThe web fix looks sound: the portal brings back the contexts the test-tools pages need, and the host stacks above the overlay. Two test steps likely still fail, though, so I'd request changes before approving. Should fix
Worth addressing
Nits
What I checked and found fine
I reviewed the code only. I didn't run the tests or the React Compiler check, and I didn't test on a device. Items 1 and 2 need an Android, iOS, or mWeb run to confirm. |
…t while they are open.
|
Two of these are fixed in 4f36638. Android test tools now use the same portal as web ( The Enable 2FA Enter shortcut is not rendered while the test-tools route is focused. The overlay sits outside a screen, so that shortcut otherwise stays active. Four-finger tap on Android mWeb already opens test tools while required 2FA is showing, so I did not add a second responder. I left the navigator remount and the web dim animation. The remount only happens if required-2FA visibility flips while tools are already open. Opening tools from the overlay does not flip that flag. The dim follows the nested card animation after the portal, and it does not block the tools. |
|
@thelullabyy The PR is ready for another review. Thanks!! |
|
@neerajbachani Could you please recheck this point, I don't see the fix added yet? #102955 (comment) |
There was a problem hiding this comment.
Thanks for the PR! I left some inline comments. The main ones are the Android dim, the web card animation, and the navigator remount.
A few other things:
tests/ui/RequireTwoFactorOverlayStackingTest.tsxmocks the navigator, the portal and nearly every hook, so it mostly checks testIDs rather than real stacking and wouldn't catch the issues above. Fine as a smoke test, but please don't rely on it alone.- The PR description still has
// TODO: These must be filled out…under QA steps
… Android sheet without remounting the stack.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Explanation of Change
The required-2FA overlay is drawn after
RootStack.Navigatorat z-index 20, so it covers the test-tools route and the offline banner thatScreenWrapperpaints inside those screens. Cmd/Ctrl+D and the four-finger tap still navigate to test tools, but that screen stays underneath the overlay.This keeps the overlay above normal app UI, including onboarding and the welcome modal. Two things move above it, and only while the overlay is showing:
OfflineIndicatorin a bottom-aligned layer at z-index 21. The home-indicator inset sits on the container around that row, not on the row itself. The row is a fixed height, so padding on the same view clips the label on native and leaves only the cloud icon. The banner is absent when the device is online, so normal screens keep their own banner and there is no second copy.backTo, the Server page, and goBack keep working. Only the focused screen is portaled, with its navigation, route, and card-animation contexts put back. Portaling the whole tree dropped those contexts, andOverlaythen threw "Couldn't find values for card animation", which the error boundary showed as "Uh-oh, something went wrong." Web and Android use that portal. Android's transparent modal stays inside the stack, under the overlay, so leaving the screen in place keeps the tools covered. iOS already presents this navigator in its own window above the overlay, so the screen stays in that modal. Portaling it out left an empty opaque window that covered the tools once the modal transition finished. The nested native screen background is transparent so the parent dim still shows. While test tools are focused, the overlay's Enable 2FA Enter shortcut is hidden. The overlay sits outside a screen, so that shortcut otherwise stays active and Enter starts 2FA setup.The overlay stays mounted underneath test tools. On web, its focus trap turns off while the test-tools route is focused so the portaled tools can take input. Enable, Sign out, and the onboarding path snapshot are unchanged. When required 2FA is off, or the user is inside 2FA setup, nothing is portaled.
Fixed Issues
$ #102574
PROPOSAL:
Tests
Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2026-10-13.at.12.00.00.PM.mov
Android: mWeb Chrome
WhatsApp.Video.2026-10-13.at.12.07.34.mp4
iOS: Native
Screen.Recording.2026-10-12.at.11.32.21.AM.mov
iOS: mWeb Safari
Screen.Recording.2026-10-12.at.10.40.10.AM.mov
MacOS: Chrome / Safari
Screen.Recording.2026-10-12.at.10.10.32.AM.mov