Skip to content

Unify expense column pickers via COLUMN_AVAILABILITY and align report details columns#94124

Merged
mjasikowski merged 5 commits into
mainfrom
claude-unifyColumnPickers
Jun 24, 2026
Merged

Unify expense column pickers via COLUMN_AVAILABILITY and align report details columns#94124
mjasikowski merged 5 commits into
mainfrom
claude-unifyColumnPickers

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

The two expense column pickers — the Spend/Search picker (/search → Display → Edit columns) and the single-report picker (r/:reportID/settings/columns) — were built from two independently hand-maintained constants (CONST.SEARCH.TYPE_CUSTOM_COLUMNS.EXPENSE and CONST.SEARCH.REPORT_DETAILS_CUSTOM_COLUMNS) with no shared source of truth and no test linking them, so they silently drifted apart.

This PR implements the approved proposal:

  1. Single source of truth. Adds CONST.SEARCH.COLUMN_AVAILABILITY, one ordered map over TABLE_COLUMNS that declares each transaction-level column's availability per surface (search / reportView). Both TYPE_CUSTOM_COLUMNS.EXPENSE and REPORT_DETAILS_CUSTOM_COLUMNS are now derived from this map (preserving declaration order), so adding a column forces a single, deliberate availability decision instead of editing two lists. The existing getCustomColumns() and the getColumnsToShow() allow-list already read these derived constants, so they pick up the change automatically.

  2. Aligns the lists (additive only). Adds the four transaction-level columns that were Search-only into the single-report picker — Posted, Attendees, Per attendee (TOTAL_PER_ATTENDEE), and Original amount — per the rule "a column belongs in the report view only if its value can differ between expenses within the same report." Report Details goes from 18 → 22 columns; Search is unchanged; nothing is removed. Total stays the one Report-Details-only column, and the report-level columns (Status, Submitted, Approved, Exported, From, To, Workspace, Report ID, etc.) stay Search-only.

  3. Renders the newly-added columns when selected. In the single-report view, getColumnsToShow() now retains Posted and Original amount when the user explicitly selects them (matching the existing retention behavior of Attendees/Per attendee). Search-page behavior for these columns is intentionally left unchanged. The shared TransactionItemRowWide renderer and SearchTableHeader already support all four columns.

  4. Guard test against future drift. Adds tests/unit/Search/ColumnAvailabilityTest.ts, which fails if a TABLE_COLUMNS value is added without being classified in COLUMN_AVAILABILITY or explicitly attributed to another surface (grouped / report-list / task views). It also asserts both derived lists contain only valid columns and snapshots them so any change is a deliberate, reviewed update.

AI tests run locally by Melvin
  • npm run typecheck (tsc) — passed
  • npm run lint-changed — passed
  • npm run prettier — clean
  • npm test -- tests/unit/Search/ColumnAvailabilityTest.ts — 9/9 passed
  • npm test -- tests/unit/Search/SearchUIUtilsTest.ts — 347/347 passed

Storybook smoke and React Compiler checks were not applicable (no component/story/TSX changes).

Fixed Issues

$ #93522
PROPOSAL: #93522 (comment)

Tests

Large screen only — the expense column pickers and the wide transactions table are only available on large screens (wide layout). Test on a desktop/web browser at a wide width.

  1. Open Spend tab → Display → Edit columns and confirm the Search expense column list is unchanged (all 33 columns present in the same order).
  2. Open Inbox tab → expense report with multi transactions → Edit columns and confirm:
    • Posted, Attendees, Per attendee, and Original amount now appear as toggleable columns (22 total).
    • Enable Posted and Original amount, save, and verify the columns render in the report transactions table if they have value
  • Verify that no errors appear in the JS console

Offline tests

N/A — change is to client-side column configuration only.

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

…mn picker

Co-authored-by: ahmedGaber93 <ahmedGaber93@users.noreply.github.com>
Co-authored-by: ahmedGaber93 <ahmedGaber93@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Fixed the failing spellcheck check. CSpell flagged three unknown words introduced by this PR's new column keys and test comment:

Since taxrate/exportedto are real column-key values (not typos), I added all three to the cspell.json dictionary rather than changing the values — this matches the existing convention there (e.g. originalamount, dateexported, exchangerate are already listed).

The other failing check, PR Author Checklist, is the standard human checklist and isn't something I can complete on your behalf.

Comment thread src/libs/SearchUIUtils.ts Outdated
nonDataColumns.add(CONST.SEARCH.TABLE_COLUMNS.POSTED);
nonDataColumns.add(CONST.SEARCH.TABLE_COLUMNS.ORIGINAL_AMOUNT);
}

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 Why you put those columns to nonDataColumns?

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.

Because that block is the only thing that keeps Posted and Original amount visible once the user explicitly selects them in the single-report column picker.

The function returns at SearchUIUtils.ts:5955:

return customResult.filter((col) => nonDataColumns.has(col) || columns[col]);

columns[col] is a data-presence check — it's only true when at least one transaction in the report actually has a value for that column. nonDataColumns is the allow-list of columns that bypass that check and are kept purely because the user picked them.

POSTED (card posting date) and ORIGINAL_AMOUNT (foreign/original amount) are inherently data-driven: a report may contain no card transactions and no foreign-currency expenses, so columns[POSTED] / columns[ORIGINAL_AMOUNT] would be false. Without adding them to nonDataColumns, the moment a user toggles one on but no transaction in that report happens to have a posting date / original amount, the filter would silently drop it and the explicit selection would vanish.

Adding them keeps them retained whenever selected — matching the existing behavior of ATTENDEES / TOTAL_PER_ATTENDEE already in the set.

It's gated behind isExpenseReportView so the search page is untouched: there these two columns keep their existing data-driven behavior, and only the report view treats them as non-data.

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.

Because that block is the only thing that keeps Posted and Original amount visible once the user explicitly selects them in the single-report column picker.

@MelvinBot I don't think we need to keep those columns visible when they don't have values, even if the user explicitly selected them. Please revert this change.

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.

Done — reverted in 73b9617.

Removed the isExpenseReportView block that added POSTED and ORIGINAL_AMOUNT to nonDataColumns. Both columns now keep their data-driven behavior in the report view: when selected but no transaction in the report has a value, they're dropped by the columns[col] presence check, same as before this PR.

Posted, Attendees, Per attendee, and Original amount are still added to the report column picker (the alignment change) — this only reverts the always-keep-when-selected behavior for the two data-driven columns.

Checks: typecheck, lint-changed, prettier clean; SearchUIUtilsTest + ColumnAvailabilityTest 356/356 passed.

…t column picker

Co-authored-by: ahmedGaber93 <ahmedGaber93@users.noreply.github.com>
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Coverage Δ
src/CONST/index.ts 94.11% <100.00%> (+0.27%) ⬆️
src/libs/SearchUIUtils.ts 64.53% <62.50%> (+0.05%) ⬆️
... and 254 files with indirect coverage changes

@ahmedGaber93

Copy link
Copy Markdown
Contributor

@MelvinBot Update Tests to be

Tests

  1. Open Spend tab → Display → Edit columns and confirm the Search expense column list is unchanged (all 33 columns present in the same order).
  2. Open Inbox tab → expense report with multi transactions → Edit columns and confirm:
    • Posted, Attendees, Per attendee, and Original amount now appear as toggleable columns (22 total).
    • Enable Posted and Original amount, save, and verify the columns render in the report transactions table if they have value

@MelvinBot Mark all auther checklist as checked

@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 Done, ahmedGaber93:

  1. Updated the Tests section to the new steps:
    • Spend tab → Display → Edit columns → confirm Search expense column list unchanged (33 columns, same order).
    • Inbox tab → multi-transaction expense report → Edit columns → confirm Posted, Attendees, Per attendee, and Original amount appear (22 total); enable Posted + Original amount, save, and verify they render when they have a value.
  2. Checked all PR Author Checklist items (and the JS-console verification boxes under Tests/QA).

@ahmedGaber93

Copy link
Copy Markdown
Contributor

@MelvinBot Mark this PR as ready for review

@MelvinBot MelvinBot marked this pull request as ready for review June 23, 2026 20:20
@MelvinBot MelvinBot requested a review from a team as a code owner June 23, 2026 20:20
@melvin-bot melvin-bot Bot requested review from ahmedGaber93 and joekaufmanexpensify and removed request for a team June 23, 2026 20:20
@melvin-bot

melvin-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

@ahmedGaber93 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 June 23, 2026 20:20
@ahmedGaber93

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 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 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 and each prop has a /** comment above it */
    • The file is named correctly
    • 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
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • 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 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 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
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-06-23.at.8.20.31.PM.mov

@ahmedGaber93

Copy link
Copy Markdown
Contributor

@MelvinBot Please update Tests to confirm

  • Large screen only

@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: 73b961746e

ℹ️ 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/CONST/index.ts
STATUS: {column: this.TABLE_COLUMNS.STATUS, search: true, reportView: false},
SUBMITTED: {column: this.TABLE_COLUMNS.SUBMITTED, search: true, reportView: false},
APPROVED: {column: this.TABLE_COLUMNS.APPROVED, search: true, reportView: false},
POSTED: {column: this.TABLE_COLUMNS.POSTED, search: true, reportView: true},

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 Keep newly exposed report columns renderable

When Posted is added to REPORT_DETAILS_CUSTOM_COLUMNS, the report column settings page lets users save it, but MoneyRequestReportTransactionList still calls getColumnsToShow(..., isExpenseReportView: true), whose custom-column path filters the saved list down to nonDataColumns.has(col) || columns[col]. POSTED is never set in the report-view columns map and is not in nonDataColumns (same for the newly exposed ORIGINAL_AMOUNT below), so selecting these new options in r/:reportID/settings/columns silently drops them and they never render.

Useful? React with 👍 / 👎.

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 the bare revert overcorrected — it removed the always-on behavior but added no data-presence path, so Posted and Original amount are now never rendered in the report view (even when transactions do have a posting date / foreign amount).

Please implement the data-driven approach instead of nonDataColumns

Also please add a getColumnsToShow({isExpenseReportView: true}) regression test for those columns

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.

Done — implemented the data-driven approach in 25418e7.

Instead of nonDataColumns, getColumnsToShow now populates the report-view data-presence map for both columns, so they render when the data exists and are dropped when it doesn't:

  • ORIGINAL_AMOUNT — set to true in the report view when a currency conversion exists (hasExchangeRate), mirroring the existing search-page behavior. SearchUIUtils.ts:5850-5857
  • POSTED — set to true when at least one transaction in the report has a posting date (transaction.posted). SearchUIUtils.ts:5859-5864

Both are also seeded as false in the report-view columns map so they default to hidden and are only kept by the existing columns[col] presence check (no nonDataColumns entry). Search-page behavior is unchanged.

Added 4 getColumnsToShow({isExpenseReportView: true}) regression tests covering hide-when-empty / show-when-present for each column: SearchUIUtilsTest.ts:8894-8957.

Checks: SearchUIUtilsTest 351/351 passed (incl. the 4 new tests); typecheck and prettier clean. ⚠️ I couldn't run ESLint locally — this environment's lint-changed relies on git merge-base origin/main HEAD, which fails on the shallow PR checkout, and direct eslint invocation isn't available here. The change adds no new imports and follows the existing data-presence patterns, and tsgo typecheck passed, but a CI lint pass should confirm.

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 the data-driven direction is right, but this is now too broad: the POSTED and ORIGINAL_AMOUNT setters aren't gated to an explicit selection, so they also fire in the default report view. I verified that for a report whose transactions have a posting date and a currency conversion — with no custom column selection — both columns now show by default. That means foreign-currency reports render both Amount and Original amount by default, and card reports render Posted by default. That's beyond what we want here; these should only appear when the user explicitly picks them.

Please gate both behind customResult (keep TOTAL_AMOUNT as-is):

if (hasExchangeRate) {
    if (isExpenseReportView) {
        columns[CONST.SEARCH.TABLE_COLUMNS.TOTAL_AMOUNT] = true;
        if (customResult) {
            columns[CONST.SEARCH.TABLE_COLUMNS.ORIGINAL_AMOUNT] = true;
        }
    } else {
        columns[CONST.SEARCH.TABLE_COLUMNS.ORIGINAL_AMOUNT] = true;
    }
}
if (customResult && isExpenseReportView && transaction.posted) {
    columns[CONST.SEARCH.TABLE_COLUMNS.POSTED] = true;
}

Also add a default-view regression test: with a transaction that has both a posting date and a conversion but no explicit column selection, assert POSTED and ORIGINAL_AMOUNT are not returned. The current 4 tests only cover the custom path, so this default-view behavior slipped through untested.

…ession tests

Co-authored-by: ahmedGaber93 <ahmedGaber93@users.noreply.github.com>
@MelvinBot MelvinBot requested a review from a team as a code owner June 23, 2026 21:23
@melvin-bot melvin-bot Bot requested review from mjasikowski and removed request for a team June 23, 2026 21:24
@melvin-bot

melvin-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

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

@joekaufmanexpensify joekaufmanexpensify 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 for product

Both columns were being set in the default expense report view whenever a
transaction had a posting date or currency conversion, so foreign-currency
reports rendered Original amount and card reports rendered Posted by default.
Gate both behind customResult so they only appear when the user explicitly
selects them. TOTAL_AMOUNT remains data-driven as before.

Add a default-view regression test covering a transaction that has both a
posting date and a conversion with no explicit column selection.

Co-authored-by: ahmedGaber93 <ahmedGaber93@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Done — gated both setters behind customResult so they no longer fire in the default report view. Pushed in 67c9e76.

Change in src/libs/SearchUIUtils.ts:5850-5864:

  • ORIGINAL_AMOUNT now only set in the report view when customResult is present (Search-page behavior unchanged; TOTAL_AMOUNT left as-is).
  • POSTED now gated as customResult && isExpenseReportView && transaction.posted.

Regression test added in tests/unit/Search/SearchUIUtilsTest.ts: a transaction with both a posting date and a currency conversion, visibleColumns: [] (no explicit selection), isExpenseReportView: true → asserts POSTED and ORIGINAL_AMOUNT are not returned.

AI checks run locally
  • npm test -- tests/unit/Search/SearchUIUtilsTest.ts -t "getColumnsToShow" — 35/35 passed (including the new default-view test)
  • npm run lint-changed — clean
  • npm run typecheck-tsgo — clean
  • npx prettier --write on both files — no changes

@ahmedGaber93 ahmedGaber93 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!

@mjasikowski mjasikowski merged commit b5c1376 into main Jun 24, 2026
39 checks passed
@mjasikowski mjasikowski deleted the claude-unifyColumnPickers branch June 24, 2026 09:43
@github-actions

Copy link
Copy Markdown
Contributor

🚧 mjasikowski 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/mjasikowski in version: 9.4.19-1 🚀

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

Bundle Size Analysis (Sentry):

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Help site review — changes required ✅

This PR adds four columns to the single-report Columns picker (r/:reportID/settings/columns): Posted, Attendees, Per attendee, and Original amount (Report Details: 18 → 22 columns). The help article describing that picker only mentioned Attendees and Per attendee, so it needed updating.

Draft help site PR: #94500

What I changed: In Managing Expenses in a Report, the "How to view and use the expense table" section now lists all four columns available in the single-report Columns picker, with each column's render condition. Names use the exact UI labels (Posted, Attendees, Per attendee, Original amount) verified against src/languages/en.ts.

No change needed for the Spend/Search picker article (Using Reports in New Expensify) — this PR left the Search column list unchanged.


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

@mitarachim

Copy link
Copy Markdown

Deploy Blocker #94526 was identified to be related to this PR.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/blimpich in version: 9.4.19-5 🚀

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

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.

6 participants