App
App copied to clipboard
[Wave 8] [Ideal Nav] Issues with the bold (unread) status on Workspace Item
Action Performed:
The workspace item on the Workspace Switcher should be bold when there are any unread chat/report in that workspace. This indicator, however, isn't working consistently.
Sometimes, the workspace item is bold even when there is no unread chat in that workspace. And sometimes, it's not bold when there is a unread chat/report.
The following is the reproduction step for the latter issue.
- Create a workspace if you don't have one yet.
- Go to a workspace (not Expensify one).
- Right click (or long press) a chat and click
Mark as unreadon the popover that appears - Click the Workspace Switcher.
- Look for the current workspace name. Confirm that the workspace name is bold.
- Go back to the workspace.
- Right click the same chat and click
Mark as read - Go back to Workspace Switcher
- Confirm the current workspace is not bold
https://github.com/Expensify/App/assets/98560306/bb189b08-1d8a-4e97-9215-f7ad861808a8
Workaround:
N/A
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [x] Android: Native
- [x] Android: mWeb Chrome
- [x] iOS: Native
- [x] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [x] MacOS: Desktop
Screenshots/Videos
Vides are attached above.
Triggered auto assignment to @Christinadobrzyn (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
@mateuuszzzzz I believe you're working on this regression? can you comment on this GH issue so that I can assign you?
Ah good catch! I can reproduce this - we'll see if @mateuuszzzzz is working on this!
Hello, I'll be working on this one and take it from @mateuuszzzzz.
Nice, assigned you @cdOut!
While debugging a similar issue (https://github.com/Expensify/App/issues/35766) which was closed as a dupe of this one I noticed the following:
- within the
ReportUtils.isUnreadfunction we're checking thelastReadTimewhich if undefined will fallback to empty string - in WorkspacesSettingsUtils we're using Onyx.connect to get
allReports - sometimes for certain workspaces -> reports within that workspace will initially have the
lastReadTimeas undefined - undefined lastReadTime defaults to empty string which when compared to an existing
lastVisibleActionCreateddate string, isUnread always returns true
Considering these, I tend to think that the RC here might come from the Onyx.connect -> allReports data which might first initialize some report variables as undefined - while shortly after to become defined but the function doesn't register the data change and remains with initial isUnread status.
Hope this helps w/ debugging ✌️
Interesting, thanks for sharing the info @ikevin127!
update - we're working on debugging/PR for this!
I am interested in reviewing this since I was C+ in dupe issue
hey just a quick question here... testing this again and talking over this issue with @cdOut... I'm not sure if the steps in the OP are correct or are the issue we're trying to fix.
What I see when testing:
- Create a workspace if you don't have one yet.
- Go to a workspace (not Expensify one).
- Right click (or long press) a chat and click
Mark as unreadon the popover that appears - Click the Workspace Switcher.
- Verify that the workspace is bold
- Go back to the workspace and right click (or long press) to
mark as read - Verify that the workspace is not bold
https://github.com/Expensify/App/assets/51066321/3aa046e6-0c70-4f70-bc09-86898a924bbb
- I don't think the checkmark matters here, the checkmark is the default workspace, yeah?
- Is the green dot behaviour incorrect? I think that might be the issue - shouldn't the green dot show for unread and not show for read?
So isn't this behaviour correct? @hayata-suenaga @trjExpensify @situchan
@Christinadobrzyn I'm sorry. I mistyped the step #6. You're correct. We want to check if the workspace name is bold or not.
There is another issue that is handling RBR and GBR.
Ah okay, thanks @hayata-suenaga so if that's the case, I think this might be fixed? Could you test again and let me know if the bold isn't working? TY! Or I can ask QA to test again if needed!
I still seem to have a phantom unread workspace on v1.4.37-2:
I've clicked into all of the chats on that workspace and can't seem to clear it.
I still seem to have a phantom unread workspace on
v1.4.37-2:I've clicked into all of the chats on that workspace and can't seem to clear it.
That's exactly the problem that I was also able to replicate and was working on a fix on this, just wanted to clarify that that's the only issue appearing currently with bold. Thanks for retesting and specifying the issue!
Dopeeee! Any idea what it is? 🕵️
The issue appears to be occuring on old accounts which already had different reports created but due to updates to different flows they were hidden from the users view without ever gaining the lastReadTime property, which we use to determine whether we should use bold for the workspaces in the switcher.
I do have an old account that has a hidden report in the Everything section of the switcher, but I'd appreciate if I could log into the account you used for the video @trjExpensify with a hidden report in a user created workspace so I can test that case also. I've messaged you on slack about it.
Chatted about this earlier. I can't provide access to my real Expensify account where this is shown in the vid. I'll test an adhoc build though when ready!
As an update I will be creating a PR for this today or tomorrow.
Wahoo, nice! 👍
Awesome! Thanks @cdOut! Let us know if you need anything for the PR
@cdOut let us know once you open a PR 🙇
I am still working on fixing this issue, I'm currently revising what reports are shown to the user on the LHP so I can properly display the unread reports, which after testing different scenarios I found out are still available reports that the user can manually go to but they do not appear properly on the list.
@Christinadobrzyn @cdOut @hayata-suenaga @situchan this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
which after testing different scenarios I found out are still available reports that the user can manually go to but they do not appear properly on the list.
hi @cdOut, I'm having a bit of trouble understanding the sentence above. Would you mind clarifying it for me? Thanks!
@cdOut, could you report on the progress of this when you have time? 🙇
I was OOO due to a fever these past days, I'll get back on this issue today and write up a follow up with progress for you later today.
thank you for the update and I hope you recovered fully 🍀
@Christinadobrzyn @cdOut @hayata-suenaga @situchan this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!
melvin, @cdOut is going to provide an update later once they recover.
@Christinadobrzyn, @cdOut, @hayata-suenaga, @situchan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
