You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250] Thread - App shows join button after user joined offline #46004
👋 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:
Identify the pull request that introduced this issue and revert it.
At first glance, this seems like a frontend issue 🤔 I see LeaveRoom was called when the user got back online but maybe we should have also called the Api command to rejoin the thread?
Please re-state the problem that we are trying to solve in this issue.
After creating a thread, if a user was to go offline then leave the thread and then rejoin, the join button will appear on the screen when it is not supposed to be there.
What is the root cause of that problem?
When the user is brought back online the Sequential Queue processes the requests that weren't able to be made while the user is offline.
This means:
User leaves thread -> User rejoins thread
In that order.
So after the User Left Thread request, there is a period that the User Rejoined Thread request had not been completed.
What changes do you think we should make in order to solve the problem?
Add a pending field to our notification update function so we have a flag to look for while we're processing actions. src/libs/actions/Report.ts
To clarify from the issue body, the join button does disappear after a moment. The leave button isn't currently in prod so it's a little difficult to compare. @mountiny do you know if this is expected with the sequential queue or should this be fixed?
Personally, in my three weeks contributing so far, I think this is the third time I've come across an offline/online issue where the queue is processing causing state to repeatedly re-render. Sometimes it's handled and sometimes it isn't. It makes me wish Onyx had an offline state and the sequential queue was a plugin that informs Onyx when it's empty and it's safe to output the results.
In the comments about the queue it mentions that they're run in order so that the expect results turns out exactly as the user input it while offline. And it makes sense, calculating an end result and simply displaying that might create confusion.
But I'm kind of tempted to crack open the code and try anyway for fun 😂
Thanks for the proposals so far. Can you identify which PR from the checklist caused the regression? Anyway, going to demote as a polish issue since it's for offline behavior that doesn't break any critical flow.
I think this is happening as we process the API commands in the backend and we queue the relevant onyx updates. First, the app processes, leaving the thread so it gets hidden and then it joins again.
I think we do not have to worry about this one too much and might even close it
I agree, closing this one out since the expected behavior (the join button not showing) does occur, it just takes a second because of the sequential queue.
Activity
melvin-bot commentedon Jul 23, 2024
Triggered auto assignment to @alexpensify (
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 commentedon Jul 23, 2024
Triggered auto assignment to @srikarparsi (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon Jul 23, 2024
👋 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:
izarutskaya commentedon Jul 23, 2024
We think this issue might be related to the #vip-vsb.
izarutskaya commentedon Jul 23, 2024
Production
Recording.2636.mp4
MariaHCD commentedon Jul 23, 2024
At first glance, this seems like a frontend issue 🤔 I see LeaveRoom was called when the user got back online but maybe we should have also called the Api command to rejoin the thread?
6 remaining items
melvin-bot commentedon Jul 23, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @brunovjk (
External)Zakpak0 commentedon Jul 24, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
After creating a thread, if a user was to go offline then leave the thread and then rejoin, the join button will appear on the screen when it is not supposed to be there.
What is the root cause of that problem?
When the user is brought back online the Sequential Queue processes the requests that weren't able to be made while the user is offline.
This means:
User leaves thread -> User rejoins thread
In that order.
So after the User Left Thread request, there is a period that the User Rejoined Thread request had not been completed.
What changes do you think we should make in order to solve the problem?
Add a pending field to our notification update function so we have a flag to look for while we're processing actions.
src/libs/actions/Report.ts
Then modify our canJoin boolean to read that flag and be patient.
src/pages/home/HeaderView.tsx
Here is a test branch with my changes
What alternative solutions did you explore? (Optional)
N/A
srikarparsi commentedon Jul 24, 2024
To clarify from the issue body, the join button does disappear after a moment. The leave button isn't currently in prod so it's a little difficult to compare. @mountiny do you know if this is expected with the sequential queue or should this be fixed?
Screen.Recording.2024-07-24.at.4.30.02.AM.mov
brunovjk commentedon Jul 24, 2024
If @mountiny confirm "... sequential queue ... should this be fixed" I think we can go with @Zakpak0's proposal, I tested they branch and LGTM.
🎀👀🎀 C+ reviewed
melvin-bot commentedon Jul 24, 2024
Current assignee @srikarparsi is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
Zakpak0 commentedon Jul 24, 2024
Personally, in my three weeks contributing so far, I think this is the third time I've come across an offline/online issue where the queue is processing causing state to repeatedly re-render. Sometimes it's handled and sometimes it isn't. It makes me wish Onyx had an offline state and the sequential queue was a plugin that informs Onyx when it's empty and it's safe to output the results.
In the comments about the queue it mentions that they're run in order so that the expect results turns out exactly as the user input it while offline. And it makes sense, calculating an end result and simply displaying that might create confusion.
But I'm kind of tempted to crack open the code and try anyway for fun 😂
francoisl commentedon Jul 24, 2024
Thanks for the proposals so far. Can you identify which PR from the checklist caused the regression? Anyway, going to demote as a polish issue since it's for offline behavior that doesn't break any critical flow.
mountiny commentedon Jul 25, 2024
I think this is happening as we process the API commands in the backend and we queue the relevant onyx updates. First, the app processes, leaving the thread so it gets hidden and then it joins again.
I think we do not have to worry about this one too much and might even close it
srikarparsi commentedon Jul 29, 2024
I agree, closing this one out since the expected behavior (the join button not showing) does occur, it just takes a second because of the sequential queue.