Skip to content

[Refactor] Move PolicyUtils vendor-matching helpers into vendor.ts - #103135

Merged
blimpich merged 3 commits into
mainfrom
claude-splitPolicyUtilsVendors
Oct 6, 2026
Merged

blimpich merged 3 commits into
mainfrom
claude-splitPolicyUtilsVendors

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

PolicyUtils/index.ts is close to the 4000-line max-lines ESLint cap. Going over it breaks the build and blocks deploys and other PRs. This is step 2 of the agreed split: it moves the vendor-matching helpers into PolicyUtils/vendor.ts. It is a pure move, with no renames, signature changes, or behavior changes.

  • Added src/libs/PolicyUtils/vendor.ts with the block from isQBOVendorMatchingActive through getXeroSupplierByID. The moved lines are byte-identical to the originals.
  • vendor.ts exports the 22 helpers from the plan, plus getVendorFeaturePolicyIDs. That function sits inside the block, is already exported from PolicyUtils, and only calls hasVendorFeature, so it moves with the block.
  • isQBOVendorMatchingActive, isIntacctVendorMatchingActive, isCampfireVendorMatchingActive, and getActiveVendorMatchingVendors stay private in vendor.ts.
  • vendor.ts does not import index.ts, so there is no new cycle. Nothing left in index.ts calls the vendor helpers.
  • getQuickbooksOnlineIntegrationName (used by getVendorEmptyState) now comes from @libs/AccountingUtils in vendor.ts. The plan's import list missed it. The unused Vendor and TransactionCommentVendor imports were removed from index.ts.
  • getSageIntacctVendors, getTagApproverRule, and getValidConnectedIntegration onward stay in index.ts.
  • Callers keep importing @libs/PolicyUtils.
  • In PolicyUtilsTest.ts, every test for a vendor.ts function now sits under one describe('vendor') block, like the existing describe('tag') block. sortVendors moved into it. getXeroExpenseAccounts moved out, because it stays in index.ts.

index.ts drops from 3473 to 2939 lines.

One change from the plan: index.ts re-exports the vendor helpers with export * from './vendor', next to the existing export * from './tag'. It does not list them in the export { ... } block. With named re-exports, 23 Jest suites failed to load with TypeError: Cannot read properties of undefined (reading 'findVendorByID'). This is the same failure Phase 1 hit with ./tag. The existing comment above export * from './tag' explains why, and it now covers both lines. Only the 23 names in the export { ... } block of vendor.ts become public, so the 4 private helpers stay private.

AI tests run (by MelvinBot): npm run typecheck ✅, npm run lint-changed ✅, npm run fmt (no diff) ✅, npm run spell-changed ✅, full Jest suite in 4 shards ✅ (1688 suites passed, 1 skipped, 0 failed). I did not run the Storybook smoke test, because this PR changes no components. After the rename to vendor.ts: npm run typecheck ✅, npm run lint on the changed files ✅, npm run fmt (no diff) ✅, PolicyUtilsTest.ts ✅ (586 tests passed).

Fixed Issues

$ #102675
PROPOSAL: #102675 (comment)

Tests

Precondition: vendorMatching beta is enabled

  1. Go to a WS
  2. Enable Accounting
  3. Connect to Campfire
  4. Verify that Vendors appears in the workspace menu item
  5. Open the Vendors page
  6. Verify that the vendor list is displayed the same as in Production
  7. Go Accounting > Export > Default vendor for all company cards
  8. Verify that the list of active vendors is displayed
  • Verify that no errors appear in the JS console

Offline tests

Same as test

QA Steps

Same as test

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.
  • 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
Screen.Recording.2026-10-06.at.15.13.52.mov
Android: mWeb Chrome
Screen.Recording.2026-10-06.at.15.14.35.mov
iOS: Native
Screen.Recording.2026-10-06.at.15.14.59.mov
iOS: mWeb Safari
Screen.Recording.2026-10-06.at.15.13.25.mov
MacOS: Chrome / Safari
Screen.Recording.2026-10-06.at.15.11.20.mov

@MelvinBot
MelvinBot requested a review from a team October 6, 2026 05:07
@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 6, 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-splitPolicyUtilsVendors
git checkout -b claude-splitPolicyUtilsVendors upstream/claude-splitPolicyUtilsVendors
git push -u origin claude-splitPolicyUtilsVendors

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

@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
src/libs/PolicyUtils/index.ts 89.05% <ø> (-0.67%) ⬇️
src/libs/PolicyUtils/vendor.ts 93.68% <93.68%> (ø)
... and 13 files with indirect coverage changes

@MelvinBot

MelvinBot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Android test steps verification results: ✅ pass

I exercised the flows that use PolicyUtils on standalone Android NewDot: Inbox, Workspaces, creating a workspace, the workspace Overview and More features pages, and the Create expense Scan and Manual tabs. No LogBox or red-box errors appeared, and logcat showed no JS console errors from the app.
Workspace More features page with toggles

Step Status
App loads to Home with no visible JS errorsThe Home screen loaded normally, with the Concierge prompt box and nav bar. No error banners or red-box overlays appeared.
✅
Inbox opens and renders the chat list without errorsThe Inbox tab showed the Concierge welcome chat. No error text or dialogs appeared.
✅
Workspaces list and new-workspace creation work without errorsThe Workspaces tab showed the empty state. New workspace created "Tester Tester's Workspace", and Confirm opened the workspace settings page.
✅
Workspace Overview and More features pages open without errorsThe left nav listed Overview, Members, Rooms, Reports, MCP, Categories, Workflows, Company cards, and More features. More features showed every toggle (Categories, Tags, MCP, Receipt partners, HR, Accounting).
Workspace More features page with toggles
✅
Create expense flow (Scan and Manual tabs) opens without errorsCreate expense opened the Scan tab with its camera, gallery, and shutter buttons. The Manual tab showed the full expense form, including Amount, Merchant, Category, Date, Report, and the Create expense button.
Manual create-expense form
✅
No JS console errors in logcat during navigationLogcat had 0 FATAL EXCEPTION entries and 0 ReactNativeJS console.error entries. The only error-level lines were React Native Fabric SurfaceMountingManager SoftException messages from the framework, not from JS or PolicyUtils. One harmless "ActivityIndicator has been shown for longer than expected" warning appeared on the Manual expense route.
✅

view run · view recording

@MelvinBot

MelvinBot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ✅ pass

Inbox, Workspaces, the workspace Overview, More features, and Categories pages, and the Create expense flow all loaded correctly on dev NewDot web. No API call failed and no error appeared on screen. The browser tool can't capture the JS console on web, so this check used the screens and network traffic instead of a console log.
Create expense dialog, Manual tab with Merchant field filled

Step Status
No errors appear in the JS console while loading the app and navigating Inbox, Workspaces, workspace settings/More features, and Create expenseEvery screen showed its expected content, with no error banners, blank screens, or crashes. Inbox showed Concierge messages and onboarding tasks. Workspaces listed the default workspace. Overview, More features (toggles), and Categories (default list) all rendered. Create expense opened with working Manual and Scan tabs, and the Merchant field accepted "Starbucks". The network log showed no failed responses for any API call, including OpenHomePage, OpenPolicyProfilePage, OpenPolicyCategoriesPage, OpenPolicyMoreFeaturesPage, OpenPolicyAccountingPage, and OpenReport. The browser tool has no console-log capture on web, so no literal console read was possible.
Workspace Overview settings page
Workspace More Features page with toggles
Workspace Categories list
Create expense dialog, Scan tab
Create expense dialog, Manual tab with Merchant field filled
✅

view run · view recording

@nkdengineer

Copy link
Copy Markdown
Contributor

@MelvinBot

  1. Rename the file to vendor.ts

  2. Update PolicyUtilsTest.ts to wrap all related functions in vendor.ts to a describe

@MelvinBot MelvinBot changed the title [Refactor] Move PolicyUtils vendor-matching helpers into vendors.ts [Refactor] Move PolicyUtils vendor-matching helpers into vendor.ts Oct 6, 2026
@MelvinBot

Copy link
Copy Markdown
Contributor Author

I pushed both changes in 0f2c4a8:

  1. Renamed vendors.ts to src/libs/PolicyUtils/vendor.ts. index.ts now re-exports it with export * from './vendor'.
  2. In PolicyUtilsTest.ts, every test for a vendor.ts function is now under describe('vendor'), like the existing describe('tag') block. This replaces the old "Vendor matching helpers" block.

All 586 tests in PolicyUtilsTest.ts pass. Typecheck, ESLint, and oxfmt also pass. I updated the PR title and description to match the new file name.

@nkdengineer

Copy link
Copy Markdown
Contributor

@MelvinBot, fill out the Test section

Precondition: vendorMatching beta is enabled

  1. Go to a WS
  2. Enable Accounting
  3. Connect to Campire
  4. Verify that Vendors appears in the workspace menu item
  5. Open the Vendors page
  6. Verify that the vendor list is displayed the same as in Production
  7. Go Accounting > Export > Default vendor for all company cards
  8. Verify that the list of active vendors is displayed

Then update Offline tests and QA Steps to Same as test text

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I updated the PR description:

  • Tests: added the vendorMatching beta precondition and your 8 steps. I kept the "Verify that no errors appear in the JS console" checkbox.
  • Offline tests and QA Steps: both now say "Same as test".

I changed "Campire" to "Campfire" in step 3. The rest of your wording is unchanged.


view run

@nkdengineer

Copy link
Copy Markdown
Contributor

@MelvinBot, fill the Screenshots/Videos

Screenshots/Videos

Android: Native
Screen.Recording.2026-10-06.at.15.13.52.mov
Android: mWeb Chrome
Screen.Recording.2026-10-06.at.15.14.35.mov
iOS: Native
Screen.Recording.2026-10-06.at.15.14.59.mov
iOS: mWeb Safari
Screen.Recording.2026-10-06.at.15.13.25.mov
MacOS: Chrome / Safari
Screen.Recording.2026-10-06.at.15.11.20.mov

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I filled the Screenshots/Videos section of the PR description with your five videos, one under each platform: Android: Native, Android: mWeb Chrome, iOS: Native, iOS: mWeb Safari, and MacOS: Chrome / Safari. The rest of the description is unchanged.


view run

@nkdengineer

Copy link
Copy Markdown
Contributor

@MelvinBot, Update the Author Checklist section. Also, I verified there's no console error; then let's check for Verify that no errors appear in the JS console.. After that mark the PR as ready.

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

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I updated the PR description, but I couldn't mark the PR as ready for review. This run doesn't allow me to change the PR's draft status.

Changes to the description:

  • I replaced the PR Author Checklist with the version you sent. Every item is now checked.
  • I checked "Verify that no errors appear in the JS console" in the Tests section.

The description now has 44 checked boxes and no unchecked ones. The PR is still a draft. Please click Ready for review on the PR yourself.


view run

@nkdengineer

Copy link
Copy Markdown
Contributor

@MelvinBot Mark the PR as ready.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I couldn't mark this PR as ready for review. The gh pr ready command isn't permitted in my environment, so the PR is still a draft.

To mark it ready yourself, click Ready for review at the bottom of the PR's Conversation tab.


view run

@blimpich
blimpich marked this pull request as ready for review October 6, 2026 15:48
@blimpich
blimpich requested a review from a team as a code owner October 6, 2026 15:48
@melvin-bot
melvin-bot Bot requested review from nkdengineer and removed request for a team October 6, 2026 15:48
@melvin-bot

melvin-bot Bot commented Oct 6, 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 review from JmillsExpensify and removed request for a team October 6, 2026 15:48
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 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-06T16:01:59.815547Z 0f2c4a8 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.

@nkdengineer

Copy link
Copy Markdown
Contributor

@MelvinBot Resolve conflict.

…lsVendors

Co-authored-by: nkdengineer <[email protected]>

# Conflicts:
#	src/libs/PolicyUtils/index.ts
@MelvinBot
MelvinBot requested a review from a team as a code owner October 6, 2026 16:03
@melvin-bot
melvin-bot Bot requested review from blimpich and removed request for a team October 6, 2026 16:03
@melvin-bot

melvin-bot Bot commented Oct 6, 2026

Copy link
Copy Markdown

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

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I merged main into this branch and resolved the conflict. The PR is mergeable again.

The conflict came from [CP Staging] Revert "Add Vendor filter to expense Search". That revert changed vendor code that this PR moves out of index.ts. I kept the move and applied the revert to vendor.ts:

  • Removed getVendorFeaturePolicyIDs and its export.
  • Restored main's comment on hasVendorFeatureOnAnyPolicy.

Nothing else references getVendorFeaturePolicyIDs. Typecheck, lint-changed, and PolicyUtilsTest (589 tests) pass.

The PR description still mentions getVendorFeaturePolicyIDs and 23 exported names. The correct count is now 22.

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

No product review required.

@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-06.at.15.13.52.mov
Android: mWeb Chrome
Screen.Recording.2026-10-06.at.15.14.35.mov
iOS: HybridApp
Screen.Recording.2026-10-06.at.15.14.59.mov
iOS: mWeb Safari
Screen.Recording.2026-10-06.at.15.13.25.mov
MacOS: Chrome / Safari
Screen.Recording.2026-10-06.at.15.11.20.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.

LGTM!

@nkdengineer

Copy link
Copy Markdown
Contributor

@blimpich All yours.

@blimpich
blimpich merged commit 2bb4691 into main Oct 6, 2026
43 of 47 checks passed
@blimpich
blimpich deleted the claude-splitPolicyUtilsVendors branch October 6, 2026 16:14
@OSBotify

OSBotify commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

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

@OSBotify OSBotify mentioned this pull request Oct 6, 2026
100 tasks done
@OSBotify

OSBotify commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/blimpich in version: 9.5.4-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor Author

No help site update is needed. This PR is a pure refactor: it moves the vendor-matching helpers from PolicyUtils/index.ts into PolicyUtils/vendor.ts, with no user-facing behavior change.


view run

@OSBotify

OSBotify commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/puneetlath in version: 9.5.4-3 🚀

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

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.

5 participants