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] Workspace - Some of the new worspace chats name is "Chat Report" #39340

Closed
1 of 6 tasks
m-natarajan opened this issue Mar 31, 2024 · 48 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Help Wanted Apply this label when an issue is open to proposals by contributors Internal Requires API changes or must be handled by Expensify staff

Comments

@m-natarajan
Copy link

m-natarajan commented Mar 31, 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.58-2
Reproducible in staging?: y
Reproducible in production?: n
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. Log in with a new expensifail account
  2. Create a workspace
  3. Invite 3 new expensifail members who doesn't have expensify account yet
  4. Navigate to the LHN
  5. Click on any WS chats named "Chat Report"

Expected Result:

Workspace chat name should appear with member name

Actual Result:

Some of the new worspace chats name is "Chat Report". It changes back if you click on it.

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

Bug6433449_1711905664988.bandicam_2024-03-31_19-13-09-337.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01de6cc9a1328c3268
  • Upwork Job ID: 1774955282860523520
  • Last Price Increase: 2024-04-02
@m-natarajan m-natarajan added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 31, 2024
Copy link

melvin-bot bot commented Mar 31, 2024

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

Copy link

melvin-bot bot commented Mar 31, 2024

Triggered auto assignment to @yuwenmemon (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Mar 31, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@yuwenmemon
Copy link
Contributor

Screenshot 2024-04-01 at 4 56 42 PM

They also show up has Hidden in the workspace

@yuwenmemon
Copy link
Contributor

yuwenmemon commented Apr 2, 2024

Seems like we're somehow not properly falling back on the email on staging. Definitely seems like a candidate for external.

@yuwenmemon yuwenmemon added the External Added to denote the issue can be worked on by a contributor label Apr 2, 2024
@melvin-bot melvin-bot bot changed the title Workspace - Some of the new worspace chats name is "Chat Report" [$500] Workspace - Some of the new worspace chats name is "Chat Report" Apr 2, 2024
Copy link

melvin-bot bot commented Apr 2, 2024

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

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

melvin-bot bot commented Apr 2, 2024

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

@AMohamedAakhil
Copy link

Proposal
Please re-state the problem that we are trying to solve in this issue.
Some of the new worspace chats name is "Chat Report"

What is the root cause of that problem?
Chat names not being refetched

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

  1. Invalidate chat names fetched, as workspace is created and members are invited.

What alternative solutions did you explore? (Optional)
NA

Copy link

melvin-bot bot commented Apr 2, 2024

📣 @AMohamedAakhil! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@AMohamedAakhil
Copy link

Contributor details
Your Expensify account email: a.aakhilmohamed@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~0116333babf287853b

Copy link

melvin-bot bot commented Apr 2, 2024

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@AMohamedAakhil
Copy link

Proposal
Please re-state the problem that we are trying to solve in this issue.
Some of the new worspace chats name is "Chat Report"

What is the root cause of that problem?
Chat names not being refetched

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

Invalidate chat names fetched, as workspace is created and members are invited.
What alternative solutions did you explore? (Optional)
NA

@Pranav2612000
Copy link

Proposal

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

New Chats created on inviting new members to a workspace are called "Chat Reports"

What is the root cause of that problem?

On inviting a new member, we call addMembersToWorkspace (

function addMembersToWorkspace(invitedEmailsToAccountIDs: InvitedEmailsToAccountIDs, welcomeNote: string, policyID: string) {
)
which calls createPolicyExpenseChats (
function createPolicyExpenseChats(policyID: string, invitedEmailsToAccountIDs: InvitedEmailsToAccountIDs, hasOutstandingChildRequest = false): WorkspaceMembersChats {
).
In this function, we build an optimistic chat report for each user (
const optimisticReport = ReportUtils.buildOptimisticChatReport([sessionAccountID, cleanAccountID], undefined, CONST.REPORT.CHAT_TYPE.POLICY_EXPENSE_CHAT, policyID, cleanAccountID);
) with the reportName as undefined. Due to this, in buildOptimisticChatReport the default chat report name ( i.e. Chat Report ) is set

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

To solve the problem, we can use the email as the reportName param to the buildOptimisticChatReport function call for each new member in createPolicyExpenseChat. This would look something like this -

const optimisticReport = ReportUtils.buildOptimisticChatReport([sessionAccountID, cleanAccountID], email, CONST.REPORT.CHAT_TYPE.POLICY_EXPENSE_CHAT, policyID, cleanAccountID);

What alternative solutions did you explore? (Optional)

NA

@yuwenmemon
Copy link
Contributor

@Pranav2612000 Are you able to identify the PR in the latest Staging deploy that would be at the heart of your root cause?

@mollfpr
Copy link
Contributor

mollfpr commented Apr 2, 2024

@yuwenmemon Are you able to repro the issue? I can't reproduce the issue on the latest main or staging.

@yuwenmemon
Copy link
Contributor

Yeah I'm able to reproduce on staging with these steps:

  1. Create a new workspace
  2. Invite 3 brand new accounts to that workspace (the accounts have not been created before)
  3. Go to your Chats - you'll see 2/3 Workspace chats are "Chat Report" rather than the email of the user you just invited

@yuwenmemon
Copy link
Contributor

Kapture.2024-04-01.at.22.05.27.mp4

@yuwenmemon
Copy link
Contributor

We can do that, but how do you propose it would fix the issue described above?

@yuwenmemon yuwenmemon removed the Reviewing Has a PR in review label Apr 3, 2024
@yuwenmemon
Copy link
Contributor

I am inclined to believe this has been sitting around as a bug all along since I could reproduce it on both API code from a week ago and App code from a week ago.

So yeah, maybe what we could do is:

  1. Move the relevant portions of this command to auth
  2. In addition to sending the personal details of the newly created accounts, and blowing away the optimistic accountIDs, also update the policy expense chat to have the participants reflect the new set of accountIDs (i.e. replace the optimistic one with the real one)

Asking about this in Open Source here: https://expensify.slack.com/archives/C01GTK53T8Q/p1712188777239399

@melvin-bot melvin-bot bot added the Overdue label Apr 8, 2024
Copy link

melvin-bot bot commented Apr 9, 2024

@yuwenmemon, @kevinksullivan, @mollfpr Huh... This is 4 days overdue. Who can take care of this?

Copy link

melvin-bot bot commented Apr 11, 2024

@yuwenmemon, @kevinksullivan, @mollfpr 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@kevinksullivan
Copy link
Contributor

bumped yuwen's thread in slack for more input

@melvin-bot melvin-bot bot removed the Overdue label Apr 11, 2024
Copy link

melvin-bot bot commented Apr 14, 2024

@yuwenmemon @kevinksullivan @mollfpr 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!

@melvin-bot melvin-bot bot added the Overdue label Apr 14, 2024
Copy link

melvin-bot bot commented Apr 15, 2024

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

@kevinksullivan
Copy link
Contributor

Adding to collect project per this convo

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Apr 15, 2024
@kevinksullivan
Copy link
Contributor

bumped in slack again

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Apr 19, 2024
Copy link

melvin-bot bot commented Apr 22, 2024

@yuwenmemon, @kevinksullivan, @mollfpr Whoops! This issue is 2 days overdue. Let's get this updated quick!

Copy link

melvin-bot bot commented Apr 24, 2024

@yuwenmemon, @kevinksullivan, @mollfpr Huh... This is 4 days overdue. Who can take care of this?

Copy link

melvin-bot bot commented Apr 26, 2024

@yuwenmemon, @kevinksullivan, @mollfpr Still overdue 6 days?! Let's take care of this!

@yuwenmemon
Copy link
Contributor

@Beamanator, Any thoughts on what I posted here a couple of weeks back?

@melvin-bot melvin-bot bot removed the Overdue label Apr 30, 2024
@Beamanator
Copy link
Contributor

Oofdaaaa - responded, sorry for the delay

@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@melvin-bot melvin-bot bot added the Overdue label May 2, 2024
Copy link

melvin-bot bot commented May 3, 2024

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

@yuwenmemon
Copy link
Contributor

Unable to reproduce as well - soooo... looks like this somehow got fixed by someone somewhere somehow 😅

@melvin-bot melvin-bot bot removed the Overdue label May 3, 2024
@yuwenmemon
Copy link
Contributor

Closing this out!

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 Help Wanted Apply this label when an issue is open to proposals by contributors Internal Requires API changes or must be handled by Expensify staff
Projects
No open projects
Archived in project
Development

No branches or pull requests

10 participants