Skip to content

[HOLD for payment 2023-08-16] [$1000] Web - Deleted Workspace can be accessed after deleting a workspace offline #23355

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. Be offline
  2. Go to any workspace > click on the three dots > click on Admins room
  3. Go to the Details page by clicking on the Admin room header
  4. Go to the workspace by clicking on the workspace name below the #admin
  5. Delete the workspace by clicking on the three dots above
  6. By Click on the back button you will be taken to the archived #Admin room.
  7. Go to the workspace by clicking on the workspace name below the #admin(Archived)

Expected Result:

Can't access the deleted workspace

Actual Result:

Can access the deleted 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.43-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
Notes/Photos/Videos: Any additional supporting documentation

Test82._Offliceworkspaceaccess-1.mp4
Recording.3815.mp4

Expensify/Expensify Issue URL:
Issue reported by: https://expensify.slack.com/archives/C049HHMV9SM/p1689897130713649
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689897130713649

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011eef84994dda9118
  • Upwork Job ID: 1683499227112550400
  • Last Price Increase: 2023-07-31
  • Automatic offers:
    • fedirjh | Reviewer | 25908810

Activity

  1. added
    Daily
    Bug
    on Jul 21, 2023
  2. melvin-bot commented on Jul 21, 2023

    @melvin-bot

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

  3. melvin-bot commented on Jul 21, 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. samh-nl commented on Jul 21, 2023

    @samh-nl
    Contributor

    Proposal

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

    A workspace that has been deleted while offline can still be accessed.

    What is the root cause of that problem?

    In ReportDetailsPage, the workspace name remains clickable as isPolicyAdmin stays true when deleting a workspace while the user is offline.

    {isPolicyAdmin ? (
    <PressableWithoutFeedback
    accessibilityRole={CONST.ACCESSIBILITY_ROLE.BUTTON}
    accessibilityLabel={chatRoomSubtitle}
    onPress={() => {
    Navigation.navigate(ROUTES.getWorkspaceInitialRoute(props.report.policyID));
    }}
    >
    {chatRoomSubtitleText}
    </PressableWithoutFeedback>
    ) : (
    chatRoomSubtitleText
    )}

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

    Add an extra condition to {isPolicyAdmin ? ( to check if the workspace has not been optimistically deleted (i.e. pendingAction is delete), in which case we should not render the link, i.e. keep just the text.

    What alternative solutions did you explore? (Optional)

    Option 1. In PolicyUtils.isPolicyAdmin, return false if the workspace is optimistically deleted.
    Option 2. Remove the admin role of the user. However, this will remove the workspace from the workspaces list, which is undesired.

  5. added
    External
    on Jul 24, 2023
  6. changed the title [-]Web - Deleted Workspace can be accessed after deleting a workspace offline[/-] [+][$1000] Web - Deleted Workspace can be accessed after deleting a workspace offline[/+] on Jul 24, 2023
  7. melvin-bot commented on Jul 24, 2023

    @melvin-bot
  8. added
    Help Wanted
    on Jul 24, 2023
  9. melvin-bot commented on Jul 24, 2023

    @melvin-bot

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

  10. melvin-bot commented on Jul 24, 2023

    @melvin-bot

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

  11. rk111 commented on Jul 24, 2023

    @rk111

    Proposal

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

    The problem we are trying to solve is that a deleted workspace can still be accessed after the user deletes it while being offline. Even after successfully deleting the workspace, the user can still access it, which is unexpected behavior.

    What is the root cause of that problem?

    The root cause of this issue is related to the synchronization of the workspace deletion status when the user is offline. When the user deletes a workspace while offline, the deletion status is not immediately synchronized with the server. As a result, the client-side view may still show the deleted workspace as accessible.

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

    To solve the problem, we need to ensure that the deletion status of the workspace is accurately synchronized with the server, even when the user is offline. When the user attempts to delete a workspace while offline, the application should queue the deletion request and attempt to synchronize it with the server once the user is back online.
    When the synchronization process occurs, the server should receive the deletion request and process it accordingly. Upon successful deletion, the client-side view should update to reflect the updated workspace list without the deleted workspace. This ensures that the deleted workspace cannot be accessed after successful deletion, regardless of the user's online/offline status during the deletion process.

  12. 51 remaining items

  13. melvin-bot commented on Aug 9, 2023

    @melvin-bot

    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:

    • [@fedirjh] The PR that introduced the bug has been identified. Link to the PR:
    • [@fedirjh] 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:
    • [@fedirjh] 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:
    • [@fedirjh] Determine if we should create a regression test for this bug.
    • [@fedirjh] 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.
    • [@conorpendergrast / @kevinksullivan] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  14. kevinksullivan commented on Aug 15, 2023

    @kevinksullivan
    Contributor

    Set to make the payment tomorrow! @fedirjh can you finish out the steps above so we can pay out on time?

  15. conorpendergrast commented on Aug 16, 2023

    @conorpendergrast

    Ah, you're back! Unassigning myself now Kevin

  16. removed their assignment
    on Aug 16, 2023
  17. fedirjh commented on Aug 16, 2023

    @fedirjh
    Contributor

    BugZero Checklist:

  18. fedirjh commented on Aug 28, 2023

    @fedirjh
    Contributor

    cc @kevinksullivan this one is 2 weeks overdue

  19. daveSeife commented on Aug 29, 2023

    @daveSeife

    @kevinksullivan can you please add me as a Reporter?

  20. kevinksullivan commented on Aug 30, 2023

    @kevinksullivan
    Contributor

    Paid @fedirjh . @DanutGavrus @daveSeife just sent you both offers. Lmk when you accept!

  21. daveSeife commented on Aug 31, 2023

    @daveSeife

    @kevinksullivan accepted the offer. Thank you!

  22. DanutGavrus commented on Sep 1, 2023

    @DanutGavrus
    Contributor

    @kevinksullivan Offer accepted with updated price as to also include the bonus. Thank you!

  23. DanutGavrus commented on Sep 5, 2023

    @DanutGavrus
    Contributor

    Hi, @kevinksullivan! Offer is still in pending, if you have the time. Thanks!

  24. kevinksullivan commented on Sep 6, 2023

    @kevinksullivan
    Contributor

    all set

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

Metadata

Metadata

Labels

Awaiting PaymentBugExternalWeekly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions