fix: payments is enabled when workspace is created offline#82981
fix: payments is enabled when workspace is created offline#82981francoisl merged 8 commits intoExpensify:mainfrom
Conversation
|
@ikevin127 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: aee161966e
ℹ️ 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".
src/libs/actions/Policy/Policy.ts
Outdated
| introSelected?.choice === CONST.ONBOARDING_CHOICES.TRACK_WORKSPACE || | ||
| introSelected?.choice === CONST.ONBOARDING_CHOICES.PERSONAL_SPEND |
There was a problem hiding this comment.
Ignore stale intro choice when setting reimbursement default
This condition lets introSelected?.choice override the current workspace intent, so users whose persisted intro choice is TRACK_WORKSPACE or PERSONAL_SPEND will get reimbursementChoice = reimburseNo even when the new workspace is being created with a non-track intent (or via flows that default to MANAGE_TEAM); I traced this against createWorkspace() defaulting engagementChoice in src/libs/actions/Policy/Policy.ts and this now makes newly created workspaces appear with payments disabled/offline-only behavior (e.g., pay button gating via canIOUBePaid) until a server round-trip corrects it, if any.
Useful? React with 👍 / 👎.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.mp4Android: mWeb Chromeandroid-mweb.mp4iOS: HybridAppios.moviOS: mWeb Safariios-mweb.movMacOS: Chrome / Safariweb.mov |
ikevin127
left a comment
There was a problem hiding this comment.
👇 This and some tests are failing which are related to the changes, that must be resolved before approval.
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Fine for product
ikevin127
left a comment
There was a problem hiding this comment.
Once this 👇 is fixed, I will approve and we can merge 🟢
|
thanks @ikevin127, i updated |
ikevin127
left a comment
There was a problem hiding this comment.
🟢 LGTM
Failing test does not seem related to this PRs changes.
|
@francoisl all looks good now |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @francoisl 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/francoisl in version: 9.3.31-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.31-12 🚀
|
Explanation of Change
Fixed Issues
$ #82276
PROPOSAL: #82276 (comment)
Tests
Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
and.mov
Android: mWeb Chrome
and.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web.mov