App icon indicating copy to clipboard operation
App copied to clipboard

[$500] Thread - Share code in thread disappears after replying in thread

Open lanitochka17 opened this issue 2 years ago β€’ 16 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.26-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: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:

Action Performed:

  1. [User A] Create a group chat with User B and C
  2. [User A] Send a message in group chat
  3. [User B] Open the message in thread
  4. [User B] Click on the header and note that "Share code" is present
  5. [User B] Reply in thread and return to main chat
  6. [User B] Revisit the thread > Click chat header

Expected Result:

Share code still remains in the menu

Actual Result:

Share code option is gone

Workaround:

Unknown

Platforms:

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

  • [x] Android: Native
  • [x] Android: mWeb Chrome
  • [x] iOS: Native
  • [x] iOS: mWeb Safari
  • [x] MacOS: Chrome / Safari
  • [x] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/1b6a23fa-a8ca-4fb5-b02d-15fe243ad427

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0142289a10bfb44477
  • Upwork Job ID: 1747644089518665728
  • Last Price Increase: 2024-01-31

lanitochka17 avatar Jan 17 '24 15:01 lanitochka17

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

melvin-bot[bot] avatar Jan 17 '24 15:01 melvin-bot[bot]

Job added to Upwork: https://www.upwork.com/jobs/~0142289a10bfb44477

melvin-bot[bot] avatar Jan 17 '24 15:01 melvin-bot[bot]

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

melvin-bot[bot] avatar Jan 17 '24 15:01 melvin-bot[bot]

Proposal

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

Share code option is gone

What is the root cause of that problem?

We display share code option base on isGroupDMChat condition

https://github.com/Expensify/App/blob/3033f999751cf51e89727aa6993a05b298710023/src/pages/ReportDetailsPage.js#L94

When a user reply in the thread, the participant now is only one and after this user send a message in this report the participant isn't updated. So in these case, the share code option is still present

https://github.com/Expensify/App/blob/3033f999751cf51e89727aa6993a05b298710023/src/pages/ReportDetailsPage.js#L78

After we re-visit this the thread again, the thread participant now is updated by OpenReport API so the share code option is hidden.

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

  1. In add comment action or create task action we should update the participant of the report in optimistic data
  2. We should confirm the expected about the share code option.
  • If we don't want to show this option for all of DM chat, we can add isThread condition here
!isThread && !isGroupDMChat

https://github.com/Expensify/App/blob/3033f999751cf51e89727aa6993a05b298710023/src/pages/ReportDetailsPage.js#L78

  • If we want to show share code option for thread we can update this condition to
isThread || !isGroupDMChat

https://github.com/Expensify/App/blob/3033f999751cf51e89727aa6993a05b298710023/src/pages/ReportDetailsPage.js#L78

What alternative solutions did you explore? (Optional)

NA

dukenv0307 avatar Jan 17 '24 16:01 dukenv0307

Proposal

Please re-state the problem

Share code option is gone for thread after some time

What is the root cause of the problem?

https://github.com/Expensify/App/blob/3033f999751cf51e89727aa6993a05b298710023/src/pages/ReportDetailsPage.js#L78 The root cause is that we consider a thread chat as DM and we don't allow DMs to have a shareCode functionality. https://github.com/Expensify/App/blob/3033f999751cf51e89727aa6993a05b298710023/src/pages/ReportDetailsPage.js#L94-L96

What changes should be made to fix this?

We should modify ReportUtils.isDM() to include && !isThread(report), so that threads are not considered as DMs and shareCode functionality is allowed. https://github.com/Expensify/App/blob/4097c00a9c093253d62b3785da9f87cc4d2e8e46/src/libs/ReportUtils.ts#L823-L825

esh-g avatar Jan 17 '24 16:01 esh-g

Checking on expected behaviour here https://expensify.slack.com/archives/C01GTK53T8Q/p1705523841571389

mallenexpensify avatar Jan 17 '24 20:01 mallenexpensify

πŸ‘» from last post so checking again https://expensify.slack.com/archives/C01GTK53T8Q/p1706060712070839?thread_ts=1705523841.571389&cid=C01GTK53T8Q

@thesahindia have you heard/seen anything about expected behaviour for where the share code is supposed to show?

mallenexpensify avatar Jan 24 '24 01:01 mallenexpensify

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] avatar Jan 24 '24 16:01 melvin-bot[bot]

@thesahindia have you heard/seen anything about expected behaviour for where the share code is supposed to show?

Nope but I believe we should have the share code feature for threads because it's pretty common to share the links of past threads

thesahindia avatar Jan 25 '24 11:01 thesahindia

@mallenexpensify, @thesahindia Huh... This is 4 days overdue. Who can take care of this?

melvin-bot[bot] avatar Jan 30 '24 15:01 melvin-bot[bot]

Thanks @thesahindia , checking internally since I still haven't got any feedback https://expensify.slack.com/archives/C066HJM2CAZ/p1706665973968639

mallenexpensify avatar Jan 31 '24 01:01 mallenexpensify

@mallenexpensify @thesahindia 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!

melvin-bot[bot] avatar Jan 31 '24 15:01 melvin-bot[bot]

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] avatar Jan 31 '24 16:01 melvin-bot[bot]

Still πŸ‘» on my post, going to give it another day or so

mallenexpensify avatar Feb 02 '24 01:02 mallenexpensify

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

melvin-bot[bot] avatar Feb 05 '24 15:02 melvin-bot[bot]

Still unsure what to do here, gonna keep thinking about and leave a daily

mallenexpensify avatar Feb 07 '24 00:02 mallenexpensify

@mallenexpensify @thesahindia this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

melvin-bot[bot] avatar Feb 07 '24 15:02 melvin-bot[bot]

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] avatar Feb 07 '24 16:02 melvin-bot[bot]

Asking in #product now https://expensify.slack.com/archives/C03U7DCU4/p1707328869117839

mallenexpensify avatar Feb 07 '24 18:02 mallenexpensify

@mallenexpensify, @thesahindia Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] avatar Feb 13 '24 15:02 melvin-bot[bot]

Weird, I thought I commented here (I think I created an SO with the deets).

From Mills in the link above.

  • Threads always have distinct permissions from the parent, so they should have a share code.

Also.. for reference:

  • All DMs do not have a share code, and it’s not possible to join them after creation.
  • Further Group DMs are being deprecated soon in favor of Group chats, which will have a share code.
  • It doesn’t show for 1:1 DMs or group chats but it does show for threads in both DMs and group chats. So all in all, everything that is described above is by design.

@thesahindia can you review the proposal above?

mallenexpensify avatar Feb 13 '24 23:02 mallenexpensify

@mallenexpensify @thesahindia this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:

  • Decide whether any proposals currently meet our guidelines and can be approved as-is today
  • If no proposals meet that standard, please take this issue internal and treat it as one of your highest priorities
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

melvin-bot[bot] avatar Feb 14 '24 15:02 melvin-bot[bot]

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

melvin-bot[bot] avatar Feb 14 '24 15:02 melvin-bot[bot]

@esh-g's proposal looks good to me!

πŸŽ€ πŸ‘€ πŸŽ€ C+ reviewed

thesahindia avatar Feb 17 '24 09:02 thesahindia

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

melvin-bot[bot] avatar Feb 17 '24 09:02 melvin-bot[bot]

@madmax330 please review the proposal above. If it isn't accepted I can open up the issue to External contributors again.

mallenexpensify avatar Feb 18 '24 20:02 mallenexpensify

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

melvin-bot[bot] avatar Feb 21 '24 12:02 melvin-bot[bot]

πŸ“£ @esh-g πŸŽ‰ 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 πŸ“–

melvin-bot[bot] avatar Feb 21 '24 12:02 melvin-bot[bot]

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

melvin-bot[bot] avatar Mar 12 '24 20:03 melvin-bot[bot]

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

melvin-bot[bot] avatar Mar 13 '24 19:03 melvin-bot[bot]