Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$500] Flag - Flag message for flagged parent message disappears when reopening thread #34151

Closed
6 tasks done
lanitochka17 opened this issue Jan 9, 2024 · 23 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause

Comments

@lanitochka17
Copy link

lanitochka17 commented Jan 9, 2024

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.23-0
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:

Issue found when executing PR https://github.com/Expensify/App/pull/33676ithub.com/Expensify/App/

Action Performed:

  1. [User A] Send a message to User B
  2. [User B] Open the message in thread
  3. [User B] Send a reply in thread
  4. [User B] Flag the message as Intimidation
  5. [User B] Return to main chat
  6. [User B] Reopen the thread
    Note that

Expected Result:

The flag message for the flagged parent message does not disappear

Actual Result:

The flag message for the flagged parent message disappears

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6336764_1704811453379.20240109_211928.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ea3ffb8d539f6e86
  • Upwork Job ID: 1744738298135650304
  • Last Price Increase: 2024-01-16
  • Automatic offers:
    • situchan | Contributor | 28104518
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 9, 2024
@melvin-bot melvin-bot bot changed the title Flag - Flag message for flagged parent message disappears when reopening thread [$500] Flag - Flag message for flagged parent message disappears when reopening thread Jan 9, 2024
Copy link

melvin-bot bot commented Jan 9, 2024

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

Copy link

melvin-bot bot commented Jan 9, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 9, 2024
Copy link

melvin-bot bot commented Jan 9, 2024

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

@yh-0218
Copy link
Contributor

yh-0218 commented Jan 9, 2024

I think this is backend issue

@yh-0218
Copy link
Contributor

yh-0218 commented Jan 9, 2024

Proposal

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

Flag - Flag message for flagged parent message disappears when reopening thread

What is the root cause of that problem?

I think this is backend issue.
But we can fix on here easilly.

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

const latestDecision = lodashGet(props, ['action', 'message', 0, 'moderationDecision', 'decision'], '') || lodashGet(props, ['action', 'originalMessage', 'moderationDecision', 'decision'], '');

What alternative solutions did you explore? (Optional)

FREE.-.HDconvert.com.Screen.Recording.2024-01-09.at.8.15.33.PM.mov

@ikevin127
Copy link
Contributor

ikevin127 commented Jan 9, 2024

Proposal

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

The flag message for the flagged parent message disappears when reopening thread.

What is the root cause of that problem?

// Hide the message if it is being moderated for a higher offense, or is hidden by a moderator
// Removed messages should not be shown anyway and should not need this flow
const latestDecision = lodashGet(props, ['action', 'message', 0, 'moderationDecision', 'decision'], '');

In the line above, we're looking for the decision within action.message[0] but when re-fetching OpenReport the BE doesn't pass the decision in message like it does when first calling the flagging endpoint.

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

As fallback to the latestDecision from action.message[0] we should add latestDecisionOriginal which we get from the originalMessage object instead of action.message[0] where its missing.

POC looks something like this:

+   const latestDecisionOriginal = lodashGet(props, ['action', 'originalMessage', 0, 'moderationDecision', 'decision'], '');
    const latestDecision = lodashGet(
            props, ['action', 'message', 'moderationDecision', 'decision'],
+           latestDecisionOriginal
    );

What alternative solutions did you explore? (Optional)

A back-end only fix which would require the decision to be returned within action.message[0] such that we won't need the front-end originalMessage fallback.

Videos

MacOS: Chrome / Safari
Screen.Recording.2024-01-09.at.20.19.31.mov

Copy link

melvin-bot bot commented Jan 11, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Jan 11, 2024
@slafortune
Copy link
Contributor

@tylerkaraszewski do you agree that this is a backend issue but this fix would do the trick? #34151 (comment)

@melvin-bot melvin-bot bot added the Overdue label Jan 13, 2024
Copy link

melvin-bot bot commented Jan 15, 2024

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

Copy link

melvin-bot bot commented Jan 16, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@slafortune slafortune assigned situchan and unassigned eVoloshchak Jan 16, 2024
@melvin-bot melvin-bot bot removed Help Wanted Apply this label when an issue is open to proposals by contributors Overdue labels Jan 16, 2024
Copy link

melvin-bot bot commented Jan 16, 2024

📣 @situchan 🎉 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 📖

@situchan
Copy link
Contributor

Ideally, this should be fixed in backend.
Several weird bugs happening with this root cause. i.e. #28002 (comment)

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jan 18, 2024
@slafortune slafortune added Internal Requires API changes or must be handled by Expensify staff retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause and removed External Added to denote the issue can be worked on by a contributor labels Jan 22, 2024
Copy link

melvin-bot bot commented Jan 22, 2024

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

@slafortune
Copy link
Contributor

Thanks @situchan I'll change this to internal and the retest label to check on this and see if it get's resolved with the other mentioned GH.

@melvin-bot melvin-bot bot removed the Overdue label Jan 22, 2024
@dangrous
Copy link
Contributor

I don't think this is going to be resolved with the other GH, unfortunately - it's just posing some issues with testing haha. Hopefully we can solve this internally!

@situchan
Copy link
Contributor

Haha yes.
@tylerkaraszewski @dangrous one of you please check internally?

@melvin-bot melvin-bot bot added the Overdue label Jan 29, 2024
Copy link

melvin-bot bot commented Jan 30, 2024

@tylerkaraszewski @slafortune @situchan 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!

@tylerkaraszewski
Copy link
Contributor

@dangrous - what do you think we should do with this issue?

@dangrous
Copy link
Contributor

I think we're probably deprioritizing moderation bugs? It's not currently covered by a wave, as far as I know. Can you think of one where it might fit? I can add this to a list I have of moderation bugs so we can come back to it at some point

@situchan
Copy link
Contributor

Btw please keep me assigned here in case frontend fix is needed

@slafortune
Copy link
Contributor

Works for me @dangrous ! I'll assign @situchan so if this is opened again that will still be the assignment and close for now.

@kbecciv
Copy link

kbecciv commented Feb 6, 2024

Issue is reproduced on build 1.4.37.0 when executing PR #28002

20240206_185900.mp4

@dangrous
Copy link
Contributor

dangrous commented Feb 7, 2024

Just marking this out - we are aware that this bug still exists, but not prioritizing as of now, so re-closing!

@dangrous dangrous closed this as completed Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause
Projects
None yet
Development

No branches or pull requests

9 participants