Skip to content

[$500] Thread - Title in thread is not shown when leaving and revisiting thread offline #32659

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.4.9-2
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:

Issue found when executing PR #32331

Action Performed:

  1. Send a message and create a reply in thread
  2. Go offline
  3. Click three-dot menu and leave the thread
  4. Click on the n replies

Expected Result:

Parent message title shows in the thread header

Actual Result:

Thread header shows skeleton loading

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

Bug6304429_1701953689181.20231207_070103.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0106a4cab3b7676301
  • Upwork Job ID: 1732754476237701120
  • Last Price Increase: 2023-12-07

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 7, 2023
  2. changed the title [-]Thread - Title in thread is not shown when leaving and revisiting thread offline[/-] [+][$500] Thread - Title in thread is not shown when leaving and revisiting thread offline[/+] on Dec 7, 2023
  3. melvin-bot commented on Dec 7, 2023

    @melvin-bot

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

  4. melvin-bot commented on Dec 7, 2023

    @melvin-bot
  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Dec 7, 2023
  6. melvin-bot commented on Dec 7, 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 7, 2023

    @melvin-bot

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

  8. FitseTLT commented on Dec 7, 2023

    @FitseTLT
    Contributor

    Proposal

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

    Title in thread is not shown when leaving and revisiting thread offline

    What is the root cause of that problem?

    The report action (the message we have replied in thread) has no childReportID when we reply in thread. These caused by BE resetting childReportID although we set it properly in our optimistic data related to some recent change in BE and already being dealt with here. That will occur if we open a new thread online but if u open a new thread offline and send some message leave the thread and go back to the left thread the page will show loading endless, here is the explanation:
    This is a related bug which is caused by the code in Report.leaveRoom that Onyx.METHOD.SET the chat thread report replacing all other necessary props and only settting stateNum statusNum in here optimistically

    App/src/libs/actions/Report.js

    Lines 2041 to 2048 in 5a0b7fd

    : {
    onyxMethod: Onyx.METHOD.SET,
    key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
    value: {
    stateNum: CONST.REPORT.STATE_NUM.SUBMITTED,
    statusNum: CONST.REPORT.STATUS.CLOSED,
    },
    },

    which is a bug that breaks our offline user experience and causes an endless loading page (as all necessary data of the chat thread report is deleted in Onyx by the above code) when we navigate to a thread we have left from while offline. It will only display it when we go back online and the necessary data for the thread is fetched from the BE.

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

    We should use Onyx.METHOD.MERGE instead of Onyx.METHOD.SET here

    App/src/libs/actions/Report.js

    Lines 2041 to 2048 in 5a0b7fd

    : {
    onyxMethod: Onyx.METHOD.SET,
    key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
    value: {
    stateNum: CONST.REPORT.STATE_NUM.SUBMITTED,
    statusNum: CONST.REPORT.STATUS.CLOSED,
    },
    },

     : {
                      onyxMethod: Onyx.METHOD.MERGE,
                      key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
                      value: {
                          stateNum: CONST.REPORT.STATE_NUM.SUBMITTED,
                          statusNum: CONST.REPORT.STATUS.CLOSED,
                      },
                  },
    

    What alternative solutions did you explore? (Optional)

  9. yh-0218 commented on Dec 7, 2023

    @yh-0218
    Contributor

    Proposal

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

    Title in thread is not shown when leaving and revisiting thread offline

    What is the root cause of that problem?

    Because childReportID is undefined.

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

    We should give childReportID

    What alternative solutions did you explore? (Optional)

    Screen.Recording.2023-12-07.at.3.50.11.PM.mov
  10. yh-0218 commented on Dec 7, 2023

    @yh-0218
    Contributor

    Hi, @thesahindia Could you check my proposal?
    This will fix about 5 issues together.
    Thanks.

  11. tienifr commented on Dec 7, 2023

    @tienifr
    Contributor

    Dupe of: #32519.

  12. FitseTLT commented on Dec 7, 2023

    @FitseTLT
    Contributor

    @tienifr But there is a related bug as I explained in my proposal 👍

  13. melvin-bot commented on Dec 11, 2023

    @melvin-bot

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

  14. conorpendergrast commented on Dec 11, 2023

    @conorpendergrast
    Contributor

    Yeah as this is a dupe of #32519, I'll close it out. If there's another bug, let's get that created as a separate issue!

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions