Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Due for payment 2025-03-05] [$250] Room - Room mention turns into a random number after leaving a private room #55676

Open
1 of 8 tasks
lanitochka17 opened this issue Jan 23, 2025 · 39 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jan 23, 2025

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: 9.0.89-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): nathanmulugetatesting+2850@gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Navigate to staging.new.expensify.com
  2. Create a workspace
  3. Create a private room
  4. Go to the workspace chat and mention the room
  5. Navigate to the room by tapping on the room mention
  6. Leave from the private room

Expected Result:

The room mention stays displaying the room name

Actual Result:

The room mention changes to show a random number

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Screenshots/Videos

Add any screenshot/video evidence
Bug6722182_1737667139938.XRecorder_24012025_001119.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021885423124058262616
  • Upwork Job ID: 1885423124058262616
  • Last Price Increase: 2025-02-14
  • Automatic offers:
    • paultsimura | Reviewer | 106196319
    • daledah | Contributor | 106196323
Issue OwnerCurrent Issue Owner: @abekkala
@lanitochka17 lanitochka17 added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Jan 23, 2025
Copy link

melvin-bot bot commented Jan 23, 2025

Triggered auto assignment to @abekkala (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.

@daledah
Copy link
Contributor

daledah commented Jan 23, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-01-23 23:06:35 UTC.

Proposal

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

The room mention changes to show a random number

What is the root cause of that problem?

When leaving room, we set the reportName to null:

App/src/libs/actions/Report.ts

Lines 3106 to 3107 in d930fea

: Object.keys(report).reduce<Record<string, null>>((acc, key) => {
acc[key] = null;

so we display the reportID:

mentionDisplayText = removeLeadingLTRAndHash(report?.reportName ?? htmlAttributeReportID);

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

We shouldn't set the reportName to null in:

acc[key] = null;

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

We should mock the room data and then simulate the leaving room action. Then verify whether its name still exists.

What alternative solutions did you explore? (Optional)

In:

mentionDisplayText = removeLeadingLTRAndHash(report?.reportName ?? htmlAttributeReportID);

pass the reportAction data:

    const mentionReportContextValue = useMemo(() => ({currentReportID: report?.reportID ?? '-1', reportAction: action}), [report?.reportID, action]);

In:

const {currentReportID: currentReportIDContext, exactlyMatch} = useContext(MentionReportContext);

we get the reportAction data.

In:

const mentionDetails = getMentionDetails(htmlAttributeReportID, currentReport, reports, tnode);

pass the reportAction as the 5th param.

In:

const getMentionDetails = (htmlAttributeReportID: string, currentReport: OnyxEntry<Report>, reports: OnyxCollection<Report>, tnode: TText | TPhrasing) => {

update the function so that it can receive 5th param.

Finally, update:

mentionDisplayText = removeLeadingLTRAndHash(report?.reportName ?? htmlAttributeReportID);

        mentionDisplayText = removeLeadingLTRAndHash(report?.reportName ?? getReportActionMessageText(reportAction) ?? htmlAttributeReportID);

Copy link

melvin-bot bot commented Jan 27, 2025

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

Copy link

melvin-bot bot commented Jan 29, 2025

@abekkala Eep! 4 days overdue now. Issues have feelings too...

Copy link

melvin-bot bot commented Jan 31, 2025

@abekkala 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@abekkala abekkala added the External Added to denote the issue can be worked on by a contributor label Jan 31, 2025
@melvin-bot melvin-bot bot changed the title Room - Room mention turns into a random number after leaving a private room [$250] Room - Room mention turns into a random number after leaving a private room Jan 31, 2025
Copy link

melvin-bot bot commented Jan 31, 2025

Job added to Upwork: https://www.upwork.com/jobs/~021885423124058262616

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 31, 2025
Copy link

melvin-bot bot commented Jan 31, 2025

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

@melvin-bot melvin-bot bot removed the Overdue label Jan 31, 2025
@paultsimura
Copy link
Contributor

Reviewing soon 👀

@paultsimura
Copy link
Contributor

Thanks @daledah, unfortunately, your solution works optimistically until the first chat reload:

Screen.Recording.2025-02-03.at.22.13.18.mov

@dylanexpensify
Copy link
Contributor

@daledah are you working on an updated solution?

@dylanexpensify dylanexpensify moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Feb 4, 2025
@paultsimura
Copy link
Contributor

@daledah are you working on an updated solution?

The deeper issue seems to be a BE one, so we might want to combine @daledah's proposal and a BE fix.

@daledah could you please investigate it closer?

@daledah
Copy link
Contributor

daledah commented Feb 5, 2025

Thanks @daledah, unfortunately, your solution works optimistically until the first chat reload:

When reloading the app, it calls ReconnectApp API, which will set the room data to null. As a result, the reportName field is gone, so the bug exists again.

Solution: It is a BE issue, so we need to make sure the ReconnectApp API didn't set the room data to null.

Copy link

melvin-bot bot commented Feb 6, 2025

@abekkala @paultsimura this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@paultsimura
Copy link
Contributor

Thanks @daledah. Let's bring an Engineer in and see where we stand after the BE is fixed. If the issue remains, we'll proceed with your FE proposal.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Feb 6, 2025

Triggered auto assignment to @aldo-expensify, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@daledah
Copy link
Contributor

daledah commented Feb 6, 2025

Let's bring an Engineer in and see where we stand after the BE is fixed. If the issue remains, we'll proceed with your FE proposal.

@paultsimura @aldo-expensify This issue requires fixes on both the FE and BE sides:

  • The FE fix has already been outlined in my proposal.

  • The BE fix is detailed in this comment.

Copy link

melvin-bot bot commented Feb 7, 2025

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@aldo-expensify
Copy link
Contributor

I can take care of the backend changes, I just need some time to understand what these changes imply and how to do them. I may have time close to the end of the week to work on this.

Copy link

melvin-bot bot commented Feb 14, 2025

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Feb 14, 2025
@aldo-expensify
Copy link
Contributor

This needs a fix in both backend layers:

I'll have to finish it on Tuesday

Copy link

melvin-bot bot commented Feb 18, 2025

@abekkala, @paultsimura, @aldo-expensify Eep! 4 days overdue now. Issues have feelings too...

@aldo-expensify
Copy link
Contributor

Still working on the backend

@aldo-expensify
Copy link
Contributor

From testing with the UI, these App changes seem to work well for me:

    const successData: OnyxUpdate[] = [];
    if (isWorkspaceMemberLeavingWorkspaceRoom || isChatThread) {
        successData.push({
            onyxMethod: Onyx.METHOD.MERGE,
            key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
            value: {
                participants: {
                    [currentUserAccountID]: {
                        notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN,
                    },
                },
            }
        });
    } else {
        successData.push({
            onyxMethod: Onyx.METHOD.SET,
            key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
            value: {reportName: report.reportName}
        });
    }

(Inspired from the proposed solution by @daledah here: #55676 (comment))

@aldo-expensify
Copy link
Contributor

aldo-expensify commented Feb 19, 2025

I'll make the backend PRs ready for review asap (today)

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 19, 2025
Copy link

melvin-bot bot commented Feb 19, 2025

📣 @paultsimura 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Feb 19, 2025

📣 @daledah 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@aldo-expensify
Copy link
Contributor

Hiring @daledah for the frontend changes

@melvin-bot melvin-bot bot removed the Overdue label Feb 19, 2025
@aldo-expensify
Copy link
Contributor

Made backend PR's ready for review

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Feb 21, 2025
@daledah
Copy link
Contributor

daledah commented Feb 21, 2025

@paultsimura FE PR is ready. Waiting for BE change to test ReconnectApp behavior.

@aldo-expensify
Copy link
Contributor

The backend PRs were merged but are waiting for deploy, they will be deployed on monday.

@aldo-expensify
Copy link
Contributor

all the backend changes were deployed

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Feb 26, 2025
@melvin-bot melvin-bot bot changed the title [$250] Room - Room mention turns into a random number after leaving a private room [Due for payment 2025-03-05] [$250] Room - Room mention turns into a random number after leaving a private room Feb 26, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 26, 2025
Copy link

melvin-bot bot commented Feb 26, 2025

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

Copy link

melvin-bot bot commented Feb 26, 2025

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

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

Copy link

melvin-bot bot commented Feb 26, 2025

@paultsimura @abekkala @paultsimura 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]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Status: Bugs and Follow Up Issues
Development

No branches or pull requests

7 participants