Skip to content

Drop the Vendor column from the Spend table when no workspace has the vendor feature - #101864

Merged
Beamanator merged 1 commit into
Expensify:mainfrom
c3024:chaitanya/101859-vendor-column-gate
Sep 22, 2026
Merged

Beamanator merged 1 commit into
Expensify:mainfrom
c3024:chaitanya/101859-vendor-column-gate

Conversation

@c3024

@c3024 c3024 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

The saved Search column list outlives the vendor feature. After the accounting integration is disconnected, the column picker and the report table already drop Vendor, but the Spend table rendered the saved list as is, so the Vendor column stayed with empty cells.

getColumnsToShow now takes isVendorColumnAvailable. When it is false the saved list loses Vendor and the report view skips the data-driven auto-show. A new useIsVendorColumnAvailable hook supplies the flag to every Search caller (table, overlay, sort popup, grouped views, CSV export) and replaces the inline check in the column picker. The report table passes its per-workspace hasVendorFeature result instead of pre-filtering the saved list itself.

Fixed Issues

$ #101859

Tests

  1. Sign in as an admin of a workspace connected to QuickBooks Online with non-reimbursable expenses exported as Credit card, or Sage Intacct with non-reimbursable expenses exported as Credit card charge.
  2. Create an expense in that workspace.
  3. Go to Spend > Expenses, click Display > Edit columns, enable Vendor and save.
  4. Verify the Vendor column shows in the table.
  5. Go to Workspaces > [workspace] > Accounting and disconnect the integration.
  6. Go back to Spend > Expenses.
  7. Verify the Vendor column is gone from the table.
  8. Click Display > Edit columns and verify Vendor is not offered.
  9. Open a report from that workspace and verify its expense table has no Vendor column.
  10. Reconnect the integration and go back to Spend > Expenses.
  11. Verify the Vendor column is back without editing columns again.
  • Verify that no errors appear in the JS console

Offline tests

  1. Complete steps 1 to 5 of Tests while online.
  2. Go offline.
  3. Go to Spend > Expenses and verify the Vendor column is not shown.
  4. Go back online and verify the table is unchanged.

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 01-web-connected-vendor-column 02-web-disconnected-table-no-vendor-column 03-web-disconnected-picker-no-vendor 04-mweb-disconnected-picker-no-vendor 05-web-disconnected-report-table-no-vendor 06-web-reconnected-vendor-column-back 07-web-reconnected-report-table-vendor-back

… vendor feature

The saved Search column list outlives the vendor feature, so getColumnsToShow now takes isVendorColumnAvailable and removes Vendor from the saved list and from the report view auto-show when it is false. A shared useIsVendorColumnAvailable hook feeds every Search caller and the column picker.
@codecov

codecov Bot commented Sep 22, 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 Δ
...ponents/Search/SearchList/ListItem/GroupHeader.tsx 77.67% <100.00%> (+0.20%) ⬆️
...archList/ListItem/TransactionGroupListExpanded.tsx 67.44% <100.00%> (+0.25%) ⬆️
src/components/Search/hooks/useSearchSnapshot.ts 86.95% <100.00%> (+0.14%) ⬆️
src/hooks/useIsVendorColumnAvailable.ts 100.00% <100.00%> (ø)
src/hooks/useSearchBulkActions.ts 75.97% <100.00%> (+0.03%) ⬆️
src/hooks/useSearchOverlay.tsx 57.14% <100.00%> (+1.26%) ⬆️
src/libs/SearchUIUtils.ts 71.17% <100.00%> (+0.01%) ⬆️
...yRequestReportView/useMoneyRequestReportColumns.ts 0.00% <0.00%> (ø)
.../components/Search/FilterDropdowns/SortByPopup.tsx 2.94% <0.00%> (-0.09%) ⬇️
src/pages/Search/SearchColumnsPage.tsx 0.00% <0.00%> (ø)
... and 16 files with indirect coverage changes

@c3024
c3024 marked this pull request as ready for review September 22, 2026 09:29
@c3024
c3024 requested review from a team as code owners September 22, 2026 09:29
@melvin-bot
melvin-bot Bot requested review from eh2077 and joekaufmanexpensify and removed request for a team September 22, 2026 09:29
@melvin-bot

melvin-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown

@eh2077 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 September 22, 2026 09:29
@eh2077

eh2077 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-09-22.at.9.05.28.PM.mov

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

works well and looks good - the new hook useIsVendorColumnAvailable and updated method in SearchUIUtils make the Vendor column work properly in different use cases.

@melvin-bot
melvin-bot Bot requested a review from Beamanator September 22, 2026 13:19

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

@Beamanator
Beamanator merged commit 1690b06 into Expensify:main Sep 22, 2026
41 of 46 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚧 Beamanator 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/Beamanator in version: 9.4.92-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Yes — help site changes were required, and I've opened a draft PR for them.

Draft PR: Docs updates for E/A#101864 Vendor column availability in Spend — labeled HelpDot, assigned to c3024.

Why a docs change was needed

This PR makes the Vendor column in Spend depend on at least one workspace having vendor matching active, and it applies that check everywhere the saved column list is read — the Spend table, the expense table on a report, Display > Edit columns, the sort popup, grouped views, and the Current view CSV export (src/hooks/useIsVendorColumnAvailable.ts, src/libs/SearchUIUtils.ts).

The help site never documented the Vendor column at all. So a member who added it and then disconnected QuickBooks Online or Sage Intacct would see it silently vanish with nothing explaining why.

What the docs PR changes

  • Using-Reports-in-New-Expensify.md — adds Vendor to the list of columns you can pick under Display > Edit columns, plus a note that it is only offered while a workspace has vendor matching active, and that your other saved columns are unaffected when it goes away.
  • Manage-Vendor-Matching-for-QuickBooks-Online.md — adds how to show the Vendor column in Spend and what happens to it when QuickBooks Online vendor matching stops.
  • Manage-Vendor-Matching-for-Sage-Intacct.md — the same two sections for Sage Intacct.

I documented only the QuickBooks Online and Sage Intacct paths, since Xero, Rillet, and Business Central are still gated behind the vendor matching beta in hasVendorFeature.

Written against docs/HELPSITE_NAMING_CONVENTIONS.md, docs/HELP_AUTHORING_GUIDELINES.md, and docs/TEMPLATE.md. I verified the UI labels (Spend, Display, Edit columns, Vendor, Current view, Export company card expenses as) against src/languages/en.ts — browser control was unavailable in this run, so I could not confirm them in a live session.


@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

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/lakchote in version: 9.4.92-8 🚀

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

Bundle Size Analysis (Sentry):

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants