Repository navigation
Fix duplicate OpenApp on deep link by recording full reconnect time immediately - #100547
danieldoglas merged 3 commits into
Conversation
|
@QichenZhu 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] |
|
Hey @QichenZhu , Could you please run an adhoc build on this branch for QA? I tried to manually test the Automated coverage: I added unit tests on this branch that model the boot race - on Thanks! |
|
@neerajbachani, you can open You need to do the same even with ad hoc builds, so I'd suggest testing locally and finishing the checklist first. |
|
Thanks @QichenZhu that works! I tested the Here’s a video of one of the runs: Screen.Recording.2026-09-09.at.10.17.19.AM.online-video-cutter.com.mp4I’m working through the rest of the PR checklist now as well. Thanks again! |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp (N/A)The test steps don't support native platforms. Android: mWeb Chromeandroid-web.webmiOS: HybridApp (N/A)The test steps don't support native platforms. iOS: mWeb Safariios-web.movMacOS: Chrome / Safarimac-web.mov |
QichenZhu
left a comment
There was a problem hiding this comment.
@neerajbachani, the changes look good to me.
Three issues about the test steps:
- The test steps don't match your recording. Please don't copy AI's steps if AI didn't run them itself, as the steps may not make sense. Please update them according to #100547 (comment).
- Please also update the QA steps similar to the Tests. Just change
dev.new.expensify.com:8082tostaging.new.expensify.com, since the QA team can't access the dev environment. - Please upload recordings for Android mWeb and iOS mWeb. The steps don't apply to native platforms, so you can skip Android Native and iOS Native.
|
@QichenZhu TYSM for the guidance, working on it!! |
Hey @danieldoglas, I've addressed all three points flagged above; Would appreciate a look whenever you get a chance. Thanks! |
|
🚧 danieldoglas 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/danieldoglas in version: 9.4.78-0 🚀
|
|
🤖 No help site changes are required for this PR — so no draft PR was created. This PR is an internal networking/ordering fix. It changes when
How I checked the help siteI searched The only near-match, The only observable difference for a user is that a report opened from an Expensify Classic report link shows a brief opaque loader instead of a stuck skeleton. That's a bug being fixed, not documented behavior — the help site never described the broken state, so there is nothing to correct. Per
view run · no recording available |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.4.78-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
When opening a report via an OldDot
/transitiondeep link,subscribeToFullReconnectcould fire an unnecessaryReconnectAppduring boot becauseLAST_FULL_RECONNECT_TIMEwas spliced into the deferredOpenAppresponse batch. The cutoff became visible in Onyx before the recorded reconnect time, soreconnectApp()fell back to a secondOpenApp, leaving the report stuck on a semi-transparent skeleton.This PR removes the broken splice in
recordFullReconnectTimeFromResponseand writesLAST_FULL_RECONNECT_TIMEdirectly to Onyx inside theRecordFullReconnectTimemiddleware, awaited beforeSaveResponseInOnyxcan stage the cutoff. That prevents the duplicate full download without adding ahasLoadedAppguard around the reconnect subscription.Fixed Issues
$ #97159
PROPOSAL: #97159 (comment)
Tests
npm test -- tests/unit/SubscribeToFullReconnectTest.ts tests/unit/FullReconnectUtilsTest.ts tests/unit/RecordFullReconnectTimeMiddlewareTest.ts tests/actions/RecordFullReconnectTimeFromResponseTest.tsOpenAppfires when the cutoff arrives while the first response is still queued.https://www.expensify.com/report?param={"pageReportID":"<reportID>"}.new.expensify.com/transition?...&exitTo=search/r/<reportID>, quickly copy the full URL and close the tab.dev.new.expensify.com:8082./search/r/<reportID>and the report loads with a brief opaque loader (not a stuck semi-transparent skeleton with Home visible behind it).Offline tests
N/A — this change affects the OpenApp/reconnect ordering during initial app load over the network. No offline-specific behavior was changed.
QA Steps
Same flow as Tests, only the host changes:
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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 (N/A)
Android: mWeb Chrome
lv_0_20260911005410.mp4
iOS: Native (N/A)
iOS: mWeb Safari
Screen.Recording.2026-09-10.at.11.13.33.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2026-09-09.at.10.17.19.AM.online-video-cutter.com.mp4