[CP Staging] Revert "Show Create Report CTA for users without a workspace"#86583
[CP Staging] Revert "Show Create Report CTA for users without a workspace"#86583
Conversation
|
@mjasikowski 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] |
|
🚧 @marcaaron 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! 🧪🧪
|
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.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bc513a870a
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (shouldNavigateToUpgradePath) { | ||
| const freshReportID = generateReportID(); | ||
| const freshTransactionID = generateReportID(); |
There was a problem hiding this comment.
Gate upgrade routing until policy data is loaded
This branch can run before ONYXKEYS.COLLECTION.POLICY has hydrated: usePolicyForMovingExpenses() returns no policy during initial load, so shouldNavigateToUpgradePath becomes true and pressing “Create report” can incorrectly send users who already have workspaces to the upgrade flow. The previous shared action guarded this decision until policy data was loaded, so this is a regression in startup/race scenarios.
Useful? React with 👍 / 👎.
| if (action === ModalActions.CONFIRM) { | ||
| openOldDotLink(CONST.OLDDOT_URLS.INBOX); |
There was a problem hiding this comment.
Preserve HybridApp classic redirect handling
On confirm this now always calls openOldDotLink, which bypasses the HybridApp-specific redirect flow used elsewhere (closeReactNativeApp with NVP/GPS handling). In Hybrid builds, choosing “Go to Expensify Classic” from this entry point can therefore behave differently from the expected mobile flow and leave state handling inconsistent.
Useful? React with 👍 / 👎.
|
uh what how does this have conflicts now 🥲 |
# Conflicts: # src/hooks/useCreateReportAction.tsx
|
lol this revert is annoying 😄 |
Update shouldRestrictUserBillableActions parameter order to match current signature and remove tests for deleted useCreateReportAction hook.
Reverts #85570
Fixes
$ #86563
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.