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
[HOLD for payment 2024-06-11] HELD ON ONYX BUMP 2.0.40 [$250] FAB - Nothing happens when Start chat is clicked after creating a room offline #40855
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Nothing happens when Start chat is clicked after creating a room offline. On iOS and Android native, you can see it opening for a short time but it disappears after. On mWeb Safari, the page shakes after the tap.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
and this condition (wasLoading && !isLoading) is also becomes true.
What changes do you think we should make in order to solve the problem?
The useEffect is added (in #31655) so it will only close the page when the request is successful, but we added back the code to close it immediately in Report.addPolicyReport, so it's really weird, I think it's a bad merge, so we can remove the dismiss code here.
To fix this issue, we can set initWithStoredValues: false to the new room form state. This way, the data will always be empty initially. We don't want the previous state to affect the new page.
NOTE: there is currently a bug in Onyx where initWithStoredValues doesn't work. To fix it we should initialize the onyx key only if initWithStoredValues is true.
changed the title [-]FAB - Nothing happens when Start chat is clicked after creating a room offline[/-][+][$250] FAB - Nothing happens when Start chat is clicked after creating a room offline[/+]on Apr 29, 2024
[@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
[@mollfpr] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
No offending PR.
[@mollfpr] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@mollfpr] Determine if we should create a regression test for this bug.
The regression step should be enough.
[@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Apr 24, 2024
Triggered auto assignment to @muttmuure (
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.izarutskaya commentedon Apr 24, 2024
We think this issue might be related to the #vip-vsb.
bernhardoj commentedon Apr 24, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
When we open start chat again after creating a room while offline, nothing happen.
What is the root cause of that problem?
When we create a new room, it will optimistically set the loading to the new room form
App/src/libs/actions/Report.ts
Lines 1955 to 1957 in 08b7ff4
Because we are offline, the loading state is always true. When we reopen the page again, it will immediately close because of the below effect.
App/src/pages/workspace/WorkspaceNewRoomPage.tsx
Lines 146 to 152 in 08b7ff4
The
(isOffline && isLoading)condition is true. When the page is mounted, we clear the loading state (set to false)App/src/pages/workspace/WorkspaceNewRoomPage.tsx
Lines 128 to 130 in 08b7ff4
and this condition
(wasLoading && !isLoading)is also becomes true.What changes do you think we should make in order to solve the problem?
The
useEffectis added (in #31655) so it will only close the page when the request is successful, but we added back the code to close it immediately inReport.addPolicyReport, so it's really weird, I think it's a bad merge, so we can remove the dismiss code here.App/src/libs/actions/Report.ts
Lines 2012 to 2013 in 08b7ff4
To fix this issue, we can set
initWithStoredValues: falseto the new room form state. This way, the data will always be empty initially. We don't want the previous state to affect the new page.Then, we can remove this effect
App/src/pages/workspace/WorkspaceNewRoomPage.tsx
Lines 128 to 130 in 08b7ff4
Or trigger it when it's unmounted instead.
NOTE: there is currently a bug in Onyx where
initWithStoredValuesdoesn't work. To fix it we should initialize the onyx key only ifinitWithStoredValuesis true.melvin-bot commentedon Apr 29, 2024
Job added to Upwork: https://www.upwork.com/jobs/~0114d6fec2c1cc3911
[-]FAB - Nothing happens when Start chat is clicked after creating a room offline[/-][+][$250] FAB - Nothing happens when Start chat is clicked after creating a room offline[/+]melvin-bot commentedon Apr 29, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (
External)muttmuure commentedon May 1, 2024
@mollfpr there's a proposal above for you to take a look at
56 remaining items
melvin-bot commentedon Jun 18, 2024
@puneetlath, @mollfpr, @muttmuure, @bernhardoj Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
mollfpr commentedon Jun 18, 2024
No offending PR.
The regression step should be enough.
muttmuure commentedon Jun 20, 2024
@mollfpr - $250 C+
JmillsExpensify commentedon Jun 22, 2024
$250 approved for @mollfpr
melvin-bot commentedon Jun 24, 2024
@puneetlath, @mollfpr, @muttmuure, @bernhardoj Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
puneetlath commentedon Jun 25, 2024
@muttmuure what is left to do here? Can we close?
bernhardoj commentedon Jun 26, 2024
I think the payment for me is still pending.
muttmuure commentedon Jun 27, 2024
@bernhardoj paid $250 for C