Skip to content

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

Closed

Description

@dylanexpensify

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

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 8, 2023
  2. 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[/+] on Dec 8, 2023
  3. melvin-bot commented on Dec 8, 2023

    @melvin-bot

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

  4. melvin-bot commented on Dec 8, 2023

    @melvin-bot
  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Dec 8, 2023
  6. melvin-bot commented on Dec 8, 2023

    @melvin-bot

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

    @melvin-bot

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

  8. dukenv0307 commented on Dec 8, 2023

    @dukenv0307
    Contributor

    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)

  9. hoangzinh commented on Dec 9, 2023

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

  10. 27 remaining items

  11. dylanexpensify commented on Dec 22, 2023

    @dylanexpensify
    ContributorAuthor

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

  12. hoangzinh commented on Dec 22, 2023

    @hoangzinh
    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 👎

  13. moved this from HIGH to CRITICAL in [#whatsnext] #vip-vsbon Dec 26, 2023
  14. 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[/+] on Dec 26, 2023
  15. 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[/+] on Jan 4, 2024
  16. melvin-bot commented on Jan 4, 2024

    @melvin-bot
  17. melvin-bot commented on Jan 4, 2024

    @melvin-bot

    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!

  18. roryabraham commented on Jan 4, 2024

    @roryabraham
    Contributor

    Hmmm ... that's not right.

  19. roryabraham commented on Jan 4, 2024

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions