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
LHN - When user enters multiline message, first and last line displayed in LHN #33308
Version Number: 1.4.14 Reproducible in staging?: Y
**Reproducible in production?:**N 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:
👋 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.
But after the API request is successful, the BE returns a different format of the last message. BE replaces all new line with a whitespace.
What changes do you think we should make in order to solve the problem?
If the BE changes is intended (by replacing all new line with whitespace), then we need to update the optimistic logic for the FE too. Otherwise, we need to fix it on the BE.
@situchan looking at the linked issue by @ZhenjaHorbach, the BE update is intentional #32497 (comment) and the FE update is handled on that issue, so we can close this one.
Activity
github-actions commentedon Dec 19, 2023
👋 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:
melvin-bot commentedon Dec 19, 2023
Triggered auto assignment to @neil-marcellini (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.bernhardoj commentedon Dec 19, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
When we send a multiline message, the LHN last message preview shows the new line as whitespace that's why we can see the last line.
What is the root cause of that problem?
When we add a new message, we optimistically format the message by only taking the first line of the message.
App/src/libs/actions/Report.ts
Line 307 in ab4279b
App/src/libs/ReportUtils.ts
Lines 1185 to 1190 in ab4279b
But after the API request is successful, the BE returns a different format of the last message. BE replaces all new line with a whitespace.
What changes do you think we should make in order to solve the problem?
If the BE changes is intended (by replacing all new line with whitespace), then we need to update the optimistic logic for the FE too. Otherwise, we need to fix it on the BE.
We would need to update it here too.
App/src/libs/ReportActionsUtils.ts
Lines 461 to 463 in ab4279b
Or just use
ReportUtils.formatReportLastMessageTextZhenjaHorbach commentedon Dec 19, 2023
I think we need to wait for this ticket when FE will be updated
#32497
situchan commentedon Dec 19, 2023
@bernhardoj this is deploy blocker so you mean that regression came from staging backend?
bernhardoj commentedon Dec 19, 2023
@situchan looking at the linked issue by @ZhenjaHorbach, the BE update is intentional #32497 (comment) and the FE update is handled on that issue, so we can close this one.
neil-marcellini commentedon Dec 19, 2023
Yep, thanks @bernhardoj!