App icon indicating copy to clipboard operation
App copied to clipboard

WS selector/LHN-Workspace selector does not filter out workspace conversations correctly

Open lanitochka17 opened this issue 1 year ago β€’ 2 comments

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: 9.0.72-0 Reproducible in staging?: Y Reproducible in production?: Y 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: N/A Issue reported by: Applause - Internal Team

Action Performed:

Precondition: User has minimum os 2 workspaces created.

  1. Navigate to staging.new.expensify and log in.
  2. Go to the Inbox.
  3. Click on the workspace selector on the LHN.
  4. Select one of the workspaces, then the other .
  5. Each time verify, that the LHN displays conversations related to the selected workspace.

Expected Result:

The workspace selector should filter out the conversations of the particular workspace in LHN

Actual Result:

Workspace selector does not filter out workspace conversations correctly. It shows chats related to two workspaces, when one is selected

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
  • [x] MacOS: Chrome / Safari
  • [x] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/f1aa375d-1af2-4d63-9331-29ef0d301061

View all open jobs on GitHub

lanitochka17 avatar Dec 06 '24 18:12 lanitochka17

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

melvin-bot[bot] avatar Dec 06 '24 19:12 melvin-bot[bot]

Proposal

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

Workspace selector does not filter out workspace conversations correctly. It shows chats related to two workspaces, when one is selected

What is the root cause of that problem?

In the LHN we use useReportIDs hook to get list reportIDs, while deep observing this hook I see the logic here it mean we always display current report in the LHN

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

  • We need to update the condition here to add as below to disable this re-generation. This change will ensure that current report from other workspaces do not appear in the list when the filter is selected.
const parentReportID = chatReports?.[`${ONYXKEYS.COLLECTION.REPORT}${derivedCurrentReportID}`]?.parentReportID;
....
(!activeWorkspaceID || (parentReportID && orderedReportIDs.includes(parentReportID)))
  • Explanation:
    • First condition: The LHN will not regenerate if activeWorkspaceID exists (to filter for the selected workspace).
    • Second condition: Handle cases where another report with a parent inside the workspace (e.g., an expense) is opened. In this case, re-generating the list ensures the item is displayed https://github.com/Expensify/App/blob/b595f5d24141a403fcc3f44c73d00cd6951dca7d/src/hooks/useReportIDs.tsx#L91-L94
POC

https://github.com/user-attachments/assets/daf98e4a-e495-4ac6-9314-43f748897f6a

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)

N/A

linhvovan29546 avatar Dec 07 '24 05:12 linhvovan29546

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

melvin-bot[bot] avatar Dec 10 '24 05:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 10 '24 05:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 13 '24 09:12 melvin-bot[bot]

Woops somehow I missed this one, will review asap.

Ollyws avatar Dec 13 '24 09:12 Ollyws

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

melvin-bot[bot] avatar Dec 16 '24 09:12 melvin-bot[bot]

In the OP's video, the following steps were observed:

  1. Step 1: Switch to workspace A, where conversations A1 and A2 are displayed in the LHN. (A1 and A2 belong to workspace A)
  2. Step 2: Open report A1.
  3. Step 3: Switch to workspace B, where conversations B1, B2, and A1 are displayed in the LHN. (B1, B2 belong to workspace B)

@Ollyws Based on the behavior in step 3, do you consider this a bug or the expected outcome? From my side, I think it is expected since A1 is the report that is opened, so it should be displayed in LHN.

truph01 avatar Dec 16 '24 10:12 truph01

It seems like the expected outcome, at least as much as the only other options I can imagine would be to navigate away from the chat or remain on the chat but not have it in the LHN which doesn't seeem like a good idea. I'll have to confirm the expected behaviour.

Ollyws avatar Dec 16 '24 16:12 Ollyws

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] avatar Dec 17 '24 16:12 melvin-bot[bot]

@Ollyws @kadiealexander 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!

melvin-bot[bot] avatar Dec 20 '24 09:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 20 '24 09:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 24 '24 09:12 melvin-bot[bot]

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] avatar Dec 24 '24 16:12 melvin-bot[bot]

@Ollyws, @kadiealexander Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

melvin-bot[bot] avatar Dec 26 '24 09:12 melvin-bot[bot]

@Ollyws, @kadiealexander 12 days overdue. Walking. Toward. The. Light...

melvin-bot[bot] avatar Dec 30 '24 09:12 melvin-bot[bot]

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] avatar Dec 31 '24 16:12 melvin-bot[bot]

This issue has not been updated in over 14 days. @Ollyws, @kadiealexander eroding to Weekly issue.

melvin-bot[bot] avatar Jan 02 '25 09:01 melvin-bot[bot]

@Ollyws @kadiealexander this issue is now 4 weeks old, please consider:

  • Finding a contributor to fix the bug
  • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

melvin-bot[bot] avatar Jan 03 '25 09:01 melvin-bot[bot]

This is no longer reproducible for me, whenever I change the workspace it lands on the Concierge chat.

Ollyws avatar Jan 06 '25 13:01 Ollyws

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] avatar Jan 07 '25 16:01 melvin-bot[bot]

Issue not reproducible during KI retests. (First week)

mvtglobally avatar Jan 12 '25 05:01 mvtglobally

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] avatar Jan 14 '25 16:01 melvin-bot[bot]

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] avatar Jan 21 '25 16:01 melvin-bot[bot]

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] avatar Jan 28 '25 16:01 melvin-bot[bot]

This issue has not been updated in over 15 days. @Ollyws, @kadiealexander eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

melvin-bot[bot] avatar Jan 30 '25 09:01 melvin-bot[bot]

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] avatar Feb 04 '25 16:02 melvin-bot[bot]

Issue not reproducible during KI retests. (Second week)

mvtglobally avatar Feb 08 '25 04:02 mvtglobally

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] avatar Feb 11 '25 16:02 melvin-bot[bot]

Issue not reproducible during KI retests. (Third week)

mvtglobally avatar Feb 15 '25 00:02 mvtglobally