Skip to content

Show Consolidated Travel Billing copy when workspace deletion is blocked by CTB#96090

Open
MelvinBot wants to merge 3 commits into
mainfrom
claude-deleteWorkspaceTravelInvoicingCopy
Open

Show Consolidated Travel Billing copy when workspace deletion is blocked by CTB#96090
MelvinBot wants to merge 3 commits into
mainfrom
claude-deleteWorkspaceTravelInvoicingCopy

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

When a workspace deletion is blocked, the delete-workspace flow always rendered the Expensify Cards warning (workspace.common.deleteOpenExpensifyCardsError — "Your company still has Expensify Cards."), even when the real blocker was Consolidated Travel Billing (CTB) being enabled. This produced the wrong warning for workspaces with Travel Invoicing enabled.

This PR makes the warning copy match the actual blocking condition:

  • Adds a new translation key workspace.common.deleteTravelInvoicingError — "Your company still has Consolidated Travel Billing enabled." — across all locales.
  • Detects whether CTB is enabled on the workspace via getIsTravelInvoicingEnabled(getCardSettings(...)) (the same helper used by the More Features page).
  • The delete-workspace error modal now selects the copy based on which feature is enabled: Expensify Cards → old copy, CTB → new copy. When both are enabled, the Expensify Cards copy is prioritized, per the requested behavior.
  • The online delete-error effect now also surfaces this modal when only CTB is enabled (previously it fell through to the generic backend error).

Fixed Issues

$ #90407
PROPOSAL: #90407 (comment)

Tests

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

Preconditions: Use the Expensifail account and enable Consolidated Travel Billing (formerly known as Travel Invoicing) in the Workspace features

  1. Open the NewDot app
  2. Navigate to the Workspace tab or Overview
  3. Click on the three dots button -> Delete -> Confirm Delete

Confirm the copy talks about Travel Billing and not Expensify cards.

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

…ed by CTB

Co-authored-by: Benjamin Limpich <blimpich@users.noreply.github.com>
@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 12d74fbe5d6..fff51333812 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -4478,7 +4478,7 @@ ${amount} für ${merchant} – ${date}`,
             deleteConfirmation: 'Möchten Sie diesen Workspace wirklich löschen?',
             deleteWithCardsConfirmation: 'Möchtest du diesen Workspace wirklich löschen? Dadurch werden alle Kartenfeeds und zugewiesenen Karten entfernt.',
             deleteOpenExpensifyCardsError: 'Ihre Firma hat noch Expensify Karten. Bitte <concierge-link>wenden Sie sich an Concierge</concierge-link>, um sie zu entfernen.',
-            deleteTravelInvoicingError: 'Ihre Firma hat noch die Konsolidierte Reiseabrechnung aktiviert.',
+            deleteTravelInvoicingError: 'Ihr Unternehmen hat die Konsolidierte Reiseabrechnung noch aktiviert.',
             outstandingBalanceWarning:
                 'Sie haben einen offenen Saldo, der beglichen werden muss, bevor Sie Ihren letzten Workspace löschen können. Bitte gehen Sie zu Ihren Abonnementeinstellungen, um die Zahlung abzuschließen.',
             settleBalance: 'Zu Abo wechseln',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 1dc02e64936..a9ec2e30667 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -4357,7 +4357,7 @@ ${amount} para ${merchant} - ${date}`,
             deleteConfirmation: '¿Estás seguro de que quieres eliminar este espacio de trabajo?',
             deleteWithCardsConfirmation: '¿Estás seguro de que quieres eliminar este espacio de trabajo? Se eliminarán todos los datos de las tarjetas y las tarjetas asignadas.',
             deleteOpenExpensifyCardsError: 'Tu empresa todavía tiene Tarjetas Expensify. Por favor, <concierge-link>contacta con Concierge</concierge-link> para eliminarlas.',
-            deleteTravelInvoicingError: 'Tu empresa todavía tiene habilitada la Facturación consolidada de viajes.',
+            deleteTravelInvoicingError: 'Tu empresa todavía tiene habilitada la Facturación Consolidada de Viajes.',
             outstandingBalanceWarning:
                 'Tienes un saldo pendiente que debe liquidarse antes de eliminar tu último espacio de trabajo. Por favor, ve a la configuración de tu suscripción para resolver el pago.',
             settleBalance: 'Ir a Suscripción',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 5c3bf99acd8..434af314bec 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -4488,7 +4488,7 @@ ${amount} pour ${merchant} - ${date}`,
             deleteConfirmation: 'Voulez-vous vraiment supprimer cet espace de travail ?',
             deleteWithCardsConfirmation: 'Voulez-vous vraiment supprimer cet espace de travail ? Cela supprimera tous les flux de cartes et les cartes assignées.',
             deleteOpenExpensifyCardsError: 'Votre entreprise a encore des Cartes Expensify. Veuillez <concierge-link>contacter Concierge</concierge-link> pour les supprimer.',
-            deleteTravelInvoicingError: 'Votre entreprise a encore la Facturation de voyages consolidée activée.',
+            deleteTravelInvoicingError: 'Votre entreprise a toujours la facturation de voyages consolidée activée.',
             outstandingBalanceWarning:
                 'Vous avez un solde impayé qui doit être réglé avant de supprimer votre dernier espace de travail. Veuillez accéder à vos paramètres d’abonnement pour résoudre le paiement.',
             settleBalance: 'Aller à l’abonnement',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 4373c7e2fe5..a6187102ef2 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -4463,7 +4463,7 @@ ${amount} per ${merchant} - ${date}`,
             deleteConfirmation: 'Sei sicuro di voler eliminare questo spazio di lavoro?',
             deleteWithCardsConfirmation: 'Sei sicuro di voler eliminare questo spazio di lavoro? Questa azione rimuoverà tutti i feed delle carte e le carte assegnate.',
             deleteOpenExpensifyCardsError: 'La tua azienda ha ancora delle Carte Expensify. Per favore, <concierge-link>contatta Concierge</concierge-link> per rimuoverle.',
-            deleteTravelInvoicingError: 'La tua azienda ha ancora la Fatturazione viaggio consolidata abilitata.',
+            deleteTravelInvoicingError: 'La tua azienda ha ancora la Fatturazione Viaggi Consolidata attivata.',
             outstandingBalanceWarning:
                 'Hai un saldo in sospeso che deve essere saldato prima di eliminare il tuo ultimo workspace. Vai alle impostazioni dell’abbonamento per risolvere il pagamento.',
             settleBalance: 'Vai all’abbonamento',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index df02cd88471..c63e7d375f5 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -4427,7 +4427,7 @@ ${integrationName === CONST.ONBOARDING_ACCOUNTING_MAPPING.other ? 'あなたの'
             deleteConfirmation: 'このワークスペースを削除してもよろしいですか?',
             deleteWithCardsConfirmation: 'このワークスペースを削除してもよろしいですか? すべてのカードフィードと割り当て済みカードが削除されます。',
             deleteOpenExpensifyCardsError: '御社にはまだ Expensify カードが残っています。削除するには、<concierge-link>Concierge までお問い合わせください</concierge-link>。',
-            deleteTravelInvoicingError: '御社ではまだ出張費の一括請求が有効になっています。',
+            deleteTravelInvoicingError: 'お客様の会社では、統合トラベル請求がまだ有効になっています。',
             outstandingBalanceWarning: '最後のワークスペースを削除する前に精算する必要がある未払残高があります。支払いを解決するには、サブスクリプション設定に移動してください。',
             settleBalance: 'サブスクリプションに移動',
             unavailable: '利用できないワークスペース',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index edef2f0c3d0..8f6d2f0af72 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -4458,7 +4458,7 @@ ${amount} voor ${merchant} - ${date}`,
             deleteConfirmation: 'Weet je zeker dat je deze werkruimte wilt verwijderen?',
             deleteWithCardsConfirmation: 'Weet je zeker dat je deze werkruimte wilt verwijderen? Hiermee worden alle kaartfeeds en toegewezen kaarten verwijderd.',
             deleteOpenExpensifyCardsError: 'Je bedrijf heeft nog Expensify Kaarten. <concierge-link>Neem contact op met Concierge</concierge-link> om ze te verwijderen.',
-            deleteTravelInvoicingError: 'Je bedrijf heeft nog Geconsolideerde reisfacturatie ingeschakeld.',
+            deleteTravelInvoicingError: 'Je bedrijf heeft nog steeds Geconsolideerde Reisfacturering ingeschakeld.',
             outstandingBalanceWarning:
                 'Je hebt een openstaand saldo dat moet worden vereffend voordat je je laatste werkruimte kunt verwijderen. Ga naar je abonnementsinstellingen om de betaling af te ronden.',
             settleBalance: 'Ga naar abonnement',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 0d010167964..32d0572a840 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -4444,7 +4444,7 @@ ${amount} dla ${merchant} - ${date}`,
             deleteConfirmation: 'Czy na pewno chcesz usunąć tę przestrzeń roboczą?',
             deleteWithCardsConfirmation: 'Na pewno chcesz usunąć tę przestrzeń roboczą? Spowoduje to usunięcie wszystkich źródeł kart i przypisanych kart.',
             deleteOpenExpensifyCardsError: 'Twoja firma wciąż ma Karty Expensify. Prosimy, <concierge-link>skontaktuj się z Concierge</concierge-link>, aby je usunąć.',
-            deleteTravelInvoicingError: 'Twoja firma nadal ma włączone Zbiorcze rozliczanie podróży.',
+            deleteTravelInvoicingError: 'Twoja firma nadal ma włączone Skonsolidowane Rozliczanie Podróży.',
             outstandingBalanceWarning:
                 'Masz zaległe saldo, które musi zostać uregulowane przed usunięciem ostatniego miejsca pracy. Przejdź do ustawień subskrypcji, aby uregulować płatność.',
             settleBalance: 'Przejdź do subskrypcji',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index ef4e5b8d0d1..cbfeea6e9be 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -4448,7 +4448,7 @@ ${amount} para ${merchant} - ${date}`,
             deleteConfirmation: 'Tem certeza de que deseja excluir este workspace?',
             deleteWithCardsConfirmation: 'Tem certeza de que deseja excluir este workspace? Isso removerá todos os feeds de cartão e cartões atribuídos.',
             deleteOpenExpensifyCardsError: 'Sua empresa ainda tem Cartões Expensify. Por favor, <concierge-link>fale com o Concierge</concierge-link> para removê-los.',
-            deleteTravelInvoicingError: 'Sua empresa ainda tem o Faturamento de Viagens Consolidado ativado.',
+            deleteTravelInvoicingError: 'Sua empresa ainda está com a Faturação Consolidada de Viagens ativada.',
             outstandingBalanceWarning:
                 'Você tem um saldo pendente que precisa ser quitado antes de excluir seu último espaço de trabalho. Acesse as configurações de assinatura para resolver o pagamento.',
             settleBalance: 'Ir para a assinatura',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index bc8887b1c94..43e4239bce7 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -4336,7 +4336,7 @@ ${amount},商户:${merchant} - 日期:${date}`,
             deleteConfirmation: '确定要删除此工作区吗?',
             deleteWithCardsConfirmation: '确定要删除此工作区吗?这将移除所有卡片数据源和已分配的卡片。',
             deleteOpenExpensifyCardsError: '您的公司仍在使用 Expensify 卡。请<concierge-link>联系 Concierge</concierge-link>以停用它们。',
-            deleteTravelInvoicingError: '您的公司仍启用了合并差旅账单。',
+            deleteTravelInvoicingError: '您的公司仍然启用了合并差旅账单。',
             outstandingBalanceWarning: '您有一笔未结清的余额,必须在删除最后一个工作区之前结清。请前往订阅设置以解决付款问题。',
             settleBalance: '前往订阅',
             unavailable: '工作区不可用',

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 Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
.../workspace/deleteWorkspace/DeleteWorkspaceFlow.tsx 0.00% <0.00%> (ø)
... and 26 files with indirect coverage changes

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Nothing to fix here in code — all CI checks are green. ✅

The only red check is PR Author Checklist / checklist, and it's failing for a non-code reason:

You completed 0 out of 38 checklist items with 38 unfinished items
##[error]PR Author Checklist is not completely filled out.

That check just verifies the author has ticked the boxes in the PR description's PR Author Checklist section. It'll go green once you fill out the checklist (and the Tests/QA Steps sections, which are currently // TODO placeholders). That's an author task, so I haven't pushed anything.

Every functional check — typecheck, all test (job 1–8), Bun tests, ESLint, Oxfmt, Storybook, builds, perf tests — is passing.

@blimpich

Copy link
Copy Markdown
Contributor

@MelvinBot can you replace your translation strings with the one from this comment/patch? #96090 (comment)

Co-authored-by: Benjamin Limpich <blimpich@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Done ✅ Applied the Polyglot Parrot translation updates from that patch to deleteTravelInvoicingError across all 8 locales (de, es, fr, it, ja, nl, pl, zh-hans) and pushed to this branch in commit f7f13eb.

Only the string content for that key changed — 8 lines, one per locale, matching the patch byte-for-byte.

@blimpich blimpich requested a review from rlinoz July 14, 2026 17:14
@blimpich blimpich marked this pull request as ready for review July 14, 2026 17:14
@blimpich blimpich requested a review from a team as a code owner July 14, 2026 17:14
@melvin-bot melvin-bot Bot requested review from blimpich and joekaufmanexpensify and removed request for a team July 14, 2026 17:14
@melvin-bot

melvin-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

@blimpich Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot Bot removed the request for review from a team July 14, 2026 17:14
@MelvinBot

Copy link
Copy Markdown
Contributor Author

All checks are passing now — nothing to fix. ✅

The previously-red PR Author Checklist / checklist went green on its latest run once the checklist was filled out. Every other check (typecheck, all test (job 1–8), Bun tests, ESLint, Oxfmt, Storybook, review, builds, and perf tests) is also passing, so no code changes were needed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f7f13eb666

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/pages/workspace/deleteWorkspace/DeleteWorkspaceFlow.tsx Outdated
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Nothing to fix in code — the only red check is PR Reviewer Checklist / checklist, and it's failing for a non-code reason:

##[error]No PR Reviewer Checklist was found

This isn't something I can push a fix for. As melvin-bot already noted above, it needs the reviewer to copy/paste the Reviewer Checklist into a new comment on this PR and complete it — then the check goes green.

Status of the two checklist checks:

  • PR Author Checklist → ✅ passing (filled out)
  • PR Reviewer Checklist → ❌ waiting on the reviewer checklist comment

Every functional check — typecheck, all test (job 1–8), Bun tests, ESLint, Oxfmt, Storybook, review, builds, and perf tests — is passing.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Still nothing to fix in code — all functional CI checks are green. ✅

The only red check now is PR Reviewer Checklist / checklist. That one isn't an author/code concern at all: it goes green once the assigned reviewer completes their checklist during review. There's no code change that can clear it, so I haven't pushed anything.

(The PR Author Checklist that was failing earlier is now passing.)

@MelvinBot MelvinBot requested a review from a team as a code owner July 14, 2026 18:43
@melvin-bot

melvin-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

@blimpich Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot Bot removed the request for review from a team July 14, 2026 18:43
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Still nothing to fix in code — all functional checks are green on the latest commit (3349a007). ✅

The PR Author Checklist now passes. The only remaining red check is PR Reviewer Checklist / checklist, which fails simply because no reviewer has filled out the reviewer checklist yet — it clears once a reviewer completes their review. That's not an author task and not a code defect, so I haven't pushed anything.

Everything else — typecheck, all test (job 1–8), Bun tests, ESLint, Oxfmt, Storybook, all builds, perf tests, codecov — is passing.

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