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

[HOLD for payment 2024-01-11] [$500] Welcome message - Hmm its not here not displayed for wrong link #33230

Closed
6 tasks done
kbecciv opened this issue Dec 18, 2023 · 42 comments
Closed
6 tasks done
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

Comments

@kbecciv
Copy link

kbecciv commented Dec 18, 2023

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: v1.4.13-6
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: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Open the app
  2. Open #announce of workspace of which you are admin
  3. Click on header and open settings - >welcome message
  4. Copy the link and paste in the report
  5. Modify the link and send eg: Add 's' in the end
  6. Click on modified link and observe that nothing happens

Expected Result:

App should display 'hmm its not here' page for wrong welcome message link click

Actual Result:

App does nothing on wrong welcome message link click

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

Bug6317830_1702894772827.windows_chrome_-_hmm_its_not_here_not_displayed.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01fb5caa50cbb1c6aa
  • Upwork Job ID: 1736751063588982784
  • Last Price Increase: 2023-12-25
  • Automatic offers:
    • shubham1206agra | Reviewer | 28071736
    • samilabud | Contributor | 28071737
Issue OwnerCurrent Issue Owner: @shubham1206agra
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 18, 2023
@melvin-bot melvin-bot bot changed the title Welcome message - Hmm its not here not displayed for wrong link [$500] Welcome message - Hmm its not here not displayed for wrong link Dec 18, 2023
Copy link

melvin-bot bot commented Dec 18, 2023

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

Copy link

melvin-bot bot commented Dec 18, 2023

Triggered auto assignment to @slafortune (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 18, 2023
Copy link

melvin-bot bot commented Dec 18, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Dec 18, 2023

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

@samilabud
Copy link
Contributor

samilabud commented Dec 18, 2023

Proposal

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

Welcome message - Hmm its not here not displayed for wrong link

What is the root cause of that problem?

We are not validating the URL route for the second parameter when we are building our routes for 'r' parameter in https://github.com/Expensify/App/blob/main/src/ROUTES.ts. e.g:

route: 'r/:reportID/welcomeMessage',

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

We should validate if the link URL exists in our routes rules, if not then return our custom 404 error.

To do this we should edit the component ReportScreenIDSetter
, first, validate the reportActionID which should be numeric, and if not return the user to the last report page (chat window).

We should add this at the top of the current use effect like:

const reportActionID = route?.params?.reportActionID;
        const regexValidReportActionID = new RegExp(/^\d*$/);
        if (reportActionID && !regexValidReportActionID.test(reportActionID)) {
            Navigation.goBack(ROUTES.HOME);
            return;
        }

This is the result:
Before changes:

Before.changes.reporte.screen.report.id.mp4

After changes:

After.changes.report.screen.report.id.mp4

@mkhutornyi
Copy link
Contributor

I think this should be handled as part of comment linking project
cc: @roryabraham

@yh-0218
Copy link
Contributor

yh-0218 commented Dec 18, 2023

Proposal

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

Welcome message - Hmm its not here not displayed for wrong link

What is the root cause of that problem?

Because handle by this

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

need to update

RANDOM_URL: {
        route: 'r/:reportID?',
        getRoute: (reportID: string, any: string) => ` r/${reportID}` as const,
}

What alternative solutions did you explore? (Optional)

@unidev727
Copy link
Contributor

unidev727 commented Dec 18, 2023

Proposal

from: @unicorndev-727

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

For the optimistic account, the ReportWelcomeText shows the email as text, not a link.

What is the root cause of that problem?

The root cause is that r/:reportId/welcomeMessages is converted to r/:reportID?/:reportActionID? and the Report page will be displayed and we didn't check if reportActionId is valid.
image

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

If the format of route is r/:reportID?/:reportActionID? and is not isModalNavigator, we should check if reportActionId is valid.
If not valid, should return 404 error page here.

if (action && 'payload' in action && action.payload && 'name' in action.payload && isModalNavigator(action.payload.name)) {

What alternative solutions did you explore? (Optional)

N/A

@shahinyan11
Copy link

shahinyan11 commented Dec 18, 2023

Proposal

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

Welcome message - Hmm its not here not displayed for wrong link

What is the root cause of that problem?

The main cause is reportActionID in REPORT_WITH_ID t route . How I see reportActionID is not used in getRoute and the question arises: why is it added there?

When we navigate to link like following r/5104260884112886/ANYTHING the text after last / will be our reportActionID and since we have such a router the 404 screen will not be shown .

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

I do nor know why we use reportActionID in REPORT_WITH_ID but we can remove it. Or if we know that the valid reportActionID can be only numeric text we can check if the text after the last / is numeric

What alternative solutions did you explore? (Optional)

@karimiBadr
Copy link

Proposal

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

Welcome message - Hmm its not here not displayed for wrong link

What is the root cause of that problem?

The presence of an unnecessary segment /:reportActionID? in the ROUTES.ts config:

REPORT_WITH_ID: {
	route: 'r/:reportID?/:reportActionID?',
	getRoute: (reportID: string) => `r/${reportID}` as const,
},

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

Remove /:reportActionID? :

REPORT_WITH_ID: {
	route: 'r/:reportID?',
	getRoute: (reportID: string) => `r/${reportID}` as const,
},

What alternative solutions did you explore? (Optional)

N/A

@samilabud
Copy link
Contributor

Proposal

Updated

@shubham1206agra
Copy link
Contributor

@samilabud's proposal looks good

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Dec 21, 2023

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

@shubham1206agra
Copy link
Contributor

@hayata-suenaga This might be related to comment linking project.

@shubham1206agra
Copy link
Contributor

@roryabraham @perunt as you have worked on comment linking

@roryabraham
Copy link
Contributor

I don't think this necessarily has to HOLD for comment linking. I agree with @shubham1206agra's recommended proposal.

@mkhutornyi
Copy link
Contributor

What happens if numeric but doesn't exist?
i.e. r/:reportId/1234567890

@samilabud
Copy link
Contributor

samilabud commented Dec 23, 2023

What happens if numeric but doesn't exist? i.e. r/:reportId/1234567890

In this case, the deep link does reach the correct route: 'r/:reportID?/:reportActionID', but this is not handling any error/404 page for this when reportId is not found, I imagine this would be another bug or feature to develop if not please let me know.

foyrjt.mp4

@shubham1206agra
Copy link
Contributor

What happens if numeric but doesn't exist? i.e. r/:reportId/1234567890

That will be handled in comment linking project

@melvin-bot melvin-bot bot added the Overdue label Dec 25, 2023
Copy link

melvin-bot bot commented Dec 25, 2023

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

Copy link

melvin-bot bot commented Dec 26, 2023

@slafortune, @shubham1206agra, @hayata-suenaga Whoops! This issue is 2 days overdue. Let's get this updated quick!

@shubham1206agra
Copy link
Contributor

Hey guys! Whatever decision you will make, please don't delete the reportActionID from the route path. This stuff will be used in the Comment Linking.

We are not deleting the reportActionID. We are just going to validate this

@shubham1206agra
Copy link
Contributor

This is not a valid argument in this case.
But I am gonna side with @samilabud in this case. As @shahinyan11, your RCA was right, but your solution is little vague, and I was unable to judge what you are saying, and in what direction you are going with your solution.

@shubham1206agra You can check the difference between the latest and all previous versions of proposals from @samilabud. And then If you think it's fair then decide so

Sorry. But I still feel we should go with @samilabud's proposal

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

melvin-bot bot commented Dec 28, 2023

📣 @shubham1206agra 🎉 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 Dec 28, 2023

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

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Dec 28, 2023
@roryabraham
Copy link
Contributor

Looks like @hayata-suenaga is OOO until 2024-01-08, so I'll jump in and take over as the Expensify engineer here.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 4, 2024
@melvin-bot melvin-bot bot changed the title [$500] Welcome message - Hmm its not here not displayed for wrong link [HOLD for payment 2024-01-11] [$500] Welcome message - Hmm its not here not displayed for wrong link Jan 4, 2024
Copy link

melvin-bot bot commented Jan 4, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 4, 2024
Copy link

melvin-bot bot commented Jan 4, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.21-4 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 2024-01-11. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jan 4, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@shubham1206agra] The PR that introduced the bug has been identified. Link to the PR:
  • [@shubham1206agra] 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:
  • [@shubham1206agra] A discussion in #expensify-bugs 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:
  • [@shubham1206agra] Determine if we should create a regression test for this bug.
  • [@shubham1206agra] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@slafortune] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jan 11, 2024
Copy link

melvin-bot bot commented Jan 11, 2024

Issue is ready for payment but no BZ is assigned. @NicMendonca you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!

@NicMendonca NicMendonca removed their assignment Jan 11, 2024
@slafortune
Copy link
Contributor

@shubham1206agra can you please complete the above checklist then accept the job offer? Thanks!

@shubham1206agra
Copy link
Contributor

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@shubham1206agra] The PR that introduced the bug has been identified. Link to the PR: Comment linking redirects #24411
  • [@shubham1206agra] 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: Comment linking redirects #24411 (comment)
  • [@shubham1206agra] A discussion in #expensify-bugs 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:
  • [@shubham1206agra] Determine if we should create a regression test for this bug. No as this is a new feature (comment linking project) being worked on.
  • [@shubham1206agra] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@slafortune] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

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
Projects
None yet
Development

No branches or pull requests