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 2023-08-02] [$1000] Web - #admin is highlighted in LHN but shows Concierge report screen #21408

Closed
1 of 6 tasks
kbecciv opened this issue Jun 23, 2023 · 45 comments
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 Jun 23, 2023

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


Action Performed:

  1. Create new account
  2. Click on + icon and select New workspace option
  3. Check the LHN and report screen

Expected Result:

Concierge should be highlighted in LHN

Actual Result:

#admin is highlighted in LHN but shows Concierge report screen

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.28-5

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

Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-06-16.at.3.40.08.PM.mov
Recording.3233.mp4

Expensify/Expensify Issue URL:

Issue reported by: @gadhiyamanan

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686910566735839

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01975cb777161dce5e
  • Upwork Job ID: 1673275742488936448
  • Last Price Increase: 2023-07-03
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 23, 2023
@esh-g
Copy link
Contributor

esh-g commented Jun 23, 2023

Proposal

Please re-state the problem

#admin is highlighted in LHN but shows Concierge report screen on newly created account.

What is the root cause of that problem?

The root cause is that when the Workspace is created, we have to navigate to two screens:

  1. #admin chat in Report Screen
  2. Workspace details page in RHP

App/src/libs/actions/Policy.js

Lines 1045 to 1049 in 6183609

// Get the reportID associated with the newly created #admins room and route the user to that chat
const routeKey = lodashGet(navigationRef.getState(), 'routes[0].state.routes[0].key');
Navigation.setParams({reportID: adminsChatReportID}, routeKey);
Navigation.navigate(ROUTES.getWorkspaceInitialRoute(policyID));

Here we just set the route params to the reportID of the admins chat and only navigate to the RHP details page because this code was written before the navigation refactor and I think we couldn't navigate to both at once at that time.

But since we are only updating the route params, it is not causing the ReportScreenWrapper to update because that is set to update only if the reportID becomes null and therefore, the URL changes to the adminReportID but the actual ReportScreen doesn't change.

What changes do you think we should make to solve this problem?

We can just navigate to both the routes using Navigation.navigate for both routes so that it looks something like this:

if (shouldNavigateToAdminChat) {
            Navigation.navigate(ROUTES.getReportRoute(adminsChatReportID));
}

Navigation.navigate(ROUTES.getWorkspaceInitialRoute(policyID));

Notice that I'm also adding a parameter to the createWorkspace method called shouldNavigateToAdminChat which can be set to false on small screens because navigating to admin on small screen pushes the workspace before and after the admin chat. This prop can be passed in FloatingActionButtonAndPopover.js as !this.props.isSmallScreenWidth.

Result

Screen.Recording.2023-06-23.at.2.05.38.PM.mov

What other approach did you explore?

I also tried having the ReportScreenWrapper to update on route change but that exceeds the maximum depth of updates react is capable of.

@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

Looks like something related to react-navigation may have been mentioned in this issue discussion.

As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.

Feel free to drop a note in #expensify-open-source with any questions.

@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 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

@melvin-bot melvin-bot bot added the Overdue label Jun 26, 2023
@twisterdotcom twisterdotcom added the External Added to denote the issue can be worked on by a contributor label Jun 26, 2023
@melvin-bot melvin-bot bot changed the title Web - #admin is highlighted in LHN but shows Concierge report screen [$1000] Web - #admin is highlighted in LHN but shows Concierge report screen Jun 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 26, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01975cb777161dce5e

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

melvin-bot bot commented Jun 26, 2023

Current assignee @twisterdotcom is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jun 26, 2023

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

@twisterdotcom
Copy link
Contributor

@abdulrahuman5196 - I think @esh-g's proposal looks good. At least the outcome video seems correct anyway. Wonder if we could get this one assigned quickly!

@melvin-bot melvin-bot bot removed the Overdue label Jun 26, 2023
@abdulrahuman5196
Copy link
Contributor

Sure will check on this today and update

@abdulrahuman5196
Copy link
Contributor

@esh-g I am not sure if i am aligned to make 2 navigations to solve this issue. Consider small screen devices it will add 2 navigations on the navigation stack, how will it behave there?

@esh-g
Copy link
Contributor

esh-g commented Jun 26, 2023

Notice that I'm also adding a parameter to the createWorkspace method called shouldNavigateToAdminChat which can be set to false on small screens because navigating to admin on small screen pushes the workspace before and after the admin chat. This prop can be passed in FloatingActionButtonAndPopover.js as !this.props.isSmallScreenWidth.

@abdulrahuman5196 That is why I have added these lines to the proposal. I know that it will push unexpected screens for small screen devices, that is why I'm proposing to only navigate to admins chat on full screen devices as small screen devices can navigate to only one screen at a time.

@esh-g
Copy link
Contributor

esh-g commented Jun 27, 2023

@abdulrahuman5196 Should I provide a branch from my fork to test with for these changes?

@twisterdotcom
Copy link
Contributor

I am OOO! Adding another BZ for the week.

@twisterdotcom twisterdotcom added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Jun 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 28, 2023

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

@Expensify Expensify deleted a comment from melvin-bot bot Jun 28, 2023
@esh-g
Copy link
Contributor

esh-g commented Jun 28, 2023

@abdulrahuman5196 This is how it looks on small screens:

Screen.Recording.2023-06-28.at.9.49.06.PM.mov

And this is the change I was mentioning in my proposal of passing a navigateToAdminChat as false for small screens:
From this:

onSelected: () => this.interceptAnonymousUser(() => Policy.createWorkspace()),

To this:

onSelected: () => this.interceptAnonymousUser(() => Policy.createWorkspace('', false, '', false, !this.props.isSmallScreenWidth)),

@aldo-expensify
Copy link
Contributor

Thanks all, assigning @esh-g to implement proposal

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

melvin-bot bot commented Jul 10, 2023

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

Upwork job

@melvin-bot
Copy link

melvin-bot bot commented Jul 10, 2023

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

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
Copy link

melvin-bot bot commented Jul 10, 2023

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

Upwork job

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Jul 11, 2023
@esh-g
Copy link
Contributor

esh-g commented Jul 11, 2023

Thanks for assigning me! 🚀
PR is here: #22619
cc @abdulrahuman5196

@melvin-bot
Copy link

melvin-bot bot commented Jul 18, 2023

@twisterdotcom, @abdulrahuman5196, @esh-g, @aldo-expensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@aldo-expensify
Copy link
Contributor

@esh-g the PR is running into conflicts now. What is the current state?

@esh-g
Copy link
Contributor

esh-g commented Jul 19, 2023

@aldo-expensify I was waiting for @abdulrahuman5196 to test a comment I left 4 days ago... I'm sorry for not bumping sooner.
I will resolve all the conflicts today

@aldo-expensify
Copy link
Contributor

PR merged

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jul 26, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Web - #admin is highlighted in LHN but shows Concierge report screen [HOLD for payment 2023-08-02] [$1000] Web - #admin is highlighted in LHN but shows Concierge report screen Jul 26, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 26, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 26, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.45-7 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 2023-08-02. 🎊

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:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Jul 26, 2023

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:

  • [@abdulrahuman5196] The PR that introduced the bug has been identified. Link to the PR:
  • [@abdulrahuman5196] 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:
  • [@abdulrahuman5196] 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:
  • [@abdulrahuman5196] Determine if we should create a regression test for this bug.
  • [@abdulrahuman5196] 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.
  • [@twisterdotcom] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@abdulrahuman5196
Copy link
Contributor

The PR that introduced the bug has been identified. Link to the PR:
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:
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:

This was caused during navigation refractor.

Determine if we should create a regression test for this bug.

yes

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.

  1. Login from an account with no workspace (or delete all workspaces)
  2. Click on the + icon and create new workspace.
  3. On fullscreen, verify that we navigate to #admins page report and also to the workspace details on the right.
  4. On Small screen, verify that we are not shown the admin chat but are navigated to the details of the workspace.

@twisterdotcom

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Aug 1, 2023
@twisterdotcom
Copy link
Contributor

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
No open projects
Development

No branches or pull requests

9 participants