WS selector/LHN-Workspace selector does not filter out workspace conversations correctly
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.
- Navigate to staging.new.expensify and log in.
- Go to the Inbox.
- Click on the workspace selector on the LHN.
- Select one of the workspaces, then the other .
- 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
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.
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
activeWorkspaceIDexists (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
- First condition: The LHN will not regenerate if
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
Job added to Upwork: https://www.upwork.com/jobs/~021866352292334991030
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws (External)
@Ollyws, @kadiealexander Whoops! This issue is 2 days overdue. Let's get this updated quick!
Woops somehow I missed this one, will review asap.
@Ollyws, @kadiealexander Whoops! This issue is 2 days overdue. Let's get this updated quick!
In the OP's video, the following steps were observed:
- Step 1: Switch to workspace A, where conversations A1 and A2 are displayed in the LHN. (A1 and A2 belong to workspace A)
- Step 2: Open report A1.
- 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.
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.
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
@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!
@Ollyws, @kadiealexander Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@Ollyws, @kadiealexander 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
@Ollyws, @kadiealexander Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
@Ollyws, @kadiealexander 12 days overdue. Walking. Toward. The. Light...
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
This issue has not been updated in over 14 days. @Ollyws, @kadiealexander eroding to Weekly issue.
@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!
This is no longer reproducible for me, whenever I change the workspace it lands on the Concierge chat.
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
Issue not reproducible during KI retests. (First week)
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
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!
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
Issue not reproducible during KI retests. (Second week)
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
Issue not reproducible during KI retests. (Third week)