Repository navigation
Show the generic Control upgrade page for the Auto-pay approved reports toggle - #102660
Conversation
Co-authored-by: Fitsum Abebe <FitseTLT@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
|
request my review @MelvinBot |
|
🤖 Requested your review, |
|
@MelvinBot make it ready |
|
🤖 I couldn't mark this PR as ready for review. This run doesn't allow me to change a PR's draft status, so the PR is still a draft.
Before you do, please fill in the Tests and QA Steps sections of the PR body. They still contain the TODO placeholders, and only a human co-author can complete them. The steps from the web test run above will work for both. |
|
@MelvinBot merge main |
…trolUpgradeForAdvancedWorkflows Co-authored-by: Fitsum Abebe <FitseTLT@users.noreply.github.com>
|
@MelvinBot Are you sure you are only changing the behavior for autoPayApprovedReports that's the aim on the OP of the issue right? |
|
No. This PR changes all three Workflows > Advanced toggles, not only The change is at UpgradeIntro.tsx:111-117. With this PR, each of these toggles opens the generic "Upgrade to the Control plan" page:
The PR doesn't change any other upgrade feature. The approved proposal also covers all three ids. If you want only Auto-pay changed, reply |
You are wrong. Pay attention to the logic of the op |
Prevent self-approval and Auto-approve compliant reports are approval features, so they keep the Advanced Approvals upgrade copy. Co-authored-by: Fitsum Abebe <FitseTLT@users.noreply.github.com>
|
You're right, and I've narrowed the PR to only change Auto-pay. The issue says Auto-pay (auto-reimbursement) needs Control but not advanced approvals. That reasoning doesn't apply to Prevent self-approval or Auto-approve compliant reports, which are approval features. I pushed the fix in commit eb5e870.
|
|
@MelvinBot complete checklist TestsPrecondition: an admin on a Collect workspace (not Control). Workflows enabled on that workspace.
Offline testsSame as tests. QA StepsSame as tests. |
|
I updated the PR description:
The Screenshots/Videos sections are still empty. Please add screenshots or videos for each platform before review. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp2026-10-08.20-29-47.mp4Android: mWeb Chrome2026-10-08.20-26-50.mp4iOS: HybridAppiOS: mWeb Safari2026-10-08.20-25-15.mp4MacOS: Chrome / Safari2026-10-08.20-24-44.mp4 |
|
@MelvinBot make it ready |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@chuckdries 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] |
| @@ -134,7 +135,7 @@ function UpgradeIntro({feature, onUpgrade, buttonDisabled, loading, isCategorizi | |||
|
|
|||
| const getOnlyAvailableOnPlanHTML = () => { | |||
| const planParams = {formattedPrice, hasTeam2025Pricing}; | |||
There was a problem hiding this comment.
❌ CONSISTENCY-2 (docs)
This modified condition compares feature.id against the hardcoded strings 'preventSelfApproval' and 'autoApproveCompliantReports', but these feature IDs are already defined as named constants in CONST.UPGRADE_FEATURE_INTRO_MAPPING (src/CONST/index.ts). This is inconsistent with the same PR, which correctly references CONST.UPGRADE_FEATURE_INTRO_MAPPING.autoPayApprovedReports.id on line 110. Using the raw strings risks silent breakage if the IDs ever change and reduces readability.
Reference the constants instead:
if (
feature.id === CONST.UPGRADE_FEATURE_INTRO_MAPPING.preventSelfApproval.id ||
feature.id === CONST.UPGRADE_FEATURE_INTRO_MAPPING.autoApproveCompliantReports.id
) {
return translate('workspace.upgrade.approvals.onlyAvailableOnPlan', planParams);
}Reviewed at: eb5e870 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
There was a problem hiding this comment.
Agreed. The PR already uses the CONST id for autoPayApprovedReports, so the other two ids should match. I switched the check to CONST.UPGRADE_FEATURE_INTRO_MAPPING.preventSelfApproval.id and CONST.UPGRADE_FEATURE_INTRO_MAPPING.autoApproveCompliantReports.id in 75b60a6. Nothing else changed.
Typecheck, lint, and tests/ui/WorkspaceUpgradeTest.tsx (16/16) pass.
Co-authored-by: Fitsum Abebe <FitseTLT@users.noreply.github.com>
|
@madmax330 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] |
|
The failing Analysis: fix: follow-up #100567 merged today. It changed Evidence: This PR changes only Next step: Someone needs to fix this on |
This comment has been minimized.
This comment has been minimized.
|
We've fixed lint in main, merging main should fix it here |
|
@MelvinBot merge main |
…trolUpgradeForAdvancedWorkflows Co-authored-by: Fitsum Abebe <FitseTLT@users.noreply.github.com>
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #101252 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
@chuckdries over to you |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 chuckdries 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/chuckdries in version: 9.5.7-0 🚀
|
|
No help site update is needed. This PR only changes the copy on the upgrade page for Auto-pay approved reports, and no help article describes that page as Advanced Approvals content. |




Explanation of Change
Auto-pay approved reports is a Control feature, but tapping its toggle on a Collect workspace opened the upgrade page with Advanced Approvals copy. Auto-pay doesn't require advanced approvals, it requires Control, so that copy was misleading.
UpgradeIntronow renders the existing generic "Upgrade to the Control plan" view (GenericFeaturesView) for theautoPayApprovedReportsfeature id. The resolvedfeatureobject is kept onWorkspaceUpgradePageon purpose, because it still drives:confirmUpgradeswitches onfeature.id),requiredPlan(otherwise a Submit workspace would fall back to Collect),featureNametoupgradeToCorporate.Prevent self-approval and Auto-approve compliant reports are approval features, so they keep the Advanced Approvals upgrade page. The
getOnlyAvailableOnPlanHTMLapprovals case now covers only those two ids.UI tests check that Auto-pay shows the Control title and not the Advanced Approvals title, and that the other two toggles still show the Advanced Approvals title.
AI tests (run by MelvinBot):
npm run typecheck✅,npm run linton the changed files ✅,tests/ui/WorkspaceUpgradeTest.tsx✅ (16/16). Not run locally: oxfmt formatting check, the full Jest suite, and the Storybook smoke test (no stories touched).Fixed Issues
$ #101252
PROPOSAL: #101252 (comment)
Tests
Precondition: an admin on a Collect workspace (not Control). Workflows enabled on that workspace.
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)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