Skip to content

Clarify Approval Options When Held Expenses Exist#70825

Merged
marcochavezf merged 68 commits intoExpensify:mainfrom
mkzie2:mkzie2-issue/70383
Feb 21, 2026
Merged

Clarify Approval Options When Held Expenses Exist#70825
marcochavezf merged 68 commits intoExpensify:mainfrom
mkzie2:mkzie2-issue/70383

Conversation

@mkzie2
Copy link
Contributor

@mkzie2 mkzie2 commented Sep 18, 2025

Explanation of Change

Fixed Issues

$ #70383
PROPOSAL: #70383 (comment)

Tests

  1. Go to ND
  2. Go to WS chat
  3. Create 2 expenses
  4. Mark 1 of them as hold
  5. Submit
  6. Verify that we have 2 options to approve the expense (Partial and full)
  7. Verify that both ways to approve expense work correctly
  • Verify that no errors appear in the JS console

Offline tests

  1. Go to WS chat
  2. Create 2 expenses
  3. Mark 1 of them as hold
  4. Go offline
  5. Submit
  6. Verify that we have 2 options to approve the expense (Partial and full)
  7. Verify that both ways to approve expense work correctly

QA Steps

  1. Go to ND
  2. Go to WS chat
  3. Create 2 expenses
  4. Mark 1 of them as hold
  5. Submit
  6. Verify that we have 2 options to approve the expense (Partial and full)
  7. Verify that both ways to approve expense work correctly
  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified there are no new alerts related to the canBeMissing param for useOnyx
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
android.mov
Android: mWeb Chrome
android-web.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-web.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov

@mkzie2 mkzie2 marked this pull request as ready for review September 18, 2025 19:10
@mkzie2 mkzie2 requested a review from a team as a code owner September 18, 2025 19:10
@melvin-bot melvin-bot bot requested a review from parasharrajat September 18, 2025 19:10
@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2025

@parasharrajat 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]

@melvin-bot melvin-bot bot removed the request for review from a team September 18, 2025 19:10
@mkzie2 mkzie2 requested a review from a team as a code owner September 18, 2025 19:13
@shawnborton
Copy link
Contributor

Just to confirm, what line height are you using here?
CleanShot 2025-09-18 at 21 19 48@2x

I believe it should be 16px, which is what we'd have in Figma.

@mkzie2
Copy link
Contributor Author

mkzie2 commented Sep 19, 2025

Just to confirm, what line height are you using here? CleanShot 2025-09-18 at 21 19 48@2x

I believe it should be 16px, which is what we'd have in Figma.

@shawnborton I use default font size label that used for existing similar places which is dynamic across devices with default value is 13 and maximum value is 19

keepAll: 'Mantener todos',
confirmApprove: 'Confirmar importe a aprobar',
confirmApprovalAmount: 'Aprueba sólo los gastos conformes, o aprueba todo el informe.',
confirmApprovalWithHeldAmount: 'El informe contiene gastos retenidos. ¿Aprobar sólo los gastos conformes, o aprobar todo el informe?',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was it confirmed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated the correct translation

text={translate('iou.approve')}
/>
);
})(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please a new component for this instead?

@shawnborton
Copy link
Contributor

I use default font size label that used for existing similar places which is dynamic across devices with default value is 13 and maximum value is 19

I'm talking about the line height. Can you confirm the line height size?

/**
* Generates dropdown options for approve button when there are held expenses
*/
function getApprovalDropdownOptions(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's move this function to the new component

@mkzie2
Copy link
Contributor Author

mkzie2 commented Sep 23, 2025

Hi @shawnborton, currently I don't set any line-height here, it will be default value based on font size. However, I see in our codebase, we have dynamic line height from 16 - 21. I could update to add it. The result will look like this.

For my screen size, it uses 16px for line height

image

@mkzie2
Copy link
Contributor Author

mkzie2 commented Sep 23, 2025

@parasharrajat I have resolved all your comments. Kindly check again. Thanks

shouldUseOptionIcon?: boolean;

/** Used to apply styles specifically to the header text */
headerStyles?: StyleProp<TextStyle>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename this to be more suitable for the purpose it serves. Let's be clear whose header.

keepAll: 'Mantener todos',
confirmApprove: 'Confirmar importe a aprobar',
confirmApprovalAmount: 'Aprueba sólo los gastos conformes, o aprueba todo el informe.',
confirmApprovalWithHeldAmount: 'El informe contiene gastos retenidos. ¿Aprobar sólo los gastos conformes, o aprobar todo el informe?',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was it confirmed?

onPress={() => confirmApproval()}
/>
),
[CONST.REPORT.REPORT_PREVIEW_ACTIONS.APPROVE]: (() => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not look like you updated this?


return {
options,
menuHeaderText: translate('iou.confirmApprovalWithHeldAmount'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you directly add this in component?

return {
options,
menuHeaderText: translate('iou.confirmApprovalWithHeldAmount'),
shouldShowDropdown,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed. Let's just add the check directly where needed.

/**
* Generates dropdown options for approve button when there are held expenses
*/
function getApprovalDropdownOptions(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Convert params to object.

Comment on lines +57 to +58
onApprovePartial: () => void,
onApproveFull: () => void,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
onApprovePartial: () => void,
onApproveFull: () => void,
onPartialApprove: () => void,
onFullApprove: () => void,

});
}
}}
onConfirmApproval={confirmApproval}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this doing now? Can we just use onApprove?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so because they are for different purpose. However, pls let me know your thoughts?

@parasharrajat
Copy link
Member

parasharrajat commented Oct 3, 2025

@mkzie2 Please merge main and add offline testing steps.

@codecov
Copy link

codecov bot commented Oct 7, 2025

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/components/ButtonWithDropdownMenu/index.tsx 74.61% <100.00%> (+0.19%) ⬆️
...rc/components/Icon/chunks/expensify-icons.chunk.ts 0.00% <ø> (ø)
src/styles/index.ts 46.31% <ø> (ø)
src/components/PopoverMenu.tsx 78.87% <95.45%> (+1.55%) ⬆️
src/components/MoneyReportHeaderKYCDropdown.tsx 0.00% <0.00%> (ø)
src/components/ProcessMoneyReportHoldMenu.tsx 0.00% <0.00%> (ø)
...ReportPreview/MoneyRequestReportPreviewContent.tsx 61.53% <8.33%> (+0.46%) ⬆️
src/components/ExpenseHeaderApprovalButton.tsx 0.00% <0.00%> (ø)
src/components/MoneyReportHeader.tsx 0.00% <0.00%> (ø)
... and 13 files with indirect coverage changes

icon: illustrations.DocumentCheck,
onSelected: onFullApprove,
keyForList: APPROVE_FULL,
subMenuHeaderText: translate('iou.confirmApprovalWithHeldAmount'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same?

@parasharrajat
Copy link
Member

BUG: Secondary menu does not close on approve action.

06.02.2026_18.27.41_REC.mp4

@mkzie2
Copy link
Contributor Author

mkzie2 commented Feb 10, 2026

@parasharrajat Fixed the bug and addressed the comments.

@parasharrajat
Copy link
Member

Screenshots

🔲 iOS / native

05.01.2026_16.01.42_REC.mp4

🔲 iOS / Safari

05.01.2026_16.14.30_REC.mp4

🔲 MacOS / Chrome

05.01.2026_16.17.00_REC.mp4

🔲 Android / Chrome

🔲 Android / native

06.02.2026_21.49.44_REC.mp4

Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified tests pass on all platforms & I tested again on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

🎀 👀 🎀 C+ reviewed

@melvin-bot melvin-bot bot requested a review from marcochavezf February 10, 2026 14:44
Copy link
Contributor

@marcochavezf marcochavezf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: Clarify Approval Options When Held Expenses Exist

PR Summary: This PR changes the approval flow when held expenses exist on a report. Instead of showing a single "Approve" button that opens a modal dialog, it now presents the approval options directly in the button's dropdown menu, making the two choices (partial vs. full approval) visible before clicking.

Files changed: 22 files, ~330 additions, ~170 deletions


Architecture & Design

Well-structured extraction: The new ExpenseHeaderApprovalButton component is a clean extraction that encapsulates the conditional logic for rendering either a dropdown (when held expenses exist) or a simple button. The getApprovalDropdownOptions helper being exported separately and reused in MoneyReportHeader for secondary actions is a good pattern that avoids duplication.

Clean separation of concerns: Removing the approval logic from ProcessMoneyReportHoldMenu so it only handles the pay hold flow is a meaningful simplification. The component went from handling two concerns (approve + pay) to just one (pay), which removes several hooks (usePermissions, violation checks) that are no longer needed there.


Potential Issues & Questions

  1. Fallback when shouldShowDropdown is true but approvalOptions.length <= 1:
    In ExpenseHeaderApprovalButton, when shouldShowDropdown is true but the options array has only one entry (the full-approval option because hasOnlyHeldExpenses is true or hasValidNonHeldAmount is false), the code falls through to the plain Button that calls onApprove(true). This is correct behavior -- if all expenses are held, a dropdown with a single option would be awkward. However, the onApprove callback in MoneyReportHeader always calls approveMoneyRequest with the isFullApproval parameter directly, bypassing the old confirmApproval path. This means the delegate access check and the DWE modal check that exist in confirmApproval are not invoked through the ExpenseHeaderApprovalButton path. The isDelegateAccessRestricted guard is inside ExpenseHeaderApprovalButton controlling whether to show the dropdown, but it does not prevent the plain Button from firing onApprove(true) when shouldShowDropdown is false. Is this intentional? The old code path routed through confirmApproval which checked for DWE and delegate access. Please verify that the new flow does not bypass these checks when held expenses exist.

  2. onPress={() => {}} on ButtonWithDropdownMenu:
    In ExpenseHeaderApprovalButton, the onPress handler is an empty function () => {}. Looking at ButtonWithDropdownMenu, onPress is typically invoked when the main button area is clicked. With shouldAlwaysShowDropdownMenu set to true, the dropdown always opens, so the empty onPress is effectively a no-op. This works but is a minor code smell -- consider adding a comment explaining why onPress is intentionally empty, or consider whether the component API could be improved to not require it.

  3. hasNonHeldExpenses prop removed from ProcessMoneyReportHoldMenu rendering:
    In MoneyRequestReportPreviewContent, the ProcessMoneyReportHoldMenu no longer receives hasNonHeldExpenses. Looking at the diff, it seems hasNonHeldExpenses was removed from the JSX but is still expected by the component's type definition. Actually, I see it's not in the diff for that file -- let me re-check. It appears hasNonHeldExpenses was removed in the MoneyRequestReportPreviewContent rendering but the component still accepts it. This is fine as it has no default, but please double-check that the payment hold modal still renders correctly without hasNonHeldExpenses being passed. Edit: I see on closer inspection it is still not passed in the new code at line ~908. The component type still has hasNonHeldExpenses but it's no longer passed. This could cause the prompt text to always show the "all held" message variant even when there are non-held expenses in the pay flow.

  4. PopoverMenu currentHeaderText computation traverses all sub-menu indexes:
    The useMemo in PopoverMenu iterates through enteredSubMenuIndexes to find the current header. This is correct for nested sub-menus, but the logic shouldAlwaysShowHeaderText is set from the last traversed item's subMenuHeaderText. If a parent item has subMenuHeaderText but a child does not, shouldAlwaysShowHeaderText becomes false. This seems intentional but could be fragile for deeper nesting scenarios.

  5. Key change in renderHeaderText:
    The key changed from "header-text" to a template literal \${currentHeaderText}_${shouldPutHeaderTextAfterBackButton}``. This will cause React to unmount/remount the Text component whenever the header text changes, rather than just updating it. This may cause a brief flash or animation reset. If the intent is to trigger a re-render, a comment explaining this would be helpful.


Minor Notes

  • The SVG file document-check.svg is missing a trailing newline. While this is cosmetic, it can cause "no newline at end of file" warnings.
  • The lineHeightNormal style addition in src/styles/index.ts is clean and follows the existing pattern.
  • Language file changes are consistent across all 10 locale files -- the old 3 keys (confirmApprove, confirmApprovalAmount, confirmApprovalAllHoldAmount) are properly replaced with the single confirmApprovalWithHeldAmount key.

Overall Assessment

This is a solid improvement to the UX. The approach of surfacing approval options directly in the dropdown rather than behind a modal is a meaningful usability win. The code is well-organized with the new ExpenseHeaderApprovalButton component. The main concern is around item (1) above -- ensuring the delegate access and DWE checks are not bypassed in the new approval flow when held expenses are present.

@codex review @claude review

🤖 This comment was generated with the assistance of an AI tool.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0656dabff8

ℹ️ 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".

Comment on lines +997 to +1000
const onApprove = (isFullApproval: boolean) => {
startApprovedAnimation();
approveMoneyRequest(moneyRequestReport, policy, accountID, email ?? '', hasViolations, isASAPSubmitBetaEnabled, nextStep, betas, isFullApproval);
if (currentSearchQueryJSON) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve approval guard checks in header approve callback

This callback now invokes approveMoneyRequest directly, bypassing the confirmApproval gating logic in the same component. As a result, approvals from this path no longer stop for dynamic external workflow accounts (hasDynamicExternalWorkflow && !isDEWBetaEnabled) or delegate-restricted users, so those users can trigger approval requests instead of seeing the expected blocking modal flow.

Useful? React with 👍 / 👎.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like something new @mkzie2

Comment on lines +611 to +614
onApprove={(isFullApproval) => {
startApprovedAnimation();
approveMoneyRequest(
iouReport,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reapply DEW/delegate checks in preview approve handler

The preview approve handler now directly calls approveMoneyRequest instead of routing through confirmApproval, which means the dynamic external workflow check and delegate-access block are skipped on this screen. In DEW-nonbeta or delegate-restricted contexts, pressing Approve here can execute an approval request when the previous behavior was to show the corresponding modal restriction.

Useful? React with 👍 / 👎.

Comment on lines +905 to +909
<ProcessMoneyReportHoldMenu
nonHeldAmount={!hasOnlyHeldExpenses && hasValidNonHeldAmount ? nonHeldAmount : undefined}
fullAmount={fullAmount}
onClose={() => setIsHoldMenuVisible(false)}
isVisible={isHoldMenuVisible}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Pass non-held-expense flag to preview hold payment modal

ProcessMoneyReportHoldMenu still uses hasNonHeldExpenses to decide whether to show the partial-payment option and non-held prompt, but this invocation no longer passes that prop. For reports that have both held and non-held expenses, the preview pay flow will now always render the "all held" variant and hide the "pay only" path.

Useful? React with 👍 / 👎.

@parasharrajat
Copy link
Member

I will check these things tomorrow.

@mkzie2
Copy link
Contributor Author

mkzie2 commented Feb 20, 2026

I applied the suggestions.

@marcochavezf marcochavezf merged commit a3a3d53 into Expensify:main Feb 21, 2026
31 checks passed
@github-actions
Copy link
Contributor

🚧 @marcochavezf has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/marcochavezf in version: 9.3.25-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 failure ❌
🍎 iOS 🍎 cancelled 🔪

mkzie2 added a commit to mkzie2/App that referenced this pull request Feb 24, 2026
@mkzie2 mkzie2 mentioned this pull request Feb 24, 2026
52 tasks
puneetlath added a commit that referenced this pull request Feb 24, 2026
OSBotify pushed a commit that referenced this pull request Feb 24, 2026
reverts #70825

(cherry picked from commit 6c617bd)

(cherry-picked to staging by puneetlath)
@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/puneetlath in version: 9.3.25-13 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants