Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$250] Chat - Thread page reloads when user entering it first time after leaving #45966

Closed
3 of 6 tasks
lanitochka17 opened this issue Jul 22, 2024 · 17 comments
Closed
3 of 6 tasks
Assignees
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 22, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.10-6
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

Issue found when executing PR #45921

Action Performed:

  1. Open any chat
  2. Send a message
  3. Right click on the message > Reply in thread
  4. Send a reply in thread
  5. Click on the chat header
  6. Click Leave
  7. Enter the thread again

Expected Result:

Thread page opens without reloading

Actual Result:

Thread page reloads after entering thread for the first time after leaving. If user navigates to parent chat and entering thread again, no reload page

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6549928_1721680441749.bandicam_2024-07-22_23-31-43-789.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018152ed9583469041
  • Upwork Job ID: 1815513755284322155
  • Last Price Increase: 2024-07-29
Issue OwnerCurrent Issue Owner: @suneox
@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels Jul 22, 2024
Copy link

melvin-bot bot commented Jul 22, 2024

Triggered auto assignment to @chiragsalian (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link
Contributor

👋 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:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-vsp

@francoisl
Copy link
Contributor

The same thing is happening to me on production - it's not a full page reload per se, just the thread data loading. Not sure it's even a bug tbh.
There's also something weird happening, when I send a message, my profile picture disappears (visible at the end of the video), but that's unrelated to this issue.

Screen.Recording.2024-07-22.at.2.20.54.PM.mov

@francoisl francoisl removed DeployBlocker Indicates it should block deploying the API DeployBlockerCash This issue or pull request should block deployment labels Jul 22, 2024
@chiragsalian
Copy link
Contributor

Cool yup doesn't look like a blocker. I'll demote and apply external label for contributors to investigate.

@chiragsalian chiragsalian added External Added to denote the issue can be worked on by a contributor Weekly KSv2 and removed Hourly KSv2 labels Jul 22, 2024
@melvin-bot melvin-bot bot changed the title Chat - Thread page reloads when user entering it first time after leaving [$250] Chat - Thread page reloads when user entering it first time after leaving Jul 22, 2024
Copy link

melvin-bot bot commented Jul 22, 2024

Job added to Upwork: https://www.upwork.com/jobs/~018152ed9583469041

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 22, 2024
Copy link

melvin-bot bot commented Jul 22, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @suneox (External)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 22, 2024
@tsa321
Copy link
Contributor

tsa321 commented Jul 23, 2024

same as #45834

@devmadhavvv
Copy link

Contributor details
Your Expensify account email: madhavmishra28@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~0161f3ad9d848f9056?mp_source=share

Copy link

melvin-bot bot commented Jul 23, 2024

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

Copy link

melvin-bot bot commented Jul 26, 2024

@suneox, @chiragsalian Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Jul 26, 2024
@suneox
Copy link
Contributor

suneox commented Jul 28, 2024

Still waiting for a proposal.

@melvin-bot melvin-bot bot removed the Overdue label Jul 28, 2024
Copy link

melvin-bot bot commented Jul 29, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@huult
Copy link
Contributor

huult commented Jul 30, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Thread page reloads when user entering it first time after leaving

What is the root cause of that problem?

This issue looks like a backend issue, as described in this comment

Screenshot 2024-07-31 at 01 17 32

So when GetMissingOnyxMessages is called,reportOnyx will return undefined, and Skeleton will be displayed, causing it to go to the previous page

const [reportOnyx, reportResult] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${getReportID(route)}`, {allowStaleData: true});

The logic handles going to the previous page when reportOnyx is undefined.

if (
// non-optimistic case
(!prevUserLeavingStatus && !!userLeavingStatus) ||
didReportClose ||
isRemovalExpectedForReportType ||
isClosedTopLevelPolicyRoom ||
(prevIsDeletedParentAction && !isDeletedParentAction)
) {
// Early return if the report we're passing isn't in a focused state. We only want to navigate to Concierge if the user leaves the room from another device or gets removed from the room while the report is in a focused state.
// Prevent auto navigation for report in RHP
if (!isFocused || isInNarrowPaneModal) {
return;
}
Navigation.dismissModal();
if (Navigation.getTopmostReportId() === prevOnyxReportID) {
Navigation.setShouldPopAllStateOnUP(true);
Navigation.goBack(undefined, false, true);
}
if (prevReport.parentReportID) {
// Prevent navigation to the IOU/Expense Report if it is pending deletion.
if (ReportUtils.isMoneyRequestReportPendingDeletion(prevReport.parentReportID)) {
return;
}
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(prevReport.parentReportID));
return;
}
Report.navigateToConciergeChat();
return;
}

The logic handles showing the Skeleton when reportOnyx is undefined.

const shouldShowSkeleton =

What changes do you think we should make in order to solve the problem?

Update the GetMissingOnyxMessages API to retrieve the existing value.

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Jul 30, 2024
@suneox
Copy link
Contributor

suneox commented Jul 31, 2024

@huult Thanks for your proposal. I’ll double-check it in a few hours.

@melvin-bot melvin-bot bot removed the Overdue label Jul 31, 2024
@suneox
Copy link
Contributor

suneox commented Jul 31, 2024

@chiragsalian This issue is a duplicate of #45834. After leaving the thread and reopening it, the report action is set to null when call API GetMissingOnyxMessages, so I think we can close this one.

@chiragsalian
Copy link
Contributor

ah yup looks like it. Thanks for that, it does look like a dupe. Closing out this issue in favor of the other one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

7 participants