Skip to content

[$250] Workspace - Green dot is shown on an empty Workspace chat #58431

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

Closed
2 of 8 tasks
mitarachim opened this issue Mar 14, 2025 · 42 comments
Closed
2 of 8 tasks

[$250] Workspace - Green dot is shown on an empty Workspace chat #58431

mitarachim opened this issue Mar 14, 2025 · 42 comments
Assignees
Labels
External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2

Comments

@mitarachim
Copy link

mitarachim commented Mar 14, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: v9.1.13-0
Reproducible in staging?: Yes
Reproducible in production?: Unable to check
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: #57553
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 14.5/ Chrome
App Component: Chat Report View

Action Performed:

  1. Goto https://staging.new.expensify.com/
  2. Create two Workspaces and add an expense on one of them.
  3. Go to the report (created expense) and Append /change-workspace to the URL of the report.
  4. From the workspace selection list, choose a different workspace.
  5. Dismiss the Educational Modal
  6. On the LHN notice that Green dot is shown on the Workspace chats with no reports

Expected Result:

Green dot on the LHN is not shown for workspace with no reports

Actual Result:

Green dot on the LHN is shown for workspace with no reports. Green dot is dismissed after going to the WS chat

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6770248_1741921382180.Screen_Recording_2025-03-14_at_5.49.47_at_night.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021900391111352951265
  • Upwork Job ID: 1900391111352951265
  • Last Price Increase: 2025-04-25
Issue OwnerCurrent Issue Owner: @robertjchen
@mitarachim mitarachim added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 DeployBlocker Indicates it should block deploying the API DeployBlockerCash This issue or pull request should block deployment labels Mar 14, 2025
Copy link

melvin-bot bot commented Mar 14, 2025

Triggered auto assignment to @robertjchen (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Mar 14, 2025

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

Copy link

melvin-bot bot commented Mar 14, 2025

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Mar 14, 2025
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@robertjchen robertjchen added Daily KSv2 External Added to denote the issue can be worked on by a contributor and removed DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API Hourly KSv2 Engineering Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 14, 2025
@melvin-bot melvin-bot bot changed the title Workspace - Green dot is shown on an empty Workspace chat [$250] Workspace - Green dot is shown on an empty Workspace chat Mar 14, 2025
Copy link

melvin-bot bot commented Mar 14, 2025

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

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

melvin-bot bot commented Mar 14, 2025

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Mar 14, 2025
@davidgelhar
Copy link
Contributor

davidgelhar commented Mar 16, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-03-21 10:09:56 UTC.

Proposal

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

When an expense report is moved from one workspace to another, the green dot remains on (in the LHN) for the workspace chat that is now empty.

What is the root cause of that problem?

The code in changeReportPolicy() in Report.ts is not doing anything to update the hasOutstandingChildRequest key in the optimistic updates it's making, so the green dot remains on.

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

Front End:
In the changeReportPolicy function, use getReasonAndReportActionThatRequiresAttention to determine if the green dot is on because of the report that's being moved. If so, add to the optimistic updates:

            optimisticData.push({
                onyxMethod: Onyx.METHOD.MERGE,
                key: `${ONYXKEYS.COLLECTION.REPORT}${reportToMove.chatReportID}`,
                value: {hasOutstandingChildRequest: false},
            });

And, in the same function, add this to the updates of the destination workspace:

        optimisticData.push({
            onyxMethod: Onyx.METHOD.MERGE,
            key: `${ONYXKEYS.COLLECTION.REPORT}${policyExpenseChat.reportID}`,
            value: {hasOutstandingChildRequest: true},
        });

Back End:
It will also necessary to update the logic behind the ChangeReportPolicy API call to recompute hasOutstandingChildRequest on both the source and destination workspaces after the report is moved.

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

There do not appear to be any tests at all for changeReportPolicy, perhaps some should be added?

What alternative solutions did you explore? (Optional)

n/a
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.

@melvin-bot melvin-bot bot added the Overdue label Mar 16, 2025
@QichenZhu
Copy link
Contributor

Not overdue. It was the weekend. I'll review proposals today.

@QichenZhu
Copy link
Contributor

Not overdue. In discussion.

@melvin-bot melvin-bot bot removed the Overdue label Mar 28, 2025
@QichenZhu
Copy link
Contributor

@robertjchen Friendly bump on this comment.

Copy link

melvin-bot bot commented Apr 4, 2025

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

@melvin-bot melvin-bot bot added the Overdue label Apr 4, 2025
@QichenZhu
Copy link
Contributor

QichenZhu commented Apr 4, 2025

Not overdue. @robertjchen, what's our next step? Should we wait for the backend fix, or assign @davidgelhar to fix the frontend first?

@melvin-bot melvin-bot bot removed the Overdue label Apr 4, 2025
Copy link

melvin-bot bot commented Apr 4, 2025

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

@robertjchen
Copy link
Contributor

Will revisit this week!

@melvin-bot melvin-bot bot added the Overdue label Apr 7, 2025
@melvin-bot melvin-bot bot added the Overdue label Apr 7, 2025
@melvin-bot melvin-bot bot added the Overdue label Apr 7, 2025
@QichenZhu
Copy link
Contributor

Okay, thanks!

Copy link

melvin-bot bot commented Apr 8, 2025

@robertjchen Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Apr 10, 2025

@robertjchen Huh... This is 4 days overdue. Who can take care of this?

Copy link

melvin-bot bot commented Apr 11, 2025

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

@robertjchen robertjchen added Weekly KSv2 and removed Daily KSv2 labels Apr 13, 2025
@melvin-bot melvin-bot bot removed the Overdue label Apr 13, 2025
@robertjchen
Copy link
Contributor

updating to reflect proper priority

Copy link

melvin-bot bot commented Apr 18, 2025

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

@QichenZhu
Copy link
Contributor

Now both new and old workspaces have GBRs. Tested on latest main.

Screen.Recording.2025-04-21.at.22.36.16.mov

@melvin-bot melvin-bot bot added the Overdue label Apr 22, 2025
Copy link

melvin-bot bot commented Apr 25, 2025

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

@mvtglobally
Copy link

Issue not reproducible during KI retests. (Second week)

@robertjchen
Copy link
Contributor

thanks, going to close out for now given existing priorities and inconsistent reproduction.

@melvin-bot melvin-bot bot removed the Overdue label Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants