Skip to content

[No QA] Show UK fuel rate VAT mapping warnings - #106055

Merged
neil-marcellini merged 12 commits into
mainfrom
claude-ukFuelRateTaxError
Nov 12, 2026
Merged

neil-marcellini merged 12 commits into
mainfrom
claude-ukFuelRateTaxError

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Workspace admins see a warning when an enabled UK advisory fuel-band rate has no valid VAT tax mapping. A red dot replaces the gear on the direct Settings button, leading to the warning in Settings; the affected rate page shows it too. Selecting a valid tax mapping clears the warning, or an admin can dismiss it for the whole workspace. Standard mileage and custom rates are unaffected.

Fixed Issues

$ #104646
PROPOSAL: #104646 (comment)

Tests

Local developer steps only; use a disposable workspace, since dismissal sends a real request.

  1. As an admin, use a GBP Control workspace with Distance rates, Taxes, and Track tax enabled, plus an existing enabled rate. Open Distance rates and wait for OpenPolicyDistanceRatesPage to finish before running this in the nonproduction browser console (replace WORKSPACE_ID):
(async () => {
    const key = 'policy_WORKSPACE_ID';
    const policy = await window.Onyx.get(key);
    const [unitID, unit] = Object.entries(policy.customUnits).find(([, u]) => u.name === 'Distance');
    const [rateID] = Object.entries(unit.rates).find(([, r]) => r.enabled && !r.pendingAction);
    await window.Onyx.merge(key, {
        customUnits: {
            [unitID]: {
                attributes: {isUKFuelRateTaxErrorDismissed: false},
                errorFields: {isUKFuelRateTaxErrorDismissed: null},
                rates: {
                    [rateID]: {
                        enabled: true,
                        attributes: {
                            governmentRate: {sourceRateID: 'GB_PETROL_UP_TO_1400_2026-09-01'},
                            taxRateExternalID: null,
                        },
                    },
                },
            },
        },
    });
})();
  1. Verify red dots on the Workspaces tab/row, Distance rates menu, and direct Settings button (replacing its gear, with no More dropdown). Verify one click opens Settings. Open the modified rate and Settings; verify both show the 20% warning with a dismiss X, while the Tax rate field itself has no red dot. Rerun the snippet after each page refetch finishes; otherwise the response wipes the local fixture.
  2. Dismiss from either page and verify the warning and leading dots clear for the workspace. Reapply the fixture and repeat from the other page. A rejected request should restore the warning with visible failure feedback.
  3. Reapply the fixture, select a valid tax mapping, and verify the warning clears when no other enabled fuel band has an invalid mapping.
  • Verify that no errors appear in the JS console

Offline tests

  1. With the local fixture active, go offline and dismiss the warning; verify it and the leading dots hide immediately, then reconnect and verify persistence on success or visible rollback on failure.

QA Steps

No QA

  • Verify that no errors appear in the JS console

AI Tests

Latest run (2026-11-11):

  • Passed: nine targeted suites (1,209 tests), including real warning/close-button/action wiring on Settings and rate details. Full typecheck, changed-file lint/lint-changed, Oxfmt, spelling, explicit React Compiler check, staged-diff review, and Storybook smoke test passed.
  • Full lint/Jest exceeded local time limits; compiler change discovery had an unavailable base ref. Live web verification was blocked by a blank supplied session.

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 verified any copy / text that was added to the app 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 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 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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team November 5, 2026 02:54
@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 Nov 5, 2026
@MelvinBot

Copy link
Copy Markdown
Contributor Author

I created this draft PR from an upstream branch because I do not have push access to your fork. It is assigned to Krishna2323 and must remain in draft until DismissUKFuelRateTaxError is live.

To take ownership of the branch in your fork:

git remote add upstream https://github.com/Expensify/App.git
git fetch upstream claude-ukFuelRateTaxError
git checkout -b claude-ukFuelRateTaxError upstream/claude-ukFuelRateTaxError
git push -u origin claude-ukFuelRateTaxError

You can then close this PR and open a draft PR from your fork.

@OSBotify

OSBotify commented Nov 5, 2026

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 a3de8a93..155bad31 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -8341,9 +8341,9 @@ Der Control-Tarif beginnt bei 9 $ pro aktivem Mitglied und Monat.`,
             statusExpired: 'Abgelaufen',
             statusInactive: 'Inaktiv',
             unit: 'Einheit',
-            ukFuelRateTaxError: 'Bitte füge einen Steuersatz von 20 % hinzu, um die Steuer für die britischen Advisory Fuel Rates zu erfassen.',
+            ukFuelRateTaxError: 'Bitte fügen Sie einen Steuersatz von 20 % hinzu, um die Steuer auf die britischen Advisory Fuel Rates zu erfassen.',
             ukFuelRateTaxErrorWithIntegration: ({integrationName}: {integrationName: string}) =>
-                `Bitte füge in ${integrationName} einen Steuersatz von 20 % hinzu, um die Steuer für die britischen Advisory Fuel Rates zu erfassen.`,
+                `Bitte fügen Sie in ${integrationName} einen Steuersatz von 20 % hinzu, um die Steuer auf die britischen Advisory Fuel Rates nachzuverfolgen.`,
             taxFeatureNotEnabledMessage:
                 '<muted-text>Steuern müssen im Workspace aktiviert sein, um diese Funktion zu verwenden. Gehe zu <a href="#">Weitere Funktionen</a>, um das zu ändern.</muted-text>',
             deleteDistanceRate: 'Entfernungsrate löschen',
diff --git a/src/languages/el.ts b/src/languages/el.ts
index e9f28199..5bcec5c8 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -8618,9 +8618,9 @@ _Για πιο αναλυτικές οδηγίες, [επισκεφθείτε τ
             statusExpired: 'Έληξε',
             statusInactive: 'Ανενεργό',
             unit: 'Μονάδα',
-            ukFuelRateTaxError: 'Προσθέστε φορολογικό συντελεστή 20% για την παρακολούθηση του φόρου στις συνιστώμενες τιμές καυσίμων του Ηνωμένου Βασιλείου.',
+            ukFuelRateTaxError: 'Προσθέστε έναν φορολογικό συντελεστή 20% για την παρακολούθηση του φόρου στα UK Advisory Fuel Rates.',
             ukFuelRateTaxErrorWithIntegration: ({integrationName}: {integrationName: string}) =>
-                `Προσθέστε φορολογικό συντελεστή 20% στο ${integrationName} για την παρακολούθηση του φόρου στις συνιστώμενες τιμές καυσίμων του Ηνωμένου Βασιλείου.`,
+                `Παρακαλούμε προσθέστε συντελεστή φόρου 20% στο ${integrationName} για να παρακολουθείτε τον φόρο στους βρετανικούς συντελεστές Advisory Fuel.`,
             taxFeatureNotEnabledMessage:
                 '<muted-text>Πρέπει να είναι ενεργοποιημένοι οι φόροι στο χώρο εργασίας για να χρησιμοποιήσετε αυτή τη λειτουργία. Μεταβείτε στο <a href="#">Περισσότερες δυνατότητες</a> για να κάνετε αυτήν την αλλαγή.</muted-text>',
             deleteDistanceRate: 'Διαγραφή χρέωσης απόστασης',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 02142a3c..c7a5a6c1 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -8352,9 +8352,9 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`,
             statusExpired: 'Expirado',
             statusInactive: 'Inactivo',
             unit: 'Unidad',
-            ukFuelRateTaxError: 'Añade una tasa impositiva del 20% para registrar los impuestos de las tarifas de combustible recomendadas del Reino Unido.',
+            ukFuelRateTaxError: 'Añade una tasa de impuestos del 20% para registrar el impuesto en las Tarifas de Combustible de Asesoría del Reino Unido (UK Advisory Fuel Rates).',
             ukFuelRateTaxErrorWithIntegration: ({integrationName}: {integrationName: string}) =>
-                `Añade una tasa impositiva del 20% en ${integrationName} para registrar los impuestos de las tarifas de combustible recomendadas del Reino Unido.`,
+                `Por favor, añade una tasa de impuesto del 20 % en ${integrationName} para registrar el impuesto sobre las Tarifas de Combustible Asesoradas del Reino Unido (UK Advisory Fuel Rates).`,
             taxFeatureNotEnabledMessage:
                 '<muted-text>Los impuestos deben estar activados en el área de trabajo para poder utilizar esta función. Dirígete a <a href="#">Más funcionalidades</a> para hacer ese cambio.</muted-text>',
             deleteDistanceRate: 'Eliminar tasa de distancia',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index b5377c89..dc405e3e 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -8366,9 +8366,9 @@ Le forfait Control commence à 9 $ par Membre actif et par mois.`,
             statusExpired: 'Expiré',
             statusInactive: 'Inactif',
             unit: 'Unité',
-            ukFuelRateTaxError: 'Veuillez ajouter un taux de taxe de 20 % pour suivre la taxe sur les tarifs de carburant recommandés au Royaume-Uni.',
+            ukFuelRateTaxError: 'Veuillez ajouter un taux de taxe de 20 % pour suivre la taxe sur les « UK Advisory Fuel Rates ».',
             ukFuelRateTaxErrorWithIntegration: ({integrationName}: {integrationName: string}) =>
-                `Veuillez ajouter un taux de taxe de 20 % dans ${integrationName} pour suivre la taxe sur les tarifs de carburant recommandés au Royaume-Uni.`,
+                `Veuillez ajouter un taux de taxe de 20 % dans ${integrationName} pour suivre la taxe sur les taux de carburant consultatifs au Royaume-Uni.`,
             taxFeatureNotEnabledMessage:
                 '<muted-text>Les taxes doivent être activées sur l’espace de travail pour utiliser cette fonctionnalité. Rendez-vous dans <a href="#">Plus de fonctionnalités</a> pour effectuer cette modification.</muted-text>',
             deleteDistanceRate: 'Supprimer le taux de distance',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index e2d25fb7..c7724f3a 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -8290,9 +8290,9 @@ Il piano Control parte da 9 $ al mese per ogni membro attivo.`,
             statusExpired: 'Scaduto',
             statusInactive: 'Inattivo',
             unit: 'Unit',
-            ukFuelRateTaxError: 'Aggiungi un’aliquota del 20% per monitorare le imposte sulle tariffe carburante consigliate del Regno Unito.',
+            ukFuelRateTaxError: 'Aggiungi un’aliquota fiscale del 20% per tenere traccia delle imposte sulle UK Advisory Fuel Rates.',
             ukFuelRateTaxErrorWithIntegration: ({integrationName}: {integrationName: string}) =>
-                `Aggiungi un’aliquota del 20% in ${integrationName} per monitorare le imposte sulle tariffe carburante consigliate del Regno Unito.`,
+                `Aggiungi un'aliquota fiscale del 20% in ${integrationName} per tenere traccia delle imposte sui tassi di rimborso carburante del Regno Unito.`,
             taxFeatureNotEnabledMessage:
                 '<muted-text>Per usare questa funzione devi abilitare le imposte nello spazio di lavoro. Vai su <a href="#">Altre funzionalità</a> per effettuare questa modifica.</muted-text>',
             deleteDistanceRate: 'Elimina tariffa chilometrica',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index ba8ef329..887caa04 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -7497,7 +7497,6 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
                 title: 'メンバーをコピー',
                 prompt: ({count, targetWorkspaceName}: {count: number; targetWorkspaceName: string}) => ({
                     one: `${targetWorkspaceName}のメンバーをこのワークスペースのメンバーで置き換えてもよろしいですか?`,
-                    // Japanese has no "one" plural category, so handle the single-workspace case here
                     other:
                         count === 1
                             ? `${targetWorkspaceName}のメンバーをこのワークスペースのメンバーで置き換えてもよろしいですか?`
@@ -8175,9 +8174,9 @@ Control プランは、アクティブメンバー1人あたり月額 $9 から
             statusExpired: '期限切れ',
             statusInactive: '無効',
             unit: '単位',
-            ukFuelRateTaxError: '英国の推奨燃料料金の税金を追跡するには、20%の税率を追加してください。',
+            ukFuelRateTaxError: '英国アドバイザリー燃料料金の税金を追跡するために、20%の税率を追加してください。',
             ukFuelRateTaxErrorWithIntegration: ({integrationName}: {integrationName: string}) =>
-                `英国の推奨燃料料金の税金を追跡するには、${integrationName}に20%の税率を追加してください。`,
+                `UKのアドバイザリー燃料レートの税金を管理するため、${integrationName} に20%の税率を追加してください。`,
             taxFeatureNotEnabledMessage:
                 '<muted-text>この機能を利用するには、ワークスペースで税金設定を有効にする必要があります。設定を変更するには、<a href="#">その他の機能</a>に移動してください。</muted-text>',
             deleteDistanceRate: '距離レートを削除',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index f2508dce..40bb5353 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -8272,9 +8272,9 @@ Het Control-abonnement begint bij $9 per actieve deelnemer per maand.`,
             statusExpired: 'Verlopen',
             statusInactive: 'Inactief',
             unit: 'Eenheid',
-            ukFuelRateTaxError: 'Voeg een belastingtarief van 20% toe om belasting bij te houden voor de Britse adviesbrandstoftarieven.',
+            ukFuelRateTaxError: 'Voeg een btw-tarief van 20% toe om btw op de UK Advisory Fuel Rates bij te houden.',
             ukFuelRateTaxErrorWithIntegration: ({integrationName}: {integrationName: string}) =>
-                `Voeg een belastingtarief van 20% toe in ${integrationName} om belasting bij te houden voor de Britse adviesbrandstoftarieven.`,
+                `Voeg alsjeblieft een belastingtarief van 20% toe in ${integrationName} om de belasting op de Britse Advisory Fuel Rates bij te houden.`,
             taxFeatureNotEnabledMessage:
                 '<muted-text>Belastingen moeten in de workspace zijn ingeschakeld om deze functie te gebruiken. Ga naar <a href="#">Meer functies</a> om dat te wijzigen.</muted-text>',
             deleteDistanceRate: 'Afstandstarief verwijderen',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index d36a3699..a19ce59e 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -8297,9 +8297,9 @@ Plan Control zaczyna się od 9 USD za aktywnego członka miesięcznie.`,
             statusExpired: 'Wygasła',
             statusInactive: 'Nieaktywna',
             unit: 'Jednostka',
-            ukFuelRateTaxError: 'Dodaj stawkę podatku 20%, aby śledzić podatek dla brytyjskich zalecanych stawek paliwowych.',
+            ukFuelRateTaxError: 'Dodaj stawkę podatku 20%, aby śledzić podatek od brytyjskich stawek paliwa doradczego (UK Advisory Fuel Rates).',
             ukFuelRateTaxErrorWithIntegration: ({integrationName}: {integrationName: string}) =>
-                `Dodaj stawkę podatku 20% w ${integrationName}, aby śledzić podatek dla brytyjskich zalecanych stawek paliwowych.`,
+                `Dodaj proszę stawkę podatku 20% w ${integrationName}, aby śledzić podatek od brytyjskich stawek Advisory Fuel Rates.`,
             taxFeatureNotEnabledMessage:
                 '<muted-text>Aby korzystać z tej funkcji, włącz podatki w przestrzeni roboczej. Przejdź do sekcji <a href="#">Więcej funkcji</a>, aby to zmienić.</muted-text>',
             deleteDistanceRate: 'Usuń stawkę za dystans',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 8fac6a88..f80e75c8 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -8286,9 +8286,9 @@ O plano Control começa em US$ 9 por membro ativo por mês.`,
             statusExpired: 'Expirado',
             statusInactive: 'Inativo',
             unit: 'Unidade',
-            ukFuelRateTaxError: 'Adicione uma alíquota de 20% para acompanhar os impostos sobre as tarifas de combustível recomendadas do Reino Unido.',
+            ukFuelRateTaxError: 'Adicione uma alíquota de imposto de 20% para acompanhar o imposto nas UK Advisory Fuel Rates.',
             ukFuelRateTaxErrorWithIntegration: ({integrationName}: {integrationName: string}) =>
-                `Adicione uma alíquota de 20% no ${integrationName} para acompanhar os impostos sobre as tarifas de combustível recomendadas do Reino Unido.`,
+                `Adicione uma alíquota de imposto de 20% em ${integrationName} para rastrear o imposto nas Taxas de Combustível Consultivas do Reino Unido.`,
             taxFeatureNotEnabledMessage:
                 '<muted-text>Os impostos precisam estar ativados no workspace para usar este recurso. Vá até <a href="#">Mais recursos</a> para fazer essa alteração.</muted-text>',
             deleteDistanceRate: 'Excluir taxa de distância',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 04e5730e..434e9f6e 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -7324,7 +7324,6 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
                 title: '复制成员',
                 prompt: ({count, targetWorkspaceName}: {count: number; targetWorkspaceName: string}) => ({
                     one: `确定要用此工作区的成员替换 ${targetWorkspaceName} 的成员吗?`,
-                    // Chinese has no "one" plural category, so handle the single-workspace case here
                     other: count === 1 ? `确定要用此工作区的成员替换 ${targetWorkspaceName} 的成员吗?` : `确定要用此工作区的成员替换 ${count} 个工作区的成员吗?`,
                 }),
             },
@@ -7985,9 +7984,8 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
             statusExpired: '已过期',
             statusInactive: '未启用',
             unit: '单位',
-            ukFuelRateTaxError: '请添加20%的税率,以跟踪英国建议燃油费率的税额。',
-            ukFuelRateTaxErrorWithIntegration: ({integrationName}: {integrationName: string}) =>
-                `请在${integrationName}中添加20%的税率,以跟踪英国建议燃油费率的税额。`,
+            ukFuelRateTaxError: '请添加 20% 的税率,以便跟踪英国咨询燃油费率的税款。',
+            ukFuelRateTaxErrorWithIntegration: ({integrationName}: {integrationName: string}) => `请在 ${integrationName} 中添加 20% 的税率,以跟踪英国咨询燃油费率的税款。`,
             taxFeatureNotEnabledMessage: '<muted-text>必须在工作区中启用税费才能使用此功能。前往<a href="#">更多功能</a>进行更改。</muted-text>',
             deleteDistanceRate: '删除距离费率',
             areYouSureDelete: () => ({

Note

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

View workflow run

@codecov

codecov Bot commented Nov 5, 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 96.03% <ø> (ø)
src/components/Navigation/DebugTabView.tsx 60.11% <100.00%> (+3.75%) ⬆️
src/hooks/usePolicyIndicatorChecks.ts 100.00% <100.00%> (ø)
src/libs/API/types.ts 100.00% <ø> (ø)
src/libs/GovernmentRateUtils.ts 100.00% <100.00%> (ø)
src/libs/PolicyDistanceRatesUtils.ts 83.81% <ø> (+1.29%) ⬆️
src/libs/PolicyUtils/errors.ts 98.85% <100.00%> (+0.43%) ⬆️
src/libs/PolicyUtils/tax.ts 97.05% <100.00%> (+0.08%) ⬆️
src/libs/actions/Policy/Policy.ts 74.37% <100.00%> (+0.16%) ⬆️
...ce/distanceRates/PolicyDistanceRateDetailsPage.tsx 89.94% <100.00%> (+0.24%) ⬆️
... and 3 more
... and 8 files with indirect coverage changes

@MelvinBot

MelvinBot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Android test steps verification results: ⚠️ partial

Tested on standalone Android NewDot. UI setup succeeded, but government auto-update supplied only standard Great Britain mileage rates, blocking all advisory fuel-band warning scenarios; no feature failure was demonstrated.

Government auto-update supplied standard Great Britain mileage rates only

Step Status
Workspace tab/list and Distance rates menu show red dots for an affected UK advisory fuel-band rateFixture blocked. Created a GBP workspace, enabled Taxes, Distance rates, Track tax, and government auto-updates on Control. The final snapshot listed only standard Great Britain £0.45/mile and £0.55/mile rates plus Default Rate—not advisory fuel-band rates.
Government auto-update supplied standard Great Britain mileage rates only
⚠️
More dropdown button and Settings option both show red dotsNot verified: the required affected advisory fuel-band fixture was unavailable.
⚠️
Settings shows the 20% VAT warning under Track tax, with Settings-only dismiss X and visible dismissal failureNot verified: warning-triggering fixture unavailable. Dismissal was not attempted.
⚠️
Affected rate tax field shows red dot/help text and retains save-error dismissalNot verified: no affected advisory fuel-band rate was available.
⚠️
Valid tax mapping clears warning; workspace-wide dismissal hides warning and leading dotsNot verified: required fixture unavailable. Backend support for dismissal and persistence remain unconfirmed.
⚠️
Warning is suppressed when Distance rates or tax tracking is disabledNot verified: without an affected fuel-band rate, warning absence cannot establish suppression.
⚠️
No JavaScript console errors during the tested flowInconclusive: no error screen appeared, but console inspection was unavailable.
⚠️

view run · view recording

@MelvinBot

MelvinBot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ⚠️ partial

Tested on dev NewDot web using real UI state: created a GBP workspace and enabled Distance rates and Taxes, but only Default Rate was available. Settings clicks were blocked by dialog coverage, preventing further setup; no feature failure was established.

Settings menu at the UI-driving blocker

Step Status
Admin sees red dots on workspace tab/list and Distance rates menu for an enabled UK fuel-band rate with invalid VAT mappingRequired fuel-band fixture was not established; the rate list contained only Default Rate at £0.76/mile.
Distance rates showing Default Rate and the open Settings menu
⚠️
More dropdown button and Settings option both show red dotsBoth controls were reached, but the prerequisite invalid fuel-band VAT mapping was unavailable.
More dropdown exposing Settings without the required warning fixture
⚠️
Settings shows the 20% warning under Track tax, with Settings-only dismiss X and visible dismissal failureSettings could not be entered: both selector and fresh-reference clicks were rejected as covered by the dialog. No dismissal attempted.
Settings menu at the UI-driving blocker
⚠️
Affected rate tax field shows red dot/help text and retains save-error dismissalNo affected advisory fuel-band rate or existing save-error state was available.
⚠️
Valid tax mapping clears warning; workspace-wide dismissal hides warning and leading dotsWarning state was not established, so neither clearing nor workspace-wide dismissal could be verified. Backend readiness remains unconfirmed.
⚠️
Warning is suppressed when Distance rates or tax tracking is disabledCould not establish the warning-positive baseline needed to verify suppression.
⚠️
No JS console errors during the tested flowThe permitted testing interface does not expose JS console inspection; console cleanliness was not verified.
⚠️

view run · view recording

@neil-marcellini neil-marcellini changed the title [HOLD backend] Show UK fuel rate VAT mapping warnings Show UK fuel rate VAT mapping warnings Nov 5, 2026
@Krishna2323

Copy link
Copy Markdown
Contributor

@MelvinBot resolve conflicts

<ButtonWithDropdownMenu
onPress={() => {}}
shouldUseOptionIcon
shouldAlwaysShowDropdownMenu

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.

With a single option, ButtonWithDropdownMenu renders a direct "⚙ Settings" button (same as the Taxes page). shouldAlwaysShowDropdownMenu turns it into "More ▾" with one item for every workspace, even when there's no fuel rate error, so Settings now takes two clicks. Can we only show the menu while the error is showing, e.g. shouldAlwaysShowDropdownMenu={!!taxErrorIndicator}?

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.

Addressed in e82f319: the dropdown is forced only while taxErrorIndicator is present, preserving direct one-click Settings otherwise. Both warning indicators remain.


view run

<MenuItemField
name={translate('workspace.taxes.taxRate')}
<MenuItem.Root
onPress={canWriteDistanceRates ? editTaxRateValue : undefined}

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.

Swapping the MenuItemField preset for MenuItem.Root drops two things it did: it wrapped onPress in callFunctionIfActionIsAllowed, and it only drew the chevron when onPress was set. Now a read-only user (e.g. an Auditor) sees a chevron on a Tax rate row that does nothing. CurrencyPicker is the precedent for keeping both.

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.

This was addressed in f913eba. Tax rate uses the MenuItemField preset again, retaining its authorization gate and conditional chevron; the separate warning does not add a row indicator.


view run

const {canWrite: canWriteDistanceRates, withReadOnlyFallback} = usePolicyFeatureWriteAccess(policy, CONST.POLICY.POLICY_FEATURE.DISTANCE_RATES);
const isDistanceTrackTaxEnabled = !!customUnit?.attributes?.taxEnabled;
const isPolicyTrackTaxEnabled = !!policy?.tax?.trackingEnabled;
const connectionName = getCurrentConnectionName(policy);

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.

getCurrentConnectionName returns a name for any connection, but per the design doc Auth only skips creating the 20% rate when tax rates are imported from the integration. E.g. Xero with importTaxRates off, admin disables "Standard VAT (20%)": the error says "add a 20% tax rate in Xero" although the rate lives in the workspace. The integration name should only be used when tax is imported (QBO/NetSuite syncTax, Xero importTaxRates, see isPolicyTaxEnabled). Same on the rate details page.

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.

Addressed in e82f319. Both pages now name the integration only when QBO/NetSuite syncTax or Xero importTaxRates is enabled. I extracted the existing import check into a shared helper: isPolicyTaxEnabled alone also accepts local workspace tax tracking, so it cannot distinguish these cases. Added enabled/disabled import regression cases for all three integrations.


view run

errors={{...fuelRateTaxError, ...getLatestErrorField(customUnit ?? {}, 'isUKFuelRateTaxErrorDismissed')}}
errorRowStyles={styles.mh5}
pendingAction={customUnit?.pendingFields?.isUKFuelRateTaxErrorDismissed}
onClose={canWriteDistanceRates && customUnit ? () => dismissUKFuelRateTaxError(policyID, customUnit) : undefined}

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.

NAB: when DismissUKFuelRateTaxError fails, the row shows both the fuel rate error and the generic error, and the only X re-sends the dismiss. If it keeps failing, the generic error can't be cleared.

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.

Addressed in e82f319. When a dismissal failure exists, closing the row now clears that failure locally without another API request. The warning remains; a subsequent close can retry dismissal. This applies to both pages. Added tests confirming unrelated workspace/rate-save errors and dismissal state remain unchanged, including when the warning no longer applies.


view run

Comment thread tests/unit/PolicyUtilsTest.ts Outdated
const shouldShow = shouldShowUKFuelRateTaxError(policy);
// Then it is excluded without hiding another workspace's warning
expect(shouldShow).toBe(false);
expect(shouldShowUKFuelRateTaxError(createUKFuelRateTaxPolicy())).toBe(true);

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.

NAB: this runs a pure function on a freshly built policy, so it can't catch one workspace's dismissal leaking into another. Either drop it or cover two policies through usePolicyIndicatorChecks.

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.

Addressed in e82f319: removed the ineffective fresh-policy assertion and corrected the comment to describe eligibility only. It no longer claims cross-workspace isolation coverage.


view run

Comment thread src/libs/PolicyUtils/errors.ts Outdated
if (
!isPolicyAdmin(policy) ||
!policy?.areDistanceRatesEnabled ||
!policy.tax?.trackingEnabled ||

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.

NAB: these two checks are what isTaxTrackingEnabled(true, policy, true) already does. PolicyDistanceRatesUtils uses it for the same fuel-band eligibility.

@MelvinBot MelvinBot Nov 6, 2026 •

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.

Addressed in e82f319: eligibility now reuses isTaxTrackingEnabled(true, policy, true), retaining the admin, distance-feature, custom-unit, and dismissal guards. Existing eligibility regressions pass.


view run · no recording available

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

@MelvinBot please match the mock on the rate details page:

  1. Revert the Tax rate field to the MenuItemField preset, with no red dot on the row.
  2. Below it, add a separate OfflineWithFeedback error row for the fuel rate error, the same way the Settings page does it: the same message, getLatestErrorField(customUnit, 'isUKFuelRateTaxErrorDismissed') for a failed dismiss, and onClose calling dismissUKFuelRateTaxError. Keep the field's existing OfflineWithFeedback, whose onClose clears the rate's own save errors.
  3. Both pages now build the same error, so share it through one helper instead of duplicating it.
Image

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

Copy link
Copy Markdown
Contributor Author

Resolved conflicts and pushed 900666f, preserving both sets of Sentry labels. GitHub confirms no merge conflicts remain.

✅ 1,154 targeted tests, constants-file lint, and Storybook smoke test passed. Broader checks remain incomplete, documented under AI Tests.

PR remains draft pending backend readiness.


view run

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

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ⚠️ partial

Implemented all three requested changes in f913eba: standard Tax rate field, separate dismissible warning, and shared error helper; 1,158 targeted tests, App/Jest typechecks, changed-file lint, and Storybook passed. Live web verification was blocked by a blank page; broader check limitations are documented in AI Tests.

Blank dev NewDot web page in the provided session

Step Status
Editable Tax field without row dot; separate dismissible 20% VAT warningBlocked: no application controls rendered, preventing navigation to rate Details.
Blank dev NewDot web page in the provided session
⚠️
Workspace-wide warning dismissal, visible failed dismissal, and independent save-error dismissalDetails and Settings were unreachable; live dismissal behavior remains unverified.
⚠️
Identical warning copy on Settings and Details, including integration-specific wordingShared-helper tests passed; neither live warning surface was reachable.
⚠️

view run

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

Copy link
Copy Markdown
Contributor Author

Pushed aa51856, fixing the Oxfmt failure with formatting-only changes.

✅ Formatting, lint, typecheck, spelling, Storybook smoke test, and 854 targeted tests passed. Full Jest timed out.

CI is rerunning. Independent approval requires human review. PR remains draft.


view run

@MelvinBot

Copy link
Copy Markdown
Contributor Author

⚠️ Something went wrong. This may be a transient issue. Try again. If it persists, check status.openai.com.

Run details

@MelvinBot

Copy link
Copy Markdown
Contributor Author

⚠️ Something went wrong. This may be a transient issue. Try again. If it persists, check status.openai.com.

Run details

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

Copy link
Copy Markdown
Contributor Author

⚠️ MelvinBot CI Fix Loop Detected

MelvinBot has made 5 consecutive commits trying to fix CI failures. Automatic CI fix dispatches are now paused for this PR.

Next steps: A human should review the recent commits and resolve the conflicting CI errors manually.

2 similar comments
@MelvinBot

Copy link
Copy Markdown
Contributor Author

⚠️ MelvinBot CI Fix Loop Detected

MelvinBot has made 5 consecutive commits trying to fix CI failures. Automatic CI fix dispatches are now paused for this PR.

Next steps: A human should review the recent commits and resolve the conflicting CI errors manually.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

⚠️ MelvinBot CI Fix Loop Detected

MelvinBot has made 5 consecutive commits trying to fix CI failures. Automatic CI fix dispatches are now paused for this PR.

Next steps: A human should review the recent commits and resolve the conflicting CI errors manually.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ⚠️ partial

Addressed all six review threads and pushed e82f319; Oxfmt is clean, and 1,166 targeted tests, full typecheck, and changed-file lint passed. Live verification was blocked during workspace creation; broader check limitations are documented in AI Tests.

Workspace creation remains on Confirm Workspace after clicking Confirm

Step Status
Direct Settings without warning; dropdown indicators with warningBlocked: Confirm Workspace remained open after Confirm, preventing navigation to Distance rates.
Workspace creation remains on Confirm Workspace after clicking Confirm
⚠️
Tax preset, read-only chevron behavior, and imported-tax warning copyRequired workspace, read-only, and integration fixtures were unavailable.
⚠️
Clear failed dismissal locally, then allow retry without affecting save errorsRegression tests passed; live warning and failure states could not be reached.
⚠️

view run

@MelvinBot

Copy link
Copy Markdown
Contributor Author

⚠️ MelvinBot CI Fix Loop Detected

MelvinBot has made 5 consecutive commits trying to fix CI failures. Automatic CI fix dispatches are now paused for this PR.

Next steps: A human should review the recent commits and resolve the conflicting CI errors manually.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Cleaned up the PR description as requested: four plain explanation sentences, local Onyx steps with the refetch warning, one offline step, four QA regressions, and only the latest AI results.

Removed old screenshots and checked only completed documentation/unit-test items. Platform testing and screenshot items remain unticked.


view run

<ButtonWithDropdownMenu
onPress={() => {}}
shouldUseOptionIcon
shouldAlwaysShowDropdownMenu={!!taxErrorIndicator}

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 this doesn't match the mock. With the error, the mock keeps the direct "Settings" button and swaps the gear icon for the red dot (screenshot below). Here the header switches to "More ▾" with a single Settings item, so Settings takes two clicks. The single-option path of ButtonWithDropdownMenu ignores brickRoadIndicator, so this flag is a workaround. Please match the mock: no More dropdown, direct Settings button with the red dot.

Image

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.

🤖 Web test steps verification results: ⚠️ partial

Pushed 2272bf0: Settings now stays a direct button, with the red dot replacing the gear during warnings—no More dropdown. All 837 targeted tests and full typecheck passed; live verification was blocked because no active session was available.

Step Status
Direct Settings, correct icon, and one-click navigationAutomated narrow/wide tests passed, including red hover color and gear restoration after resolving the warning. Live UI verification remains unavailable.
⚠️

view run

Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
@Krishna2323

Copy link
Copy Markdown
Contributor

@MelvinBot resolve conflicts

@Krishna2323

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
web_chrome.mp4
web_chrome_small_widths.mp4

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

Copy link
Copy Markdown
Contributor Author

Resolved conflicts and pushed ba56665. GitHub confirms no merge conflicts remain.

Full typecheck and 1,197 targeted tests passed, including direct Settings button regressions. Full-suite timeouts are noted in AI Tests.


view run

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

@melvin-bot
melvin-bot Bot requested a review from neil-marcellini November 10, 2026 21:14

@neil-marcellini neil-marcellini 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.

(Neil's AI agent, human reviewed)

Looks good overall: the feature matches the issue and the mock, and the helper and action are well tested. One small blocker from the last main merge (inline comment), plus some NABs:

  1. NAB: The PR body's "do not merge until DismissUKFuelRateTaxError is live" note is outdated. The command shipped in https://github.com/Expensify/Web-Expensify/pull/57461 and is in production, so the hold can be removed.
  2. NAB: No UI test renders the Settings page or rate details page with the warning and checks that the X calls dismissUKFuelRateTaxError. The helper and action are covered, but the page wiring isn't (Settings, rate details). One render test per page would do it.
  3. NAB: The Settings header button rebuilds ButtonWithDropdownMenu's single-option button by hand because that path ignores brickRoadIndicator. Teaching the single-option path to show the dot, like the split-button path already does, would keep this consistent with other pages. Fine as a follow-up.
  4. NAB: Two low-value tests. This one only checks that a helper isn't called, and mocks all of @libs/PolicyUtils for the file to do it. This one repeats the Xero and no-integration cases from the describe.each above it.
  5. @Krishna2323 thanks for the recordings, they show the full flow nicely. The reviewer checklist ticks Android, iOS and mWeb, but both videos are desktop Chrome (one at mobile width). Could you add at least one native recording, or untick the platforms you didn't test?

onPress={canWriteDistanceRates ? editTaxRateValue : undefined}
value={taxRate}
onPress={canWriteDistanceRates ? editTaxRateValue : undefined}
sentryLabel={CONST.SENTRY_LABEL.WORKSPACE.DISTANCE_RATES.TAX_RATE}

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.

(Neil's AI agent, human reviewed)

The main merge replaced RATE_DETAILS_TAX_RATE (added in #106495) with a new TAX_RATE label on this row, so RATE_DETAILS_TAX_RATE is now unused and this row reports a different Sentry label than main. Can we drop TAX_RATE from SENTRY_LABEL.ts and restore this MenuItemField block (including the View wrapper) as it is on main? This feature doesn't need any changes to this row.

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.

Addressed in d583e40: restored the Tax rate field and its View wrapper/prop order to match main, using RATE_DETAILS_TAX_RATE, and removed the obsolete TAX_RATE constant. The separate fuel-warning row remains immediately afterward. Both pages now have render-and-close UI tests verifying the workspace dismissal action is called.


view run

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

This PR looks good to me.

@Krishna2323

Copy link
Copy Markdown
Contributor

@MelvinBot resolve conflicts

@Krishna2323

Copy link
Copy Markdown
Contributor

@MelvinBot please address Neil's review: #106055 (review) #106055 (comment)

  1. Restore the Tax rate MenuItemField block in PolicyDistanceRateDetailsPage.tsx exactly as it appears on main (including the View w100 wrapper, prop order, and RATE_DETAILS_TAX_RATE). Remove TAX_RATE from SENTRY_LABEL.ts. Keep the separate fuel warning OfflineWithFeedback immediately after it.
  2. Remove the "do not merge until DismissUKFuelRateTaxError is live" note from the PR description.
  3. Add one UI test for each page (Settings and rate details) that verifies the fuel warning is rendered, presses its close button, and checks that dismissUKFuelRateTaxError is called.
  4. Remove the two low-value tests Neil linked.

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

Copy link
Copy Markdown
Contributor Author

Resolved conflicts and pushed 23c8852, preserving both sets of UI tests. GitHub confirms no merge conflicts remain.

Formatting and targeted lint passed. Tests/typecheck were blocked by missing local dependencies, documented in AI Tests.


view run

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

MelvinBot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ⚠️ partial

Addressed all four requests in d583e40: restored main’s Tax rate block/label, added both dismissal UI tests, removed the two low-value tests, and removed the outdated hold. All 1,209 targeted tests and full typecheck passed; live verification was blocked by a blank session.

Blank dev NewDot web session

Step Status
Rate details field and separate dismissible warningAutomated rendering/close-button test passed. Live page was unreachable.
Blank dev NewDot web session
⚠️
Settings warning and workspace dismissal wiringAutomated rendering/close-button test passed. Live Settings was unreachable.
⚠️

view run · no recording available

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

@melvin-bot
melvin-bot Bot requested a review from neil-marcellini November 11, 2026 23:29
@Krishna2323

Copy link
Copy Markdown
Contributor

@neil-marcellini ready again!

@neil-marcellini neil-marcellini 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 to go from me, thanks!

function getSettingsMessage(status: IndicatorStatus | undefined): TranslationPaths | undefined {
switch (status) {
case CONST.INDICATOR_STATUS.HAS_CUSTOM_UNITS_ERROR:
case CONST.INDICATOR_STATUS.HAS_UK_FUEL_RATE_TAX_ERROR:

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.

(Neil's AI agent, human reviewed)

NAB: In the debug tab view, this reuses the generic "There's a workspace with custom units errors" message. It would be better to explain more explicitly what the error is for, e.g. "There's a workspace with UK fuel rates missing a 20% tax rate", so it's clear what the red dot is pointing to.

}

describe('PolicyDistanceRatesPage tax reclaimable column', () => {
describe('PolicyDistanceRatesPage', () => {

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.

(Neil's AI agent, human reviewed)

NAB: Renaming this describe to PolicyDistanceRatesPage so it can also hold the Settings header tests makes the file name WorkspaceDistanceRatesTableTaxReclaimableColumnTest misleading. Someone looking for the Settings button or fuel-warning dot tests wouldn't think to look here.

Suggestion: rename the file to PolicyDistanceRatesPageTest.tsx, and split this block into two nested describes, tax reclaimable column (the existing tests, unchanged) and Settings header (the new describe.each). The shared renderPage/buildRate helpers keep working, and each group's purpose is clear from the test output.

@neil-marcellini
neil-marcellini merged commit 3593bb8 into main Nov 12, 2026
50 of 53 checks passed
@neil-marcellini
neil-marcellini deleted the claude-ukFuelRateTaxError branch November 12, 2026 18:44
@neil-marcellini neil-marcellini changed the title Show UK fuel rate VAT mapping warnings [No QA] Show UK fuel rate VAT mapping warnings Nov 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚧 neil-marcellini 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.

@github-actions

Copy link
Copy Markdown
Contributor

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.5.38-0 🚀

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

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/marcaaron in version: 9.5.39-2 🚀

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

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