Skip to content

Open a support ticket straight from the Talk to a human link - #104572

Draft
ishpaul777 wants to merge 3 commits into
Expensify:mainfrom
ishpaul777:ishpaul/684546-talk-to-human-ticket
Draft

ishpaul777 wants to merge 3 commits into
Expensify:mainfrom
ishpaul777:ishpaul/684546-talk-to-human-ticket

Conversation

@ishpaul777

@ishpaul777 ishpaul777 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Concierge now ends most replies with a Talk to a human link instead of escalating (Web-Expensify #56788). That link currently lands on Account > Help, where the customer still has to find and press the Talk to a human row. This adds a settings/help/talk-to-human route that performs that step for them, so the link opens a support ticket directly.

The ticket logic already existed in openSupportTicket(); the only new behaviour is an entry point for it. Ticket creation and the no-rep-available fallback to Concierge are extracted into useOpenSupportTicket, so the Help page row and this route stay identical. A route is used rather than intercepting link presses, so email links, refreshes and mobile deep links all work.

The route leaves itself before creating the ticket, so the ticket's Back returns to the chat the link was pressed in instead of this loader. With nothing behind it (a direct link) it falls back to the Help page and opens the ticket from there. Offline returns to the Help page, since ticket creation needs the network, and a ref keeps a remount from opening a second ticket.

Deploy order: this ships before Auth and Web-Expensify, which point the link here.

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/684546

Tests

  1. Sign in and open the Concierge chat.
  2. Send a message that gets the link, for example "I want to talk to a real person please."
  3. Press Talk to a human in Concierge's reply.
  4. Verify a support ticket is created and opened directly, with no stop on the Help page.
  5. Press Back in the ticket. Verify you return to the Concierge chat, not a spinner.
  6. Go to Account > Help and press the Talk to a human row. Verify it behaves exactly as before.
  7. Open settings/help/talk-to-human directly in the URL bar. Verify it opens a ticket and Back lands on the Help page.
  8. With no support rep available, press the link. Verify the "no support rep available" message shows and Concierge opens.
  • Verify that no errors appear in the JS console

Offline tests

  1. Go offline and press the link. Verify you land on Account > Help and no ticket is created.
  2. Come back online and press the Talk to a human row. Verify a ticket opens.

QA Steps

  1. Open the Concierge chat and send "I want to talk to a real person please."
  2. Press Talk to a human in the reply and verify a support ticket opens directly and Back returns to the chat.
  3. Verify the Talk to a human row under Account > Help still opens a ticket.
  • Verify that no errors appear in the JS console

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

@ishpaul777
ishpaul777 requested review from a team as code owners October 21, 2026 13:09
@melvin-bot
melvin-bot Bot requested a review from situchan October 21, 2026 13:09
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T13:21:59.509604Z 8b33174 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@melvin-bot
melvin-bot Bot removed the request for review from a team October 21, 2026 13:09
@melvin-bot

melvin-bot Bot commented Oct 21, 2026

Copy link
Copy Markdown

@situchan 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 requested review from dylanexpensify and removed request for a team October 21, 2026 13:09
@situchan

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 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 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
    • 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
    • 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 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).
  • 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

// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isOffline]);

return <FullScreenLoadingIndicator shouldUseGoBackButton={false} />;

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.

❌ UI-1 (docs)

This screen renders a FullScreenLoadingIndicator with no navigation component (no HeaderWithBackButton or close button) in the same return, and it explicitly sets shouldUseGoBackButton={false}. If opening the support ticket hangs (slow or stuck network response), the user is trapped on a full-screen spinner with no escape route. The shouldUseGoBackButton={false} escape hatch is reserved for cases where going back is dead or harmful (global overlays, mid sign-out). Here going back is safe and useful, so the emergency "Go Back" button should be available.

Remove the shouldUseGoBackButton={false} override (it defaults to true), or set it explicitly to true:

return <FullScreenLoadingIndicator shouldUseGoBackButton />;

Reviewed at: 8b33174 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

}
hasRequestedTicket.current = true;
openSupportTicketOrConcierge();
// eslint-disable-next-line react-hooks/exhaustive-deps

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.

❌ CONSISTENCY-5 (docs)

The eslint-disable-next-line react-hooks/exhaustive-deps suppresses the exhaustive-deps rule without an accompanying comment explaining why openSupportTicketOrConcierge is intentionally omitted from the dependency array. Since this is a permanent suppression (the effect should only re-run when isOffline changes), add a justification so future maintainers understand the intent.

// openSupportTicketOrConcierge is a new reference every render; the hasRequestedTicket ref already
// guards against re-running, so we only want this effect to react to isOffline changing.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isOffline]);

Reviewed at: 8b33174 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

@ishpaul777
ishpaul777 marked this pull request as draft October 21, 2026 13:16
@situchan

Copy link
Copy Markdown
Contributor

Please ping me when ready for review. Thanks

@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: 8b33174b58

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

return;
}
hasRequestedTicket.current = true;
openSupportTicketOrConcierge();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep the action route out of the ticket back target

When this effect is entered from a Concierge link, openSupportTicket() calls getReportRouteForCurrentContext(), which records the currently active settings/help/talk-to-human route as the new report's backTo; ReportHeader honors that value when the customer leaves the ticket. The settings tab remains mounted with hasRequestedTicket.current set, so Back returns to this page's permanent loader (which explicitly has no Go Back button) instead of the originating chat; if the page was remounted, it can instead create another ticket. Remove/replace this transient route or preserve the pre-link route before invoking the action.

Useful? React with 👍 / 👎.

@codecov

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
src/ROUTES.ts 33.78% <ø> (+0.07%) ⬆️
src/SCREENS.ts 100.00% <ø> (ø)
src/libs/Navigation/linkingConfig/config.ts 62.50% <ø> (ø)
src/pages/settings/HelpPage/HelpPage.tsx 84.21% <100.00%> (+3.19%) ⬆️
...AppNavigator/Navigators/SettingsSplitNavigator.tsx 50.00% <0.00%> (-2.00%) ⬇️
src/hooks/useOpenSupportTicket.ts 50.00% <50.00%> (ø)
src/pages/settings/HelpPage/TalkToHumanPage.tsx 0.00% <0.00%> (ø)
... and 75 files with indirect coverage changes

This branch has not been deployed

No deployments
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.

2 participants