Skip to content

"No further action.." is shown in the next step briefly, then changes to "Waiting for admin" - #99896

Merged
rlinoz merged 6 commits into
Expensify:mainfrom
dukenv0307:fix/676299
Sep 15, 2026
Merged

rlinoz merged 6 commits into
Expensify:mainfrom
dukenv0307:fix/676299

Conversation

@dukenv0307

@dukenv0307 dukenv0307 commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Fixed Issues

$ #99898
PROPOSAL:

Tests

Preconditions:

  1. User A is collect workspace admin, invited User B and User C

  2. Submissions are set to Manual

  3. User C submitted an expense in the WS chat

  4. User A goes to the report

  5. User A sets User B as an Approver

  6. Sign in as User B

  7. Open the report from User C

  8. Click Approve button

  9. Observe the next step message

  • 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 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 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 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.
  • 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
Screen.Recording.2026-08-29.at.21.35.02.mov

@dukenv0307
dukenv0307 marked this pull request as ready for review August 31, 2026 10:52
@dukenv0307
dukenv0307 requested review from a team as code owners August 31, 2026 10:52
@melvin-bot
melvin-bot Bot requested review from dylanexpensify and huult and removed request for a team August 31, 2026 10:52
@melvin-bot

melvin-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown

@huult 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 August 31, 2026 10:52
@huult

This comment was marked as resolved.

@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: 8d9c24471a

ℹ️ 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 thread src/libs/NextStepUtils.ts Resolved
@marufsharifi

Copy link
Copy Markdown
Contributor

@huult, since I’m assigned to the issue associated with this PR, should I be the reviewer as well? I’ll take care of it. Thanks!

dylanexpensify
dylanexpensify previously approved these changes Aug 31, 2026

@dylanexpensify dylanexpensify 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.

Good from a product perspective

@marufsharifi

marufsharifi commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

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 that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • 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 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 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)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • 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
    • 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 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 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.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this 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.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Screen.Recording.2026-09-01.at.5.15.56.PM.mov
Android: mWeb Chrome
Screen_Recording_20260901_171812_Chrome.mp4
iOS: HybridApp
Screen.Recording.2026-09-01.at.5.27.02.PM.mov
iOS: mWeb Safari
Screen.Recording.2026-09-01.at.5.28.47.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2026-09-01.at.5.04.58.PM.mov

@dukenv0307

Copy link
Copy Markdown
Contributor Author

@marufsharifi kindly bump

@marufsharifi

Copy link
Copy Markdown
Contributor

I am still testing, i will let you know soon. thanks.

@dukenv0307 dukenv0307 changed the title Fix/676299 "No further action.." is shown in the next step briefly, then changes to "Waiting for admin" Sep 1, 2026
@marufsharifi

Copy link
Copy Markdown
Contributor

@dukenv0307, could you please take a look at this. thanks.

Screen.Recording.2026-09-02.at.3.27.44.PM.mov

@huult

huult commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@dylanexpensify Could you please unassign me? Thanks!

@dukenv0307
dukenv0307 removed the request for review from huult September 2, 2026 16:11
@dukenv0307

dukenv0307 commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor Author

@marufsharifi Can you please share the steps? I can't reproduce, is it our regression here?

Screen.Recording.2026-09-02.at.23.18.43.mov

@marufsharifi

Copy link
Copy Markdown
Contributor

@dukenv0307, here it is:

Steps to reproduce:

  1. Create three users: A, B, and C.
  2. Log in as User B.
  3. Go to Members and invite User A and User C.
  4. Set the workspace roles:
  • User A → Admin
  • User B → Owner
  • User C → Member
  1. Go to Workflows → Approval.
  2. Click Add approval workflow.
  3. On the Expenses page, select User C and click Next.
  4. On the Approver page, select User A.
  5. Log in as User C, create an expense, and submit it for approval.
  6. Log in as User A and approve the expense.
  7. Check the next-step message. It changes from "Waiting for you to approve expenses."
  8. After clicking Approve, the message briefly shows "Waiting for User B to pay expenses."
  9. After a moment, it changes to "Waiting for you to pay expenses."

Thanks.

@dukenv0307

Copy link
Copy Markdown
Contributor Author

@marufsharifi Can you please check it 1 more time? I think it's fixed on the BE side

@marufsharifi

Copy link
Copy Markdown
Contributor

@dukenv0307, could you please merge the main. thanks.

@marufsharifi

Copy link
Copy Markdown
Contributor

Test steps — Next Step briefly shows generic admin instead of the actual payer

Preconditions

  • Use a Collect workspace.
  • Have 3 users:
  • User A = Workspace admin / payer
  • User B = Approver, but not the payer
  • User C = Employee / expense submitter
  • Enable Workflows / Approvals.
  • Configure User C's expenses to be approved by User B.
  • Payments/reimbursements must be enabled.
  • User A must be the person responsible for paying the approved expense.

Steps

  1. Log in as User C.
  2. Create a new reimbursable expense, for example $20.
  3. Submit the expense.
  4. Log in as User B.
  5. Open User C's submitted Expense Report.
  6. Wait until the report is fully loaded.
  7. Disconnect the internet or set Chrome DevTools → Network → Offline.
  8. Click Approve.
  9. Observe the Next Step message at the top of the report.
  • Actual result while offline: it shows this message

Waiting for an admin to pay expenses.

  • Reconnect the internet, and it shows this message after reconnect

Waiting for User A to pay expenses.

Expected result

Immediately after approval, the correct payer should be shown:

Waiting for User A to pay expenses.

Screen.Recording.2026-09-05.at.11.50.04.AM.mov

@dukenv0307

Copy link
Copy Markdown
Contributor Author

I see, it should be BE bug. I'll let you know when the BE PR is deployed

@marufsharifi

Copy link
Copy Markdown
Contributor

@dukenv0307, could you please confirm whether the BE PR has been deployed yet? Thanks!

@dukenv0307

Copy link
Copy Markdown
Contributor Author

It's merged, will let you know when it's deployed

@dukenv0307

Copy link
Copy Markdown
Contributor Author

@marufsharifi It's deployed, all yours!

@marufsharifi

Copy link
Copy Markdown
Contributor

@dukenv0307, i am still able to reproduce the same issue. could you please check this.

RF-1.mov

@dukenv0307

Copy link
Copy Markdown
Contributor Author

@marufsharifi weird, it works on my side. I used the same steps here

Precondition:

Screenshot 2026-09-10 at 15 54 49

Steps:

Screen.Recording.2026-09-10.at.15.51.23.mov

@codecov

codecov Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Coverage Δ
src/libs/NextStepUtils.ts 89.65% <100.00%> (+0.07%) ⬆️
src/libs/PolicyUtils.ts 80.33% <100.00%> (ø)
... and 94 files with indirect coverage changes

@dukenv0307

Copy link
Copy Markdown
Contributor Author

ANW, I merged main. Could you please test it again 🙏 ? @marufsharifi

@marufsharifi

Copy link
Copy Markdown
Contributor

Test steps — Next Step briefly shows generic admin instead of the actual payer

Preconditions

  • Use a Collect workspace.
  • Have 3 users:
  • User A = Workspace admin / payer
  • User B = Approver, but not the payer
  • User C = Employee / expense submitter
  • Enable Workflows / Approvals.
  • Configure User C's expenses to be approved by User B.
  • Payments/reimbursements must be enabled.
  • User A must be the person responsible for paying the approved expense.

Steps

  1. Log in as User C.
  2. Create a new reimbursable expense, for example $20.
  3. Submit the expense.
  4. Log in as User B.
  5. Open User C's submitted Expense Report.
  6. Wait until the report is fully loaded.
  7. Disconnect the internet or set Chrome DevTools → Network → Offline.
  8. Click Approve.
  9. Observe the Next Step message at the top of the report.
  • Actual result while offline: it shows this message

Waiting for an admin to pay expenses.

  • Reconnect the internet, and it shows this message after reconnect

Waiting for User A to pay expenses.

Expected result

Immediately after approval, the correct payer should be shown:

Waiting for User A to pay expenses.

Screen.Recording.2026-09-05.at.11.50.04.AM.mov

@dukenv0307, could you please confirm whether you followed these steps exactly? Thanks!

Note: Please carefully watch the recording all the way to the end.

Screen.Recording.2026-09-10.at.1.54.19.PM.mp4

@dukenv0307

Copy link
Copy Markdown
Contributor Author

@marufsharifi Thanks for your response. I can reproduce the issue after unapproving the expense in offline mode (you didn't mention it in the steps 😃). Actually it's a BE bug, SearchForTodos is clearing achData. I'll create a BE issue to fix it and let you know when it's deployed

Screenshot 2026-09-10 at 17 00 18

@dukenv0307

Copy link
Copy Markdown
Contributor Author

@MelvinBot Create an issue in E/E for #99896 (comment) and assign me

@MelvinBot

Copy link
Copy Markdown
Contributor

Created the backend issue and assigned you: https://github.com/Expensify/Expensify/issues/680472

It captures the repro (approve then unapprove while offline), the screenshot from your comment, and the expected fix. I found no existing issue covering it.

@dukenv0307

Copy link
Copy Markdown
Contributor Author

@marufsharifi After checking BE logic, I think we can fix FE to fall back to owner. Could you please test it again?

@dukenv0307

Copy link
Copy Markdown
Contributor Author

@marufsharifi all yours

@marufsharifi marufsharifi 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.

LGTM

@melvin-bot

melvin-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown

We did not find an internal engineer to review this PR, trying to assign a random engineer to #99898 as well as to this PR... Please reach out for help on Slack if no one gets assigned!

@melvin-bot
melvin-bot Bot requested a review from rlinoz September 15, 2026 15:11
@rlinoz
rlinoz merged commit 482f7e4 into Expensify:main Sep 15, 2026
35 of 37 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

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

@OSBotify

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.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/rlinoz in version: 9.4.80-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site changes are required for this PR. I did not create a docs PR.

This is a client-side fix to the optimistic next step after approval. The message it now shows immediately ("Waiting for … to pay expenses") is the same one the server already returned a moment later, so the end-state behavior customers see is unchanged — only the brief "No further action required!" flicker is gone.

Why no article needs updating

What changed

  • src/libs/NextStepUtils.ts:287-296 — the APPROVED case no longer returns "no further action" just because the approver isn't the payer. It now returns that only for invoice reports, a zero reimbursable total, or when the workspace has reimbursements disabled (reimbursementChoice === REIMBURSEMENT_NO).
  • src/libs/PolicyUtils.ts:2173 — getReimburserAccountID falls back to the workspace owner when no authorized payer is set on the bank account, so the message names a person instead of resolving to -1. This helper is only used by NextStepUtils, so nothing else in the app is affected.

What I checked in docs/articles

  • The help site does not document next step / "Waiting for …" message text anywhere. grep -r "Waiting for" articles/new-expensify/ returns no matches, and no article documents the No further action required! string.
  • Understanding the For you Section documents the Review / Submit / Approve / Pay / Export / Fix to-do items, not next step copy. Those items are unchanged by this PR.
  • Approve Expenses already states under "What happens after I approve a report?" that a final-approved report "becomes Approved and is ready for payment" — which matches the corrected behavior, so it is still accurate.
  • Workspace Workflows covers setting an authorized Payer and who gets prompted to pay. The owner fallback here only affects whose name appears in the next step message, not who can pay, so that article stays accurate too.

One optional follow-up, not required by this PR: no article currently explains that approving a report on a workspace with reimbursements disabled ends the workflow with no payment step. That gap predates this PR and would be new content rather than a correction, so I left it alone. Say the word if you'd like me to draft it.

@dukenv0307, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR Ready for review


view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/luacmartins in version: 9.4.80-0 🚀

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

Bundle Size Analysis (Sentry):

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.

7 participants