Skip to content

[Due for payment 2025-05-13] [$250] Expense - Description with mention highlighted in not consistent for track/IOU/expense. #60807

Closed

Description

@jponikarchuk

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.1.32-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail: N
Email or phone of affected tester (no customers): Slottwo1 2@gmail.com
Issue reported by: Applause Internal Team
Device used: Redminote 10s android 13
App Component: Money Requests

Action Performed:

  1. Go to https://staging.new.expensify.com/home
  2. Login with a new gmail account
  3. Create a track expense with description Eg: #8
  4. Note in confirmation page the behaviour of description
  5. Open the expense
  6. Note the behaviour of description
  7. Create a manual expense with description Eg: #7
  8. Note in confirmation page the behaviour of description
  9. Open the expense
  10. Note the behaviour of description
  11. Tap fab and Create workspace
  12. Open workspace chat
  13. Create a manual expense with description Eg: #7
  14. Note in confirmation page the behaviour of description
  15. Open the expense
  16. Note the behaviour of description

Expected Result:

Description with mention highlighted must be consistent for track/IOU/expense.

Actual Result:

In track expense, description with mention is not highlighted. In 1:1 chat, in preview mention is highlighted in created expense. In workspace chat, in confirmation page, highlighted in description(including preview) but on opening created expense, only in preview description with mention is highlighted.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021916953073958255661
  • Upwork Job ID: 1916953073958255661
  • Last Price Increase: 2025-04-28
  • Automatic offers:
    • truph01 | Contributor | 107106303
Issue OwnerCurrent Issue Owner: @Christinadobrzyn

Activity

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

    @melvin-bot

    Triggered auto assignment to @Christinadobrzyn (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. truph01 commented on Apr 24, 2025

    @truph01
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-04-24 11:00:01 UTC.

    Proposal

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

    In track expense, description with mention is not highlighted. In 1:1 chat, in preview mention is highlighted in created expense. In workspace chat, in confirmation page, highlighted in description(including preview) but on opening created expense, only in preview description with mention is highlighted.

    What is the root cause of that problem?

      const isReportInGroupPolicy = !!report?.policyID && report.policyID !== CONST.POLICY.ID_FAKE;

    may incorrectly return true for 1:1 DMs, causing markdown styles (including mention highlighting) to be applied in those cases.

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

    • We should add the exactlyMatch: true option to the mention rendering logic in:

      const mentionReportContextValue = useMemo(() => ({currentReportID: reportID}), [reportID]);

      This will ensure mentions are matched and highlighted precisely and consistently.

    • Additionally, we should update the isReportInGroupPolicy logic in:

      excludedMarkdownStyles={!isReportInGroupPolicy ? ['mentionReport'] : []}

      to more accurately detect group policies and avoid false positives for 1:1 DMs.

      Proposed update:

      
      const isReportInGroupPolicy = !!report?.policyID 
        && report.policyID !== CONST.POLICY.ID_FAKE 
        && getPersonalPolicy()?.id !== report.policyID;
      
    • Besides only disabling mentionReport if isReportInGroupPolicy is false, we can always disable mentionReport.

    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)

  4. melvin-bot commented on Apr 28, 2025

    @melvin-bot

    @Christinadobrzyn Whoops! This issue is 2 days overdue. Let's get this updated quick!

  5. Christinadobrzyn commented on Apr 28, 2025

    @Christinadobrzyn
    Contributor

    This can be reproduced in the provided steps - i think this can be external.

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Apr 28, 2025
  7. melvin-bot commented on Apr 28, 2025

    @melvin-bot
  8. changed the title [-]Expense - Description with mention highlighted in not consistent for track/IOU/expense.[/-] [+][$250] Expense - Description with mention highlighted in not consistent for track/IOU/expense.[/+] on Apr 28, 2025
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Apr 28, 2025
  10. melvin-bot commented on Apr 28, 2025

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @c3024 (External)

  11. 19 remaining items

  12. changed the title [-][$250] Expense - Description with mention highlighted in not consistent for track/IOU/expense.[/-] [+][Due for payment 2025-05-13] [$250] Expense - Description with mention highlighted in not consistent for track/IOU/expense.[/+] on May 6, 2025
  13. melvin-bot commented on May 6, 2025

    @melvin-bot

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

  14. melvin-bot commented on May 6, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.39-8 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-05-13. 🎊

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

  15. melvin-bot commented on May 6, 2025

    @melvin-bot

    @c3024 @Christinadobrzyn @c3024 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]

  16. Christinadobrzyn commented on May 12, 2025

    @Christinadobrzyn
    Contributor

    @c3024 Do we need a regression test?

  17. c3024 commented on May 13, 2025

    @c3024
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [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: This is an edge case and no PR can be held responsible.

    • [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: Not started because the regression was not critical.

    • [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 Template

    Regression Test Proposal

    Precondition:

    • None

    Test:

    1. Go to ND.
    2. Log in using a new Gmail account.
    3. Create a manual expense in a 1:1 DM with a description of room number markdown (e.g., Implement infinite sessions #7).
    4. Verify that on the confirmation page, the room number in the desciption is not highlighted.
    5. Click on the description field on the confirmation page.
    6. Verify that the room number in the description field is not highlighted.
    7. Open the created expense.
    8. Verify that the description is still not highlighted.
    9. Click on the description field.
    10. Verify that the description remains not highlighted.
    11. Tap the FAB and create a new workspace.
    12. Open the workspace chat.
    13. Create a manual expense in the workspace chat with the description, e.g., Implement infinite sessions #7.
    14. Verify that on the confirmation page, the description is not highlighted.
    15. Click on the description field on the confirmation page.
    16. Verify that the description field is highlighted.
    17. Open the created expense.
    18. Verify that the description is not highlighted.
    19. Click on the description field.
    20. Verify that the description is highlighted.

    Do we agree 👍 or 👎

  18. Christinadobrzyn commented on May 13, 2025

    @Christinadobrzyn
    Contributor

    Payment summary here - #60807 (comment)

    Regression test here - #60807 (comment)

    Please make sure to request payment @c3024!

  19. JmillsExpensify commented on May 29, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @c3024

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions