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
[Due for payment 2025-04-30] [$250] Room - User is redirected to "Settings" instead of LHN after creating room while offline. #60398
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
Version Number: 9.1.29-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both If this was caught during regression testing, add the test name, ID and link from TestRail:https://expensify.testrail.io/index.php?/tests/view/5944276&group_by=cases:section_id&group_order=asc&group_id=296763 Email or phone of affected tester (no customers):ibellicotest+576@gmail.com Issue reported by: Applause Internal Team Device used: Motorola MotoG60 - Android 12 - Chrome App Component: Other
Action Performed:
Open the Expensify app.
Navigate to "Settings"
Return to LHN.
Turn off internet connection.
Tap on FAB and select "Create Chat"
Select "Room" and complete the creation flow.
Once redirected to chat, tap on room header.
Tap on "Members" and invite a new member.
Return to conversation.
Tap on the arrow on the top left corner to return to LHN.
Check where is the user redirected after this action.
Expected Result:
After the room is created, the back button should redirect the user to LHN.
Actual Result:
When creating a room conversation while offline and inviting a new member, the back button redirects to "Settings" instead of to LHN.
changed the title [-]Room - User is redirected to "Settings" instead of LHN after creating room while offline.[/-][+][$250] Room - User is redirected to "Settings" instead of LHN after creating room while offline.[/+]on Apr 17, 2025
There's a slight delay between setNewRoomFormLoading and setNewRoomReportID because of InteractionManager.runAfterInteractions. In this short amount of time, isLoading is true and newRoomReportID is undefined
// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps -- we just want this to update on changing the form State
},[isLoading,errorFields]);
When online this condition will be always returned early, so no actions is triggered.
When offline, isOffline && isLoading and isEmptyObject(errorFields) is true, so effect is not returned early. Also, for a short amount of time above, newRoomReportID is undefined, so we dismissModal:
Basically: New room page -> dismissModal to Home -> dismissModalWithReport to room report
This chain of action removes Home from navigation state, so when clicking back button we returned to the page before Home, which is Settings.
What changes do you think we should make in order to solve the problem?
This effect was added in #31655 to handle navigation since they removed dismissModalWithReport in addPolicyReport. After that dismissModalWithReport was added back in addPolicyReport so this effect does not have any purposes anymore.
I tried removing this effect and the bug in #31655 is not reproduced anymore, so we can remove it.
To outside of InteractionManager.runAfterInteractions so it can be called immediately with setNewRoomFormLoading
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
I was assigned as BZ, what a doozy.
I brokedown steps and inc. screenshot here, they're not particularly helpful now. @ariel
can you share a screenshot of what you see, on your end, for report #1267600385997383 (in OldDot and NewDot plz). I'm particularly perplexed by the Apple charg
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.31-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@hungvu193@jliexpensify@hungvu193 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Test:
Login with any account, then turn on the force offline.
Go to Inbox.
Go to Accounts.
Go to Inbox.
Press FAB -> Start chat.
Select room tab and finish room creation.
Once created and navigated to new room, press back button
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 17, 2025
Triggered auto assignment to @jliexpensify (
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.[-]Room - User is redirected to "Settings" instead of LHN after creating room while offline.[/-][+][$250] Room - User is redirected to "Settings" instead of LHN after creating room while offline.[/+]melvin-bot commentedon Apr 17, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021912707464499254711
melvin-bot commentedon Apr 17, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 (
External)jliexpensify commentedon Apr 17, 2025
Strange, I agree that we should redirect to LHN.
daledah commentedon Apr 17, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-04-17 03:40:52 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When creating a room conversation while offline and inviting a new member, the back button redirects to "Settings" instead of to LHN.
What is the root cause of that problem?
When creating room:
App/src/pages/workspace/WorkspaceNewRoomPage.tsx
Lines 90 to 112 in 5e7543e
There's a slight delay between
setNewRoomFormLoadingandsetNewRoomReportIDbecause ofInteractionManager.runAfterInteractions. In this short amount of time,isLoadingistrueandnewRoomReportIDisundefinedNow let's look at the below
useEffect:App/src/pages/workspace/WorkspaceNewRoomPage.tsx
Lines 132 to 142 in 5e7543e
When online this condition will be always returned early, so no actions is triggered.
When offline,
isOffline && isLoadingandisEmptyObject(errorFields)istrue, so effect is not returned early. Also, for a short amount of time above,newRoomReportIDisundefined, so wedismissModal:App/src/pages/workspace/WorkspaceNewRoomPage.tsx
Lines 136 to 139 in 5e7543e
Then logics inside
addPolicyReportis called, and we navigate again:App/src/libs/actions/Report.ts
Line 2849 in 5e7543e
Basically: New room page ->
dismissModalto Home ->dismissModalWithReportto room reportThis chain of action removes Home from navigation state, so when clicking back button we returned to the page before Home, which is Settings.
What changes do you think we should make in order to solve the problem?
This effect was added in #31655 to handle navigation since they removed
dismissModalWithReportinaddPolicyReport. After thatdismissModalWithReportwas added back inaddPolicyReportso thiseffectdoes not have any purposes anymore.I tried removing this effect and the bug in #31655 is not reproduced anymore, so we can remove it.
App/src/pages/workspace/WorkspaceNewRoomPage.tsx
Lines 132 to 142 in 5e7543e
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
No need, navigation issue.
What alternative solutions did you explore? (Optional)
Move this
App/src/pages/workspace/WorkspaceNewRoomPage.tsx
Line 108 in 5e7543e
To outside of
InteractionManager.runAfterInteractionsso it can be called immediately withsetNewRoomFormLoadingReminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
mallenexpensify commentedon Apr 17, 2025
Commented on Slack thread too
e
17 remaining items
melvin-bot commentedon Apr 23, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.31-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2025-04-30. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Apr 23, 2025
@hungvu193 @jliexpensify @hungvu193 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
jliexpensify commentedon Apr 30, 2025
Payment Summary
Upwork job
@hungvu193 - waiting on checklist!
jliexpensify commentedon Apr 30, 2025
Paid, job closed.
hungvu193 commentedon May 1, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] 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: https://github.com/Expensify/App/pull/59207/files#r2069856844
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Test:
Do we agree 👍 or 👎
jliexpensify commentedon May 1, 2025
No checklist needed @hungvu193 ?
hungvu193 commentedon May 1, 2025
We definitely need it 😆. I'll let you know once it's completed
hungvu193 commentedon May 1, 2025
Checklist is completed. I have been struggling to find the offending PR because of the overlapping changes. I'll update here once I found it
jliexpensify commentedon May 1, 2025
@hungvu193 tag me when you're done, I'll close this issue after!
hungvu193 commentedon May 1, 2025
Found it. Feels free to close 😄
garrettmknight commentedon May 12, 2025
$250 approved for @hungvu193