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

[HOLD for payment 2023-08-08][$1000] Dev: Web - Thread report header displays no data & composer is hidden when clicking 'Reply in thread' icon while in offline mode #23646

Closed
1 of 6 tasks
kbecciv opened this issue Jul 26, 2023 · 23 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Jul 26, 2023

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


Action Performed:

  1. Open an existing chat
  2. Send message
  3. Open dev tools & apply 'offline' network mode
  4. Hover over the sent message & click on 'Reply in thread' icon

Expected Result:

Thread header should display the threaded message & 'from' link, and composer should be visible

Actual Result:

Thread header doesn't display the threaded message & 'from' link, and composer is not visible

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: Dev 1.3.45-8
Reproducible in staging?: no
Reproducible in production?: no
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

Screencast.from.2023-07-26.15-38-10.mp4

Expensify/Expensify Issue URL:
Issue reported by: @Natnael-Guchima
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690375363052749
https://expensify.slack.com/archives/C049HHMV9SM/p1690461910613649 (Similar bug)
View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0172d7253f196dfea5
  • Upwork Job ID: 1684725080240574464
  • 2023-07-28
  • Automatic offers:
    • Natnael-guchima | Reporter | 25809101
@kbecciv kbecciv added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Jul 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 26, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 26, 2023

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

@StevenKKC
Copy link
Contributor

StevenKKC commented Jul 26, 2023

Proposal

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

Thread report header displays no data & composer is hidden when clicking 'Reply in thread' icon while in offline mode.

What is the root cause of that problem?

When reply in thread while in offline mode, ReportUtils.buildOptimisticChatReport is called.

const newChat = ReportUtils.buildOptimisticChatReport(
participantAccountIDs,
lodashGet(parentReportAction, ['message', 0, 'text']),
lodashGet(parentReport, 'chatType', ''),
lodashGet(parentReport, 'policyID', CONST.POLICY.OWNER_EMAIL_FAKE),
CONST.POLICY.OWNER_ACCOUNT_ID_FAKE,
false,
'',
undefined,
CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS,
parentReportAction.reportActionID,
parentReportID,
);

We pass CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS to ReportUtils.buildOptimisticChatReport writeCapability parameter.
So report.writeCapability is set to always, but this value should be one of all, admins.
writeCapability: PropTypes.oneOf(_.values(CONST.REPORT.WRITE_CAPABILITIES)),

Therefore, the error is occured, and report is not fully displayed.

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

We should pass proper value to ReportUtils.buildOptimisticChatReport as below.

    const newChat = ReportUtils.buildOptimisticChatReport(
        participantAccountIDs,
        lodashGet(parentReportAction, ['message', 0, 'text']),
        lodashGet(parentReport, 'chatType', ''),
        lodashGet(parentReport, 'policyID', CONST.POLICY.OWNER_EMAIL_FAKE),
        CONST.POLICY.OWNER_ACCOUNT_ID_FAKE,
        false,
        '',
        undefined,
+       CONST.REPORT.WRITE_CAPABILITIES.ALL,
        CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS,
        parentReportAction.reportActionID,
        parentReportID,
    );

What alternative solutions did you explore? (Optional)

None.

@zanyrenney
Copy link
Contributor

I don't have a Dev environment, assigning eng to help with that step!

@melvin-bot
Copy link

melvin-bot bot commented Jul 27, 2023

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

@bondydaa
Copy link
Contributor

hmm i don't understand, contributors don't have expensify vms either so I think what they mean is this is in main not on staging or production yet.

@bondydaa bondydaa added External Added to denote the issue can be worked on by a contributor and removed Engineering labels Jul 28, 2023
@melvin-bot melvin-bot bot changed the title Dev: Web - Thread report header displays no data & composer is hidden when clicking 'Reply in thread' icon while in offline mode [$1000] Dev: Web - Thread report header displays no data & composer is hidden when clicking 'Reply in thread' icon while in offline mode Jul 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 28, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0172d7253f196dfea5

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 28, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 28, 2023

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

@dukenv0307
Copy link
Contributor

I think this issue is a regression from this PR #21950

@Pujan92
Copy link
Contributor

Pujan92 commented Jul 28, 2023

Seems 3 places we need to correct #23638 (comment)

@rezkiy37
Copy link
Contributor

Hi, I’m Michael (Mykhailo) from Callstack and I would like to work in this issue, because I am the author of the broken PR.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 28, 2023

📣 @mananjadhav Please request via NewDot manual requests for the Reviewer role ($1000)

@melvin-bot
Copy link

melvin-bot bot commented Jul 28, 2023

📣 @Natnael-Guchima 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@amyevans
Copy link
Contributor

As @rezkiy37 mentioned this is a regression from #21456 so self-assigning

@Natnael-Guchima
Copy link

Accepted the offer. Thanks

@rezkiy37
Copy link
Contributor

rezkiy37 commented Aug 4, 2023

#23919 was merged. Is the issue going to be closed?

@amyevans
Copy link
Contributor

amyevans commented Aug 4, 2023

Yeah I think we're okay to close. Typically we wait a week after deploy to prod before closing, but that's to handle payments, and I think since the bug reporter accepted the offer and no one else is due payment, we can close now.

@amyevans amyevans closed this as completed Aug 4, 2023
@Natnael-Guchima
Copy link

@amyevans an offer was sent to me & it is not settled yet #23646 (comment)

@amyevans
Copy link
Contributor

amyevans commented Aug 4, 2023

Okay my bad 😅, thanks for pointing it out. Reopening so that @zanyrenney can handle that part.

@amyevans amyevans reopened this Aug 4, 2023
@Natnael-Guchima
Copy link

No worries 😁

@amyevans amyevans changed the title [$1000] Dev: Web - Thread report header displays no data & composer is hidden when clicking 'Reply in thread' icon while in offline mode [HOLD for payment 2023-08-08][$1000] Dev: Web - Thread report header displays no data & composer is hidden when clicking 'Reply in thread' icon while in offline mode Aug 7, 2023
@amyevans amyevans added Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 and removed Needs Reproduction Reproducible steps needed Reviewing Has a PR in review Weekly KSv2 labels Aug 7, 2023
@mananjadhav
Copy link
Collaborator

@zanyrenney Did you get a chance to look at this? Once @Natnael-Guchima is paid, we can close this one out.

@melvin-bot melvin-bot bot added the Overdue label Aug 14, 2023
@zanyrenney
Copy link
Contributor

This is paid! Closing:
2023-08-14_12-02-34

@melvin-bot melvin-bot bot removed the Overdue label Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

10 participants