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] clicking on a chat row in a thread within a thread leads to "not found" page. #47892

Closed
1 of 6 tasks
m-natarajan opened this issue Aug 23, 2024 · 21 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@m-natarajan
Copy link

m-natarajan commented Aug 23, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.24-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @puneetlath
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1724336539348799

Action Performed:

  1. Initiate a chat
  2. Reply in the thread
  3. Reply in the thread of thread
  4. Click on the chat row in a thread within the thread

Expected Result:

Able to open the chat

Actual Result:

Leads to "not found" 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

Recording.488.mp4
Screen.Recording.2024-08-22.at.10.21.33.AM.mov

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b2e4f856351af3b6
  • Upwork Job ID: 1828188239764165076
  • Last Price Increase: 2024-08-26
  • Automatic offers:
    • brunovjk | Reviewer | 103719086
Issue OwnerCurrent Issue Owner: @brunovjk
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 23, 2024
Copy link

melvin-bot bot commented Aug 23, 2024

Triggered auto assignment to @kevinksullivan (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.

@daledah
Copy link
Contributor

daledah commented Aug 23, 2024

Edited by proposal-police: This proposal was edited at 2024-08-23 03:21:15 UTC.

Proposal

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

  1. Press a thread ancestor leads to "not found" page
  2. The first thread ancestor is not pressable

What is the root cause of that problem?

We're using parentReportID from these ancestors:

onPress={
ReportUtils.canCurrentUserOpenReport(ancestorReports.current?.[ancestor?.report?.parentReportID ?? '-1'])
? () => {
const isVisibleAction = ReportActionsUtils.shouldReportActionBeVisible(ancestor.reportAction, ancestor.reportAction.reportActionID ?? '-1');
// Pop the thread report screen before navigating to the chat report.
Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(ancestor.report.parentReportID ?? '-1'));
if (isVisibleAction && !isOffline) {
// Pop the chat report screen before navigating to the linked report action.
Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(ancestor.report.parentReportID ?? '-1', ancestor.reportAction.reportActionID));
}
Timing.start(CONST.TIMING.SWITCH_REPORT);
}
: undefined
}

which leads us up to 1 level higher.

Because the report data in these ancestors already points to its parent report:

report: parentReport,

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

Use reportID instead of parentReportID.

@melvin-bot melvin-bot bot added the Overdue label Aug 26, 2024
Copy link

melvin-bot bot commented Aug 26, 2024

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

@kevinksullivan kevinksullivan added the External Added to denote the issue can be worked on by a contributor label Aug 26, 2024
@melvin-bot melvin-bot bot changed the title clicking on a chat row in a thread within a thread leads to "not found" page. [$250] clicking on a chat row in a thread within a thread leads to "not found" page. Aug 26, 2024
Copy link

melvin-bot bot commented Aug 26, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01b2e4f856351af3b6

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

melvin-bot bot commented Aug 26, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Aug 26, 2024
@brunovjk
Copy link
Contributor

It seems to me that those parentReportID should be replaced by reportID here, but the part pointed out in the proposal is missing. I tested the suggested changes and it solved the issue just fine. However, I wonder if there are other places we should check to update. What do you think @daledah? Either way, the proposal looks good to me.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Aug 27, 2024

Triggered auto assignment to @arosiclair, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@raza-ak
Copy link
Contributor

raza-ak commented Aug 27, 2024

Proposal

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

Clicking on a chat row in a thread within a thread leads to "not found" page.

What is the root cause of that problem?

The issue occurs when attempting to navigate to a report that doesn't exist on the backend, resulting in an error response from the OpenReport API call.

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

The navigation logic has been updated to ensure that, under certain conditions, it navigates back to the parent chat instead of trying to access a non-existent report.
Following changes in the https://github.com/Expensify/App/blob/main/src/pages/home/report/ReportActionItemParentAction.tsx#L134 will fix the issue.

Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(ancestor.report.parentReportID ? ancestor.report.parentReportID : ancestor.reportAction.reportActionID));
image

361837107-330e4510-2a3c-476d-a574-6053b61d7b0e.mp4

@raza-ak
Copy link
Contributor

raza-ak commented Aug 27, 2024

@brunovjk Please review my proposal.

@brunovjk
Copy link
Contributor

Hi @raza-ak, Thank you for your proposal. But I believe the first proposal effectively resolves the problem and aligns better with the existing codebase. It seems reasonable to support it and move forward with that solution. However, @arosiclair will have the final say on this matter. Let’s wait for their review.

@arosiclair
Copy link
Contributor

@daledah's proposal looks good and tests well on my end 👍

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 28, 2024
Copy link

melvin-bot bot commented Aug 28, 2024

📣 @brunovjk 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Aug 28, 2024

📣 @daledah You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@brunovjk
Copy link
Contributor

brunovjk commented Sep 3, 2024

Note

The production deploy automation failed: This should be on [HOLD for Payment 2024-09-09] according to #48360 prod deploy checklist, confirmed in #48232 (comment).

cc: @kevinksullivan

@brunovjk
Copy link
Contributor

brunovjk commented Sep 4, 2024

Regression Test Proposal

  • Initiate a chat
  • Reply in the thread
  • Reply in the thread of thread
  • Click on the chat row in a thread within the thread
  • Verify that: the screen navigates to the correct report.
  • Repeat the above steps in offline mode to ensure consistency.
  • Do we agree 👍 or 👎

@kevinksullivan
Copy link
Contributor

Paid @brunovjk . @daledah , can you apply for the upwork job and let us know once you've done so here?

@kevinksullivan
Copy link
Contributor

Looping in another BZ member for final payment to @daledah as I'm going OOO , otherwise this is all set!

@kevinksullivan kevinksullivan removed their assignment Sep 12, 2024
@kevinksullivan kevinksullivan added Daily KSv2 Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. and removed Weekly KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 12, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

Triggered auto assignment to @Christinadobrzyn (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.

@kevinksullivan kevinksullivan self-assigned this Sep 12, 2024
@Christinadobrzyn
Copy link
Contributor

@daledah here's an Upwork offer - https://www.upwork.com/nx/wm/offer/103950508 - can you accept this so we can pay you?

@daledah
Copy link
Contributor

daledah commented Sep 14, 2024

@Christinadobrzyn I did, thanks

@Christinadobrzyn
Copy link
Contributor

Awesome! Thanks @daledah I've paid you in Upwork.

Payment summary just in case it's helpful.

Payouts due:

Regression test here - #49133
Closing this as complete!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
No open projects
Status: No status
Development

No branches or pull requests

7 participants