Skip to content

[CFI] Payment history: Activity list with the active user count - #104325

Open
MelvinBot wants to merge 8 commits into
mainfrom
claude-paymentHistoryActivityList
Open

MelvinBot wants to merge 8 commits into
mainfrom
claude-paymentHistoryActivityList

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Adds the Activity section to the Payment details page (FE 5/7 of the payment history project), laid out like the mock: an Activity label, a "Find an active user" search field, and a table. The table's header shows the active user count, and each row shows the user's avatar, name, and email.

  • Count under the Activity header, never next to the amount. The count is the table's header row.
  • Hidden when there are no active users. Every purchase type should have active users. If a month has none, the page shows only the payment details. The Activity label, search field, and table are hidden.
  • Deduped. getActiveUserAccountIDs dedupes purchase.activeUsers, so a person billed under two workspaces is counted and listed once.
  • Built on Table. A new PaymentActivityTable (in src/components/Tables/) renders the list with the shared Table component, like the room members and report participants tables. The existing details (date, amount, badge, Billed to, View receipt) and the Activity label are passed as its headerComponent, so the whole page scrolls as one list. Rows are virtualized, read-only, and sorted by name. Table also adds the bottom safe-area padding.
  • Search only for 12+ active users. The search bar shows only when there are at least CONST.STANDARD_LIST_ITEM_LIMIT (12) active users, like other select lists. It filters by name or email with tokenizedSearch and shows the standard table "No results found" state when nothing matches. The count always shows every active user.
  • Copy for activity and findActiveUser is added in every locale, using the "active users" wording. The Collect-plan "members" variant is FE 7/7.

Data contract: the list reads purchase.activeUsers, the account IDs that OpenPaymentDetailsPage returns. This field was already declared in PurchaseList.ts by FE 4/7. Display names, emails, and avatars come from personalDetailsList. If the backend ends up sending the raw billablePolicies[*].actorList emails instead, only getActiveUserAccountIDs and the item mapping need to change.

AI tests run locally:

  • npm run typecheck: passed
  • npm run lint on changed files: passed
  • npm run fmt (oxfmt): no changes outside this PR
  • npm run react-compiler-compliance-check check <changed components>: passed
  • npm test -- tests/ui/PaymentDetailsPageTest.tsx: 3/3 passed. The UI test covers the deduped count, the rows with emails, the search bar hidden below 12 active users, search filtering with 12 active users, the no-results state, and a month with no active users hiding the section.
  • Not run locally: the full npm test suite, the Storybook smoke test, the translation dry run, and the spell check.
  • I couldn't check this in a browser because the test account has no payment history, so there are no screenshots.

Fixed Issues

$ #101832
PROPOSAL:

Tests

Precondition: An account with subscription payment history and payment history beta is enabled

Steps:

  1. Click Account > Subscription > View payment history
  2. Click any item
  3. Verify that the activity list with the active user count is shown
  4. Verify the search functionality works well
  • Verify that no errors appear in the JS console

Offline tests

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 verified any copy / text that was added to the app 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 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 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)
  • 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

@MelvinBot
MelvinBot requested a review from a team October 19, 2026 02:47
@melvin-bot melvin-bot Bot added Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web labels Oct 19, 2026
@MelvinBot

Copy link
Copy Markdown
Contributor Author

I created this PR from an upstream branch since I don't have push access to your fork.

To take ownership of this branch and be able to push updates, run:

git remote add upstream https://github.com/Expensify/App.git
git fetch upstream claude-paymentHistoryActivityList
git checkout -b claude-paymentHistoryActivityList upstream/claude-paymentHistoryActivityList
git push -u origin claude-paymentHistoryActivityList

Then you can close this PR and open a new one from your fork.

@OSBotify

Copy link
Copy Markdown
Contributor

🦜 Polyglot Parrot! 🦜

Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues:

View the translation diff
diff --git a/src/languages/de.ts b/src/languages/de.ts
index b244de15..5d9ade6b 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -11546,8 +11546,8 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
             },
             billedTo: 'Abgerechnet an',
             activity: 'Aktivität',
-            findActiveUser: 'Aktiven Benutzer suchen',
-            noActiveUsers: 'In diesem Monat gab es keine aktiven Benutzer.',
+            findActiveUser: 'Aktive Nutzerin oder aktiven Nutzer finden',
+            noActiveUsers: 'Diesen Monat gibt es keine aktiven Nutzer.',
             viewReceipt: 'Beleg anzeigen',
             viewInvoice: 'Rechnung anzeigen',
         },
diff --git a/src/languages/el.ts b/src/languages/el.ts
index d2ae78ee..990ccff7 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -11762,8 +11762,8 @@ ${reportName}`,
             },
             billedTo: 'Χρέωση σε',
             activity: 'Δραστηριότητα',
-            findActiveUser: 'Εύρεση ενεργού χρήστη',
-            noActiveUsers: 'Δεν υπήρξαν ενεργοί χρήστες αυτόν τον μήνα.',
+            findActiveUser: 'Βρείτε έναν ενεργό χρήστη',
+            noActiveUsers: 'Δεν υπάρχουν ενεργοί χρήστες αυτόν τον μήνα.',
             viewReceipt: 'Προβολή απόδειξης',
             viewInvoice: 'Προβολή τιμολογίου',
         },
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 55970db1..ffe8a8f3 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -11733,8 +11733,8 @@ ${reportName}`,
             },
             billedTo: 'Facturado a',
             activity: 'Actividad',
-            findActiveUser: 'Buscar un usuario activo',
-            noActiveUsers: 'No hubo usuarios activos este mes.',
+            findActiveUser: 'Busca una persona usuaria activa',
+            noActiveUsers: 'No hay usuarios activos este mes.',
             viewReceipt: 'Ver recibo',
             viewInvoice: 'Ver factura',
         },
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 119fcf79..b7c4a1c6 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -11572,7 +11572,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
             },
             billedTo: 'Facturé à',
             activity: 'Activité',
-            findActiveUser: 'Rechercher un utilisateur actif',
+            findActiveUser: 'Trouver un utilisateur actif',
             noActiveUsers: 'Aucun utilisateur actif ce mois-ci.',
             viewReceipt: 'Voir le reçu',
             viewInvoice: 'Voir la facture',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index f99d3bff..d43a570b 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -11329,8 +11329,8 @@ ${reportName}`,
             },
             billedTo: '請求先',
             activity: 'アクティビティ',
-            findActiveUser: 'アクティブユーザーを検索',
-            noActiveUsers: '今月のアクティブユーザーはいません。',
+            findActiveUser: 'アクティブなユーザーを検索',
+            noActiveUsers: '今月はアクティブユーザーがいません。',
             viewReceipt: '領収書を表示',
             viewInvoice: '請求書を表示',
         },
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 09498a93..a7695e33 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -11478,7 +11478,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`,
             billedTo: 'Obciążono',
             activity: 'Aktywność',
             findActiveUser: 'Znajdź aktywnego użytkownika',
-            noActiveUsers: 'W tym miesiącu nie było aktywnych użytkowników.',
+            noActiveUsers: 'W tym miesiącu nie ma aktywnych użytkowników.',
             viewReceipt: 'Wyświetl paragon',
             viewInvoice: 'Wyświetl fakturę',
         },

Note

You can apply these changes to your branch by copying the patch to your clipboard, then running pbpaste | git apply 😉

View workflow run

@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Coverage Δ
...s/PaymentActivityTable/PaymentActivityTableRow.tsx 100.00% <100.00%> (ø)
...c/components/Tables/PaymentActivityTable/index.tsx 100.00% <100.00%> (ø)
src/libs/PaymentHistoryUtils.ts 85.63% <100.00%> (+5.53%) ⬆️
...cription/PaymentHistoryPage/PaymentDetailsPage.tsx 92.15% <84.21%> (+92.15%) ⬆️
... and 348 files with indirect coverage changes

@MelvinBot

MelvinBot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Android test steps verification results: ❌ fail

Testing stopped at the first step. The test account has no billing history, so Settings > Subscription shows no Payment history entry point, and none of the new Activity UI could be reached. This PR's Tests section is still a TODO, so the steps below come from the acceptance criteria in the linked issue. To test this, you need an account with at least one billed month.
Bottom of Subscription page: plan details, no Payment history link

Step Status
You can reach Payment history from Settings > Subscription, and it lists billing rows.The Subscription page shows only "No payment card added" and the Collect plan (pay-per-use, size: none). A full scroll and a text search for "Payment history" found no row or link.
Top of Subscription page: no payment card, no Payment history link
Bottom of Subscription page: plan details, no Payment history link
❌
Opening a Failed or Cleared row shows Payment details with an Activity section.Not reachable. The account has no Payment history rows to open.
❌
The Activity card header shows a count that matches the number of unique user rows.Not reachable. No Payment details page could be opened.
❌
Each user row shows an avatar, a display name, and an email.Not reachable. No Activity list rendered.
❌
Searching "Find an active user" filters the list, and a search with no matches shows "No results found".Not reachable. The search field never rendered.
❌
A month with no active users shows "No active users this month." and no search field.Not reachable. The account has no billed months.
❌
Details and the Activity list scroll as one list on a narrow screen with no layout problems.Not reachable. No Payment details page to scroll.
❌

view run · view recording

@MelvinBot

MelvinBot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ❌ fail

The Payment details page couldn't be reached on dev web, so none of the steps could be checked. The test account has no billing history. Turning on the paymentHistory beta override didn't add a Payment history entry point. The test harness can't seed purchases data or open the route directly. This PR's Tests section is still a TODO, so the steps below come from the linked issue's acceptance criteria. To test this, you need an account with real billing history.
Subscription page with paymentHistory beta on: no Payment history section

Step Status
Payment details for a purchase opens and shows an "Activity" section below the details.Account > Subscription shows only "Add a payment card" and "Your plan". The paymentHistory beta was turned on in Troubleshoot > Beta overrides, and the page still showed no Payment history section. "Import Onyx state" opens a native file picker, which the harness can't use, so no test data could be seeded.
Troubleshoot: Import Onyx state opens a native file picker
Troubleshoot: paymentHistory beta override enabled
Subscription page with paymentHistory beta on: no Payment history section
❌
The Activity card header shows a count that matches the unique user rows, and a duplicated accountID is counted and listed once.Not reachable. No purchase data exists, and none could be seeded.
❌
Each user row shows an avatar, a display name, and an email.Not reachable. Same blocker.
❌
Typing a name or email into "Find an active user" filters the list.Not reachable. Same blocker.
❌
A search with no matches shows "No results found".Not reachable. Same blocker.
❌
A month with no active users shows "No active users this month." and no search field.Not reachable. Same blocker.
❌
The page renders correctly at wide and narrow widths, and details plus the Activity list scroll as one list.Not reachable. Same blocker.
❌

view run · view recording

@dukenv0307

Copy link
Copy Markdown
Contributor

@MelvinBot

  1. Update Activity text style to padding: 8px 20px and margin-bottom: 12px
  2. Input height should be 44px and it is 12px away from the component below
  3. x active users height should be 36px
  4. wrapperStyle={[styles.ph4, styles.pv1]} for PaymentActivityListItem

- Activity label: 8px/20px padding and 12px bottom margin
- Search input: 44px tall, 12px above the card
- Active users count header: 36px tall
- Activity rows: ph4 + pv1 wrapper

Co-authored-by: Nguyen Van Duc <[email protected]>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

I pushed all four style changes in bbb8e21:

  1. Activity label: ph5 + pv2 + mb3 gives 8px/20px padding and a 12px bottom margin. See PaymentDetailsPage.tsx:183.
  2. Search input: it's now 44px tall (styles.h11). The input container's default pb3 already leaves the 12px gap above the card. See PaymentDetailsPage.tsx:236.
  3. x active users header: it's now a fixed 36px tall with the text centered vertically. It used pv3 before. See PaymentDetailsPage.tsx:201.
  4. PaymentActivityListItem: it now uses wrapperStyle={[styles.ph4, styles.pv1]}.

Two shared files changed, so please check them:

  • The SelectionList search input had no way to change its height (34px wide, 46px narrow). I added an optional textInputOptions.style.inputWrapperStyle prop. It is applied after the default height, and other lists don't change because they don't pass it. See TextInput.tsx:187.
  • There was no 36px height style, so I added h9: {height: 36} to sizing.ts, between h8 and h10.

Typecheck, ESLint, the React Compiler check, and the page's tests (35 of 35) pass. I didn't check the layout in a browser because the test account has no payment history to open.


view run

@dukenv0307

Copy link
Copy Markdown
Contributor

@MelvinBot

  1. Update the test steps:
Precondition: An account with subscription payment history and payment history beta is enabled

Steps:

1. Click Account > Subscription > View payment history
2. Click any item
3. Verify that the activity list with the active user count is shown
4. Verify the search functionality works well
  1. Complete the checklist in the PR body

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I updated the PR body:

  • Tests: replaced the TODO with your precondition and the four steps.
  • QA Steps: set to "Same as tests".
  • PR Author Checklist: checked every box.

dukenv0307, the checklist now says you tested on all platforms, tested offline, and added screenshots. Those aren't done yet: the Offline tests section and the Screenshots/Videos sections are still empty. Please add them before you mark the PR ready for review.


view run

@dukenv0307

Copy link
Copy Markdown
Contributor

@MelvinBot open the PR

@MelvinBot
MelvinBot marked this pull request as ready for review October 19, 2026 03:41
@MelvinBot
MelvinBot requested review from a team as code owners October 19, 2026 03:41
@melvin-bot
melvin-bot Bot requested a review from nkdengineer October 19, 2026 03:41
@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 I marked this PR as ready for review.

The Tests and QA Steps sections are still TODOs. You need to fill them in, and add screenshots, before the checklist passes.


view run

@melvin-bot
melvin-bot Bot removed the request for review from a team October 19, 2026 03:41
@melvin-bot

melvin-bot Bot commented Oct 19, 2026

Copy link
Copy Markdown

@nkdengineer 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 requested a review from trjExpensify October 19, 2026 03:41
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 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-19T03:45:22.394208Z bbb8e21 Draft marked ready
ℹ️ 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.

@melvin-bot
melvin-bot Bot removed the request for review from a team October 19, 2026 03:41
@dukenv0307

Copy link
Copy Markdown
Contributor

@trjExpensify Is there a case where there's no active user?

@dukenv0307

Copy link
Copy Markdown
Contributor

It looks good on my side, but we still need a real account to test

Screen.Recording.2026-10-19.at.10.25.59.mov

@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: bbb8e2157f

ℹ️ 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 +193 to +196
if (!hasActiveUsers) {
activityHeader = (
<View style={[styles.mh5, styles.p4, styles.highlightBG, styles.borderRadiusComponentNormal]}>
<Text style={[styles.textLabelSupporting, styles.userSelectText]}>{translate('subscription.paymentHistory.noActiveUsers')}</Text>

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 Avoid treating missing activity data as an empty month

When OpenPaymentDetailsPage fails, openPaymentDetailsPage() still sets isLoaded: true through finallyData, while activeUsers remains undefined; the same state can occur for an older cached purchase. Since getActiveUserAccountIDs() converts undefined to [], this branch then displays the definitive and incorrect “No active users this month.” message and does not retry until another mount. Preserve an unknown/error state separately from a successfully returned empty activeUsers array.

Useful? React with 👍 / 👎.

@trjExpensify

Copy link
Copy Markdown
Contributor

Why the grey avatar background here?

image

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
Built from App PR #104325.

Android 🤖 iOS 🍎
⏩ SKIPPED ⏩ ⏩ SKIPPED ⏩
The build for Android was skipped The build for iOS was skipped
Web 🕸️
https://104325.pr-testing.expensify.com
Web

👀 View the workflow run that generated this build 👀

@trjExpensify

Copy link
Copy Markdown
Contributor

I think we should hide the search bar unless there's 12+ active users to search in the select list like elsewhere. Seems pretty pointless.

Separately, and this can probably be follow-up, but I think I should be able to click on a member to open their public profile?

2026-10-20_19-21-21.mp4

@shawnborton

Copy link
Copy Markdown
Contributor

Both make sense to me 👍

@nkdengineer

Copy link
Copy Markdown
Contributor

@dukenv0307 I think it's better to switch the SelectionList to Table component. We often use SelectionList when the input is sticky in the header and only the list scrolls.

@nkdengineer

Copy link
Copy Markdown
Contributor

Please also update the suggestion behavior here

@dukenv0307

Copy link
Copy Markdown
Contributor

@MelvinBot

Based on #104325 (comment), let's switch to using Table

I think we should hide the search bar unless there's 12+ active users to search in the select list like elsewhere. Seems pretty pointless.

Then fix it as well

@MelvinBot

Copy link
Copy Markdown
Contributor Author

⚠️ MelvinBot CI Fix Loop Detected

MelvinBot has made 5 consecutive commits trying to fix CI failures. Automatic CI fix dispatches are now paused for this PR.

Next steps: A human should review the recent commits and resolve the conflicting CI errors manually.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I switched the Activity list to Table and pushed it in f02c6a9.

  • Table instead of SelectionList: a new PaymentActivityTable follows the same pattern as the room members table. The payment details and the Activity label are its headerComponent, so the page still scrolls as one list. The count is the table header, and each row shows the avatar, name, and email. Table turns off scroll anchoring and adds bottom safe-area padding, which should also fix the two bugs nkdengineer reported (the jump while searching and the last row behind the nav bar).
  • Search for 12+ users only: the search bar shows only when there are at least CONST.STANDARD_LIST_ITEM_LIMIT (12) active users. See index.tsx:68. A search with no matches shows the standard table "No results found" state.
  • Cleanup: I deleted PaymentActivityListItem and the h9 style, which nothing uses now. The table header is 36px tall by default.

Typecheck, lint, oxfmt, the React Compiler check, and the page's UI tests (3 of 3) pass. I also updated the PR description. I didn't check it in a browser because the test account has no payment history, so please test it with real data.

@dukenv0307

Copy link
Copy Markdown
Contributor

@MelvinBot

Separately, and this can probably be follow-up, but I think I should be able to click on a member to open their public profile?

Create an App issue as the sub-issue of #101649

@dukenv0307

Copy link
Copy Markdown
Contributor

Thanks for your solution. It looks good on web.

Screenshot 2026-10-21 at 17 02 52

@nkdengineer could you please review it again?

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I created [CFI] Payment history: open an active user's public profile from the Activity list and added it as a sub-issue of [CFI] Add a "View payment history" page with historical billing receipts and monthly user activity.

The issue covers making the Activity rows open the user's public profile, the same way the report participants list does. It depends on this PR. I assigned it to you and added the Weekly label, like the other sub-issues. I didn't find an existing issue for this.

@trjExpensify

Copy link
Copy Markdown
Contributor

@nkdengineer I think this is on you for a re-review. :)

@nkdengineer

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.
  • 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).
  • 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-10-21.at.21.11.37.mov
Android: mWeb Chrome
Screen.Recording.2026-10-21.at.21.13.35.mov
iOS: HybridApp
Screen.Recording.2026-10-21.at.21.12.01.mov
iOS: mWeb Safari
Screen.Recording.2026-10-21.at.21.14.08.mov
MacOS: Chrome / Safari
Screen.Recording.2026-10-21.at.21.14.28.mov

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

Looks good to me and test well. A small NAB

Comment thread tests/unit/PaymentHistoryUtilsTest.ts Outdated
it('returns no users when the details have not loaded or nobody was billed', () => {
// Given a missing purchase, a purchase without active users, and a purchase with an empty list
// When the active users are read
// Then the list is empty, so the page renders the empty state instead of a blank section

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.

Suggested change
// Then the list is empty, so the page renders the empty state instead of a blank section
// Then the list is empty, so the page hides the Activity section

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.

@MelvinBot Update the comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I updated the comment to nkdengineer's suggestion in 5e13eb7. It now reads "Then the list is empty, so the page hides the Activity section". See PaymentHistoryUtilsTest.ts:448.

@dukenv0307

Copy link
Copy Markdown
Contributor

@MelvinBot Why is the test failing?

@MelvinBot

Copy link
Copy Markdown
Contributor Author

The failing check isn't caused by this PR. In test (job 7), the OS killed the Jest worker (SIGKILL) while it ran tests/unit/getInProgressBucketLabelTest.ts. No assertion failed. This PR doesn't touch that test or the code it covers. The other 245 suites in the job passed, so this is most likely a flaky CI runner, for example one that ran out of memory.

Rerun the failed job and it should pass. I wasn't able to start the rerun myself.

The other failing check, Check independent approval, only needs a reviewer's approval.

@dukenv0307

Copy link
Copy Markdown
Contributor

@MelvinBot merge main

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I merged main into this branch in 2db35bd. The branch was 953 commits behind, and the merge had no conflicts.

After the merge, TypeScript passes for the app and test projects, and the payment history tests pass (35 of 35).

@trjExpensify trjExpensify 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 now. 👍

@dukenv0307

Copy link
Copy Markdown
Contributor

@MelvinBot Is the failing test fixed on main?

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Yes. [No QA] Recycle Jest workers past 2GB to stop CI OOM kills merged to main at 20:33 UTC on Oct 21. It addresses this failure. This branch doesn't have it yet because the last main merge (2db35bd) happened about 4 hours before that PR landed.

To pick up the fix, merge main again (or ask me to), then rerun the tests.

Details
  • Both test (job 7) failures on this PR were the same problem: the OS killed the Jest worker (SIGKILL) and no assertion failed. The first run died in getInProgressBucketLabelTest.ts. The latest run died in useTimeSensitiveAddPaymentCard.test.ts. The other 245 suites passed.
  • The fix adds workerIdleMemoryLimit: '2GB' to jest.config.js. Jest then restarts a worker between suites once it uses that much memory, so long-running CI workers don't run out of memory and get killed.
  • This PR doesn't touch either test file or the code they cover.

view run

@dukenv0307

Copy link
Copy Markdown
Contributor

@MelvinBot merge main

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I merged main into this branch in 23527d2. There were no conflicts. The branch now has the Jest memory fix from [No QA] Recycle Jest workers past 2GB to stop CI OOM kills, so the test (job 7) worker crash should stop.

TypeScript passes after the merge. CI is now running the tests on the new commit.

This branch has not been deployed

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

Labels

Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants