You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-07-01] [$250] Improve copy on "blocked deletion" modal when workspace has active Expensify Cards #92511
When a user tries to delete a workspace that has Expensify Cards with unsettled/unbilled transactions, a second modal is shown blocking the deletion and asking them to reach out to Concierge. The current copy on this modal is unclear.
changed the title [-]Improve copy on "blocked deletion" modal when workspace has active Expensify Cards[/-][+][$250] Improve copy on "blocked deletion" modal when workspace has active Expensify Cards[/+]on Jun 3, 2026
Please re-state the problem that we are trying to solve in this issue.
When a user tries to delete a workspace that still has active Expensify Cards (cards with unsettled/unbilled transactions), a second/blocking modal stops the deletion. Its body copy — "Your company still has open Expensify Cards." — is unclear, gives the user no way to act, and has no Concierge link. We want the new copy plus an in‑app link that opens a Concierge chat. The first modal (the one with the actual Delete button, shown for third‑party card feeds) must stay unchanged, and the title (workspace.common.delete = "Delete workspace") is already correct.
What is the root cause of that problem?
The blocking error is attached to the policy when deleteWorkspace detects open Expensify Cards, keyed to the deleteOpenExpensifyCardsError translation:
deleteOpenExpensifyCardsError: 'Your company still has open Expensify Cards.',
Both workspace surfaces read it via getLatestErrorMessage(policy) and surface the secondary modal through the imperative useConfirmModal() API, passing the raw string as prompt. In WorkspaceOverviewPage (policyLastErrorMessage):
Note: this code was recently migrated from a JSX <ConfirmModal prompt={...}> to the imperative showConfirmModal({prompt}) flow via useConfirmModal, so the fix lands at the showConfirmModal call sites, not on a JSX element.
ConfirmContent only wraps the prompt in <Text> when it is a string; a React node is rendered as‑is. So a plain‑string prompt can never carry an interactive link, even if the translation contained markup:
That is the root cause on both fronts: the copy is a bare error string, and as a plain string it cannot host a Concierge link.
What changes do you think we should make in order to solve the problem?
Keep the existing error flow (the translation key is still stored as the policy error and read via getLatestErrorMessage) and change only two things — the copy, and how the modal renders it. There is an established precedent for exactly this case in UnshareBankAccount.tsx: render the prompt through RenderHTML with a <concierge-link> tag, which the existing ConciergeLinkRenderer turns into an in‑app Concierge navigation.
Update deleteOpenExpensifyCardsError in src/languages/en.ts to the new copy with a <concierge-link> tag:
deleteOpenExpensifyCardsError: 'Your company still has Expensify Cards. Please <concierge-link>reach out to Concierge</concierge-link> to remove them.',
At the showConfirmModal call sites in both WorkspaceOverviewPage.tsx and WorkspacesListPage.tsx, render the prompt via RenderHTML so the <concierge-link> tag becomes a tappable link instead of literal text:
The same swap applies to the policyToDeleteLatestErrorMessage call sites in WorkspacesListPage.tsx. getLatestErrorMessage is typed to return string (never undefined), so RenderHTML html={...} is type‑safe with no null‑coalescing needed. ConfirmContent renders a React‑node prompt directly (it only wraps strings in <Text>), and the <View style={[styles.renderHTML, styles.flexRow]}> wrapper keeps RenderHTML out of any <Text> ancestor — matching the UnshareBankAccount pattern exactly.
The <concierge-link> tag is registered to ConciergeLinkRenderer, which calls navigateToConciergeChat on press, satisfying "the Concierge link in the body should open a Concierge chat" with no new wiring:
Mirror the new copy in the other locale files that carry deleteOpenExpensifyCardsError (es.ts, de.ts, fr.ts, it.ts, ja.ts, nl.ts, pl.ts, pt-BR.ts, zh-hans.ts), wrapping the "reach out to Concierge" phrase in <concierge-link> so the link works in every language.
The first/primary "Are you sure you want to delete this workspace?" modal (deleteWithCardsConfirmation) is intentionally left untouched, matching the note in the issue.
What to test: create a workspace with Expensify Cards enabled and at least one unsettled card, then attempt deletion from both Workspace Overview and the Workspaces list. The secondary modal should read "Delete workspace" / "Your company still has Expensify Cards. Please reach out to Concierge to remove them.", and tapping the link should open the in‑app Concierge chat (not an external browser tab). Confirm a workspace with only third‑party card feeds still shows the unchanged primary modal with a working Delete button.
What alternative solutions did you explore? (Optional)
Render the new copy directly as JSX in the modal, bypassing the Onyx error string (gated by hasDeleteWorkspaceExpensifyCardsError). Rejected because the same modal also surfaces other backend‑returned "can't delete" reasons from the DeleteWorkspace API; bypassing the errors flow for this one case would split rendering into two paths and let optimistic vs. backend behavior diverge. Keeping the translation key in the errors object preserves parity.
Build the link with a plain <TextLink href={CONST.CONCIERGE_URL}> instead of the <concierge-link> tag. Rejected because TextLink opens the marketing URL in a browser, which fails the "open a Concierge chat" requirement; <concierge-link> resolves to the in‑product Concierge report and reuses navigateToConciergeChat (with introSelected, betas, isSelfTourViewed, etc.) already encapsulated in ConciergeLinkRenderer.
Please re-state the problem that we are trying to solve in this issue.
When a user tries to delete a workspace that still has active Expensify Cards (cards with unsettled/unbilled transactions), a second modal blocks the deletion. The current body copy on that modal — "Your company still has open Expensify Cards." — is unclear and gives the user no way to act on it. We want the modal to show clearer copy and include a link that opens a Concierge chat so the user can have the cards removed. The first modal (the one with the "Delete" button, shown for third-party cards) must remain unchanged.
What is the root cause of that problem?
The blocked-deletion modal renders its body directly from the policy's raw Onyx error message, passed to ConfirmModal as a plain-string prompt. That error message is set when the delete request fails with active Expensify Cards:
deleteOpenExpensifyCardsError: 'Your company still has open Expensify Cards.',
The error string is then read via getLatestErrorMessage(policy) and passed straight into the modal's prompt as plain text, in the workspace overview page:
Two consequences follow: (1) the copy is just the bare error string with no guidance, and (2) because the prompt is rendered as a plain string, there is no mechanism for it to carry an interactive Concierge link. Note the modal title already uses workspace.common.delete, which is "Delete workspace", so the requested title is already correct and needs no change.
What changes do you think we should make in order to solve the problem?
Update the body copy of the translation key workspace.common.deleteOpenExpensifyCardsError in both src/languages/en.ts and src/languages/es.ts to the requested wording, embedding the app's existing <concierge-link> custom tag around the "reach out to Concierge" text. The new English string becomes: Your company still has Expensify Cards. Please <concierge-link>reach out to Concierge</concierge-link> to remove them. (with the equivalent Spanish translation in es.ts).
In both blocked-deletion modals, render the prompt through RenderHTML instead of passing the raw string, so the <concierge-link> tag is parsed and becomes an interactive link rather than literal text. Concretely, change the prompt={policyLastErrorMessage} line in WorkspaceOverviewPage.tsx and the prompt={policyToDeleteLatestErrorMessage} line in WorkspacesListPage.tsx to wrap the message in a RenderHTML element. ConfirmModal's prompt already accepts a React node, and rendering workspace prompt copy via RenderHTML is an established pattern in the codebase (for example WorkspaceResetBankAccountModal and WorkspaceOverviewSharePage).
The <concierge-link> tag is already wired to open the in-app Concierge chat through the existing renderer, which calls navigateToConciergeChat on press:
so reusing it satisfies the requirement that the link open a Concierge chat, with no new link-handling code. The first "Delete" confirmation modal is left untouched.
What alternative solutions did you explore? (Optional)
Use a plain external anchor pointing at https://www.expensify.com/concierge instead of the <concierge-link> tag. Rejected because the issue specifies the link should open a Concierge chat in the app; an external URL would navigate the user out of the app, whereas <concierge-link> opens the in-app Concierge chat natively.
Keep passing the message as a plain translate() string without RenderHTML. Rejected because a plain string cannot carry an interactive link — the <concierge-link> tag would render as literal text.
Activity
melvin-bot commentedon Jun 3, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @linhvovan29546 (
External)[-]Improve copy on "blocked deletion" modal when workspace has active Expensify Cards[/-][+][$250] Improve copy on "blocked deletion" modal when workspace has active Expensify Cards[/+]melvin-bot commentedon Jun 3, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022062167459381598260
joekaufmanexpensify commentedon Jun 3, 2026
Discussed this change here
David-2002065 commentedon Jun 3, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user tries to delete a workspace that still has active Expensify Cards (cards with unsettled/unbilled transactions), a second/blocking modal stops the deletion. Its body copy — "Your company still has open Expensify Cards." — is unclear, gives the user no way to act, and has no Concierge link. We want the new copy plus an in‑app link that opens a Concierge chat. The first modal (the one with the actual Delete button, shown for third‑party card feeds) must stay unchanged, and the title (
workspace.common.delete= "Delete workspace") is already correct.What is the root cause of that problem?
The blocking error is attached to the policy when
deleteWorkspacedetects open Expensify Cards, keyed to thedeleteOpenExpensifyCardsErrortranslation:App/src/libs/actions/Policy/Policy.ts
Line 432 in 0a2641c
It resolves to the terse string:
App/src/languages/en.ts
Line 4499 in 0a2641c
Both workspace surfaces read it via
getLatestErrorMessage(policy)and surface the secondary modal through the imperativeuseConfirmModal()API, passing the raw string asprompt. InWorkspaceOverviewPage(policyLastErrorMessage):App/src/pages/workspace/WorkspaceOverviewPage.tsx
Lines 400 to 411 in 0a2641c
App/src/pages/workspace/WorkspaceOverviewPage.tsx
Lines 435 to 441 in 0a2641c
and in
WorkspacesListPage(policyToDeleteLatestErrorMessage):App/src/pages/workspace/WorkspacesListPage.tsx
Lines 293 to 308 in 0a2641c
App/src/pages/workspace/WorkspacesListPage.tsx
Lines 327 to 334 in 0a2641c
ConfirmContentonly wraps the prompt in<Text>when it is astring; a React node is rendered as‑is. So a plain‑string prompt can never carry an interactive link, even if the translation contained markup:App/src/components/ConfirmContent.tsx
Line 211 in 0a2641c
That is the root cause on both fronts: the copy is a bare error string, and as a plain string it cannot host a Concierge link.
What changes do you think we should make in order to solve the problem?
Keep the existing error flow (the translation key is still stored as the policy error and read via
getLatestErrorMessage) and change only two things — the copy, and how the modal renders it. There is an established precedent for exactly this case inUnshareBankAccount.tsx: render the prompt throughRenderHTMLwith a<concierge-link>tag, which the existingConciergeLinkRendererturns into an in‑app Concierge navigation.App/src/pages/settings/Wallet/UnshareBankAccount/UnshareBankAccount.tsx
Lines 179 to 181 in 0a2641c
deleteOpenExpensifyCardsErrorinsrc/languages/en.tsto the new copy with a<concierge-link>tag:showConfirmModalcall sites in bothWorkspaceOverviewPage.tsxandWorkspacesListPage.tsx, render the prompt viaRenderHTMLso the<concierge-link>tag becomes a tappable link instead of literal text:The same swap applies to the
policyToDeleteLatestErrorMessagecall sites inWorkspacesListPage.tsx.getLatestErrorMessageis typed to returnstring(neverundefined), soRenderHTML html={...}is type‑safe with no null‑coalescing needed.ConfirmContentrenders a React‑node prompt directly (it only wraps strings in<Text>), and the<View style={[styles.renderHTML, styles.flexRow]}>wrapper keepsRenderHTMLout of any<Text>ancestor — matching theUnshareBankAccountpattern exactly.The
<concierge-link>tag is registered toConciergeLinkRenderer, which callsnavigateToConciergeChaton press, satisfying "the Concierge link in the body should open a Concierge chat" with no new wiring:App/src/components/HTMLEngineProvider/HTMLRenderers/index.ts
Line 56 in 0a2641c
App/src/components/HTMLEngineProvider/HTMLRenderers/ConciergeLinkRenderer.tsx
Lines 29 to 31 in 0a2641c
deleteOpenExpensifyCardsError(es.ts,de.ts,fr.ts,it.ts,ja.ts,nl.ts,pl.ts,pt-BR.ts,zh-hans.ts), wrapping the "reach out to Concierge" phrase in<concierge-link>so the link works in every language.The first/primary "Are you sure you want to delete this workspace?" modal (
deleteWithCardsConfirmation) is intentionally left untouched, matching the note in the issue.What to test: create a workspace with Expensify Cards enabled and at least one unsettled card, then attempt deletion from both Workspace Overview and the Workspaces list. The secondary modal should read "Delete workspace" / "Your company still has Expensify Cards. Please reach out to Concierge to remove them.", and tapping the link should open the in‑app Concierge chat (not an external browser tab). Confirm a workspace with only third‑party card feeds still shows the unchanged primary modal with a working Delete button.
What alternative solutions did you explore? (Optional)
hasDeleteWorkspaceExpensifyCardsError). Rejected because the same modal also surfaces other backend‑returned "can't delete" reasons from theDeleteWorkspaceAPI; bypassing the errors flow for this one case would split rendering into two paths and let optimistic vs. backend behavior diverge. Keeping the translation key in the errors object preserves parity.<TextLink href={CONST.CONCIERGE_URL}>instead of the<concierge-link>tag. Rejected becauseTextLinkopens the marketing URL in a browser, which fails the "open a Concierge chat" requirement;<concierge-link>resolves to the in‑product Concierge report and reusesnavigateToConciergeChat(withintroSelected,betas,isSelfTourViewed, etc.) already encapsulated inConciergeLinkRenderer.wildan-m commentedon Jun 3, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user tries to delete a workspace that still has active Expensify Cards (cards with unsettled/unbilled transactions), a second modal blocks the deletion. The current body copy on that modal — "Your company still has open Expensify Cards." — is unclear and gives the user no way to act on it. We want the modal to show clearer copy and include a link that opens a Concierge chat so the user can have the cards removed. The first modal (the one with the "Delete" button, shown for third-party cards) must remain unchanged.
What is the root cause of that problem?
The blocked-deletion modal renders its body directly from the policy's raw Onyx error message, passed to
ConfirmModalas a plain-stringprompt. That error message is set when the delete request fails with active Expensify Cards:App/src/libs/actions/Policy/Policy.ts
Line 436 in dd0f6b4
It resolves to the terse translation
workspace.common.deleteOpenExpensifyCardsError:App/src/languages/en.ts
Line 4392 in dd0f6b4
The error string is then read via
getLatestErrorMessage(policy)and passed straight into the modal'spromptas plain text, in the workspace overview page:App/src/pages/workspace/WorkspaceOverviewPage.tsx
Lines 628 to 637 in dd0f6b4
and in the workspaces list page:
App/src/pages/workspace/WorkspacesListPage.tsx
Lines 680 to 685 in dd0f6b4
Two consequences follow: (1) the copy is just the bare error string with no guidance, and (2) because the prompt is rendered as a plain string, there is no mechanism for it to carry an interactive Concierge link. Note the modal title already uses
workspace.common.delete, which is "Delete workspace", so the requested title is already correct and needs no change.What changes do you think we should make in order to solve the problem?
Update the body copy of the translation key
workspace.common.deleteOpenExpensifyCardsErrorin bothsrc/languages/en.tsandsrc/languages/es.tsto the requested wording, embedding the app's existing<concierge-link>custom tag around the "reach out to Concierge" text. The new English string becomes:Your company still has Expensify Cards. Please <concierge-link>reach out to Concierge</concierge-link> to remove them.(with the equivalent Spanish translation ines.ts).In both blocked-deletion modals, render the prompt through
RenderHTMLinstead of passing the raw string, so the<concierge-link>tag is parsed and becomes an interactive link rather than literal text. Concretely, change theprompt={policyLastErrorMessage}line inWorkspaceOverviewPage.tsxand theprompt={policyToDeleteLatestErrorMessage}line inWorkspacesListPage.tsxto wrap the message in aRenderHTMLelement.ConfirmModal'spromptalready accepts a React node, and rendering workspace prompt copy viaRenderHTMLis an established pattern in the codebase (for exampleWorkspaceResetBankAccountModalandWorkspaceOverviewSharePage).The
<concierge-link>tag is already wired to open the in-app Concierge chat through the existing renderer, which callsnavigateToConciergeChaton press:https://github.com/Expensify/App/blob/dd0f6b462ad71463337e67a523bd5d33e76098aa/src/components/HTMLEngineProvider/HTMLRenderers/ConciergeLinkRenderer.tsx
so reusing it satisfies the requirement that the link open a Concierge chat, with no new link-handling code. The first "Delete" confirmation modal is left untouched.
What alternative solutions did you explore? (Optional)
https://www.expensify.com/conciergeinstead of the<concierge-link>tag. Rejected because the issue specifies the link should open a Concierge chat in the app; an external URL would navigate the user out of the app, whereas<concierge-link>opens the in-app Concierge chat natively.translate()string withoutRenderHTML. Rejected because a plain string cannot carry an interactive link — the<concierge-link>tag would render as literal text.30 remaining items
melvin-bot commentedon Jun 30, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Jun 30, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
linhvovan29546 commentedon Jul 1, 2026
I'm not sure we need a regression test for this issue, since the PR overall updates the text.
linhvovan29546 commentedon Jul 1, 2026
Note: This is not a regression. It's just an edge case where the BE returns the message unchanged.
mallenexpensify commentedon Jul 2, 2026
Payment Summary
Contributor+: @linhvovan29546 paid $250 via NewDot
mallenexpensify commentedon Jul 3, 2026
@linhvovan29546 can you please accept the job below? Please reply here and tag me once you have.
https://www.upwork.com/jobs/~022073156033800792499
linhvovan29546 commentedon Jul 3, 2026
@mallenexpensify I've accepted the offer
mallenexpensify commentedon Jul 3, 2026
@linhvovan29546 paid, summary updated above. Thx.