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
[$500] IOU - Chat reloads when clicking Message <user> after returning from IOU thread #39289
Version Number: 1.4.58-1 Reproducible in staging?: Y Reproducible in production?: N 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:
Go to staging.new.expensify.com
Request money from any user
In 1:1 DM, click on the IOU preview
Click on the header subtitle to return to 1:1 DM
In 1:1 DM, click on the chat header
Click Message
Expected Result:
Chat will not reload when clicking Message since it will lead to the same page
Actual Result:
Chat reloads when clicking Message after returning from thread
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
👋 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.
@luacmartins FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
functionnavigateToAndOpenReportWithAccountIDs(participantAccountIDs: number[],currentReportID?: string){letnewChat: ReportUtils.OptimisticChatReport|EmptyObject={};constchat=ReportUtils.getChatByParticipants(participantAccountIDs);if(!chat){
newChat =ReportUtils.buildOptimisticChatReport(participantAccountIDs);}constreport=chat??newChat;if(currentReportID&&report.reportID!==currentReportID){// We want to pass newChat here because if anything is passed in that param (even an existing chat), we will try to create a chat on the serveropenReport(report.reportID,'',[],newChat,'0',false,participantAccountIDs);}Navigation.dismissModalWithReport(report);}
Yes, it doesn't reload as shown in the video but it sends a redundant backend request openReport as observed in the network tap.
To reproduce the previous behavior:
open a chat with any user.
send a message in case you don't have any previous chat with this user.
click on the report header
Then click on "Message XXXX"
This raises the question: Do we actually need to display the "Message XXX" item if the report is already opened in the background? I believe it's redundant in this case because it's already open.
I'm observing the same behavior across dev, staging, and prod; it calls OpenReport when we click the Message ... button. Given that information, I think we can close this issue.
Yeah, I think it's fine that we display this even if the report is open in the background (as long as it's working, which it sounds like it is). Closing for now, but LMK if anyone disagrees.
Activity
melvin-bot commentedon Mar 29, 2024
Triggered auto assignment to @luacmartins (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon Mar 29, 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:
lanitochka17 commentedon Mar 29, 2024
We think that this bug might be related to #vip-vsp
lanitochka17 commentedon Mar 29, 2024
@luacmartins FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
luacmartins commentedon Apr 1, 2024
I'll demote this to NAB, but it's something we need to fix. Making it external.
5 remaining items
melvin-bot commentedon Apr 1, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01350a160bfffaa30f
melvin-bot commentedon Apr 1, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 (
External)melvin-bot commentedon Apr 1, 2024
Triggered auto assignment to @joekaufmanexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.abzokhattab commentedon Apr 1, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
app reloads when clicking on message while the user report being open in the background
What is the root cause of that problem?
on clicking on
Message <user>we navigate and open the report of that user without checking whether we are on the report page or notWhat changes do you think we should make in order to solve the problem?
we should just dismiss the modal incase the target report is open in the background:
to achieve that, we should pass the current
reportIDto theReportActions.navigateToAndOpenReportWithAccountIDsApp/src/pages/ProfilePage.tsx
Line 221 in 78efe2f
and then check if the reportID is the same or not before opening the report in this line
App/src/libs/actions/Report.ts
Line 852 in be315d6
POC
Screen.Recording.2024-04-01.at.7.49.53.PM.mov
hungvu193 commentedon Apr 2, 2024
@abzokhattab Can you reproduce on latest main now?
Screen.Recording.2024-04-02.at.09.48.33.mov
abzokhattab commentedon Apr 2, 2024
yes still reproducible
it doesnt reload but it keeps sending
OpenReportrequest to the backendScreen.Recording.2024-04-02.at.4.56.03.AM.mov
hungvu193 commentedon Apr 2, 2024
Can you declare your test steps? It seems working fine on my end :/
abzokhattab commentedon Apr 2, 2024
Yes, it doesn't reload as shown in the video but it sends a redundant backend request
openReportas observed in the network tap.To reproduce the previous behavior:
This raises the question: Do we actually need to display the "Message XXX" item if the report is already opened in the background? I believe it's redundant in this case because it's already open.
hungvu193 commentedon Apr 2, 2024
I'm observing the same behavior across dev, staging, and prod; it calls
OpenReportwhen we click theMessage ...button. Given that information, I think we can close this issue.joekaufmanexpensify commentedon Apr 2, 2024
Yeah, I think it's fine that we display this even if the report is open in the background (as long as it's working, which it sounds like it is). Closing for now, but LMK if anyone disagrees.