Version Number: latest main
Reproduction Steps
- Enable the
vendorMatching beta on any account.
- Open a workspace with either (a) no accounting integration connected, or (b) an accounting integration whose non-reimbursable export destination does not scope the vendor field.
- Go to Settings → Workspace → More features.
Expected Result
The Vendors row should not appear in More features. It should only appear when the workspace has an accounting connection whose export config scopes the vendor field (this is exactly what hasVendorFeature in src/libs/PolicyUtils.ts returns).
When the row does appear, it should stay locked ON with a tooltip explaining that it is on because of the accounting integration (similar to how Categories/Tags/Taxes are handled when they come from a connection).
Actual Result
The row is rendered for any user with the beta enabled, regardless of accounting/export config. The toggle is disabled/locked with no explanation, so users don't understand how to make it work or turn it off.
Video repro from Tom in Slack: https://expensify.slack.com/archives/C07HPDRELLD/p1786096006215669?thread_ts=1785782693.225439&cid=C07HPDRELLD
Design & discussion
Fix scope
Two mechanical changes plus one copy string.
1. Hide the row when the feature doesn't apply.
src/pages/workspace/WorkspaceMoreFeaturesPage/index.tsx around line 461 — change the render gate from:
{isVendorMatchingEnabled && (
<MoreFeatureToggle ... />
)}
to:
{hasVendorFeature(policy, isVendorMatchingEnabled) && (
<MoreFeatureToggle ... />
)}
hasVendorFeature already exists in src/libs/PolicyUtils.ts and is exported. It mirrors the PHP backend gate (QBO w/ non-reimbursable = Credit Card or Debit Card, Sage Intacct w/ non-reimbursable = Credit Card Charge, Xero w/ config.isConfigured). No changes needed there — it is the single source of truth for this predicate.
2. Add a tooltip on the locked switch explaining why it's on.
The row stays disabled (there is no backend EnablePolicyVendors command yet, and the inline comment at the same call site explains why the switch stays purely derived). Per the design it should show a tooltip on hover, similar to how imported-from-integration Categories/Tags/Taxes explain themselves.
src/pages/workspace/WorkspaceMoreFeaturesPage/MoreFeatureToggle.tsx: add a disabledText?: string prop and forward it to the underlying <ToggleSettingOptionRow> — that component already accepts disabledText and wraps the switch in <Tooltip text={disabledText}> when disabled is true.
- Pass
disabledText={translate('workspace.moreFeatures.vendors.enabledExplanation')} to the Vendors <MoreFeatureToggle> in WorkspaceMoreFeaturesPage/index.tsx.
- Add the new copy string in
src/languages/en.ts inside workspace.moreFeatures.vendors (around line 6388). Suggested wording: "This is enabled by your accounting integration." — confirm final copy with @heyjennahay before shipping.
- Add the same key to
es.ts.
Scope confirmations (already answered — no follow-up needed)
- Integration coverage: use
hasVendorFeature as-is. Only QBO, Sage Intacct, and Xero are in scope. NetSuite and QuickBooks Desktop are intentionally excluded until they're picked up in a later release of the vendor project.
- Backend toggle: out of scope for this fix. The switch stays purely derived from
policy.connections — do not add an onToggle handler or an EnablePolicyVendors API call. That is a separate future PR (see the inline comment at WorkspaceMoreFeaturesPage/index.tsx line 461 on main).
Related
Platforms
All platforms — this is a shared React page.
Testing
- Enable the
vendorMatching beta.
- Open a workspace with no accounting connection → Vendors row should not appear.
- Connect QBO with non-reimbursable export = Credit Card → Vendors row appears, locked ON, tooltip on hover.
- Switch non-reimbursable export to a non-card destination (e.g. Journal Entry) → Vendors row disappears.
- Repeat 3–4 for Sage Intacct (Credit Card Charge) and Xero (any configured connection).
Upwork Automation - Do Not Edit
Version Number: latest main
Reproduction Steps
vendorMatchingbeta on any account.Expected Result
The Vendors row should not appear in More features. It should only appear when the workspace has an accounting connection whose export config scopes the vendor field (this is exactly what
hasVendorFeatureinsrc/libs/PolicyUtils.tsreturns).When the row does appear, it should stay locked ON with a tooltip explaining that it is on because of the accounting integration (similar to how Categories/Tags/Taxes are handled when they come from a connection).
Actual Result
The row is rendered for any user with the beta enabled, regardless of accounting/export config. The toggle is disabled/locked with no explanation, so users don't understand how to make it work or turn it off.
Video repro from Tom in Slack: https://expensify.slack.com/archives/C07HPDRELLD/p1786096006215669?thread_ts=1785782693.225439&cid=C07HPDRELLD
Design & discussion
Fix scope
Two mechanical changes plus one copy string.
1. Hide the row when the feature doesn't apply.
src/pages/workspace/WorkspaceMoreFeaturesPage/index.tsxaround line 461 — change the render gate from:to:
hasVendorFeaturealready exists insrc/libs/PolicyUtils.tsand is exported. It mirrors the PHP backend gate (QBO w/ non-reimbursable = Credit Card or Debit Card, Sage Intacct w/ non-reimbursable = Credit Card Charge, Xero w/config.isConfigured). No changes needed there — it is the single source of truth for this predicate.2. Add a tooltip on the locked switch explaining why it's on.
The row stays
disabled(there is no backendEnablePolicyVendorscommand yet, and the inline comment at the same call site explains why the switch stays purely derived). Per the design it should show a tooltip on hover, similar to how imported-from-integration Categories/Tags/Taxes explain themselves.src/pages/workspace/WorkspaceMoreFeaturesPage/MoreFeatureToggle.tsx: add adisabledText?: stringprop and forward it to the underlying<ToggleSettingOptionRow>— that component already acceptsdisabledTextand wraps the switch in<Tooltip text={disabledText}>whendisabledis true.disabledText={translate('workspace.moreFeatures.vendors.enabledExplanation')}to the Vendors<MoreFeatureToggle>inWorkspaceMoreFeaturesPage/index.tsx.src/languages/en.tsinsideworkspace.moreFeatures.vendors(around line 6388). Suggested wording: "This is enabled by your accounting integration." — confirm final copy with @heyjennahay before shipping.es.ts.Scope confirmations (already answered — no follow-up needed)
hasVendorFeatureas-is. Only QBO, Sage Intacct, and Xero are in scope. NetSuite and QuickBooks Desktop are intentionally excluded until they're picked up in a later release of the vendor project.policy.connections— do not add anonTogglehandler or anEnablePolicyVendorsAPI call. That is a separate future PR (see the inline comment atWorkspaceMoreFeaturesPage/index.tsxline 461 onmain).Related
Platforms
All platforms — this is a shared React page.
Testing
vendorMatchingbeta.Upwork Automation - Do Not Edit