fix: Receipt section isn't grayed out#85202
Conversation
|
@Krishna2323 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: f98308b101
ℹ️ 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".
| return undefined; | ||
| } | ||
| if (isDisplayedInWideRHP) { | ||
| return transaction?.pendingFields?.[fieldPath] ?? pendingAction; |
There was a problem hiding this comment.
Restrict wide-RHP receipt fallback to relevant pending fields
In wide RHP, getPendingFieldAction now falls back to the transaction-level pendingAction whenever pendingFields[fieldPath] is empty, which makes the receipt area appear pending for unrelated offline edits. For example, if only amount is edited offline (pendingAction: UPDATE, no pendingFields.receipt), the receipt section still gets UPDATE and is grayed out even though receipt was untouched. This is a regression in single-transaction wide-RHP flows and should be limited to receipt-related pending state (or at least ADD cases) instead of any pending action.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
For example, if only amount is edited offline (pendingAction: UPDATE, no pendingFields.receipt)
@Krishna2323 It's incorrect because when editing the field, we don't change the transaction's pendingAction, we only update the pendingFields of the changed field.
JmillsExpensify
left a comment
There was a problem hiding this comment.
Fix looks good to me.
|
@nkdengineer could you please merge main again? There was an issue on iOS native: https://expensify.slack.com/archives/C05LX9D6E07/p1773753991898119 |
|
@Krishna2323 Done. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid_native.mp4Android: mWeb Chromeandroid_chrome.mp4iOS: HybridAppios_native.mp4iOS: mWeb Safariios_safari.mp4MacOS: Chrome / Safariweb_chrome.mp4 |
|
🚧 @grgia 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! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/grgia in version: 9.3.40-0 🚀
|
|
🚀 Deployed to staging by https://github.com/grgia in version: 9.3.40-0 🚀
|
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.3.41-4 🚀
|
Explanation of Change
fix: Receipt section isn't grayed out
Fixed Issues
$ #84314
PROPOSAL: #84314 (comment)
Tests
Offline tests
Same
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-03-13.at.15.03.41.mov
Android: mWeb Chrome
Screen.Recording.2026-03-13.at.14.57.26.mov
iOS: Native
Screen.Recording.2026-03-13.at.15.01.15.mov
iOS: mWeb Safari
Screen.Recording.2026-03-13.at.14.58.30.mov
MacOS: Chrome / Safari
Screen.Recording.2026-03-13.at.14.55.00.mov