Skip to content

[cp staging] Update Paid by column from live payment actions - #99992

Merged
JS00001 merged 3 commits into
Expensify:mainfrom
c3024:chaitanya/99968-paid-by-live-update
Sep 1, 2026
Merged

[cp staging] Update Paid by column from live payment actions#99992
JS00001 merged 3 commits into
Expensify:mainfrom
c3024:chaitanya/99968-paid-by-live-update

Conversation

@c3024

@c3024 c3024 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

The Paid by column was derived only from snapshot report actions, so paying a report from the Search page left the cell empty until the search was re-run. The column now resolves the payer against live report actions too, the same way the First approver column does. The live derivation mirrors the backend rules: payment actions at or before the latest reimbursement cancellation don't count, and a submitter's "Received payment" self-attestation never identifies a payer. The Paid by filter also moves down the filters list, next to Paid status (or the Paid date filter for types without Paid status).

Fixed Issues

$ #99968
PROPOSAL:

Tests

  1. As a workspace admin, create an expense in a workspace chat and submit it.
  2. Go to Reports > Expense reports.
  3. Click Display > Edit columns, select Paid by and click Save.
  4. Approve the report from the report row (or in the report view).
  5. Click Pay > Pay elsewhere on the report row.
  6. Verify the Paid by column shows the admin immediately, without re-running the search.
  7. Click Filters and verify Paid by appears next to Paid status, not in the top section.
Screen.Recording.2026-09-01.at.11.04.10.AM.mov
  • Verify that no errors appear in the JS console

Offline tests

NA. Pay button is disabled offline.

QA Steps

Same as tests.

  • 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.
  • 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-09-01.at.11.04.10.AM.mov

The Paid by column derived only from snapshot report actions, so paying a report from the Search page left the cell empty until the search was re-run. Resolve the paid-by actor against live report actions the same way the first-approver column does, mirroring the backend rules: pay actions count, payment actions at or before the latest reimbursement cancellation do not, and a submitter's own received-payment self-attestation never identifies a payer.
@codecov

codecov Bot commented Sep 1, 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 Δ
src/CONST/index.ts 91.07% <ø> (-1.66%) ⬇️
src/hooks/useAdvancedSearchFilters.ts 97.50% <ø> (ø)
src/libs/SearchUIUtils.ts 69.10% <100.00%> (+0.51%) ⬆️
src/libs/ReportUtils.ts 87.26% <0.00%> (-0.13%) ⬇️
... and 45 files with indirect coverage changes

@c3024
c3024 marked this pull request as ready for review September 1, 2026 05:40
@c3024
c3024 requested review from a team as code owners September 1, 2026 05:40
@melvin-bot
melvin-bot Bot requested review from heyjennahay and hoangzinh and removed request for a team September 1, 2026 05:40
@melvin-bot

melvin-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

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

@hoangzinh

hoangzinh 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

Screen.Recording.2026-09-01.at.15.38.41.mov

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

🚢

@trjExpensify

Copy link
Copy Markdown
Contributor

Making sure you guys see this: #98326 (comment)

@c3024

c3024 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Moved it.

Screenshot 2026-09-01 at 5 08 36 PM Screenshot 2026-09-01 at 5 08 28 PM

@trjExpensify

Copy link
Copy Markdown
Contributor

Moved it.

Thank you. 👍

Comment thread src/libs/SearchUIUtils.ts
Comment thread src/libs/SearchUIUtils.ts
@c3024
c3024 requested a review from JS00001 September 1, 2026 13:57
@JS00001
JS00001 merged commit 68c3ab2 into Expensify:main Sep 1, 2026
39 of 43 checks passed
@JS00001

JS00001 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Lets let this deploy normally

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

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

@JS00001

JS00001 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Hmm, actually, yeah lets CP this, I dont think we want the feature shipped with the current filter position

@JS00001 JS00001 changed the title Update Paid by column from live payment actions [cp staging] Update Paid by column from live payment actions Sep 1, 2026
@OSBotify

OSBotify commented Sep 1, 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.

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

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

OSBotify pushed a commit that referenced this pull request Sep 1, 2026
Update Paid by column from live payment actions

(cherry picked from commit 68c3ab2)

(cherry-picked to staging by Julesssss)
@OSBotify OSBotify added the CP Staging marks PRs that have been CP'd to staging label Sep 1, 2026
@os-botify

os-botify Bot commented Sep 1, 2026

Copy link
Copy Markdown

🔁 Filed a Staging retest request for deploy blockers #99968 after this PR was cherry-picked to staging.

@OSBotify

OSBotify commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

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

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

@MelvinBot

Copy link
Copy Markdown
Contributor

Yes — help site changes are required. Draft PR: #100057

The Paid by column and the paid-by: operator were not documented anywhere under docs/articles, and the one article covering Spend columns had stale navigation. This PR touched both, so the gaps are worth closing now.

What changed

docs/articles/new-expensify/reports-and-expenses/Using-Reports-in-New-Expensify.md

  • Column customization steps said to click a Columns icon next to Filters. That icon does not exist. The live UI is DisplayEdit columns. Fixed in both places.
  • Added a Paid by column entry, noting it stays blank until the report is paid and updates as soon as you pay from Spend — the behavior this PR delivers.
  • Removed a duplicated Paid status bullet (the same column was listed twice with two different descriptions).
  • Documented where the Paid by filter now sits: below Paid status on the Expense Report type, below Paid on the Expense type.

docs/articles/new-expensify/reports-and-expenses/Use-Search-Operators-to-Filter-and-Analyze.md

How the UI labels were verified

Every label was read off the live NewDot web UI rather than inferred from code, per docs/HELPSITE_NAMING_CONVENTIONS.md:

  • Reports toolbar: Filters, Display, Save, Create — no Columns icon.
  • Display menu contains exactly Sort by and Edit columns.
  • Edit columns list includes Paid by in sentence case, not "Paid By".
  • Reports filter order: Type, Status, From, To, then Date, Total, Amount debited, Amount reimbursed, Currency, Exported to, Paid status, Paid by, Title, …
  • Expenses filter order: …, Exported to, Paid, Paid by, Withdrawal ID, …

Both filter positions match the reordering in src/hooks/useAdvancedSearchFilters.ts. There is no Paid date filter in the Reports view — only a generic Date filter — so the article does not mention one.

What I deliberately left alone
  • Using-Reports-in-New-Expensify.md uses several top-level # headings, which docs/HELP_AUTHORING_GUIDELINES.md Section 4 disallows. Restructuring the article is out of scope for a fix follow-up and would bury these corrections in a rewrite.
  • I could not run cspell in this environment (permission denied), so the added text is unverified by the spell checker. It is plain English with no new proper nouns, and CI will catch it either way.

@c3024, 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

OSBotify commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/francoisl in version: 9.4.65-3 🚀

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

Bundle Size Analysis (Sentry):

@OSBotify

OSBotify commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

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

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

@MelvinBot

Copy link
Copy Markdown
Contributor

Already done — no second PR needed. The help site changes for this PR are in #100057 (open, draft, HelpDot, assigned to c3024).

Nothing has changed on this PR since, so the docs work stands as-is. Two updates worth noting:

  • Spellcheck now passes. Last time I flagged that I couldn't run cspell locally. CI has since run it on the docs PR and it passed, along with build, check, verify, and the HelpDot preview deploy. The only failing check is Check independent approval, which is expected while the PR is still a draft.
  • The title picked up a [No QA] prefix. github-actions[bot] renamed it to [No QA] Docs updates for E/A#99992 document Paid by column and filter because the QA section is left for a human to fill in. That deviates from the exact title format you asked for, but the prefix is what keeps the QA check green — I've left it rather than reverting it into a failure. Say the word if you'd rather I strip it.

You can preview the rendered articles here:

Recap of what the docs PR changes

docs/articles/new-expensify/reports-and-expenses/Using-Reports-in-New-Expensify.md

  • Corrected the column customization steps. The article said to click a Columns icon next to Filters; no such icon exists. The live UI is DisplayEdit columns.
  • Added a Paid by column entry, noting it stays blank until the report is paid and updates as soon as you pay from Spend — the behavior this PR delivers.
  • Removed a duplicated Paid status bullet (the column was listed twice with two different descriptions).
  • Documented where the Paid by filter now sits: below Paid status on the Expense Report type, below Paid on the Expense type.

docs/articles/new-expensify/reports-and-expenses/Use-Search-Operators-to-Filter-and-Analyze.md

Every label was read off the live NewDot web UI per docs/HELPSITE_NAMING_CONVENTIONS.md: the Reports toolbar is Filters / Display / Save / Create, the Display menu holds Sort by and Edit columns, and Paid by is sentence case. Both filter positions match the reordering in src/hooks/useAdvancedSearchFilters.ts.

@c3024, 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

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.

6 participants