Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.56k stars 2.9k forks source link

[HOLD for payment 2023-11-21][$1000] Offline - Create task in a room with admin only #22608

Closed kavimuru closed 11 months ago

kavimuru commented 1 year ago

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. Login to two accounts, Alice and Bob, in two separate browser tabs.
  2. Alice creates a workspace and invites Bob as a non-Admin member.
  3. Bob goes to the #announce room for the new workspace.
  4. Bob goes offline.
  5. Alice goes to the #announce room for the new workspace, opens room settings, and under Who can post, sets Admins only.
  6. Since Bob is offline, he does not receive an update that the room has become read-only for non-admins. Therefore, he can still attempt to create a task offline in the #announce room.

Expected result

When Bob comes back online, the task should appear "greyed out" with a "red brick road" error. Any actions Bob attempted to take on that task (such as leaving a reaction), should fail.

Actual Result:

The task appears to have been completed normally for Bob, unless he tries to create a thread with that task as the root, in which case he'll see a 404 page.

Workaround:

Don't do that, Bob!

Platforms:

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

Version Number: 1.3.39-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

https://github.com/Expensify/App/assets/43996225/1983e5a9-e67b-4a0f-9736-7fbea6a98fa5

https://github.com/Expensify/App/assets/43996225/7e1602b3-b70a-43ce-9722-c66a23fd0a93

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01afb147c594f572e5
  • Upwork Job ID: 1679478215688933376
  • Last Price Increase: 2023-07-13
  • Automatic offers:
    • namhihi237 | Contributor | 26516237
    • namhihi237 | Reporter | 26516238
melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

Bug0 Triage Checklist (Main S/O)

kavimuru commented 1 year ago

Proposal

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

The task should not be displayed in user B if creation fails or gives an error when back online with room setting admins only

What is the root cause of that problem?

When the user creates a task when offline optimisticData is saved in Onyx with reportAction create a task. But after API returns data with an error after back online, failureData doesn't update the error for this reportAction to explain why the user cannot create a task.

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

thienlnam commented 1 year ago

We should also remove the admins only room from the selector if you are not an admin

namhihi237 commented 1 year ago

We should also remove the admins only room from the selector if you are not an admin

@thienlnam I am not clear what you mean, you mean if the user in the room is not an admin then we will remove 'admins only' from the selector

thienlnam commented 1 year ago

Oh I see, the task was created by going offline and not getting the update that it's an admin only room. Nvm in that case

thienlnam commented 1 year ago

Let's also address the split bill case in this issue https://expensify.slack.com/archives/C049HHMV9SM/p1689011065028709

EDIT: Split bill case needs some BE updates so we're splitting them into a seperate issue

melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

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

isabelastisser commented 1 year ago

Not overdue!

parasharrajat commented 1 year ago

QA posted a solution above ✨ ✨ ✨ ✨ .....QA's proposal looks to good to me... . . . . . . . . . . . . . . . . .

Just Kidding.

@namhihi237' proposal looks good to me. @thienlnam I am not the expert for optimistic actions but is the proposal expected behaviour?

:ribbon: :eyes: :ribbon: C+ reviewed

melvin-bot[bot] commented 1 year ago

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

thienlnam commented 1 year ago

Hmm, we should be displaying an error in the reportAction - but maybe this should be set via pusher in the back-end

namhihi237 commented 1 year ago

@thienlnam If we use messages from the backend I think need to Backend return the message in reportActions , currently it's missing. Screenshot 2023-07-14 at 10 47 28

thienlnam commented 1 year ago

Yeah I'm aware, this will likely have to be an internal issue

melvin-bot[bot] commented 1 year ago

Current assignee @parasharrajat is eligible for the Internal assigner, not assigning anyone new.

melvin-bot[bot] commented 1 year ago

@Gonals, @parasharrajat, @isabelastisser Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

isabelastisser commented 1 year ago

Not overdue, internal.

isabelastisser commented 1 year ago

@parasharrajat @Gonals is someone currently working on this?

Gonals commented 1 year ago

Not right now. I haven't been able to start on this yet. Hopefully in a day or two

melvin-bot[bot] commented 1 year ago

@Gonals @parasharrajat @isabelastisser this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

isabelastisser commented 1 year ago

No updates. This is an internal issue that @Gonals will work on in the next few days.

melvin-bot[bot] commented 1 year ago

@Gonals, @parasharrajat, @isabelastisser Eep! 4 days overdue now. Issues have feelings too...

isabelastisser commented 1 year ago

Any updates @Gonals ?

melvin-bot[bot] commented 1 year ago

@Gonals @parasharrajat @isabelastisser this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

Gonals commented 1 year ago

Starting on this today! I'll have something ready tomorrow!

Gonals commented 1 year ago

Starting on this today! I'll have something ready tomorrow!

I lied. W4 is going to take over my day once again 😅

isabelastisser commented 1 year ago

Internal, no progress yet.

Gonals commented 1 year ago

I'm going OOO tomorrow, so you may want to gran another engineer! Otherwise, I'll jump into it when I'm back (after a week)

melvin-bot[bot] commented 1 year ago

@Gonals @parasharrajat @isabelastisser this issue is now 4 weeks old and preventing us from maintaining WAQ. This should now be your highest priority. Please post below what your plan is to get a PR in review ASAP. Thanks!

isabelastisser commented 1 year ago

@Gonals is on parental leave, so I will re-apply the engineering label now.

melvin-bot[bot] commented 1 year ago

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

roryabraham commented 1 year ago

In my opinion the reproduction steps are not clear. I will start by writing clearer reproduction steps here.

roryabraham commented 1 year ago

We should also remove the admins only room from the selector if you are not an admin

Also @thienlnam I think this setting means "only admins can comment", not "only admins can view".

thienlnam commented 1 year ago

I agree, though I more meant you shouldn't be able to share to an 'only admins can comment' room if you aren't an admin. Though I think this part might be fixed with our recent share selector changes

isabelastisser commented 1 year ago

Not overdue, internal.

isabelastisser commented 1 year ago

Not overdue, internal.

melvin-bot[bot] commented 1 year ago

@parasharrajat, @isabelastisser, @roryabraham Whoops! This issue is 2 days overdue. Let's get this updated quick!

isabelastisser commented 1 year ago

@roryabraham @thienlnam, any updates here?

thienlnam commented 1 year ago

Let's see if we can reproduce this - this might have already been resolved in a different PR

isabelastisser commented 1 year ago

Hey @parasharrajat, can you still reproduce it?

namhihi237 commented 1 year ago

@isabelastisser Issue still can reproduce

melvin-bot[bot] commented 1 year ago

@parasharrajat, @thienlnam, @isabelastisser Huh... This is 4 days overdue. Who can take care of this?

isabelastisser commented 1 year ago

@parasharrajat, thanks for confirming!

Hey @thienlnam, the issue is still reproducible; what are the next steps here?

thienlnam commented 1 year ago

@namhihi237 Does the task get created successfully? Or does it just error out

Because this should be blocked on the BE from happening

namhihi237 commented 1 year ago

@thienlnam Currently backend response error but in FE we can see the task created success because the backend missing reportActions error. As my proposal mentioned.

thienlnam commented 1 year ago

Yeah that looks like some good QOL improvement we can do - going to assign a C+ here

melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

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