Repository navigation
fix: show prevent-spotnana modal on workspace travel CTA - #92647
Conversation
…travel CTA Rebased on top of the read-only access changes from #ShridharGoel's 'Show read-only modal from travel and card CTAs' commit. Preserves the new usePolicyFeatureWriteAccess wrapping while wiring the prevent-spotnana beta branch and the SMS-login / public-domain-email guards that BookTravelButton.tsx still uses. Per situchan's review on Expensify#81764, this matches the same shape as the draft PR Expensify#84954, with the corrected route call (policyID prop instead of the active route URL).
8f0897f to
cb4f503
Compare
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
…_ERROR ROUTES.TRAVEL_PUBLIC_DOMAIN_ERROR does not exist; it's defined inside DYNAMIC_ROUTES (ROUTES.ts:81-820). The right pattern is the one BookTravelButton and WorkspaceTravelInvoicingSection already use: hasPolicyIDInActiveRoute = getSearchParamFromPath(...) dynamicSuffix = hasPolicyIDInActiveRoute ? path : getRoute(policyID) Navigation.navigate(createDynamicRoute(dynamicSuffix)) CI typecheck failure: 'Property TRAVEL_PUBLIC_DOMAIN_ERROR does not exist on type ROUTES'. Confirmed by grep on existing usages. Extracted into navigateToPublicDomainError() helper since both guard branches use it.
|
Marking ready for review. The web screenshot in the PR body was captured by enabling the |
|
hey @situchan, this one has been ready since the 8th. small change, just wires the existing blocked-travel modal into the workspace travel CTA (mirrors BookTravelButton). whenever you get a sec to review 🙏 |
|
@yuvrajangadsingh author checklist failing. 10 items unchecked |
|
@codex review |
ReviewOne blocking issue: the PR changes behavior for non-beta users, which contradicts the approved proposal and isn't mentioned in the PR description. The approved proposal explicitly scoped this to the beta modal only:
But the PR also adds SMS-login and public-domain-email gating to the non-beta path at Recommendation: Drop the added gating (lines 53-57 and 75-83) and keep the handler as the proposal specified — Secondary: if the gating were intended, it still diverges from
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c615c20b3
ℹ️ 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".
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.movAndroid: mWeb ChromeiOS: HybridAppios.moviOS: mWeb SafariMacOS: Chrome / Safariweb.mov |
…ards Per situchan + codex review: the non-beta path now stays openTravelDotLink exactly like before, matching the approved proposal. The Get started page already guards SMS/public-domain before this CTA renders.
|
@situchan done, removed the SMS/public-domain conditions so the non-beta path is back to just |
|
Congrats, that's your 5th PR merged! 🎉 Do you know about the ContributorPlus role? It's an opportunity to earn more in the Expensify Open Source community. Keep up the great work - thanks! |
|
🚧 @blimpich 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/blimpich in version: 9.4.9-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help site review: no documentation changes required. I reviewed the changes in this PR against Why no docs changes are neededWhat this PR does: It wires the workspace Travel get-started CTA (Book or manage your trip) to the existing blocked-feature modal when the Reasons this needs no help site update:
If you intended this blocked-travel behavior to be documented as a net-new help article, let me know and I'll draft one — but based on the current scope I don't believe one is warranted. @yuvrajangadsingh, if you disagree and want a docs article created (or amended), reply with the article path/section you have in mind and I'll open a draft help site PR. |
|
Hi @yuvrajangadsingh. How QA team can enable/disable the preventSpotnanaTravel beta for the test account? cc @blimpich |
|
hey @IuliiaHerets, there's no in-app toggle for this one. i don't have access to add betas to test accounts myself. @blimpich could you add once it's set, the two states to check are: with the beta ON, "Book or manage your trip" shows the blocked modal; with it OFF, the same CTA opens TravelDot. |
public domain are not working and our expensifail accounts are beta enabled. Could this be verified internally? |
|
@kavimuru right, public-domain accounts won't have this beta, that part's expected. i think two things are needed to reach this CTA, which is likely why the expensifail accounts aren't seeing it even with betas on:
so verifying internally, where the beta can be granted and travel is provisioned, is probably the cleanest path here. @blimpich could you take a look or point us to who can? happy to help from the code side. |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.4.9-0 🚀
|

Explanation of Change
BookOrManageYourTripalready checked thepreventSpotnanaTravelbeta, but that branch only returned, so the workspace travel CTA did nothing for blocked users.This wires that branch to the same blocked-travel modal used by
BookTravelButton: existingtravel.blockedFeatureModal.*copy,RocketDude, and the standard confirm-only modal.I kept this scoped to the workspace travel CTA. The other travel entry points already have their own beta handling or blocked views.
Fixed Issues
$ #81764
PROPOSAL: #81764 (comment)
Tests
preventSpotnanaTravelbeta for the test account.Offline tests
preventSpotnanaTravelbeta.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
Pending.
Android: mWeb Chrome
Pending.
iOS: Native
Pending.
iOS: mWeb Safari
Captured via Chrome DevTools iPhone 15 Pro emulation (393x852, iOS Safari user agent, mobile, touch). The modal is the shared
useConfirmModalUI, identical to the MacOS web capture above.MacOS: Chrome / Safari