Skip to content

Hold #28997 [$500] Mweb/Chrome - Thread - Tapping leave thread, displays "U" for a second instead of Room name in header #31220

Closed

Description

@lanitochka17

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.3.98-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:

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Tap on a room with a thread reply message
  3. Tap on reply
  4. Tap 3 dots on top
  5. Select Leave thread

Expected Result:

Tapping leave thread, must not display unavailable "U" for a second instead of Room name in header

Actual Result:

Tapping leave thread, displays unavailable "U" for a second instead of Room name in header.

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

Bug6271878_1699653563009.u.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~014350424b71769cdf
  • Upwork Job ID: 1723110772857241600
  • Last Price Increase: 2024-01-12

Activity

  1. added
    External
    Daily
    Bug
    on Nov 10, 2023
  2. melvin-bot commented on Nov 10, 2023

    @melvin-bot

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

  3. changed the title [-]Mweb/Chrome - Thread - Tapping leave thread, displays "U" for a second instead of Room name in header[/-] [+][$500] Mweb/Chrome - Thread - Tapping leave thread, displays "U" for a second instead of Room name in header[/+] on Nov 10, 2023
  4. melvin-bot commented on Nov 10, 2023

    @melvin-bot
  5. melvin-bot commented on Nov 10, 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
  6. added
    Help Wanted
    on Nov 10, 2023
  7. melvin-bot commented on Nov 10, 2023

    @melvin-bot

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

  8. DylanDylann commented on Nov 11, 2023

    @DylanDylann
    Contributor

    Proposal

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

    • Mweb/Chrome - Thread - Tapping leave thread, displays "U" for a second instead of Room name in header

    What is the root cause of that problem?

    • After clicking on "Leave thread", we set the optimistic data for this thread as below:

      App/src/libs/actions/Report.ts

      Lines 2103 to 2118 in 52adf77

      const optimisticData: OnyxUpdate[] = [
      {
      onyxMethod: Onyx.METHOD.MERGE,
      key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
      value: isWorkspaceMemberLeavingWorkspaceRoom
      ? {
      notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN,
      }
      : {
      reportID: null,
      stateNum: CONST.REPORT.STATE_NUM.APPROVED,
      statusNum: CONST.REPORT.STATUS_NUM.CLOSED,
      notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN,
      },
      },
      ];
    • Then we use this useEffect to handle case onyxReportID: undefined. It will navigate the user to the previous report.
    • When the above useEffect executing, it will display the above optimistic report for a while.

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

    • We need to navigate the user to the parent report after API call, the same as what we did in case we left the room. Can do it by updating

      App/src/libs/actions/Report.js

      Lines 2087 to 2091 in f285c9c

      if (isWorkspaceMemberLeavingWorkspaceRoom) {
      const participantAccountIDs = PersonalDetailsUtils.getAccountIDsByLogins([CONST.EMAIL.CONCIERGE]);
      const chat = ReportUtils.getChatByParticipants(participantAccountIDs);
      Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(chat.reportID));
      }

      to
      if (isWorkspaceMemberLeavingWorkspaceRoom) {
            const participantAccountIDs = PersonalDetailsUtils.getAccountIDsByLogins([CONST.EMAIL.CONCIERGE]);
            const chat = ReportUtils.getChatByParticipants(participantAccountIDs);
            Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(chat.reportID));
    +     } else {
    +        Navigation.goBack();
    +    }

    What alternative solutions did you explore? (Optional)

    • Also we can hide the Join button (and the HeaderView) once the report.reportID is empty as we did in other screens.
    • To hide the Join button, we can update:
      const canJoin = canJoinOrLeave && !isWhisperAction && props.report.notificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;

      to
       const canJoin = props.report.reportID && canJoinOrLeave && !isWhisperAction && props.report.notificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;
    
        const isLoading = !props.report.reportID || !props.report || !title;
    
  9. bernhardoj commented on Nov 11, 2023

    @bernhardoj
    Contributor

    Should be fixed in #28997

  10. laurenreidexpensify commented on Nov 14, 2023

    @laurenreidexpensify
    Contributor

    @eVoloshchak do you agree this will be covered in #28997 and we can close?

  11. 19 remaining items

  12. laurenreidexpensify commented on Dec 14, 2023

    @laurenreidexpensify
    Contributor

    Still on hold on #28997 but that has payment due on 15 Dec - so should be off hold v soon

  13. melvin-bot commented on Dec 15, 2023

    @melvin-bot

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

  14. laurenreidexpensify commented on Dec 20, 2023

    @laurenreidexpensify
    Contributor

    @eVoloshchak #28997 has been on prod for a solid 12 days now, can we lift the hold?

  15. eVoloshchak commented on Dec 22, 2023

    @eVoloshchak
    Contributor

    @laurenreidexpensify, according to my tests, this was resolved by a fix for #28997.
    Would like for someone from QA to double check that

  16. melvin-bot commented on Dec 22, 2023

    @melvin-bot

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

  17. laurenreidexpensify commented on Dec 29, 2023

    @laurenreidexpensify
    Contributor

    @Expensify/applauseleads please confirm if this is still reproducible in KI tests

  18. melvin-bot commented on Dec 29, 2023

    @melvin-bot

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

  19. laurenreidexpensify commented on Jan 4, 2024

    @laurenreidexpensify
    Contributor

    @applausebot please confirm if this is still reproducible in KI tests

  20. melvin-bot commented on Jan 5, 2024

    @melvin-bot

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

  21. melvin-bot commented on Jan 12, 2024

    @melvin-bot

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

  22. laurenreidexpensify commented on Jan 15, 2024

    @laurenreidexpensify
    Contributor

    I am closing based on @eVoloshchak's comment that this is resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

ExternalHelp WantedWeekly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions