Skip to content

[Due for payment 2025-12-19] [$250] chat-Thread header is not showing the exact message sent #71434

Description

@nlemma

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: V9.2.19-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: #70777
Email or phone of affected tester (no customers): slottwo1@gmail.com
Issue reported by: Applause Internal Team
Device used: Redminote 10s android 13 phone
App Component: Chat Report View

Action Performed:

  1. Launch app
  2. Open a chat
  3. Send a message - <div>test<div>
  4. Long press and open reply thread
  5. Note thread header

Expected Result:

Thread header must show the exact message sent.

Actual Result:

Thread header is not showing the exact message sent.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6957298_1758951562559.Screenrecorder-2025-09-27-11-06-10-467.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021975154112185474030
  • Upwork Job ID: 1975154112185474030
  • Last Price Increase: 2025-10-13
  • Automatic offers:
    • nkdengineer | Contributor | 109106055
Issue OwnerCurrent Issue Owner: @trjExpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 28, 2025
  2. melvin-bot commented on Sep 28, 2025

    @melvin-bot

    Triggered auto assignment to @trjExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. nkdengineer commented on Sep 28, 2025

    @nkdengineer
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Thread header is not showing the exact message sent.

    What is the root cause of that problem?

    We are parsing from html to text here

    const title = StringUtils.lineBreaksToSpaces(Parser.htmlToText(fullTitle)) || translate('common.hidden');

    What changes do you think we should make in order to solve the problem?

    We added parse.htmlAsTest in this PR to remove markdown symbol in report header and report details page

    1. We should create a new props like shouldParseFullTitle and set the default value as true
    function DisplayNames({
        ...
        shouldParseFullTitle = true,
        ...
    }: DisplayNamesProps)
    
    1. Update title to use raw text
        const title = StringUtils.lineBreaksToSpaces(shouldParseFullTitle ? Parser.htmlToText(fullTitle) : fullTitle) || translate('common.hidden');
    
    1. Pass shouldParseFullTitle as false when we don't need to show html to text

    <DisplayNames
    fullTitle={title}
    displayNamesWithTooltips={displayNamesWithTooltips}
    tooltipEnabled
    numberOfLines={1}

    <DisplayNames
    fullTitle={reportName}
    displayNamesWithTooltips={displayNamesWithTooltips}
    tooltipEnabled
    numberOfLines={isChatRoom && !isChatThread ? 0 : 1}

    <DisplayNames
    accessibilityLabel={translate('accessibilityHints.chatUserDisplayNames')}
    fullTitle={optionItem.text ?? ''}
    displayNamesWithTooltips={optionItem.displayNamesWithTooltips ?? []}
    tooltipEnabled

    And in MenuItem component, we should pass it as !shouldRenderAsHTML

    <DisplayNames
    fullTitle={title}
    displayNamesWithTooltips={titleWithTooltips}
    tooltipEnabled

    We also need to check DisplayNames file native as well

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    None

    What alternative solutions did you explore? (Optional)

    NA

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. trjExpensify commented on Sep 29, 2025

    @trjExpensify
    Contributor

    This feels like it was on purpose to strip the HTML tags. Tagging a few people involved from PRs etc linked to help confirm:

    #70777 - @bernhardoj @QichenZhu @pecanoro
    #59328 - @daledah @s77rt @suneox @iwiznia

  5. s77rt commented on Sep 29, 2025

    @s77rt
    Member

    This is a bug. It's probably External.

  6. trjExpensify commented on Sep 29, 2025

    @trjExpensify
    Contributor

    If we're stripping HTML tags from report headers and LHN previews per those issues above, can you help me understand why this would be a bug? 🤔

  7. QichenZhu commented on Sep 29, 2025

    @QichenZhu
    Contributor

    @trjExpensify, the two issues focus on different aspects. #70777 deals with user-typed HTML (displaying as-is), while #59328 deals with HTML generated by the markdown engine (stripping them).

  8. s77rt commented on Sep 29, 2025

    @s77rt
    Member

    We only strip html tags to unstyle styles text. We still don't want html tags to be rendered though. The user typed <div>test<div> and we should consider this either as:

    • Plaintext, in which case we pass it as is <div>test<div>
    • Html: in which case we pass it encoded as &lt;div&gt;test&lt;div&gt;

    In both cases the user shall see same text in message, in header

  9. trjExpensify commented on Sep 30, 2025

    @trjExpensify
    Contributor

    Ah gotcha, so plain text then probably? @iwiznia @pecanoro?

  10. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Oct 6, 2025
  11. changed the title [-]chat-Thread header is not showing the exact message sent[/-] [+][$250] chat-Thread header is not showing the exact message sent[/+] on Oct 6, 2025
  12. 40 remaining items

  13. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Dec 12, 2025
  14. changed the title [-][$250] chat-Thread header is not showing the exact message sent[/-] [+][Due for payment 2025-12-19] [$250] chat-Thread header is not showing the exact message sent[/+] on Dec 12, 2025
  15. melvin-bot commented on Dec 12, 2025

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  16. melvin-bot commented on Dec 12, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.77-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2025-12-19. 🎊

    For reference, here are some details about the assignees on this issue:

  17. melvin-bot commented on Dec 12, 2025

    @melvin-bot

    @ZhenjaHorbach @trjExpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  18. ZhenjaHorbach commented on Dec 18, 2025

    @ZhenjaHorbach
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: https://github.com/Expensify/App/pull/59328/changes#r2629917805

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: NA

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal

    Test:

    1. Open App
    2. Open a chat
    3. Send a message - <div>test<div>
    4. Long-press and open the reply thread
    5. Verify that the thread header must show the exact message sent.

    Do we agree 👍 or 👎

  19. trjExpensify commented on Dec 19, 2025

    @trjExpensify
    Contributor

    Bit edge casey for a standalone test, going to forgo it.

    Payment summary as follows:

    Go ahead and request!

  20. ZhenjaHorbach commented on Dec 19, 2025

    @ZhenjaHorbach
    Contributor

    Requested in ND!

  21. garrettmknight commented on Dec 29, 2025

    @garrettmknight
    Contributor

    $250 approved for @ZhenjaHorbach

  22. twisterdotcom commented on Feb 25, 2026

    @twisterdotcom
    Contributor

    @nkdengineer has submitted payment for this report on ND here.

    SO: https://stackoverflowteams.com/c/expensify/questions/7582

    Zapier Logs Run ID: 00040eee-880a-aeac-84fc-5105b152fcf4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions