Repository navigation
[No QA] Show UK fuel rate VAT mapping warnings - #106055
Conversation
Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
I created this draft PR from an upstream branch because I do not have push access to your fork. It is assigned to 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-ukFuelRateTaxErrorYou can then close this PR and open a draft PR from your fork. |
🦜 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 diffdiff --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 |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
🤖 Web test steps verification results: 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.
|
|
@MelvinBot resolve conflicts |
| <ButtonWithDropdownMenu | ||
| onPress={() => {}} | ||
| shouldUseOptionIcon | ||
| shouldAlwaysShowDropdownMenu |
There was a problem hiding this comment.
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}?
| <MenuItemField | ||
| name={translate('workspace.taxes.taxRate')} | ||
| <MenuItem.Root | ||
| onPress={canWriteDistanceRates ? editTaxRateValue : undefined} |
There was a problem hiding this comment.
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.
| 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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| errors={{...fuelRateTaxError, ...getLatestErrorField(customUnit ?? {}, 'isUKFuelRateTaxErrorDismissed')}} | ||
| errorRowStyles={styles.mh5} | ||
| pendingAction={customUnit?.pendingFields?.isUKFuelRateTaxErrorDismissed} | ||
| onClose={canWriteDistanceRates && customUnit ? () => dismissUKFuelRateTaxError(policyID, customUnit) : undefined} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| const shouldShow = shouldShowUKFuelRateTaxError(policy); | ||
| // Then it is excluded without hiding another workspace's warning | ||
| expect(shouldShow).toBe(false); | ||
| expect(shouldShowUKFuelRateTaxError(createUKFuelRateTaxPolicy())).toBe(true); |
There was a problem hiding this comment.
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.
| if ( | ||
| !isPolicyAdmin(policy) || | ||
| !policy?.areDistanceRatesEnabled || | ||
| !policy.tax?.trackingEnabled || |
There was a problem hiding this comment.
NAB: these two checks are what isTaxTrackingEnabled(true, policy, true) already does. PolicyDistanceRatesUtils uses it for the same fuel-band eligibility.
Krishna2323
left a comment
There was a problem hiding this comment.
@MelvinBot please match the mock on the rate details page:
- Revert the Tax rate field to the
MenuItemFieldpreset, with no red dot on the row. - Below it, add a separate
OfflineWithFeedbackerror row for the fuel rate error, the same way the Settings page does it: the same message,getLatestErrorField(customUnit, 'isUKFuelRateTaxErrorDismissed')for a failed dismiss, andonClosecallingdismissUKFuelRateTaxError. Keep the field's existingOfflineWithFeedback, whoseonCloseclears the rate's own save errors. - Both pages now build the same error, so share it through one helper instead of duplicating it.
Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
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. |
Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
🤖 Web test steps verification results: 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.
|
|
@MelvinBot Oxfmt check is failing and you also missed these review comments:
|
Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
|
|
|
Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
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 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 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. |
|
🤖 Web test steps verification results: 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.
|
|
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. |
|
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. |
| <ButtonWithDropdownMenu | ||
| onPress={() => {}} | ||
| shouldUseOptionIcon | ||
| shouldAlwaysShowDropdownMenu={!!taxErrorIndicator} |
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
🤖 Web test steps verification results:
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. |
Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
@MelvinBot resolve conflicts |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safariweb_chrome.mp4web_chrome_small_widths.mp4 |
Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
neil-marcellini
left a comment
There was a problem hiding this comment.
(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:
- NAB: The PR body's "do not merge until
DismissUKFuelRateTaxErroris 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. - 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. - NAB: The Settings header button rebuilds
ButtonWithDropdownMenu's single-option button by hand because that path ignoresbrickRoadIndicator. 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. - NAB: Two low-value tests. This one only checks that a helper isn't called, and mocks all of
@libs/PolicyUtilsfor the file to do it. This one repeats the Xero and no-integration cases from thedescribe.eachabove it. - @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} |
There was a problem hiding this comment.
(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.
There was a problem hiding this comment.
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.
JmillsExpensify
left a comment
There was a problem hiding this comment.
This PR looks good to me.
|
@MelvinBot resolve conflicts |
|
@MelvinBot please address Neil's review: #106055 (review) #106055 (comment)
|
Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
🤖 Web test steps verification results: 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.
view run · no recording available |
|
@neil-marcellini ready again! |
neil-marcellini
left a comment
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
(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', () => { |
There was a problem hiding this comment.
(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 has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.5.38-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.5.39-2 🚀
|







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.
OpenPolicyDistanceRatesPageto finish before running this in the nonproduction browser console (replaceWORKSPACE_ID):Offline tests
QA Steps
No QA
AI Tests
Latest run (2026-11-11):
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari