[Performance] Reduce DEFAULT handler fallthrough for unrecognized-tab submissions#94454
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a948a7299
ℹ️ 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".
|
@codex review |
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.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 930feca1c4
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
DEFAULT handler fallthrough for unrecognized-tab submissionsDEFAULT handler fallthrough for unrecognized-tab submissions
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: acf836b12d
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e90bf8b6d1
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e90bf8b6d1
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
Not sure what you mean, but if it is about the navigation then it matches prod behavior - QAB navigates to Inbox while FAB goes to Spend. Not a regression from this PR. In fact QAB has many different navigations compared to FAB. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp2026-07-01.18-26-59.mp4Android: mWeb Chrome2026-07-01.18-00-14.mp4iOS: HybridApp2026-07-01.18-41-32.mp4iOS: mWeb Safariry> |
|
I think we need some delay for useSkipConfirmationPreInsert because the pre insert is seen briefly before the create expense rhp opens. And also, it is not working for distance cases, you can try skipConfirmation case for track expense distance QAB it is slow (unlike quick pre-insert) but for scan and manual it is working. 2026-07-01.01-56-05.mp4 |
|
^ true, fixed |
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.4.27-1 🚀
|
|
🤖 I reviewed the changes in this PR against Expensify's help site content under No help site changes are required. This PR is a set of internal navigation/performance improvements to the expense submit flow — there is no user-facing behavior change to document:
None of these touch documented feature names, tab names, settings labels, buttons, or user-facing workflows described on the help site, so no articles need updating and no draft PR was created. @JakubKorytko, if you believe any user-facing behavior here should be documented, let me know and I'll open a draft help site PR. |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.4.27-2 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Three related submit-navigation improvements:
1. Reduce
DEFAULThandler frequency for global-create flows from unrecognized tabsAdded a
SEARCH_DISMISScondition ingetSubmitHandlerfor global-create flows fromHome,Settings, andWorkspacestabs. These were falling through to the slowDEFAULTpath (which runscreateTransactionbefore navigation) even though the correct behavior is identical toSEARCH_DISMISS.2. Fix PAY navigation on wide layout (repeated QAB Pay stays on Home)
submitWithDismissFirstusedgetTopmostReportParamsto detect "already on destination", but this finds stale report routes in the nav state even when the active tab is Home. After the first PAY navigates to the report, subsequent PAYs incorrectly think they're "already on destination" and just dismiss - landing on Home instead of the report. Fixed by gating the check behindisReportTopmostSplitNavigator()so it only considers the report visible when it's actually the active tab.3. Honor pre-inserted routes instead of replacing them
Both
submitWithDismissFirstandSubmitExpenseOrchestrator.handleReportPreInsertcould callrevealRouteBeforeDismissingModaleven when a route was already pre-inserted under the RHP. This replaces the pre-rendered React tree, wasting the pre-insertion work and causing a visible flash. Fixed by checkinggetIsFullscreenPreInsertedUnderRHP()before falling back to reveal. Also added report pre-insertion for skip-confirmation PAY flows inIOURequestStepAmountand enabled report pre-insertion for PAY/SPLIT from global create inIOURequestStepConfirmation.Sentry Evidence
Sentry shows ~5.2k
defaultvs ~4k non-defaultfast_path_handlervalues onManualSubmitToDestinationVisiblespans in the last 24h [23.06.2026] (~56% default). The app has 5 tabs but handler selection only recognizes 2 (Search and Reports). HOME (the initial route), Settings, and Workspaces tabs are "unrecognized" and all fall through to DEFAULT even though the correct behavior is identical to SEARCH_DISMISS.Estimated DEFAULT breakdown:
Fixed Issues
$ #94463
PROPOSAL: N/A
Tests
[Sentry][ManualSubmitToDestinationVisible] Ending span (Xms)appears in console with a sub-two-second duration and attributes showingfast_path_handler: search_dismissorfast_path_handler: search_pre_insert(notdefault)SEARCH_DISMISSbehavior is unchanged (modal dismisses, stays on Spend)[Sentry][ManualSubmitToDestinationVisible] Ending span (Xms)appears in console and does NOT showfast_path_handler: search_dismissOffline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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.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.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
Web.mov