Skip to content

[Due for payment 2025-09-02] [$250] Expense Chat - System message missing hyperlink #68093

Closed

Description

@mitarachim

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.90-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: https://test-management.browserstack.com/projects/2219752/folder/13176730/test-cases/41237113
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: Macbook, Sequoia 15.6, Chrome, Desktop
App Component: Chat Report View

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Sign up with a Gmail address that includes a +
  3. Select “Track and budget expenses”. Click Skip on the remaining steps until the onboarding flow is completed
  4. Create a workspace > Create a report > Create 2 manual expenses
  5. Check both expenses > Click the “2 selected” button > Move expenses > Remove from report
  6. Go to your self DM
  7. Click on one of the removed expenses

Expected Result:

System message should include a hyperlink.

Actual Result:

System message is shown without a hyperlink.

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

Image
Bug6909833_1754522338789.Skreen_Recording_2025-08-06_at_8.05.40_PM.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021953849909154560167
  • Upwork Job ID: 1953849909154560167
  • Last Price Increase: 2025-08-08
Issue OwnerCurrent Issue Owner: @trjExpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 7, 2025
  2. melvin-bot commented on Aug 7, 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. Krishna2323 commented on Aug 7, 2025

    @Krishna2323
    Contributor

    Proposal

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

    Expense Chat - System message missing hyperlink

    What is the root cause of that problem?

    • We do not have anchor tag for unreportedTransaction translation
      unreportedTransaction: 'moved this expense to your personal space',

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

    • Add anchor tag as we do for movedTransaction.
      movedTransaction: ({reportUrl, reportName}: MovedTransactionParams) => `moved this expense${reportName ? ` to <a href="${reportUrl}">${reportName}</a>` : ''}`,
    • Update all files which are using unreportedTransaction, CONST.REPORT.ACTIONS.TYPE.UNREPORTED_TRANSACTION. and also update all translation files.
    • Create a new util function like getMovedTransactionMessage.
    • We can get the self dm report ID using const selfDMReportID = ReportUtils.findSelfDMReportID();
    • Instead of using report name, we can use personal space and create translations for it.
    function getUnreportedTransactionMessage(report: OnyxEntry<Report>) {
        const reportName = getReportName(report) ?? report?.reportName ?? '';
        const reportUrl = `${environmentURL}/r/${report?.reportID}`;
        const message = translateLocal('iou.unreportedTransaction', {
            reportUrl,
            reportName,
        });
        return message;
    }
    
    } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.UNREPORTED_TRANSACTION) {
        const selfDMReportID = findSelfDMReportID();
        const toReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${selfDMReportID}`];
        children = (
            <ReportActionItemBasicMessage message="">
                <RenderHTML html={`<comment><muted-text>${getUnreportedTransactionMessage(toReport)}</muted-text></comment>`} />
            </ReportActionItemBasicMessage>
        );
    }

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

    N/A

    What alternative solutions did you explore? (Optional)

    Result

  4. aadil42 commented on Aug 7, 2025

    @aadil42
    Contributor

    Proposal

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

    the system msg when moving the report doesn't include hyper link.

    What is the root cause of that problem?

    We're getting system generated msg in the report from here.

    children = <ReportActionItemBasicMessage message={translate('iou.unreportedTransaction')} />;

    As you can see this is a simple text not a link.

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

    Question by myself.

    It is not very clear from the OP what result do we want. It says 'it should include hyperlink'
    Do they mean the whole current system msg should be a hyperlink or we should concatenate an extra text with system msg like 'click here' and only that 'click here' part should be a hyperlink.

    Image

    solution starts here.

    We can wrap the text with existing TextLink component.

                const chatReportID = report?.chatReportID;
    
               children =  <TextLink
                                onPress={() => {
                                    Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(chatReportID));
                                }}
    
                            >
                                <ReportActionItemBasicMessage message={translate('iou.unreportedTransaction')} />                        
                            </TextLink>;

    If we're just adding extra text in the existing system msg 'click here' and only that extra text is a hyperlink then we can just add that extra text and only wrap that text with TextLink.

    NOTE

    If we are looking to make all the all system generated msgs a hyper link

    like here:

    children = <ReportActionItemBasicMessage message={getWorkspaceNameUpdatedMessage(action)} />;

    and here:

    children = <ReportActionItemBasicMessage message={getWorkspaceCurrencyUpdateMessage(action)} />;

    and in many other places(you can check them all out as they're side by side) in the PureReportActionItem.tsx component.

    Then we can wrap all of them inside our existing TextLink component and pass appropriate onPress.

    Did not include all these cases because the proposal would have gotten very long. But I think you guys get the gist.

    Sorry for the long-ass proposal.

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

    N/A

    What alternative solutions did you explore? (Optional)

    Optionally: We can also wrap it inside PressableWithoutFeedback instead of TextLink Both would work.

  5. trjExpensify commented on Aug 8, 2025

    @trjExpensify
    Contributor

    @JmillsExpensify @luacmartins we're expecting a hyperlink on personal space here, right? To link to the selfDM.

  6. aadil42 commented on Aug 8, 2025

    @aadil42
    Contributor

    @trjExpensify, We're using <TextLink /> in the video But we can also use <PressableWithoutFeedback /> .

    Screen.Recording.2025-08-08.at.2.mp4
  7. luacmartins commented on Aug 8, 2025

    @luacmartins
    Contributor

    @JmillsExpensify @luacmartins we're expecting a hyperlink on personal space here, right? To link to the selfDM.

    Yea, it should be consistent with the report case

  8. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 8, 2025
  9. changed the title [-]Expense Chat - System message missing hyperlink[/-] [+][$250] Expense Chat - System message missing hyperlink[/+] on Aug 8, 2025
  10. melvin-bot commented on Aug 8, 2025

    @melvin-bot
  11. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Aug 8, 2025
  12. moved this to Bugs and Follow Up Issues in #expensify-bugson Aug 8, 2025
  13. 23 remaining items

  14. melvin-bot commented on Aug 26, 2025

    @melvin-bot

    @Ollyws @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]

  15. trjExpensify commented on Sep 2, 2025

    @trjExpensify
    Contributor

    👋 checklist time, @Ollyws!

  16. Ollyws commented on Sep 2, 2025

    @Ollyws
    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
    • 2b. Reported on staging (deploy blocker)
    • 2c. Reported on both staging and production
    • 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: https://github.com/Expensify/App/pull/58020/files#r2316865161

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

    • [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
    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    Test:

    1. Go to https://staging.new.expensify.com/
    2. Sign up with a Gmail address that includes a +
    3. Select “Track and budget expenses”. Click Skip on the remaining steps until the onboarding flow is completed
    4. Create a workspace > Create a report > Create 2 manual expenses
    5. Check both expenses > Click the “2 selected” button > Move expenses > Remove from report
    6. Go to your self DM
    7. Click on one of the removed expenses
    8. Verify system message includes a hyperlink for "personal space" test
    

    Do we agree 👍 or 👎

  17. melvin-bot commented on Sep 2, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@trjExpensify)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1953849909154560167/hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  18. trjExpensify commented on Sep 3, 2025

    @trjExpensify
    Contributor

    This was caught by Applause in a test case, so I'm going to forgo the extra case.

    Payment summary as follows:

    You can both go ahead and request. Closing, thanks!

  19. moved this from Bugs and Follow Up Issues to Done in #expensify-bugson Sep 3, 2025
  20. Krishna2323 commented on Sep 4, 2025

    @Krishna2323
    Contributor

    Requested in NewDot!

  21. Ollyws commented on Sep 4, 2025

    @Ollyws
    Contributor

    Requested in ND.

  22. flaviadefaria commented on Sep 8, 2025

    @flaviadefaria
    Contributor

    $250 approved for @Krishna2323

  23. JmillsExpensify commented on Oct 14, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @Ollyws

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