Skip to content

[$1000] Web - 'Notify me' option doesn't update on Unavailable workspace #21859

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to staging dot on web chrome and login with User A
  2. Create a new workspace and invite User B and click on the announce channel
  3. Login with User B on another web chrome and go to the announce channel
  4. Important step- Now close the browser for User B
  5. From User A, remove the User B from the workspace (members > remove User B)
  6. On user B, open the browser again so that User B is able to see 'Unavailable Workspace' on announce.
  7. From user B, go to 'Unavailable workspace' header and click on 'Notify me about messages' and try to select different options from there.
  8. Notice that even if you select other options, it switches back to the default option - Daily

Expected Result:

If settings can't be changed for unavailable workspace, we can either not show settings OR if we decide to show settings, then it should be updated if the user selects different options

Actual Result:

'Notify me' option doesn't update on the Unavailable workspace

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.33-4
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

Recording.3305.mp4
green-2023-06-28_11.41.43.mp4

Expensify/Expensify Issue URL:
Issue reported by: @priya-zha
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1687932409885299

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c0766bb586cb325f
  • Upwork Job ID: 1677141743908093952
  • Last Price Increase: 2023-07-07

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 29, 2023
  2. melvin-bot commented on Jun 29, 2023

    @melvin-bot

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

  3. melvin-bot commented on Jun 29, 2023

    @melvin-bot

    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
  4. StevenKKC commented on Jun 29, 2023

    @StevenKKC
    Contributor

    Proposal

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

    'Notify me' option doesn't update on Unavailable workspace.

    What is the root cause of that problem?

    Once a user is removed from a workspace, he cannot update workspace notification settings, and the server will respond "Report no longer exists".
    App does not check to see if the workspace is available, and the UI does not reflect the server's response.

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

    The workspace details page can be blocked from being accessed by the removed user.
    We can add a utility function ReportUtils.isAvailableWorkspace that checks if a workspace is available.

    And in this line, we can check whether workspace is available using a utility function.

    What alternative solutions did you explore? (Optional)

    None.

  5. hungvu193 commented on Jun 29, 2023

    @hungvu193
    Contributor

    Proposal

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

    Web - 'Notify me' option doesn't update on Unavailable workspace

    What is the root cause of that problem?

    We still receive information from a room that we aren't member from backend. This because if user didn't open the app when they didn't receive pusher event to remove announce report from their end.

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

    In this case, we can update our canSeeDefaultRoom in here because it's used to filter our report in SidebarLinks also the current report to display

     const policy = allPolicies[`${ONYXKEYS.COLLECTION.POLICY}${report.policyID}`];
      // place this below isDomainRoom
        if (isChatRoom(report) && !policy) {
            return false;
        }

    What alternative solutions did you explore? (Optional)

    N/A

  6. melvin-bot commented on Jul 4, 2023

    @melvin-bot

    @adelekennedy Eep! 4 days overdue now. Issues have feelings too...

  7. melvin-bot commented on Jul 6, 2023

    @melvin-bot

    @adelekennedy 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  8. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jul 7, 2023
  9. changed the title [-]Web - 'Notify me' option doesn't update on Unavailable workspace[/-] [+][$1000] Web - 'Notify me' option doesn't update on Unavailable workspace[/+] on Jul 7, 2023
  10. melvin-bot commented on Jul 7, 2023

    @melvin-bot
  11. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jul 7, 2023
  12. melvin-bot commented on Jul 7, 2023

    @melvin-bot

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

  13. 9 remaining items

  14. tienifr commented on Jul 10, 2023

    @tienifr
    Contributor

    @sobitneupane I think we also need the front-end fix (2) mentioned in the proposal as well for existing users and also to prevent such issues occurring in the future.

    What do you think?

  15. melvin-bot commented on Jul 10, 2023

    @melvin-bot

    Triggered auto assignment to @NikkiWines (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

  16. adelekennedy commented on Jul 10, 2023

    @adelekennedy
    Contributor

    @NikkiWines question above - can thi be fixed on the backend as suggested here?

  17. adelekennedy commented on Jul 11, 2023

    @adelekennedy
    Contributor

    Let's refocus this - after reproducing I don't think this is a true bug, when we remove someone from the workspace it doesn't matter that they can't update settings. I also wasn't able to reproduce the bug for re-added members 🤷‍♀️

    I think we should actually close this as we're getting into backend fixes for something pretty insubstantial @NikkiWines @sobitneupane for thoughts

  18. NikkiWines commented on Jul 12, 2023

    @NikkiWines
    Contributor

    Yep, agreed - not saving user notification preferences for a workspace they don't have access to any longer sounds like expected behavior to me

  19. sobitneupane commented on Jul 12, 2023

    @sobitneupane
    Contributor

    IMO, those rooms from where user is removed should not be shown at all. It was the behavior previously and even now if user is removed when he/she is online, those rooms are not visible to the removed user.

    According to @tienifr (#21859 (comment))

    This problem doesn't happen before, that's because earlier the OpenApp API is called whenever we load the page again. This will populate all the policies and reports data, and will not show stale data.

    However, after #18807, we no longer call OpenApp on page load for performance reason (because OpenApp fetches all the data so it's slow), we only call ReconnectApp if the user was already logged in before.

    After the user is removed from the workspace and the user loads the page, the ReconnectApp only sends back "set workspace to null", not "set reports and reportActions related to this workspace to null" (as the Pusher will send if the user opens the app at the time).

  20. NikkiWines commented on Jul 12, 2023

    @NikkiWines
    Contributor

    If it's a regression from previous behavior (i.e. we used to not show the rooms but now we do) that sounds like an issue, and should be reported separately if it hasn't been already. But I don't think this issue as it was reported is a real bug

  21. adelekennedy commented on Jul 13, 2023

    @adelekennedy
    Contributor

    Agree - I think we should open a separate issue and deal with the regression!

  22. melvin-bot commented on Jul 13, 2023

    @melvin-bot

    @NikkiWines @sobitneupane @adelekennedy 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!

  23. NikkiWines commented on Jul 13, 2023

    @NikkiWines
    Contributor

    Cool, in that case, I'm going to close this out. Thanks everyone 🙇

  24. tienifr commented on Jul 14, 2023

    @tienifr
    Contributor

    @NikkiWines @adelekennedy do you think we should modify the OP of this issue to reflect the correct behavior (not show the rooms) rather than create another issue for that?

  25. NikkiWines commented on Jul 14, 2023

    @NikkiWines
    Contributor

    @tienifr I personally think it should be a separately reported issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions