[CP Staging] fix regression from #69644: Invoice - To field on confirm page has right caret when sending invoice from invoice room#71648
Conversation
…invoice from invoice room
|
@cristipaval 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari20251001115912324.mp4MacOS: Desktop |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Co-authored-by: ahmedGaber93 <41129870+ahmedGaber93@users.noreply.github.com>
|
Also add in test steps Precondition: |
This action was merged into main 10 hours ago here #70394, It looks we should fix every issue here https://github.com/Expensify/App/actions/runs/18157150347/job/51679597610?pr=71648 @TaduJR To run it locally, do any change to This link can help https://react.dev/reference/eslint-plugin-react-hooks/lints/preserve-manual-memoization |
There was a problem hiding this comment.
Changes LGTM! We just still need to pass the new action react-compiler-compliance-check, All the compiler issues are optimization tips that already exist in production and on the latest main branch, so they’re not related to this PR.
I’ve approved this PR since it’s a deployment blocker. I’ll leave it to the internal engineer to decide whether to wait for @TaduJR to fix them or proceed with merging.
CC @mountiny
|
Skipping compiler check for this component as it already exists. |
|
@Julesssss looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.2.21-3 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
Resolved ✅ |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.2.21-4 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.2.21-4 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.2.22-1 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.2.22-6 🚀
|
Explanation of Change
Fixed a bug where the "To" field on the invoice confirmation page was incorrectly showing a right caret icon and appearing interactive when sending an invoice from an invoice room, even though the recipient is already determined and cannot be changed in this context.
Root Cause:
App/src/components/MoneyRequestConfirmationList.tsx
Lines 813 to 818 in fa5e06d
The preferred policy restriction feature added an exception for invoices (|| isTypeInvoice) to ensure they remain interactive despite workspace restrictions. However, this exception was too broad and applied to ALL invoice scenarios, including invoice rooms where the recipient is already locked in.
The Fix:
Modified the logic to require isCreateExpenseFlow for both regular expenses AND the invoice exception. This ensures the invoice exception only applies during the global create flow (FAB → Send invoice), not when sending invoices from invoice rooms where the recipient is predetermined.
Fixed Issues
$ #71633
PROPOSAL: #69644 (comment)
Tests
Precondition: Invoice is enabled.
- Open FAB → Send invoice
- Select a recipient
- Enter amount → Next
- Verify the "To" field shows a right caret icon
- Verify clicking the "To" field allows changing the recipient
- Open FAB → Send invoice
- Send an invoice to any user
- Open the created invoice room
- Click + → Send invoice
- Enter amount → Next
- Verify the "To" field does NOT show a right caret icon
- Verify the "To" field is NOT clickable/interactive
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop