You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-07-10] Thread - Thread title not updated in header and in LHN after editing parent message #44430
The thread title is updated in the header and in LHN
Actual Result:
The thread title still displays the parent message before editing. It updates in the header after opening the thread again, but does not change in the LHN
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
👋 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:
Identify the pull request that introduced this issue and revert it.
@trjExpensify I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
Please re-state the problem that we are trying to solve in this issue.
Thread title and LHN title doesn't update immediately when updating the thread parent message.
What is the root cause of that problem?
For the thread title, we get the title from getReportActionMessage which uses parseReportActionHtmlToText. parseReportActionHtmlToText has a cache mechanism with the cache key being the combination of the reportID, reportActionID, and the report action lastModified.
There are 2 problems here. First, we don't optimistically update the lastModified when editing a message, so we rely on the BE response to update it. Second, we get the report action by using the deprecated getParentReportAction and since we enable the react-compiler in #42287, it means the component won't react to the parent report action updates because ReportUtils.getReportName only use the report data.
This change alone is enough because the report data is also updated which triggers the getReportName, but we should start passing the parent report action as the 3rd param.
changed the title [-]Thread - Thread title not updated in header and in LHN after editing parent message[/-][+][HOLD for payment 2024-07-10] Thread - Thread title not updated in header and in LHN after editing parent message[/+]on Jul 3, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@rushatgabhane] The PR that introduced the bug has been identified. Link to the PR:
[@rushatgabhane] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@rushatgabhane] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@rushatgabhane] Determine if we should create a regression test for this bug.
[@rushatgabhane] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
The PR that introduced the bug has been identified. Link to the PR: the bug stems from react compiler pr - [NoQA] feat: react-compiler #42287
The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: [NoQA] feat: react-compiler #42287 (review)
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N.A.
Determine if we should create a regression test for this bug. No because caught by QA and rca was react compiler which is one time thing.
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again - N.A.
Activity
melvin-bot commentedon Jun 26, 2024
Triggered auto assignment to @trjExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.melvin-bot commentedon Jun 26, 2024
Triggered auto assignment to @iwiznia (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon Jun 26, 2024
👋 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:
izarutskaya commentedon Jun 26, 2024
@trjExpensify I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
izarutskaya commentedon Jun 26, 2024
We think this issue might be related to the #vip-vsb
bernhardoj commentedon Jun 26, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Thread title and LHN title doesn't update immediately when updating the thread parent message.
What is the root cause of that problem?
For the thread title, we get the title from
getReportActionMessagewhich usesparseReportActionHtmlToText.parseReportActionHtmlToTexthas a cache mechanism with the cache key being the combination of thereportID,reportActionID, and the report actionlastModified.App/src/libs/ReportUtils.ts
Lines 3238 to 3242 in 0c20881
There are 2 problems here. First, we don't optimistically update the
lastModifiedwhen editing a message, so we rely on the BE response to update it. Second, we get the report action by using the deprecatedgetParentReportActionand since we enable the react-compiler in #42287, it means the component won't react to the parent report action updates because ReportUtils.getReportName only use the report data.App/src/libs/ReportUtils.ts
Lines 3322 to 3324 in 0c20881
What changes do you think we should make in order to solve the problem?
First, update the lastModified optimistically (and revert if fails).
App/src/libs/actions/Report.ts
Lines 1530 to 1543 in 0c20881
This change alone is enough because the report data is also updated which triggers the
getReportName, but we should start passing the parent report action as the 3rd param.App/src/pages/home/HeaderView.tsx
Line 106 in 0c20881
const title = ReportUtils.getReportName(reportHeaderData, undefined, parentReportAction);12 remaining items
[-]Thread - Thread title not updated in header and in LHN after editing parent message[/-][+][HOLD for payment 2024-07-10] Thread - Thread title not updated in header and in LHN after editing parent message[/+]melvin-bot commentedon Jul 3, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jul 3, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-07-10. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jul 3, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
rushatgabhane commentedon Jul 8, 2024
The PR that introduced the bug has been identified. Link to the PR: the bug stems from react compiler pr - [NoQA] feat: react-compiler #42287
The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: [NoQA] feat: react-compiler #42287 (review)
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N.A.
Determine if we should create a regression test for this bug. No because caught by QA and rca was react compiler which is one time thing.
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again - N.A.
trjExpensify commentedon Jul 10, 2024
Payment summary as follows:
Feel free to go ahead and request, both of you. Closing!
bernhardoj commentedon Jul 11, 2024
Requested in ND.
JmillsExpensify commentedon Jul 11, 2024
$250 approved for @bernhardoj
JmillsExpensify commentedon Jul 17, 2024
$250 approved for @rushatgabhane