Repository navigation
[No QA] perf: record source tab and preload wait on the Inbox tab span - #104567
Conversation
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.
|
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. |
|
Tag me when it's ready |
|
from: https://expensify.slack.com/archives/C05LX9D6E07/p1792489953324709 @huult let me take over this PR |
JmillsExpensify
left a comment
There was a problem hiding this comment.
No product review required.
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-10-22.at.14.29.23.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 JS00001 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.5.20-0 🚀
|
|
No help site update needed. This PR only adds Sentry span attributes ( |
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.5.20-5 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
This adds two attributes to the
ManualNavigateToInboxTabspan. We need them to find out what makes Inbox taps slow on Windows.source_tabrecords the tab the user left (HOME,SEARCHand so on). The app freezes the old tab inside this span, so the starting tab changes the cost. Locally a tap from Spend takes about 60ms longer than a tap from Home, and production has no data on how many taps start from Spend.ms_since_preloadrecords how long the preloaded Inbox tab waited before the tap, and only while it is still preloaded. It shows whether a tab that waits longer opens slower.startNavigateToInboxTabSpanalready runs before the tab switch, so it readssource_tabfrom the root navigation state and its callers stay the same.AuthScreensInitHandlersaves the preload time with the key of the tab navigator it preloaded. The span skipsms_since_preloadwhen that key doesn't match, because a cross-tab deep link can push a second tab navigator with its own preload. Nothing changes for users.Fixed Issues
$ #104587
PROPOSAL: N/A
Tests
[Sentry][ManualNavigateToInboxTab] Ending spanlog hassource_tab: "SEARCH",is_preloaded: trueand ams_since_preloadnumber.source_tab: "HOME"and ams_since_preloadnumber.source_tab: "SEARCH",is_preloaded: falseand noms_since_preload.Unit tests:
tests/unit/startNavigateToInboxTabSpanTest.ts.Offline tests
Same as tests. The attributes come from navigation state and a local timestamp, so they don't depend on the network.
QA Steps
None. This only adds span attributes, there is nothing to test in the app.
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Chrome,
Ending spanattributes from the JS console: