Skip to content

Gate Vendors More features row on a supported integration and explain the lock - #98845

Draft
MelvinBot wants to merge 1 commit into
mainfrom
claude-vendorsMoreFeaturesGate
Draft

Gate Vendors More features row on a supported integration and explain the lock#98845
MelvinBot wants to merge 1 commit into
mainfrom
claude-vendorsMoreFeaturesGate

Conversation

@MelvinBot

Copy link
Copy Markdown
Contributor

Explanation of Change

The Vendors row in Settings → Workspace → More features was rendered for every user with the vendorMatching beta enabled, regardless of accounting setup, and its locked switch gave no explanation when tapped. Per the updated spec and Jenna's confirmation, the row should follow a three-state matrix:

Workspace state Visible? isActive Interaction
QBO / Xero / Sage Intacct with vendor-scoping export config ON (locked) modal
QBO / Xero / Sage Intacct without the right export config OFF (locked) modal
NetSuite / QuickBooks Desktop / no connection

This PR:

  1. Splits visibility from activation. The render gate is now "a supported integration (QBO / Xero / Sage Intacct) is connected", derived via getConnectedIntegration with an explicit allowlist. hasVendorFeature stays as the narrower isActive predicate (does the export config actually scope vendors) so supported-but-unconfigured workspaces still see a locked-OFF discovery row, while NetSuite / QuickBooks Desktop / no-connection workspaces are hidden.
  2. Explains the lock by wiring the existing withReadOnlyFallback + showConfirmModal pattern (the same one Categories / Tags / Taxes use) into the Vendors row's disabledAction. Writable admins now get an accounting-settings explanation modal; read-only users still get the standard read-only modal. The switch stays purely derived from policy.connections — no EnablePolicyVendors command is introduced (that remains a future PR).
  3. Adds the copy (disabledTitle / disabledMessage) confirmed by @heyjennahay to en.ts, with translations mirrored to every other locale.

Added table-driven UI tests covering the hidden states (no connection, NetSuite), the locked-ON supported state (with the explanation modal), and the supported locked-OFF discovery state.

Fixed Issues

$ #98591
PROPOSAL: #98591 (comment)

Tests

  1. Enable the vendorMatching beta.
  2. Open a workspace with no accounting connection → the Vendors row is not shown.
  3. Connect NetSuite or QuickBooks Desktop → the Vendors row is not shown.
  4. Connect QBO with non-reimbursable export = Journal Entry / Vendor Bill → the Vendors row is shown, switch locked OFF; tapping it opens the "Not so fast..." modal.
  5. Switch the QBO non-reimbursable export to Credit Card / Debit Card → the Vendors row is shown, switch locked ON; tapping it opens the same modal, and the row body navigates to Vendors.
  6. Repeat 4–5 for Sage Intacct (correct = Credit Card Charge) and Xero (correct = connection configured).
  7. As a read-only member on any visible state, tapping the switch shows the standard read-only modal instead of the accounting-settings modal.
  • Verify that no errors appear in the JS console

Offline tests

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."

  • 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

… the lock

Co-authored-by: thelullabyy <thelullabyy@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team August 18, 2026 06:39
@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/de.ts b/src/languages/de.ts
index 82866682..db09b465 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -6362,8 +6362,8 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU
             vendors: {
                 title: 'Lieferanten',
                 subtitle: 'Ordnen Sie Kartenausgaben den aus Ihrer Buchhaltungssoftware importierten Lieferanten zu.',
-                disabledTitle: 'Nicht so schnell...',
-                disabledMessage: 'Um diese Funktion zu aktivieren oder zu deaktivieren, müssen Sie Ihre Buchhaltungsimporteinstellungen ändern.',
+                disabledTitle: 'Nicht so schnell …',
+                disabledMessage: 'Um diese Funktion zu aktivieren oder zu deaktivieren, müssen Sie Ihre Buchhaltungs-Importeinstellungen ändern.',
             },
         },
         reports: {
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 0231f79c..e577c8e4 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -6201,7 +6201,7 @@ ${amount} para ${merchant} - ${date}`,
                 title: 'Proveedores',
                 subtitle: 'Asocia los gastos de tarjeta con los proveedores importados de tu software de contabilidad.',
                 disabledTitle: 'No tan rápido...',
-                disabledMessage: 'Para activar o desactivar esta función, deberás cambiar la configuración de importación de contabilidad.',
+                disabledMessage: 'Para habilitar o deshabilitar esta función, tendrás que cambiar tu configuración de importación de contabilidad.',
             },
             reportFields: {
                 title: 'Campos de informes',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 89901336..bd35521c 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -6386,7 +6386,7 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST.
                 title: 'Fournisseurs',
                 subtitle: 'Faites correspondre les dépenses de carte aux fournisseurs importés depuis votre logiciel de comptabilité.',
                 disabledTitle: 'Pas si vite...',
-                disabledMessage: 'Pour activer ou désactiver cette fonctionnalité, vous devrez modifier vos paramètres d’importation comptable.',
+                disabledMessage: "Pour activer ou désactiver cette fonctionnalité, vous devez modifier vos paramètres d'import comptable.",
             },
         },
         reports: {
diff --git a/src/languages/it.ts b/src/languages/it.ts
index fffc1f5c..dcbc2234 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -6338,7 +6338,7 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST.
                 title: 'Fornitori',
                 subtitle: 'Abbina le spese della carta ai fornitori importati dal tuo software di contabilità.',
                 disabledTitle: 'Non così in fretta...',
-                disabledMessage: 'Per abilitare o disabilitare questa funzione, dovrai modificare le impostazioni di importazione della contabilità.',
+                disabledMessage: 'Per attivare o disattivare questa funzione, devi modificare le impostazioni di importazione contabile.',
             },
         },
         reports: {
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index b9dbc5ff..dda58d62 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -6256,7 +6256,7 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
             vendors: {
                 title: 'ベンダー',
                 subtitle: '会計ソフトからインポートした取引先にカード経費を照合します。',
-                disabledTitle: 'ちょっと待ってください...',
+                disabledTitle: 'ちょっとお待ちください…',
                 disabledMessage: 'この機能を有効または無効にするには、会計インポート設定を変更する必要があります。',
             },
         },
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 5c487d6f..68605921 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -6324,7 +6324,7 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_
                 title: 'Leveranciers',
                 subtitle: 'Koppel kaartuitgaven aan leveranciers die zijn geïmporteerd uit je boekhoudsoftware.',
                 disabledTitle: 'Niet zo snel...',
-                disabledMessage: 'Om deze functie in of uit te schakelen, moet je je boekhoudimportinstellingen wijzigen.',
+                disabledMessage: 'Om deze functie in of uit te schakelen, moet je je instellingen voor boekhoudimport wijzigen.',
             },
         },
         reports: {
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 0a093db9..84bb539a 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -6302,8 +6302,8 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy
             vendors: {
                 title: 'Dostawcy',
                 subtitle: 'Dopasuj wydatki z karty do kontrahentów zaimportowanych z twojego oprogramowania księgowego.',
-                disabledTitle: 'Nie tak szybko...',
-                disabledMessage: 'Aby włączyć lub wyłączyć tę funkcję, musisz zmienić ustawienia importu księgowego.',
+                disabledTitle: 'Nie tak prędko...',
+                disabledMessage: 'Aby włączyć lub wyłączyć tę funkcję, musisz zmienić swoje ustawienia importu księgowego.',
             },
         },
         reports: {
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 9a290e79..c1774396 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -6324,7 +6324,7 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS
                 title: 'Fornecedores',
                 subtitle: 'Combine as despesas do cartão com fornecedores importados do seu software de contabilidade.',
                 disabledTitle: 'Calma lá...',
-                disabledMessage: 'Para ativar ou desativar este recurso, você precisará alterar suas configurações de importação contábil.',
+                disabledMessage: 'Para ativar ou desativar esse recurso, você precisa alterar suas configurações de importação contábil.',
             },
         },
         reports: {
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index c5b3dcf1..93ed594f 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -6108,8 +6108,8 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
             vendors: {
                 title: '供应商',
                 subtitle: '将卡片报销与从您的会计软件导入的供应商进行匹配。',
-                disabledTitle: '别急...',
-                disabledMessage: '要启用或禁用此功能,您需要更改会计导入设置。',
+                disabledTitle: '别那么快……',
+                disabledMessage: '若要启用或禁用此功能,您需要更改会计导入设置。',
             },
         },
         reports: {

Note

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

View workflow run

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I looked into the failing checks and there's no code fix needed — every real check is now passing.

The only failing check is Check independent approval, and it isn't a code failure. It reports:

#98845 does not have enough independent Expensify employee approvals.

That check only passes once an independent Expensify employee reviews and approves the PR, so it can't be resolved by pushing a commit. It'll go green on its own once the PR gets an independent approval.

Full check status
  • All unit test shards (test job 1–8), typecheck, ESLint, Oxfmt, Bun tests, Storybook tests, generateTranslations, spellcheck, and the builds — pass.
  • branch-perf-tests, baseline-perf-tests, validate-perf-testspass (no perf regression).
  • Check independent approvalfail, waiting on an independent Expensify-employee approval (not fixable via a push).

No further action needed from me here — this one just needs a reviewer.

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.

3 participants