Skip to content

[CP Staging] Revert "Merge pull request #101226 from lorretheboy/fix-v2/95750" - #103057

Merged
MonilBhavsar merged 3 commits into
mainfrom
monil-revertBBAFlow
Oct 5, 2026
Merged

MonilBhavsar merged 3 commits into
mainfrom
monil-revertBBAFlow

Conversation

@MonilBhavsar

@MonilBhavsar MonilBhavsar commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Reverts PR #101226
This reverts commit 06d44f6, reversing changes made to 901155d.

Explanation of Change

Fixed Issues

$ #102967
PROPOSAL:

Tests

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."

  • 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
  • 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 followed proper code patterns (see Reviewing the code)
    • 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 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)
  • 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)
  • 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 the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • 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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

This reverts commit 06d44f6, reversing
changes made to 901155d.
@MonilBhavsar
MonilBhavsar requested review from a team as code owners October 5, 2026 15:53
@melvin-bot
melvin-bot Bot requested review from JmillsExpensify and removed request for a team October 5, 2026 15:53
@melvin-bot
melvin-bot Bot requested review from chuckdries and removed request for a team October 5, 2026 15:54
@melvin-bot

melvin-bot Bot commented Oct 5, 2026

Copy link
Copy Markdown

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T16:11:18.643687Z 85037a0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@MonilBhavsar MonilBhavsar changed the title Revert "Merge pull request #101226 from lorretheboy/fix-v2/95750" [CP Staging] Revert "Merge pull request #101226 from lorretheboy/fix-v2/95750" Oct 5, 2026

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

Copy link
Copy Markdown

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: 85037a02b5

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +251 to +253
(isGroupPolicy(policy) &&
getReimbursementChoice(policy) === CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_MANUAL &&
canMemberWrite(policy, currentUserLogin, CONST.POLICY.POLICY_FEATURE.WORKFLOWS_PAYMENTS));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve pay access for direct-reimbursement admins

When a workspace uses REIMBURSEMENT_YES and the current payments admin is not the designated reimburser or a sharee of the policy bank account, isReportPayer is false and this fallback now admits only REIMBURSEMENT_MANUAL. As a result, canIOUBePaid hides Pay for an otherwise authorized workspace admin, reintroducing the inability for admins to pay approved reports from an account available to them. The admin/payment-permission fallback needs to cover configured direct reimbursement as well.

Useful? React with 👍 / 👎.

Comment thread src/libs/ReportUtils.ts
// A paying admin can record `bankAccountID` on a workspace payment too, so the report type is what says
// whether this was an invoice, matching `getIOUReportActionDisplayMessage`.
const isFromInvoice = isInvoiceReport(report) && !!originalMessage?.bankAccountID;
const isFromInvoice = !!originalMessage?.bankAccountID;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restrict invoice copy to actual invoice reports

For a normal workspace expense paid by VBBA with a recorded bankAccountID, this condition classifies the payment as an invoice even though report is not an invoice. The function consequently returns settleInvoicePersonal/settleInvoiceBusiness copy such as “paid $100 with personal account” instead of the workspace bank-account wording, and may omit the digits for viewers who do not have the payer's account locally. Include isInvoiceReport(report) in this classification; the duplicated English report-action branch needs the same correction.

Useful? React with 👍 / 👎.

Comment on lines 533 to 534
reportActions,
canNonPayerAdminPay: true,
}) && allExpensesHeld;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Enable admin pay checks in the all-held branch

When every expense is held on a manual-reimbursement report, this preliminary isPrimaryPayAction call omits canNonPayerAdminPay: true, unlike the regular Pay check below. A non-designated admin with workflow-payment permission can therefore pay the report when expenses are unheld but fails isPayActionWithAllExpensesHeld, so the primary action does not redirect them to Remove hold even when expensesToHold confirms they can unhold the expenses.

Useful? React with 👍 / 👎.

@JmillsExpensify JmillsExpensify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No product review required.

@codecov

codecov Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

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.

Files with missing lines Coverage Δ
...s/LHNOptionsList/OptionRowLHN/OptionRowLHNData.tsx 88.15% <ø> (-0.16%) ⬇️
...arch/SearchList/ListItem/ExpenseReportListItem.tsx 0.00% <ø> (ø)
...earch/SearchList/ListItem/ReportListItemHeader.tsx 91.25% <ø> (ø)
.../SearchList/ListItem/TransactionListItem/index.tsx 0.00% <ø> (ø)
src/components/SettlementButton/index.tsx 74.28% <ø> (-0.25%) ⬇️
src/hooks/usePaymentContext.tsx 73.33% <ø> (-0.87%) ⬇️
src/hooks/useSearchBulkActions.ts 76.72% <100.00%> (ø)
src/libs/PolicyUtils.ts 89.02% <ø> (-0.10%) ⬇️
src/libs/ReportAlternateTextUtils.ts 92.15% <ø> (ø)
src/libs/ReportNameUtils.ts 81.64% <100.00%> (-0.04%) ⬇️
... and 13 more
... and 11 files with indirect coverage changes

@MonilBhavsar
MonilBhavsar merged commit 4e09ca2 into main Oct 5, 2026
41 checks passed
@MonilBhavsar
MonilBhavsar deleted the monil-revertBBAFlow branch October 5, 2026 17:12
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

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

@OSBotify

OSBotify commented Oct 5, 2026

Copy link
Copy Markdown
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.

@os-botify os-botify Bot mentioned this pull request Oct 5, 2026
43 tasks done
@OSBotify OSBotify added the CP Staging marks PRs that have been CP'd to staging label Oct 5, 2026
puneetlath pushed a commit that referenced this pull request Oct 5, 2026
[CP Staging] Revert "Merge pull request #101226 from lorretheboy/fix-v2/95750"

(cherry picked from commit 4e09ca2)

(cherry-picked to staging by puneetlath)
puneetlath added a commit that referenced this pull request Oct 5, 2026
…37349012534-1

🍒 Cherry pick PR #103057 to staging 🍒
@OSBotify OSBotify mentioned this pull request Oct 5, 2026
59 tasks done
@OSBotify

OSBotify commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/MonilBhavsar in version: 9.5.2-3 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update is needed. This PR reverts Allow any workspace admin to pay reports before it reached production. The live article still describes the restored behavior: "The authorized payer and workspace admins the bank account has been shared with can pay reports."

One follow-up: the draft docs PR for the reverted change, [No QA] Docs updates for E/A#101226 Let any admin pay with connected bank account, would now make that article wrong. Close it, or hold it until the change relands.


view run

@OSBotify

OSBotify commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/Julesssss in version: 9.5.2-4 🚀

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

Bundle Size Analysis (Sentry):

@OSBotify

OSBotify commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/MonilBhavsar in version: 9.5.3-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update is needed. My earlier answer still holds: this revert shipped to production in 9.5.2-4 together with the change it undoes, so users never saw Allow any workspace admin to pay reports. The article still matches production: "The authorized payer and workspace admins the bank account has been shared with can pay reports."

The draft [No QA] Docs updates for E/A#101226 Let any admin pay with connected bank account is still open. Merging it would make that sentence wrong. Close it, or hold it until the change is merged again.


view run

@OSBotify

OSBotify commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/puneetlath in version: 9.5.3-4 🚀

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

Bundle Size Analysis (Sentry):

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

Labels

CP Staging marks PRs that have been CP'd to staging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants