feat: Support partial approval from Reports page#85194
feat: Support partial approval from Reports page#85194puneetlath merged 14 commits intoExpensify:mainfrom
Conversation
|
@eVoloshchak 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] |
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: 2b784e8765
ℹ️ 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".
| if (hasHeldExpense) { | ||
| onHoldMenuOpen?.(item as TransactionReportGroupListItemType, CONST.IOU.REPORT_ACTION_TYPE.APPROVE); | ||
| return; |
There was a problem hiding this comment.
Add fallback when hold-menu callback is absent
The new approve-with-hold path returns immediately after onHoldMenuOpen?.(...), but that callback is optional and several existing callers still omit it (for example src/components/SelectionListWithSections/Search/TransactionListItem.tsx calls handleActionButtonPress without onHoldMenuOpen). Because this same commit also allows APPROVE on held reports in getActions(), those call sites can now show an Approve action that does nothing (no navigation and no approval request) when a held expense is present.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I updated to call goToItem if onHoldMenuOpen is not present.
trjExpensify
left a comment
There was a problem hiding this comment.
@puneetlath you closed the parent issue, are we actually proceeding with this? #78046 (comment)
|
Ok, reopened. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-03-20.at.12.13.08.movAndroid: mWeb ChromeScreen.Recording.2026-03-20.at.12.09.37.moviOS: HybridAppScreen.Recording.2026-03-20.at.12.04.27.moviOS: mWeb SafariScreen.Recording.2026-03-20.at.11.59.14.movMacOS: Chrome / SafariScreen.Recording.2026-03-20.at.11.56.31.mov |
| const snapshotPolicy = mockSnapshotForItem?.data?.[`${ONYXKEYS.COLLECTION.POLICY}${mockReportItemWithHold.policyID}`] ?? {}; | ||
|
|
||
| test('Should navigate to item when report has one transaction on hold', () => { | ||
| test('Should not navigate to item when report has one transaction on hold and action is approve', () => { |
There was a problem hiding this comment.
Should we also test that the Hold modal is shown? And test what happens when the two different buttons on the modal are pressed?
There was a problem hiding this comment.
@puneetlath I updated the test to verify the onHoldMenuOpen callback is called.
|
Left a couple comments. Also there are conflicts. @trjExpensify are you good with going forward with this functionality? If so, mind updating your review? |
|
I'm cool with it, though I do find it a bit strange now that you see this |
Interesting. Why is this @nkdengineer? Is that just because it's a separate thing we need to implement? |
|
@puneetlath We discussed this in the issue and decided to keep the bulk action as it's here. |
|
@puneetlath Any thoughts on my comment above? |
|
@puneetlath Friendly bump. |
|
Sorry for the delay. I re-read the context and I'm ok with going forward with this as-is in the PR. I think we should follow-up with making it possible via bulk-select as well, but it's a bigger project given the considerations, so I think we should just go forward with this for now. Can you go ahead and fix the conflicts @nkdengineer? Does that work for you @trjExpensify? If so, mind updating your review? |
Done. |
|
ESLint is failing @nkdengineer |
trjExpensify
left a comment
There was a problem hiding this comment.
I'm cool with doing the bulk select as a follow-up. 👍
|
@nkdengineer bump on the eslint issue. |
|
@puneetlath I fixed |
|
Thanks @nkdengineer but there are conflicts now. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @puneetlath 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/puneetlath in version: 9.3.67-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help site update needed — draft PR created. PR #85194 adds partial approval support from the Reports page for reports with held expenses. The existing Changes made to
Draft PR: #89640 |
Explanation of Change
feat: Support partial approval from Reports page
Fixed Issues
$ #78046
PROPOSAL:
Tests
Precondition: Approval is enabled
Approvebutton appears on this reportApprovebuttonOffline tests
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-03-13.at.14.20.19.mov