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.55k stars 2.89k forks source link

MEDIUM: [$500] After leaving a workspace room, the room is still in the chat view after closing the Concierge chat #33521

Closed m-natarajan closed 9 months ago

m-natarajan commented 10 months 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!


Version Number: 1.4.16-3 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 Expensify/Expensify Issue URL: Issue reported by: @marcochavezf Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1703192168381059

Action Performed:

  1. Log in as account A and create a workspace
  2. Create a room in the workspace with welcome message and visibility as "Workspace"
  3. Invite account B as a member of the workspace created in step 1
  4. Invite the same email/phone number to the workspace room by either mentioning them in the room or in the member list
  5. In a mobile device log in with the invited account
  6. Open the workspace room
  7. Click/tap on the three dots menu
  8. Select the option Leave and the workspace room will be still there

Expected Result:

You will see the Concierge chat and when you close it, you should not see the workspace room

Actual Result:

If you close it and the workspace room will be still there

Workaround:

unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/38435837/fcf249f1-6217-41cb-9948-9d070eb3d5a8

https://github.com/Expensify/App/assets/38435837/810fb46b-d71b-4cb7-bf2e-4393b4192e5a

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011ad515ee3bf6c0e8
  • Upwork Job ID: 1738283285298159616
  • Last Price Increase: 2023-12-22
  • Automatic offers:
    • hoangzinh | Reviewer | 28071460
    • dukenv0307 | Contributor | 28071461
melvin-bot[bot] commented 10 months ago

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

melvin-bot[bot] commented 10 months ago

Bug0 Triage Checklist (Main S/O)

melvin-bot[bot] commented 10 months ago

Job added to Upwork: https://www.upwork.com/jobs/~011ad515ee3bf6c0e8

melvin-bot[bot] commented 10 months ago

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

FitseTLT commented 10 months ago

Proposal

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

After leaving a workspace room, the room is still in the chat view after closing the Concierge chat

What is the root cause of that problem?

Currently we are navigating to concierge chat when we leave room here https://github.com/Expensify/App/blob/862b0eac87e969e3c15d2ccde165600a6e40e8fb/src/libs/actions/Report.ts#L2110-L2115 but the route for the room is still in navigation state so when we navigate back it will navigate to it

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

We need to delete the room route from the navigation state route so that when we navigate back it will not navigate to it by navigate with action type REPLACE

What alternative solutions did you explore? (Optional)

dukenv0307 commented 10 months ago

Proposal

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

If you close it and the workspace room will be still there

What is the root cause of that problem?

In here, we're just pushing the Concierge route onto the current route, so when coming back from Concierge, it will come back to the room.

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

In here, we should call Navigation.goBack to pop the current route first before navigating to Concierge.

Navigation.goBack(ROUTES.HOME);
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(chat.reportID));

This is the same approach as we did here for other cases of navigating to Concierge from the report screen due to leaving room, leaving thread, ... so I prefer it.

What alternative solutions did you explore? (Optional)

We can call navigate here with FORCED_UP navigation type

Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(chat.reportID), CONST.NAVIGATION.TYPE.FORCED_UP);

Only FORCED_UP will work, UP as suggested in the above proposal will not work for case of navigating to another report, as expected here (then after I posted my proposal, that proposal was modified to change to navigate with action type REPLACE, this can be validated by checking the proposal edit timeline)

hoangzinh commented 10 months ago

@FitseTLT @dukenv0307 Thanks for your proposals. The main proposal from @dukenv0307 looks good to me. If I recall correctly, it's the current recommended way to pop out the current route.

Link to @dukenv0307's proposal: https://github.com/Expensify/App/issues/33521#issuecomment-1868033113 πŸŽ€πŸ‘€πŸŽ€ C+ reviewed

melvin-bot[bot] commented 10 months ago

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

FitseTLT commented 10 months ago

BTW did u guys reproduce the issue? I Couldn't!!

dukenv0307 commented 10 months ago

I still reproduce this issue

https://github.com/Expensify/App/assets/129500732/1251a83e-c909-4d4a-8f66-95149b747b28

melvin-bot[bot] commented 10 months ago

πŸ“£ @hoangzinh πŸŽ‰ 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[bot] commented 10 months ago

πŸ“£ @dukenv0307 πŸŽ‰ An offer has been automatically sent to your Upwork account for the Contributor role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link 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 πŸ“–

dukenv0307 commented 10 months ago

@hoangzinh this PR is ready for review

isabelastisser commented 9 months ago

@dukenv0307 @hoangzinh any updates here?

dukenv0307 commented 9 months ago

@isabelastisser The PR is deployed to production more than a week ago but bot doesn't update

quinthar commented 9 months ago

Has this been paid? Can we close this issue?

isabelastisser commented 9 months ago

Payment summary:

@dukenv0307 Contributor $500 paid in Upwork. @hoangzinh C+ $500 offer sent in Upwork. Please accept it, and I will process the payment. Thanks!

hoangzinh commented 9 months ago

Accepted. Thanks @isabelastisser