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-07-10] [HOLD for payment 2024-07-02] [$250] Workspace - Unable to open Workspace setting when open member chat page #43462

Closed
1 of 6 tasks
lanitochka17 opened this issue Jun 11, 2024 · 34 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jun 11, 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: 1.4.81-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to Profile> Workspaces> Create Workspace
  2. Go to Members> Invite member> Invite any email address
  3. Click on invited member section to open Profile page
  4. Select message user
  5. Go to Profile> Workspaces
  6. Click on the workspace to open settings page

Expected Result:

Workspace settings page should open

Actual Result:

Workspace settings page can not be open, nothing happens when click on workspace

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

Bug6508586_1718049253343.Recording__3152.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0134016f887e04d471
  • Upwork Job ID: 1800580579719432391
  • Last Price Increase: 2024-06-18
  • Automatic offers:
    • ahmedGaber93 | Reviewer | 102793761
Issue OwnerCurrent Issue Owner: @trjExpensify
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 11, 2024
Copy link

melvin-bot bot commented Jun 11, 2024

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.

@lanitochka17
Copy link
Author

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

@trjExpensify
Copy link
Contributor

How bizarre! I'm able to reproduce, moving it on.

@trjExpensify trjExpensify added the External Added to denote the issue can be worked on by a contributor label Jun 11, 2024
Copy link

melvin-bot bot commented Jun 11, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0134016f887e04d471

@melvin-bot melvin-bot bot changed the title Workspace - Unable to open Workspace setting when open member chat page [$250] Workspace - Unable to open Workspace setting when open member chat page Jun 11, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 11, 2024
Copy link

melvin-bot bot commented Jun 11, 2024

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

@ahmedGaber93
Copy link
Contributor

Waiting on proposals

1 similar comment
@ahmedGaber93
Copy link
Contributor

Waiting on proposals

@MrMuzyk
Copy link
Contributor

MrMuzyk commented Jun 17, 2024

I am Michał from Callstack - expert contributor group. I’d like to work on this job.

@melvin-bot melvin-bot bot added the Overdue label Jun 17, 2024
@ahmedGaber93
Copy link
Contributor

@trjExpensify We can assign @MrMuzyk from callstack.

@MrMuzyk after assigning, please post your findings here daily and propose how to fix it to weigh in before creating a PR. thanks!

@melvin-bot melvin-bot bot removed the Overdue label Jun 17, 2024
@MrMuzyk
Copy link
Contributor

MrMuzyk commented Jun 18, 2024

Proposal

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

App not navigating user to selected screen

What is the root cause of that problem?

In this scenario, in many of many checks before navigating user, we check if desired state is different from current state.
This is done via getPartialStateDiff function. Next, action from this diff is extracted and dispatched causing a navigate

if (adaptedState && (metainfo.isCentralPaneAndBottomTabMandatory || metainfo.isFullScreenNavigatorMandatory)) {
const diff = getPartialStateDiff(rootState, adaptedState as State<RootStackParamList>, metainfo);
const diffActions = getActionsFromPartialDiff(diff);
for (const diffAction of diffActions) {
root.dispatch(diffAction);
}
}

In this function we are checking not only if screen name is different but also if params are different. Because that wasn't the case here - params are the same as before - user wasn't getting redirected to proper screen

if (
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
(!stateTopmostFullScreen && templateStateTopmostFullScreen) ||
(stateTopmostFullScreen &&
templateStateTopmostFullScreen &&
stateTopmostFullScreen.name !== templateStateTopmostFullScreen.name &&
!shallowCompare(stateTopmostFullScreen.params as Record<string, unknown> | undefined, templateStateTopmostFullScreen.params as Record<string, unknown> | undefined))
) {
diff[NAVIGATORS.FULL_SCREEN_NAVIGATOR] = fullScreenDiff;
}

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

I'd remove shallowCompare check from the condition in line 76. If screen names are different then it's good enough reason to navigate the user already. There is no need to check for params difference as well.

Update the condition to check for differences separately. So we would navigate user if:

  • screen name changes
  • screen name stays the same but params are different

(stateTopmostFullScreen.name !== templateStateTopmostFullScreen.name || !shallowCompare)

This should cover all the cases that were uncovered before

What alternative solutions did you explore? (Optional)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

Copy link

melvin-bot bot commented Jun 18, 2024

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

@ahmedGaber93
Copy link
Contributor

In this function we are checking not only if screen name is different but also if params are different.

@MrMuzyk I think we need for that because in nested navigation state, params will contain screen name

@MrMuzyk
Copy link
Contributor

MrMuzyk commented Jun 19, 2024

@MrMuzyk I think we need for that because in nested navigation state, params will contain screen name

@ahmedGaber93 I don't think it matters anyway. All parts of this condition have to be true because of logical AND.

If it was the case that params would have different name but screen name stored in .name field of stateTopmostFullScreen and templateStateTopmostFullScreen were the same, the outcome would've been the same.

I still believe that checking only for name difference should be sufficient to navigate the user

     (stateTopmostFullScreen && 
         templateStateTopmostFullScreen && 
         stateTopmostFullScreen.name !== templateStateTopmostFullScreen.name && 
         !shallowCompare(stateTopmostFullScreen.params as Record<string, unknown> | undefined, templateStateTopmostFullScreen.params as Record<string, unknown> | undefined))

@ahmedGaber93
Copy link
Contributor

@MrMuzyk I think if we remove shallowCompare the diff state for the example below will ignore and ScreenC not open

const stateTopmostFullScreen = {
  name: 'ScreenA',
  params: {},
}

const templateStateTopmostFullScreen = {
  name: 'ScreenA',
  params: {
    screen: 'ScreenB',
    params: {
      screen: 'ScreenC',
    },
  },
}

@MrMuzyk
Copy link
Contributor

MrMuzyk commented Jun 19, 2024

I think it wouldn't open anyway because name properties are the same which would cause whole condition to return false regardless of what comes after

&& stateTopmostFullScreen.name !== templateStateTopmostFullScreen.name &&

@ahmedGaber93
Copy link
Contributor

ahmedGaber93 commented Jun 19, 2024

Yeah, that is correct, so I think the condition should be

  • if names are different, return true without check params
  • if names are the same, check the params
// stateTopmostFullScreen.name !== templateStateTopmostFullScreen.name && !shallowCompare
stateTopmostFullScreen.name !== templateStateTopmostFullScreen.name || !shallowCompare

What do you think?

@MrMuzyk
Copy link
Contributor

MrMuzyk commented Jun 19, 2024

Ahh I get it now 😅 I agree - if screen name can come inside params then it would make sense to change the condition like on the line above you've posted

@ahmedGaber93
Copy link
Contributor

I think this part of the code affected in many places. Could you please test it through the app and update your proposal?

@MrMuzyk
Copy link
Contributor

MrMuzyk commented Jun 19, 2024

Yes, will do!

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

melvin-bot bot commented Jun 19, 2024

📣 @ahmedGaber93 🎉 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

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jun 19, 2024
@MrMuzyk
Copy link
Contributor

MrMuzyk commented Jun 19, 2024

Opened a PR, tomorrow Im OOO. If anything comes up I will take care of this on friday

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 25, 2024
@melvin-bot melvin-bot bot changed the title [$250] Workspace - Unable to open Workspace setting when open member chat page [HOLD for payment 2024-07-02] [$250] Workspace - Unable to open Workspace setting when open member chat page Jun 25, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 25, 2024
Copy link

melvin-bot bot commented Jun 25, 2024

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

Copy link

melvin-bot bot commented Jun 25, 2024

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

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

Copy link

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

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

@ahmedGaber93
Copy link
Contributor

ahmedGaber93 commented Jul 2, 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:

Regression Test Proposal

  1. Go to Account setting > Workspaces > Create Workspace
  2. Go to Members > Invite member > Invite any email address
  3. Click on the invited member item to open Profile page then click on message user
  4. Go to Account setting > Workspaces again
  5. Click on any workspace to open its settings page and Verify it open successfully

Do we agree 👍 or 👎

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

Can you provide a bit more context on all the "N/As" in the checklist, please @ahmedGaber93?

@ahmedGaber93
Copy link
Contributor

@trjExpensify updated.

@trjExpensify
Copy link
Contributor

Cool, thanks. Paid!

@github-project-automation github-project-automation bot moved this from Polish to Done in [#whatsnext] #wave-collect Jul 3, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Jul 3, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-07-02] [$250] Workspace - Unable to open Workspace setting when open member chat page [HOLD for payment 2024-07-10] [HOLD for payment 2024-07-02] [$250] Workspace - Unable to open Workspace setting when open member chat page Jul 3, 2024
Copy link

melvin-bot bot commented Jul 3, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-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 2024-07-10. 🎊

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

Copy link

melvin-bot bot commented Jul 3, 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:

  • [@ahmedGaber93] The PR that introduced the bug has been identified. Link to the PR:
  • [@ahmedGaber93] 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:
  • [@ahmedGaber93] 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:
  • [@ahmedGaber93] Determine if we should create a regression test for this bug.
  • [@ahmedGaber93] 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.
  • [@trjExpensify] 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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
No open projects
Archived in project
Development

No branches or pull requests

5 participants