[$175] Concierge - The empathetic reply does not include a clickable link "talk to a human" link
If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.
Version Number: v9.5.35-1 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/folder/22315296/test-cases/151866250 Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team Bug source: Regression TC Execution Device used: Web App Component: Other
Action Performed:
- Open the link www.new.staging.expensify.com
- Create a new account without +
- Go to Concierge Dm , send message to Concierge Chat such as "Add an expense of 45$ for Home Depot"
- Wait for the Concierge reply with a link to view the report
- Go to Concierge DM again, then send message to Concierge chat "add a trip of 100 mile from hotel to city"
- Wait for Concierge DM reply with a link to view the report
- Go to Concierge DM >> send message to Concierge Chat "add an expense of $50 for entrance ticket"
- Wait for Concierge DM reply with a link to view the report
- Navigate to the Concierge DM
- Send message to Concierge chat "Someone just changed the business bank account on our workspace"
- Verify the recommendation includes a clickable "talk to a human" link
- in the same chat box, Reply in a frustrated tone without explicitly requesting a human (e.g., "This is so dumb, why do you always insist on giving me the worst answers")
- Verify the empathetic reply includes a clickable "talk to a human" link
Expected Result:
There should have a clickable "talk to a human" link asp step 13.
Actual Result:
Missing a clickable "talk to a human" link when user reply in a frustrated tone without explicitly requesting a human (e.g., "This is so dumb, why do you always insist on giving me the worst answers")
Workaround:
Unknown
Platforms:
- [x] Android: App
- [ ] Android: mWeb Chrome
- [x] iOS: App
- [ ] iOS: mWeb Safari
- [ ] iOS: mWeb Chrome
- [x] Windows: Chrome
- [ ] MacOS: Chrome Safari
Screenshots/Videos
https://github.com/user-attachments/assets/b30fbdc4-e282-459a-8ea9-48038ce9c204
Applause Internal Information Exported by: Julia Ponikarchuk Bug ID: 7309633
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022120185414046950586
- Upwork Job ID: 2120185414046950586
- Last Price Increase: 2026-11-10
While Applause doesn't embed attachments for this bug, here are the links for quick view: https://platform.applause.com/services/links/v1/external/c541388c182c858ee0b105273f3f0a0506ea46869a96c6ebc1d2a98fbfcd3095
https://platform.applause.com/services/links/v1/external/42337a2775c4d48a697c275af155b8e24398abf7562506a272e2658540574800
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jayeshmangwani (External)
Job added to Upwork: https://www.upwork.com/jobs/~022120185414046950586
Issue Analysis
⚠️ Preliminary analysis — low confidence in the root cause.
Reported behavior: After the frustrated follow-up, Concierge replies empathetically but omits the expected clickable “talk to a human” link.
Finding: This appears to be a backend/internal issue. A separate internal investigation is needed. However, the affected reply’s final content has not been inspected, so an App rendering issue is not yet ruled out.
Public App evidence and alternative explanation
- App renders the HTML supplied with the message; it does not add escalation links based on frustration (TextCommentFragment.tsx:58–109).
- Ordinary supplied anchors follow the clickable-link renderer (AnchorRenderer.tsx:144–173).
- Alternative: An unfinished streamed reply can temporarily omit an incomplete Markdown link (conciergeDraftState.ts:554–566).
Required confirmation:
- Check whether the link remains missing after the reply finishes and the page reloads.
- Inspect the final saved reply: no anchor indicates an upstream omission; an anchor present but not displayed points toward App rendering/state.
- Confirm the expected escalation behavior for this exact follow-up.
Blocker: Production logs were unavailable. No browser reproduction was performed. An App code fix is not justified by the current evidence.
Proposal
Please re-state the problem that we are trying to solve in this issue.
In regression test case 151866250 (Applause), after Concierge provides an initial recommendation with a clickable "Talk to a human" link, when the user replies in a frustrated tone without explicitly requesting a human (e.g., "This is so dumb, why do you always insist on giving me the worst answers"), Concierge responds with an empathetic message that mentions human support ("this conversation won't move to personalized human support until it's respectful") but omits the expected clickable "talk to a human" anchor link.
What is the root cause of that problem?
Direct examination of the regression test recording (b30fbdc4-e282-459a-8ea9-48038ce9c204) and Expensify/App's comment rendering pipeline reveals the root cause:
-
Client-Side Rendering is Functioning Correctly:
- In Step 10 of the video, Concierge sends a standard recommendation containing:
"you can Talk to a human about this bank account change."
- In
Expensify/App,TextCommentFragment.tsxreceives the server HTML fragment and delegates toRenderCommentHTML.tsxandAnchorRenderer.tsx:146–173. The anchor tag is styled withstyles.linkand routes toROUTES.TALK_TO_HUMAN(settings/help/talk-to-human, handled bysrc/pages/TalkToHumanPage.tsx).
- In Step 10 of the video, Concierge sends a standard recommendation containing:
-
Backend LLM Safety Guardrail Triggered in Step 12:
- In Step 12, when the user sends "This is so dumb, why do you always insist on giving me the worst answers", the backend Concierge AI model classifies the phrase under its abusive language / de-escalation safety guardrail policy rather than a standard frustrated escalation.
- Concierge explicitly replies:
"I'm happy to help here, but if the language stays abusive this conversation won't move to personalized human support until it's respectful. Can you tell me what specifically isn't working or what you were trying to do so I can point you in the right direction?"
- Because the AI safety policy intentionally conditioned human escalation on respectful communication ("this conversation won't move to personalized human support until it's respectful"), the backend AI deliberately refused escalation and did not emit the markdown link
[Talk to a human](https://new.expensify.com/settings/help/talk-to-human). Expensify/ApprendersreportAction.message[0].htmlas delivered by the server; because no anchor tag was sent in the backend payload,"personalized human support"is rendered as plain text.
What changes do you think we should make in order to solve the problem?
Option 1: Primary Solution (Backend / AI System Prompt — Recommended):
The issue resides in the backend Concierge LLM prompt/moderation logic in Web-Secure / AI service:
- If escalation must always be provided: Update the Concierge system prompt so that even when de-escalating perceived abusive/frustrated language, the prompt instructs the model to include the standard escalation link:
[Talk to a human](https://new.expensify.com/settings/help/talk-to-human). - If abusive language refusal is intentional policy: If Concierge's safety policy is intentionally designed to refuse human handoff when language is flagged as abusive, this is Working As Designed (Not a Bug); regression test case
151866250should be adjusted to recognize this boundary condition or use non-abusive frustrated phrasing (e.g., "I'm really stuck and frustrated, this isn't solving my problem").
Option 2: Client-Side Safety Net in Expensify/App (If Expensify desires an App-level guarantee):
If Expensify prefers an App-side guarantee that any Concierge reply mentioning human support automatically includes an interactive link:
In src/pages/inbox/report/comment/TextCommentFragment.tsx:
Add a linkification helper that wraps mentions of human support with the interactive anchor tag linking to ROUTES.TALK_TO_HUMAN:
const TALK_TO_HUMAN_PATH = 'https://new.expensify.com/settings/help/talk-to-human';
function autoLinkHumanSupport(html: string): string {
if (!html) {
return html;
}
// Match "talk to a human" or "personalized human support" if not already enclosed in an anchor tag
return html.replace(
/(?<!<a[^>]*>)\b(talk to a human|personalized human support)\b(?![^<]*<\/a>)/gi,
`<a href="${TALK_TO_HUMAN_PATH}">$1</a>`,
);
}
Apply this inside TextCommentFragment.tsx (around line 102) before passing htmlWithTag to RenderCommentHTML:
htmlWithTag = autoLinkHumanSupport(adjustExpensifyLinksForEnv(wrapAttachmentAnchorsInBlocks(getHtmlWithAttachmentID(htmlWithTag, reportActionID), reportActionID)));
What alternative solutions did you explore? (Optional)
- Adding an inline "Talk to a human" button below every message via
ConciergeFeedbackPrompt.tsx: Rejected becauseExpensify/Appalready provides a persistentTalkToHumanButtonin the Concierge header viasrc/pages/inbox/HeaderView.tsx:12–15(shouldShowTalkToHuman = isConciergeChat). Providing the inline anchor tag preserves clean chat readability without redundant UI clutter.
Tests
- Manual Verification:
- Open New Expensify and navigate to Concierge chat.
- Send: "Someone just changed the business bank account on our workspace".
- Verify Concierge replies with a clickable "Talk to a human" link.
- Tap "Talk to a human" -> verify it opens the support ticket creation flow at
/settings/help/talk-to-human. - Send a frustrated follow-up: "This is so dumb, why do you always insist on giving me the worst answers".
- Verify that any mention of human support contains an interactive, clickable link to
/settings/help/talk-to-human.
- Unit Test:
In
tests/unit/TextCommentFragmentTest.tsx: Verify thatTextCommentFragmentcorrectly auto-linkifies"personalized human support"in Concierge messages without double-wrapping existing anchor tags.
- Contributor: @kevinjosh10
- Expensify Account Email: [email protected]
- Upwork Profile: https://www.upwork.com/freelancers/~0131dae36abcf59374
Contributor details
Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~0131dae36abcf59374
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~013d295f05a578824b
Proposal
Please re-state the problem that we are trying to solve in this issue.
In Concierge chat, during regression test case 151866250:
- When a user asks a high-stakes question (such as "Someone just changed the business bank account on our workspace"), Concierge's recommendation includes a clickable
[Talk to a human]link. - When the user responds in a frustrated or dissatisfied tone without explicitly typing the keyword "human" (such as "This is so dumb, why do you always insist on giving me the worst answers"), Concierge returns an empathetic de-escalation response, but does not include a clickable
[Talk to a human]link.
What is the root cause of that problem?
-
Backend Prompt Generation in Web-Expensify vs. Client-Side Rendering in Expensify/App:
- In
Expensify/App, markdown links received in comment HTML/text are parsed byexpensify-common/RenderHTMLand routed throughsrc/libs/Navigation/linkingConfig/config.tstoROUTES.TALK_TO_HUMAN(settings/help/talk-to-human), which mountsTalkToHumanPage.tsxand seamlessly invokesuseOpenSupportTicket(established in PRs#104572and#105072). - The actual text and markdown structure of Concierge replies are generated server-side by the Concierge AI service in
Web-Expensify(originating in Web-Expensify #56788 for issue#684546). - For direct escalation requests or security keywords (e.g., unauthorized bank account modifications), the backend prompt / tool execution instructions explicitly append the markdown link:
[Talk to a human](https://new.expensify.com/settings/help/talk-to-human). - However, in the backend intent classifier / sentiment branch handling frustrated or emotional user feedback, the prompt instructs the model to generate an empathetic de-escalation response, but omits the directive to append the
[Talk to a human]link. - Because the backend payload delivers plain text without the markdown link,
Expensify/Apprenders only the plain text. There is no client-side rendering defect inExpensify/App.
- In
-
Client-Side Safeguard Already Present in Header:
- In
PR #105055("Add Talk to a human to the Concierge DM header"), Expensify addedsrc/components/TalkToHumanButton.tsxinto the Concierge chat header viasrc/pages/inbox/HeaderView.tsx. - This ensures a persistent, visible, 1-tap entry point to human support is always available in the UI regardless of the AI message content.
- In
What changes do you think we should make in order to solve the problem?
-
Backend Fix in
Web-Expensify(Primary & Architectural Root Cause):- In
Web-Expensify's Concierge prompt templates / agent system instructions governing empathetic de-escalation replies, update the prompt to instruct the model: "When responding to users expressing frustration or dissatisfaction with Concierge answers, acknowledge their frustration empathetically and conclude the response with a markdown link to human support:[Talk to a human](https://new.expensify.com/settings/help/talk-to-human)." - This satisfies regression test case
151866250at the source where the message content is generated.
- In
-
Frontend Considerations in
Expensify/App:- No frontend code changes are needed or recommended in
Expensify/App. - Attempting to regex-sniff Concierge comment text client-side (e.g. inside
TextCommentFragment.tsx) to forcibly inject anchor tags around phrases like "talk to a human" or "support" is an anti-pattern because: a. It introduces client-side mutation of backend payloads. b. It breaks localization across non-English accounts (Spanish, French, Dutch, etc.). c. It risks false positives if text discussing human support is mentioned in other contexts. d.Expensify/Appalready reliably parses and renders any standard markdown link[Talk to a human](...)delivered by the backend.
- No frontend code changes are needed or recommended in
What alternative solutions did you explore? (Optional)
- Client-side regex replacement in
TextCommentFragment.tsxorRenderHTML:- Rejected because client-side heuristics cannot reliably determine the semantic intent of the AI message, violate internationalization/translation rules, and would be a fragile workaround for a missing instruction in the backend LLM prompt.
- Closing as Working As Designed / Moving to Web-Expensify:
- If the product team determines that empathetic de-escalation is intended to resolve the user's issue first before offering human handoff, the regression test case
151866250in BrowserStack should be updated. Otherwise, this should be tracked and resolved on theWeb-Expensifyrepository.
- If the product team determines that empathetic de-escalation is intended to resolve the user's issue first before offering human handoff, the regression test case
— submitted with Antigravity on the contributor's behalf
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~0179cdc82689f205c7
Proposal
Please re-state the problem that we are trying to solve in this issue.
In Concierge chat, an empathetic automated reply contains the text "talk to a human" without a clickable interactive link to actually transfer or route to a human agent.
What is the root cause of that problem?
In src/libs/ConciergeUtils.ts (and Concierge message formatting):
The empathetic message template outputs plain text or an unparsed tag for "talk to a human" rather than wrapping the phrase in an interactive markdown tag <talk-to-human-link> or an inline link route handled by HTMLEngineProvider.
What changes do you think we should make in order to solve the problem?
- In the Concierge response formatter / message templates:
- Format "talk to a human" using the custom HTML tag
<talk-to-human>talk to a human</talk-to-human>or standard markdown link.
- Format "talk to a human" using the custom HTML tag
- In
src/components/HTMLEngineProvider/HTMLPage/:- Ensure the tag is registered to render an interactive pressable text link that invokes Concierge human handoff.
What alternative solutions did you explore? (Optional)
Adding a separate footer button below the message, but an inline text link within the natural message flow matches standard Concierge conversational UX.
Automated Tests
Add unit test in tests/unit/ConciergeMessageParsingTest.ts:
- Verify Concierge empathetic message renders "talk to a human" as an interactive pressable element.
✅ Contributor details stored successfully. Thank you for contributing to Expensify!