App icon indicating copy to clipboard operation
App copied to clipboard

[Payment Due Sept 30 2024] [$250] Workspace - "Hmm... it's not here" page opens twice for an invalid link with a RHP

Open lanitochka17 opened this issue 1 year ago β€’ 29 comments

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.19-9 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4849349&group_by=cases:section_id&group_id=296763&group_order=asc Issue reported by: Applause - Internal Team

Action Performed:

  1. Open the app
  2. Log in with any account
  3. Open any deep link with the app that should display the "Hmm... it's not here" page and should open a RHP on web (https://staging.new.expensify.com/r/6821704960193694/details )
  4. Tap on the "<" button to go back
  5. Tap on the "<" button to go back again

Expected Result:

"Hmm... it's not here" page should only open once

Actual Result:

"Hmm... it's not here" page opens twice for an invalid link with a RHP

Workaround:

Unknown

Platforms:

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

  • [x] Android: Native
  • [x] Android: mWeb Chrome
  • [x] iOS: Native
  • [x] iOS: mWeb Safari
  • [ ] MacOS: Chrome / Safari
  • [ ] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/9e932943-e6c3-471c-aba3-7cc8a48153e8

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0147fe785445dbe8f8
  • Upwork Job ID: 1824283728870406581
  • Last Price Increase: 2024-08-23

lanitochka17 avatar Aug 13 '24 14:08 lanitochka17

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

melvin-bot[bot] avatar Aug 13 '24 14:08 melvin-bot[bot]

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

lanitochka17 avatar Aug 13 '24 14:08 lanitochka17

@kadiealexander 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

lanitochka17 avatar Aug 13 '24 14:08 lanitochka17

Edited by proposal-police: This proposal was edited at {2023-10-06T12:30:00Z}.

Proposal

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

"Hmm... it's not here" page opens twice for an invalid link with a RHP

What is the root cause of that problem?

On small screen, after going to /r/invalidId/details, we will init 2 pages. The first one is ReportScreen, the second one is details page. 2 of them are not found pages.

When users go back, we will show ReportScreen (Not found)

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

We're using withReportOrNotFound in report details page, report setting name, ...

https://github.com/Expensify/App/blob/d8622863739197affbcf5d3400f6964761608309/src/pages/home/report/withReportOrNotFound.tsx#L87

In these screens, if the previous ReportScreen is not found, we should go to LHN when users press back button

To do that:

  1. We should add new props named isReportRelatedPage to NotFoundPage, then enable it in here

  2. Update onBackButtonPress handler in NotFoundPage


function NotFoundPage({onBackButtonPress=Navigation.goBack, ...fullPageNotFoundViewProps}: NotFoundPageProps) {
    return (
       ...
                onBackButtonPress={()=>{
                    if(!isReportRelatedPage || !isSmallScreen){
                        onBackButtonPress();
                        return;
                    }
                    const topmostReportId = Navigation.getTopmostReportId()
                    const report = getReport(topmostReportId??'')
                    // detect the report is invalid
                    if(topmostReportId && (!report || report.errorFields?.['notFound'])){
                        Navigation.goBack(ROUTES.HOME, true, true)
                        return;
                    }
                    onBackButtonPress()
                }}

What alternative solutions did you explore? (Optional)

NA

daledah avatar Aug 13 '24 16:08 daledah

Job added to Upwork: https://www.upwork.com/jobs/~0147fe785445dbe8f8

melvin-bot[bot] avatar Aug 16 '24 03:08 melvin-bot[bot]

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

melvin-bot[bot] avatar Aug 16 '24 03:08 melvin-bot[bot]

@sobitneupane, @kadiealexander Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Aug 19 '24 18:08 melvin-bot[bot]

@sobitneupane What do you think about my proposal?

daledah avatar Aug 20 '24 02:08 daledah

@daledah Thanks for the proposal.

Is it possible to not open the deeplink (in this case, details page) if user doesn't have access to the report? In that case we will be just showing the NotFoundPage for the report.

sobitneupane avatar Aug 20 '24 11:08 sobitneupane

@sobitneupane I don't think it's the expectation. If users open the details page by deeplink, they want to see the details page url. If we show the report url, it can cause the confusion.

daledah avatar Aug 21 '24 03:08 daledah

Thanks for the update @daledah

Yup. It makes sense to open the deeplink especially in browsers. What will be the impact of your proposal in large screen devices which opens the details page in RHP? I don't think we should change the report (even if Not Found) when user presses back button in RHP.

sobitneupane avatar Aug 22 '24 10:08 sobitneupane

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] avatar Aug 23 '24 16:08 melvin-bot[bot]

@sobitneupane Thanks for your suggestion, I updated the proposal to handle onBackButtonPress on large screen, we should close the RHP only.

daledah avatar Aug 26 '24 03:08 daledah

Thanks for the update @daledah

Proposal from @daledah looks good to me.

πŸŽ€ πŸ‘€ πŸŽ€ C+ reviewed

sobitneupane avatar Aug 26 '24 12:08 sobitneupane

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

melvin-bot[bot] avatar Aug 26 '24 12:08 melvin-bot[bot]

@Beamanator @sobitneupane @kadiealexander this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] avatar Aug 27 '24 17:08 melvin-bot[bot]

Oh shit i'll review soon πŸ™

Beamanator avatar Aug 28 '24 02:08 Beamanator

πŸ“£ @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 πŸ“–

melvin-bot[bot] avatar Aug 28 '24 02:08 melvin-bot[bot]

@sobitneupane PR is ready.

daledah avatar Aug 28 '24 16:08 daledah

This issue has not been updated in over 15 days. @Beamanator, @sobitneupane, @kadiealexander, @daledah eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

melvin-bot[bot] avatar Oct 03 '24 18:10 melvin-bot[bot]

@Beamanator Is this ready for payment?

sobitneupane avatar Oct 21 '24 08:10 sobitneupane

Ooh def looks like it πŸ˜…

@kadiealexander can you help us out with payment here?

Beamanator avatar Oct 21 '24 13:10 Beamanator

Payouts due:

  • [x] Contributor: $250 @daledah (offer)
  • [x] Reviewer: $250 @sobitneupane (via Manual Request)

Upwork job is here.

kadiealexander avatar Oct 24 '24 07:10 kadiealexander

I'm going OOO so I'm adding someone to help with payment once the offer has been accepted.

kadiealexander avatar Oct 25 '24 03:10 kadiealexander

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

melvin-bot[bot] avatar Oct 25 '24 03:10 melvin-bot[bot]

Payment due in a couple of days. Can we get a checklist for this? Thanks!

trjExpensify avatar Oct 28 '24 15:10 trjExpensify

@Beamanator, @trjExpensify, @sobitneupane, @daledah Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] avatar Oct 31 '24 18:10 melvin-bot[bot]

Still awaiting the checklist!

trjExpensify avatar Nov 01 '24 10:11 trjExpensify

Bump @sobitneupane

Beamanator avatar Nov 02 '24 09:11 Beamanator

Regression Test Proposal

  1. Login
  2. Open deep link of details page of a report without access and verify that "Hmm... it's not here" page is displayed.
  3. Tap on the back button
  4. Verify that: On big screen, the modal showing Not here page closes and On small screen, the user is redirected to the home page.

Do we agree πŸ‘ or πŸ‘Ž

sobitneupane avatar Nov 05 '24 07:11 sobitneupane