[CP Staging] Fix FAB deploy blockers from popover decomposition (#83299)#85666
[CP Staging] Fix FAB deploy blockers from popover decomposition (#83299)#85666Julesssss merged 6 commits intoExpensify:mainfrom
Conversation
The confirm modal pushed a competing browser history entry via shouldHandleNavigationBack: true (hardcoded in useConfirmModal). When the FAB popover's deferred history.back() fired, it popped the confirm modal's entry instead of its own, instantly closing it. Pass shouldHandleNavigationBack: false so the confirm modal skips history management — the FAB popover already handles back navigation. Fixes Expensify#85661 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@MelvinBot review |
Code ReviewChange: Single line — adds AnalysisRoot Cause is correctly identified. The FAB popover ( Fix is correct. Passing Checklist
Verdict: This is a clean, minimal, well-targeted fix. Looks good to me. 👍 |
Reset focusedIndex on close so arrow-key highlight doesn't carry over when reopening the FAB menu. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove InteractionManager.runAfterInteractions() wrapper from startTestDrive that blocked navigation when the FAB popover's fadeOut animation created an interaction handle. Also collapse dead conditional where both branches navigated to the same route, and clean up unused params/imports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| import ROUTES from '@src/ROUTES'; | ||
| import type {IntroSelected} from './Report'; | ||
|
|
||
| function startTestDrive(introSelected: IntroSelected | undefined, hasUserBeenAddedToNudgeMigration: boolean, isUserPaidPolicyMember: boolean) { |
There was a problem hiding this comment.
all this was just deadcode called from 2 places (FAB is one)
|
@aimane-chnaif 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safaridemo.mov |
|
Can you please generate adhoc build and ask QA to test linked issues? |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 872f0349a1
ℹ️ 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".
The previous fix hardcoded shouldHandleNavigationBack: false in the shared useCreateEmptyReportConfirmation hook, which broke browser-back dismissal for all callers (search, workspace selection, compose bar). Make it an opt-in parameter (default: true) and only disable it from the FAB's CreateReportMenuItem. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
Oh thanks for handling this @adhorodyski |
This comment has been minimized.
This comment has been minimized.
|
@Julesssss you're welcome! |
|
fixes #85685 as well |
|
Requested AdHoc testing for the linked issues |
mountiny
left a comment
There was a problem hiding this comment.
Thanks! I guess we can wait until QA is done with this
|
🚧 @Julesssss has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.3.40-2 🚀
|
|
QA passed on AdHoc build. Now it's on staging I requested a retest for the 3 issues that were fixed with this revert:
|
|
🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.3.41-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.3.41-4 🚀
|
Explanation of Change
PR #83299 (FAB popover decomposition) introduced three regressions, all fixed here:
1. Report RHP closes immediately on second FAB create
The decomposition moved the empty-report confirmation from an inline
<ConfirmModal>to the global modal system viauseConfirmModal, which hardcodesshouldHandleNavigationBack: true. Both the FAB popover and the confirm modal then push{shouldGoBack: true}browser history entries. When the FAB popover closes, its deferredhistory.back()fires after the confirm modal has already pushed its own entry — popping the confirm modal's entry instead of the FAB's, which instantly dismisses the confirmation.Fix: pass
shouldHandleNavigationBack: falsetoshowConfirmModal()so the confirm modal skips history management. The FAB popover already handles back navigation, making this safe.2. FAB keyboard highlight persists across open/close
After closing the FAB menu and reopening it, the previously focused item was still highlighted — because
focusedIndexwas never reset on close. Arrow-key navigation would then start from the stale position.Fix: reset
focusedIndexto-1when the FAB menu closes so keyboard navigation always starts fresh on next open.3. FAB "Test Drive" does nothing on click
Clicking "Take a 2-minute test drive" in the FAB menu closes the popover but never navigates to the test drive screen.
startTestDrivewrapped navigation inInteractionManager.runAfterInteractions(), which was blocked by the FAB popover'sfadeOutanimation creating an interaction handle. Meanwhile,shouldHandleNavigationBackfireswindow.history.back()viasetTimeout(0), racing with the deferred navigation — result: navigation never happens. Additionally, both branches of the conditional insidestartTestDrivenavigated to the same route (dead code after commit2a843f5e2a1).Fix: remove
InteractionManagerwrapper, collapse the dead conditional, and clean up unused params/imports.startTestDrive()now directly callsNavigation.navigate(ROUTES.TEST_DRIVE_DEMO_ROOT).Fixed Issues
$ #85661
$ #85656
$ #85654
$ #85685
PROPOSAL:
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari