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
[Due for payment 2025-05-14] [$250] Admin - Workspace description with markdown is shown as html tags in admin room system message. #59435
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: V9 1.21-3 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both If this was caught during regression testing, add the test name, ID and link from TestRail: N Email or phone of affected tester (no customers): Slottwo1 aya@gmail.com Issue reported by: Applause Internal Team Device used: Redminote 10s android 13 App Component: Workspace Settings
Please re-state the problem that we are trying to solve in this issue.
Workspace description with markdown is shown as html tags in admin room system message.
What is the root cause of that problem?
We don't convert the newDescription/oldDescription to text when we get the workspace update description message here then, the description still contains markdown.
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
We can also reflector our getOriginalMessage to always return text since we mostly use getOriginalMessage for alternateText or system message Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Please re-state the problem that we are trying to solve in this issue.
The workspace description update system message shows HTML tag.
What is the root cause of that problem?
This happens after #53238 where we want to translate the admin system messages. Previously, the system message is rendered in HTML. But since now we render it using ReportActionItemBasicMessage, it will be rendered as a plain text.
We will let the message be rendered using ReportActionItemMessage. In getReportActionMessageFragments, add a new case for the description update system message.
We can do the same for other action that suffers the same issue.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Not really sure if we should add a test to `getReportActionMessageFragments for description update case since it's just a straightforward if case. If we want to add one, we can add it to the existing test suite.
@rayane-d@adelekennedy@rayane-d The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Create a workspace
Test:
Go to Settings > Workspaces > Select a workspace > Overview
Update WS description so it contains markdown (example: test)
Go to the #admins room
Verify that the description update system message displays the markdown correctly without HTML tags
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Apr 1, 2025
Triggered auto assignment to @adelekennedy (
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.nkdengineer commentedon Apr 1, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Workspace description with markdown is shown as html tags in admin room system message.
What is the root cause of that problem?
We don't convert the
newDescription/oldDescriptionto text when we get the workspace update description message here then, the description still contains markdown.App/src/pages/home/report/PureReportActionItem.tsx
Line 903 in 69bfd3d
App/src/libs/ReportActionsUtils.ts
Line 1879 in 69bfd3d
What changes do you think we should make in order to solve the problem?
We should convert the description to text and use this to display the message
App/src/pages/home/report/PureReportActionItem.tsx
Line 903 in 69bfd3d
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
If we want to display the message with markdown style, we can remove this case here
App/src/pages/home/report/PureReportActionItem.tsx
Lines 902 to 904 in 69bfd3d
And create a util to get the workspace description fragment like we did for the update room description action here
App/src/pages/home/report/ReportActionItemMessage.tsx
Lines 74 to 80 in 69bfd3d
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
samranahm commentedon Apr 1, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-04-01 12:28:12 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Workspace description with markdown is shown as html tags in admin room system message.
What is the root cause of that problem?
Here
App/src/libs/ReportActionsUtils.ts
Line 1854 in 1c74508
We are not converting HTML we get from
getOriginalMessageto text before displaying in system message in#adminroomWhat changes do you think we should make in order to solve the problem?
We should explicitly convert HTML to text using
Parser.htmlToTextlike we doing at multiple locationsand update
UpdatedPolicyDescriptionParamsApp/src/languages/params.ts
Line 300 in 1c74508
to
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
We can also reflector our
getOriginalMessageto always return text since we mostly usegetOriginalMessagefor alternateText or system messageReminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
huult commentedon Apr 1, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Workspace description with markdown is shown as html tags in admin room system message
What is the root cause of that problem?
We still keep the HTML format for
newDescriptionoroldDescriptionand return it as assigned.App/src/libs/ReportActionsUtils.ts
Line 1858 in 96562a9
App/src/pages/home/report/PureReportActionItem.tsx
Line 901 in 5b83820
And since we're using the component to render it, the HTML tags will be displayed as plain text — which leads to this issue
App/src/pages/home/report/ReportActionItemBasicMessage.tsx
Line 16 in 4ffbd42
What changes do you think we should make in order to solve the problem?
To resolve this issue we just need use
RenderHTMLto render this messageApp/src/pages/home/report/ReportActionItemBasicMessage.tsx
Line 16 in 4ffbd42
update to:
<View style={[styles.chatItemMessage]}> <RenderHTML html={`<muted-text>${message}</muted-text>`} /> </View>What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
bernhardoj commentedon Apr 4, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
The workspace description update system message shows HTML tag.
What is the root cause of that problem?
This happens after #53238 where we want to translate the admin system messages. Previously, the system message is rendered in HTML. But since now we render it using
ReportActionItemBasicMessage, it will be rendered as a plain text.App/src/pages/home/report/PureReportActionItem.tsx
Lines 935 to 936 in a099aa1
What changes do you think we should make in order to solve the problem?
First, remove this case.
App/src/pages/home/report/PureReportActionItem.tsx
Lines 935 to 936 in a099aa1
We will let the message be rendered using
ReportActionItemMessage. IngetReportActionMessageFragments, add a new case for the description update system message.App/src/libs/ReportActionsUtils.ts
Lines 1512 to 1534 in a099aa1
We can do the same for other action that suffers the same issue.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Not really sure if we should add a test to `getReportActionMessageFragments for description update case since it's just a straightforward if case. If we want to add one, we can add it to the existing test suite.
melvin-bot commentedon Apr 7, 2025
@adelekennedy Huh... This is 4 days overdue. Who can take care of this?
melvin-bot commentedon Apr 9, 2025
@adelekennedy 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
adelekennedy commentedon Apr 11, 2025
I can reproduce - definitely a polish
46 remaining items
melvin-bot commentedon May 7, 2025
@rayane-d @adelekennedy @rayane-d The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
melvin-bot commentedon May 14, 2025
Payment Summary
Upwork Job
BugZero Checklist (@adelekennedy)
rayane-d commentedon May 15, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] 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: https://github.com/Expensify/App/pull/53238/files#r2091775402
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
melvin-bot commentedon May 16, 2025
@adelekennedy Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
adelekennedy commentedon May 16, 2025
Payment Summary
@bernhardoj owed $250 via NewDot
@rayane-d owed $250 via NewDot
bernhardoj commentedon May 17, 2025
Requested in ND.
JmillsExpensify commentedon May 22, 2025
$250 approved for @bernhardoj
rayane-d commentedon Jun 3, 2025
Requested in ND
garrettmknight commentedon Jun 5, 2025
$250 approved for @rayane-d