Skip to content

Add a groups-only current-view export option - #104249

Draft
rlinoz wants to merge 2 commits into
mainfrom
rodrigo-groups-only-search-export
Draft

rlinoz wants to merge 2 commits into
mainfrom
rodrigo-groups-only-search-export

Conversation

@rlinoz

@rlinoz rlinoz commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

Add Current view (groups only) alongside the existing export option for grouped searches, including Bank reconciliation. Preserve the configured group columns and selection/filter scope while requesting summary-only output in both immediate and queued exports. Deploy Auth, then Web-Expensify, before releasing this option.

Fixed Issues

$ #104047

PROPOSAL: N/A — internal implementation following the issue's agreed scope.

Tests

  1. Sign into the development App with an account that has Bank reconciliation data.
  2. Open Spend → Bank reconciliation.
  3. Select a withdrawal group.
  4. Open Export and confirm that both Current view and Current view (groups only) are available.
  5. Capture the outgoing export request without sending it to the shared backend.
  6. Choose Current view (groups only) and confirm that the request contains groupsOnly=true, isBasicExport=false, the withdrawal grouping, and the configured group columns.

Verified with Playwright in desktop Chrome. Captured form/query values:

{
  "groupsOnly": "true",
  "isGroupExport": "true",
  "groupBy": "withdrawal-id",
  "groupColumns": [
    "groupWithdrawn",
    "groupWithdrawalStatus",
    "groupBankAccount",
    "groupWithdrawalID",
    "groupExpenses",
    "groupTotal"
  ],
  "searchKey": "reconciliation"
}

The request was deliberately aborted after capture because the shared Auth service was not restarted. Separately, the rebuilt backend and production PHP CSV responder were exercised on isolated instances. Their actual emitted CSV was:

Category,Expenses,Total
"Meals and Entertainment",1,$2.50
Travel,2,$8.00

That file contains one header and two summaries, without expense rows. The queued CSV writer produced identical bytes; the existing export retained expense sections. Backend validation passed: 26 Auth tests and 3 targeted PHP tests / 28 assertions.

Added automated regression coverage. Local App validation:

  • Passed Node 26 syntax checks for the changed export code and three targeted test files.
  • Passed changed-file spelling: 7 checked files, zero issues; non-English locale files are excluded by the repository spelling configuration.
  • Passed the repository's staged-file formatting hook.
  • Blocked Jest before test execution: the installed dependencies lack react-native-reanimated/jest/resolver. Targeted files: SearchActionsTest.ts, useSearchBulkActionsExportTest.ts, and useSearchBulkActionsTest.ts.
  • Blocked npm run lint-changed: its fetch fails on the Mobile-Expensify submodule authentication.
  • Blocked typecheck and React Compiler checks in Vagrant: the available Bun binary reports Exec format error.
  • Blocked translation dry-run: ts-node is not installed. Shared dependencies were not reinstalled.

A complete browser-to-backend download, native/mobile QA, and the blocked App checks remain outstanding.

  • Verify that no errors appear in the JS console

Offline tests

Not executed locally. Before marking this PR ready:

  1. Open a grouped search with results loaded.
  2. Disconnect the network.
  3. Select a group.
  4. Choose Export → Current view (groups only).
  5. Confirm that the existing offline warning appears and no export request is submitted.
  6. Reconnect the network.
  7. Retry the export and confirm that it succeeds with summary rows only.

QA Steps

  1. Deploy both linked backend changes.
  2. Open Spend → Bank reconciliation.
  3. Filter the view to cleared withdrawals.
  4. Configure group-level columns, including Withdrawn date.
  5. Select withdrawal groups.
  6. Choose Export → Current view (groups only).
  7. Open the CSV and confirm one header and one summary row per matching selected withdrawal, with no expense headers or expense rows.
  8. Export the same selection with Current view and confirm that both summaries and expense details remain present.
  9. Select all matching results and exclude a group.
  10. Export groups only and confirm that the queued download honors the filters and excluded group.
  11. Open a category-grouped search.
  12. Export groups only and confirm that category summaries and their configured columns are exported.
  13. Open an ungrouped search and confirm that Current view (groups only) is not offered.
  14. Disconnect the network and retry the grouped export.
  15. Confirm that the offline warning appears rather than starting a download.
  • 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 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

Not tested.

Android: mWeb Chrome

Not tested.

iOS: Native

Not tested.

iOS: mWeb Safari

Not tested.

MacOS: Chrome / Safari

Desktop Chrome menu and outgoing request verified with Playwright; captured request evidence is in Tests above. Safari was not tested. No screenshot is attached.

@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/zh-hans.ts b/src/languages/zh-hans.ts
index 81167dc8..5b30fc8f 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -11277,7 +11277,7 @@ ${reportName}`,
         exportInProgress: '导出进行中',
         conciergeWillSend: 'Concierge 将很快把文件发送给你。',
         currentView: '当前视图',
-        currentViewGroupsOnly: '当前视图(仅分组)',
+        currentViewGroupsOnly: '当前视图(仅限群组)',
     },
     exportDownload: {
         preparingTitle: 'Preparing download...',

Note

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

View workflow run

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants