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

CRITICAL: [$500] Inviting a member to a user created room does not add them until page is refreshed #32712

Closed
dylanexpensify opened this issue Dec 8, 2023 · 25 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@dylanexpensify
Copy link
Contributor

dylanexpensify commented Dec 8, 2023

Problem

Originally reported by @quinthar here

Reproduction steps:

  • Navigate to expensify.com/new/room
  • Invite a member (must be a new account and not someone who you have a personal detail for yet)
  • See that the member is not included in the list
  • Refresh the page
  • See that the member is included in the list

Why is this important?

Ideally the member would be displayed immediately.

Solution

@jasperhuangg I think maybe we need to add an optimistic personal detail for the user being added? Or something is wrong with the accountID logic in the front end. When we add a new member to a room we are using an optimistic accountID generated in the options. But we do not add optimistic personal details for them here. So this logic here is hit.

Confirmed with this log:

2023-12-05_12-01-28

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b17b3e302b4beccb
  • Upwork Job ID: 1733076588418981888
  • Last Price Increase: 2023-12-08
  • Automatic offers:
    • hoangzinh | Reviewer | 28027117
    • dukenv0307 | Contributor | 28027118
@dylanexpensify dylanexpensify 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 Dec 8, 2023
@melvin-bot melvin-bot bot changed the title HIGH: Inviting a member to a user created room does not add them until page is refreshed [$500] HIGH: Inviting a member to a user created room does not add them until page is refreshed Dec 8, 2023
Copy link

melvin-bot bot commented Dec 8, 2023

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

Copy link

melvin-bot bot commented Dec 8, 2023

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

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

melvin-bot bot commented Dec 8, 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

Copy link

melvin-bot bot commented Dec 8, 2023

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

@dukenv0307
Copy link
Contributor

dukenv0307 commented Dec 8, 2023

Proposal

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

Inviting a member to a user created room does not add them until page is refreshed

What is the root cause of that problem?

We are not adding personal details for new user in optimistic data when we invite them to the room

optimisticData: [

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

We should add optimistic personal details for new user in optimistic data if the user isn't present in personal details list.

optimisticData: [

We can do it in the same way we do in OpenReport here

const optimisticPersonalDetails = {};
const settledPersonalDetails = {};
_.map(participantLoginList, (login, index) => {

What alternative solutions did you explore? (Optional)

@hoangzinh
Copy link
Contributor

@dukenv0307 Thanks for your proposal. Your RCA is correct and your solution, overall is correct. I only suggest that we can do the same as we did when we invite a member to a workspace here

const newPersonalDetailsOnyxData = PersonalDetailsUtils.getNewPersonalDetailsOnyxData(logins, accountIDs);

Link to proposal #32712 (comment)
🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Dec 9, 2023

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

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

melvin-bot bot commented Dec 10, 2023

📣 @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

Copy link

melvin-bot bot commented Dec 10, 2023

📣 @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
Copy link
Contributor

@hoangzinh The PR is ready for review.

@dylanexpensify
Copy link
Contributor Author

bump @hoangzinh 🙏

@hoangzinh
Copy link
Contributor

I'm going to review the PR today

@dylanexpensify
Copy link
Contributor Author

@hoangzinh any update?

@quinthar quinthar changed the title [$500] HIGH: Inviting a member to a user created room does not add them until page is refreshed HIGH: [$500] Inviting a member to a user created room does not add them until page is refreshed Dec 11, 2023
@hoangzinh
Copy link
Contributor

ah sorry @dylanexpensify I reviewed and approved the PR yesterday. Waiting @roryabraham for final review.

@roryabraham
Copy link
Contributor

Pr merged

@quinthar quinthar moved this from HIGH to CRITICAL in [#whatsnext] #vip-vsb Dec 19, 2023
@quinthar quinthar changed the title HIGH: [$500] Inviting a member to a user created room does not add them until page is refreshed CRITICAL: [$500] Inviting a member to a user created room does not add them until page is refreshed Dec 19, 2023
@quinthar
Copy link
Contributor

Am I blind? What is the PR for this? Why is this issue still open if this was merged last week?

@quinthar quinthar moved this from CRITICAL to HIGH in [#whatsnext] #vip-vsb Dec 19, 2023
@quinthar quinthar changed the title CRITICAL: [$500] Inviting a member to a user created room does not add them until page is refreshed HIGH: [$500] Inviting a member to a user created room does not add them until page is refreshed Dec 19, 2023
@dukenv0307
Copy link
Contributor

dukenv0307 commented Dec 20, 2023

@dylanexpensify @roryabraham

The PR is deployed to production but bot doesn't update.

@dylanexpensify
Copy link
Contributor Author

Lame! Will update today!

@dylanexpensify dylanexpensify changed the title HIGH: [$500] Inviting a member to a user created room does not add them until page is refreshed [HOLD for Payment: 2023-12-21] HIGH: [$500] Inviting a member to a user created room does not add them until page is refreshed Dec 20, 2023
@dylanexpensify
Copy link
Contributor Author

Payment summary:

@dylanexpensify
Copy link
Contributor Author

paid! @hoangzinh can you propose Regression Test steps please?

@hoangzinh
Copy link
Contributor

Regression Test Proposal

  1. Create a new room
  2. Go to room details page
  3. Press on "Members" menu
  4. Press on Invite button
  5. Invite a member (must be a new account and not someone whom you have personal details for yet)
  6. Verify that on the room's members page, this member appears immediately

Do we agree 👍 or 👎

@quinthar quinthar moved this from HIGH to CRITICAL in [#whatsnext] #vip-vsb Dec 26, 2023
@quinthar quinthar changed the title [HOLD for Payment: 2023-12-21] HIGH: [$500] Inviting a member to a user created room does not add them until page is refreshed [HOLD for Payment: 2023-12-21] CRITICAL: [$500] Inviting a member to a user created room does not add them until page is refreshed Dec 26, 2023
@roryabraham roryabraham removed the Reviewing Has a PR in review label Jan 4, 2024
@melvin-bot melvin-bot bot added the Overdue label Jan 4, 2024
@roryabraham roryabraham changed the title [HOLD for Payment: 2023-12-21] CRITICAL: [$500] Inviting a member to a user created room does not add them until page is refreshed CRITICAL: [$500] Inviting a member to a user created room does not add them until page is refreshed Jan 4, 2024

This comment was marked as off-topic.

Copy link

melvin-bot bot commented Jan 4, 2024

The BZ member will need to manually hire applausebot for the Contributor role. Please store your Upwork details and apply to our Upwork job so this process is automatic in the future!

@roryabraham
Copy link
Contributor

Hmmm ... that's not right.

@roryabraham
Copy link
Contributor

Created https://github.com/Expensify/Expensify/issues/356696 to update regression tests, 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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
No open projects
Status: CRITICAL
Development

No branches or pull requests

7 participants