[Payment due @Eskalifer1] fix: don't show DEW approve error next step for auto-approval failures - #96198
Conversation
Restore the automaticAction check removed in Expensify#79165 so auto-approval blocks keep the normal workflow next step while manual approval failures still show the error banner to the current approver.
|
@Eskalifer1 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] |
|
Hi! I will review it in a couple of hours 😃 |
|
its not ready for review yet sorry ... i am not sure if c+ is needed .. need to confirm with @sakluger |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Extract shouldShowDynamicExternalWorkflowApproveErrorNextStep so we can unit test that auto-approve failures keep the normal next step while manual failures still show the error banner for the current approver.
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Good for product
|
This is ready for review @sakluger .. Let us know if a C+ review would be needed |
|
@abzokhattab probably good to have a C+ review it. I see @Eskalifer1 is assigned to review it, that should be sufficient. |
|
Hi @sakluger, could you please add me to the workspace with DEW enabled(as stated in preconditions), so i could all test? My account is artemkryt1800+test2@gmail.com
|
|
Hi @sakluger gentle bump on comment above, thank you! |
|
@Eskalifer1 Sorry for the delay! I've added you to my workspace Tommy's Tasty Tacos (E72BDF3A9DBE334A) as an admin, and applied the |
|
Hi @abzokhattab, could you please pin-point where it was accidentally removed in #79165? I can't find that, If this has never been implemented, then the |
|
On more q: Do you plan to record videos for all other platforms? |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp96198-android-native.movAndroid: mWeb Chrome96198-android-web.moviOS: HybridApp96198-ios-native.moviOS: mWeb Safari96198-ios-web.movMacOS: Chrome / Safari96198-web.mov |
|
Hi @abzokhattab i have left 2 comment, let me know when you give an answer, thank you! |
|
done @Eskalifer1 |
|
🎯 @Eskalifer1, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
|
@sakluger no internal engineer was added to review this. How can i trigger that |
|
@Eskalifer1 can u approve again maybe this time a backend engineer will be assigned? |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 NicolasBonet 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! 🧪🧪
|
|
@MelvinBot can you prevent assigning reviewers on merged PRs? |
|
Good call — assigning a reviewer and requesting the checklist on an already-merged PR is just noise. This isn't controlled by any workflow in this repo (the reviewer-assignment + checklist request comes from the Melvin service), so it can't be fixed with an App PR. I filed a tracking issue to add a guard that skips reviewer assignment when the PR is already merged: https://github.com/Expensify/Expensify/issues/666894 |
|
🚀 Deployed to staging by https://github.com/NicolasBonet in version: 9.4.48-0 🚀
|
Help site review — no docs changes requiredI reviewed the changes in this PR against the help site files under Why: This is an internal bug fix that restores the It does not add, rename, or change any user-facing feature, workspace setting, tab, or button. The auto-approval feature itself is documented in Add-Approvals.md (the Auto-approve compliant reports setting), but that configuration flow and its labels are unchanged by this PR. The specific next-step message wording is computed UI that isn't described in any help article, so there is nothing to update. No draft docs PR was created. @abzokhattab, please confirm you agree no help site changes are needed here. If you believe a documented behavior did change, let me know and I'll draft the help site PR. |
|
@NicolasBonet @abzokhattab @Eskalifer1 Blocked from validating this PR because of this requirement |
|
@m-natarajan let me know if you need me to enable the DEW on one of your test workspaces. |
|
@sakluger We have the following DEW enabled accounts
|
Added for policy F7CEFC312A481080 @m-natarajan
|
|
🤖 Payment issue created: #97734 |
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.4.48-3 🚀
Bundle Size Analysis (Sentry): |

Explanation of Change
Restores the
automaticActioncheck for DEW approve failure next steps. The check was added during #79165's development in commitb59668317fb, but a later commit in the same PR (a9b205c73aa) accidentally dropped the condition while scoping the error to the current approver, so the intended behavior never shipped to main. When DEW blocks auto-approval (DEW_APPROVE_FAILEDwithautomaticAction: true), the report should keep the normal workflow next step (e.g. "Waiting for A to approve the report"). The red error next step should only appear for manual approval failures (automaticAction: false) when the current user is the approver.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/652010
PROPOSAL:
Tests
Prerequisites:
GENERIC_CATEGORY_THRESHOLD_AUTO_APPROVALon the workspace (by default this DEW blocks all auto-approval)0%so the report would normally auto-approve without DEWTest 1: Auto-approve blocked by DEW (customer regression)
Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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
Before
Screen.Recording.2026-07-17.at.01.54.11.mov
After
Screen.Recording.2026-07-17.at.01.54.20.mov