fix: Travel opens travel.expensify.com in external browser instead of in-app webview#83657
fix: Travel opens travel.expensify.com in external browser instead of in-app webview#83657nkdengineer wants to merge 3 commits intoExpensify:mainfrom
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.
|
|
@ZhenjaHorbach 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc55485f1b
ℹ️ 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".
| const openTravelDotLink = (activePolicyID?: string, postLoginPath?: string) => { | ||
| const openTravelDotLink = (activePolicyID?: string, postLoginPath?: string, spotnanaToken?: string, isTestAccount?: boolean) => { | ||
| if (spotnanaToken) { | ||
| asyncOpenURL(Promise.resolve(), () => buildTravelDotURL(spotnanaToken, isTestAccount ?? false, postLoginPath)); |
There was a problem hiding this comment.
Preserve Safari popup flow when opening travel URL
When spotnanaToken is present, this path calls asyncOpenURL with Promise.resolve(), but it is invoked only after acceptSpotnanaTerms() finishes in TravelTerms, not directly in the original click event. In Safari, that loses the user-gesture context needed for window.open(), so the popup is blocked and the fallback opens in _self (same tab) instead of a new tab, which regresses web/mWeb Safari behavior for the Travel terms flow.
Useful? React with 👍 / 👎.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
trjExpensify
left a comment
There was a problem hiding this comment.
Did anyone look into this comment from QA on the parent issue? It's allegedly not reproducible anymore.
|
@trjExpensify No recent change on this page, so this issue is still reproducible |
|
Asked for you: #82362 (comment) |
Explanation of Change
fix: Travel opens travel.expensify.com in external browser instead of in-app webview
Fixed Issues
$ #82362
PROPOSAL: #82362 (comment)
Tests
Precondition: has a WS, and has enabled "Travel" feature
Offline tests
None
QA Steps
Same as test
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
Screen.Recording.2026-02-27.at.14.28.08.mov
Android: mWeb Chrome
Screen.Recording.2026-02-27.at.14.34.11.mov
iOS: Native
Screen.Recording.2026-02-27.at.14.27.22.mov
iOS: mWeb Safari
Screen.Recording.2026-02-27.at.14.35.15.mov
MacOS: Chrome / Safari
Screen.Recording.2026-02-27.at.14.29.49.mov