Skip to content

Show the replies row under support ticket previews - #105406

Merged
jasperhuangg merged 2 commits into
Expensify:mainfrom
trasnake87:fix/104400-support-ticket-replies
Nov 3, 2026
Merged

jasperhuangg merged 2 commits into
Expensify:mainfrom
trasnake87:fix/104400-support-ticket-replies

Conversation

@trasnake87

@trasnake87 trasnake87 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Support ticket previews in the Concierge chat never showed the replies row, because shouldDisplayThreadReplies returned false for any parent action whose child is a support ticket. This removes that exclusion, so the existing ReportActionItemThread row (reply count, commenter avatars, time of the last reply) renders under the ticket preview the same way it does for other threads. No new UI or copy is added.

The row's press handler went through navigateToAndOpenChildReport. When the ticket report isn't in Onyx yet, that falls back to createChildReport, which merges an optimistic chat report (type: chat) onto the ticket's own report key, so the ticket renders as a plain chat until the ticket's report data arrives from the server. For support ticket parents the row now opens the ticket through a small shared helper, navigateToSupportTicket (in src/libs/actions/Report), which the preview card uses too, so the row and the card always open the same route (including the Search context). If there is no ticket report ID, neither the row nor the card navigates.

The Reply in thread, Join thread and Leave thread context menu actions keep their own support ticket checks in ContextMenuActions, so they stay hidden for ticket previews.

Support tickets now also get the agent-processing fallback other threads already have: if the ticket report's REPORT_NAME_VALUE_PAIRS carries an agent processing indicator, the row shows one in-progress reply (with the agent's avatar if nobody has replied yet). I kept this for tickets rather than passing false, so the row behaves the same as on every other thread.

Fixed Issues

$ #104400
PROPOSAL: #104400 (comment)

Tests

  1. Sign in, go to Account > Help and press Talk to a human in the Help and support section to create a support ticket.
  2. In the support ticket, send a message (or have the support rep reply).
  3. Open the Concierge chat, both from the LHN and from the Concierge side panel / RHP.
  4. Verify a replies row now shows below the support ticket preview, with the reply count, the commenter avatar(s) and the time of the last reply.
  5. Press the replies row and verify it opens as a support ticket (title, Description and Assignee shown at the top), not a plain chat.
  6. Go back and press the support ticket preview card itself, and verify it opens the same ticket.
  7. Right-click (or long-press) the support ticket preview and verify Reply in thread, Join thread and Leave thread are still not shown.
  8. Open any regular chat message that has thread replies and verify its replies row still shows and still opens the thread.
  • Verify that no errors appear in the JS console

Offline tests

  1. Open the Concierge chat with a support ticket that has replies (Tests steps 1-3).
  2. Go offline.
  3. Verify the replies row still shows below the support ticket preview.
  4. Press the replies row and verify the support ticket opens the same way it does when pressing the preview card.

QA Steps

Same as tests.

  • 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

Recordings use a real support ticket (created from Account > Help > Talk to a human on this account); the left frame of each image is main, the right one is this branch. Older Concierge messages above the ticket card are blurred. Videos are hosted on a release of my fork; the regular-thread, context-menu, console and deeplink checks are described in the comment below.

Android: Native

before/after

before — main · after — fix

Android: mWeb Chrome

before/after

before — main · after — fix

iOS: Native

before/after

before — main · after — fix

iOS: mWeb Safari

before/after

before — main · after — fix

MacOS: Chrome / Safari

before/after — Safari

Safari (macOS 26.4): before — main · after — fix
Chrome (macOS): before — main · after — fix

Drop the support ticket exclusion from shouldDisplayThreadReplies so the
existing replies row renders under the ticket preview in Concierge.

Pressing that row used to go through navigateToAndOpenChildReport, which
merges an optimistic chat over the ticket when the ticket report isn't
loaded yet. Open the ticket the same way the preview card does instead,
and do nothing if there is no ticket report ID to open.
@trasnake87

Copy link
Copy Markdown
Contributor Author

Checklist note — items ticked as not applicable to this PR:

  • Copy / marketing: no copy is added (the row reuses the existing "Reply"/"Replies" strings).
  • New code pattern: none; the row opens the ticket with the same getReportRouteForCurrentContext call SupportTicketPreview already uses.
  • Assets: none added or modified.
  • Markdown: no message editing or sending code is touched.
  • Generic component: the new branch in ReportActionItemThread is gated on isCreatedSupportTicketReportAction, so other threads take the unchanged path; the existing chat/task cases still pass.
  • Storybook: no story covers ReportActionItemThread or ReportActionItem.
  • Main merged after a review: there has been no review yet.

The recordings for all platforms and the remaining checklist items will be completed before I mark this ready for review.

@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Coverage Δ
src/pages/inbox/report/ReportActionItemThread.tsx 100.00% <100.00%> (ø)
...mponents/ReportActionItem/SupportTicketPreview.tsx 0.00% <0.00%> (ø)
src/libs/ReportUtils.ts 90.20% <0.00%> (+0.17%) ⬆️
src/libs/actions/Report/index.ts 75.71% <50.00%> (+0.08%) ⬆️
... and 418 files with indirect coverage changes

@trasnake87

Copy link
Copy Markdown
Contributor Author

Checklist evidence for the boxes ticked above (in addition to the N/A note earlier in this thread):

  • Test steps: steps 1–2 (creating the ticket and sending one message) were done once, on Android; steps 3–6 were run on every platform with Concierge opened from the LHN (recordings above); step 3's side-panel path (Help button → Show history) was run on desktop Chrome at both the docked and the overlay width, on main and on this branch, with the same result; steps 7–8 on desktop web.
  • Regular threads (step 8): a normal message with a thread reply still shows its replies row and still opens the thread on this branch.
  • Context menu (step 7): right-clicking the ticket preview on this branch offers reactions, Mark as unread, Copy link and Delete — no Reply in thread, Join thread or Leave thread; identical to main.
  • Console (desktop Chrome): the flow (open Concierge, show the row, press the row, back, press the card) was run twice on this branch and twice on main with the console captured; no error appears on this branch that is not also on main (the pre-existing ones on both: a nested <button>, a textDecoration style warning and an unknown DOM prop).
  • Deeplinks: logged in, /r/<conciergeReportID> opens Concierge (the row shows under the card after View chat history) and /r/<ticketReportID> opens the ticket as a support ticket; logged out, both land on the sign-in page.
  • Failure scenarios: this change adds no inputs or error states. The one failure path — pressing the row before the ticket report is loaded — is covered by the new test in tests/ui/ReportActionItemThreadTest.tsx.
  • Offline: Android, this branch: with Account > Troubleshoot > Force offline on, the "2 Replies" row stays under the ticket card, pressing it opens the support ticket (title, Description, Assignee) and pressing the card opens the same report; turning Force offline off leaves the card and row unchanged.
  • High-Traffic account: this account has no support ticket, so the ticket row itself could not be exercised there. On this branch and on main, against the production API on the Android emulator (dev build), I opened Inbox, Concierge with chat history, and a 10-reply thread, and also a room with ~5,000 messages on this branch. No slowdown relative to main; one run on this branch right after the account restore was slower while the account was still syncing, and the re-run matched main.
  • Accessibility: the row keeps its existing button role and "N Replies" label; an AI review of the diff found nothing to change.
  • UI / design: no new component, copy or style — the existing replies row now also renders under support-ticket previews, as the issue asks. cc @Expensify/design for visibility (reviewers: feel free to add the Design label if you want a design pass).
  • N/A: the row has no form inputs (alignment item) and no checked/expanded/selected state to announce (state-change item).

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 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 ⚠️ Failed 2026-11-01T01:27:09.893939Z
We couldn’t complete this review. Comment @codex review to try again.
178e990 Manual request
ℹ️ 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 requested review from a team and garrettmknight and removed request for a team October 31, 2026 23:24
@melvin-bot

melvin-bot Bot commented Oct 31, 2026

Copy link
Copy Markdown

@linhvovan29546 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 October 31, 2026 23:24
@trasnake87

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

Failed to set up container
ℹ️ 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".

…replies row

Move the ticket navigation into navigateToSupportTicket and call it from both
places, so the preview card also skips navigating when there is no ticket report ID.
@linhvovan29546

Copy link
Copy Markdown
Contributor

I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.

@trasnake87 Please update the PR Author checklist! Thanks

@linhvovan29546

Copy link
Copy Markdown
Contributor

I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.

@trasnake87 Please update the PR author checklist

Comment on lines +87 to +91
const supportTicketReportID = childReport?.reportID ?? reportAction.childReportID;
if (!supportTicketReportID) {
return;
}
Navigation.navigate(getReportRouteForCurrentContext({reportID: supportTicketReportID}));

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.

This duplicates how SupportTicketPreview opens the ticket (supportTicket?.reportID ?? action?.childReportID, then Navigation.navigate(getReportRouteForCurrentContext(...)), see SupportTicketPreview.tsx#L50 and #L82). The two copies already differ: the card has no empty-ID guard, so it navigates to REPORT_WITH_ID.getRoute(''), while the row does nothing.

If someone later changes how tickets open (for example a dedicated route) and only updates the card, the row will quietly keep the old route, so the card and the row would open different places again. Nothing would catch that.

Could we move this into one small helper and call it from both places? For example:

/** Opens a support ticket without going through createChildReport, which would overwrite an unloaded ticket with an optimistic chat. */
function navigateToSupportTicket(reportID: string | undefined) {
    if (!reportID) {
        return;
    }
    Navigation.navigate(getReportRouteForCurrentContext({reportID}));
}

The card then gets the empty-ID guard too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 6d5b0eb: added navigateToSupportTicket(reportID) in src/libs/actions/Report/index.ts (next to the other support-ticket actions) and used it from both SupportTicketPreview and ReportActionItemThread, so the card now returns early on an empty ID as well. Behaviour is otherwise unchanged; the recordings in the description are from 178e990.

Comment on lines +84 to +85
// Open a support ticket the same way its preview card does. The child report path below would
// create an optimistic chat over the ticket when it isn't loaded yet, turning it into a plain chat.

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.

NAB: this comment is unnecessary, let's remove it.

Suggested change
// Open a support ticket the same way its preview card does. The child report path below would
// create an optimistic chat over the ticket when it isn't loaded yet, turning it into a plain chat.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed in 6d5b0eb.

@trasnake87

Copy link
Copy Markdown
Contributor Author

@linhvovan29546 both addressed in 6d5b0eb — ready for another look, thanks!

@linhvovan29546

linhvovan29546 commented Nov 1, 2026 •

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
Screen.Recording.2026-11-01.at.15.52.51.mov

@melvin-bot
melvin-bot Bot requested a review from jasperhuangg November 1, 2026 09:58
@linhvovan29546

linhvovan29546 commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.

@trasnake87 Please update the PR Author checklist

@trasnake87

Copy link
Copy Markdown
Contributor Author

On it — running the VoiceOver pass now and will tick that box as soon as it is done. Thanks for the quick review!

@trasnake87

Copy link
Copy Markdown
Contributor Author

@linhvovan29546 done — VoiceOver (macOS Safari) reads the card as "Support ticket, Oct 31, 2026: …, button" and, immediately after it in both Tab and VO-cursor order, the new row as "2 Replies, button"; VO+Space on the row opens the ticket. The author checklist is now complete.

@garrettmknight garrettmknight left a comment

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.

Looks good from a product perspective.

@jasperhuangg
jasperhuangg merged commit 7e14b49 into Expensify:main Nov 3, 2026
39 of 45 checks passed
@OSBotify

OSBotify commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

🚧 jasperhuangg has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@OSBotify OSBotify mentioned this pull request Nov 3, 2026
99 tasks done
@OSBotify

OSBotify commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/jasperhuangg in version: 9.5.31-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 failure ❌
🍎 iOS 🍎 success ✅

@OSBotify

OSBotify commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/jasperhuangg in version: 9.5.31-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@danielrvidal

Copy link
Copy Markdown
Contributor

Nice it looks great on staging! Check in the ConciergeDM and in RHP.

image image

@OSBotify

OSBotify commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/blimpich in version: 9.5.31-4 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

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.

6 participants