regression: unresolved `@rocket.chat/string-helpers` import breaks Omnichannel queue side panel
Proposed changes (including videos or screenshots)
InquireSidePanelItem imports escapeHTML from @rocket.chat/string-helpers, a package that no longer exists in the monorepo and is not a dependency of apps/meteor. This points the import at nothing, so the Omnichannel queue side panel items break at runtime.
Two PRs combined to produce this:
- #41763 (
742009a091) dropped the@rocket.chat/string-helperspackage in favor of@rocket.chat/tools, which is whereescapeHTMLlives now. - #41595 (
b2c16d5842) added theescapeHTMLimport while still pointing at@rocket.chat/string-helpers. The import was valid when that branch was written, but #41763 landed first and #41595 merged without picking it up, sodevelopended up importing a deleted package.
The Meteor bundler surfaces it as an unresolved module during the build:
Unable to resolve some modules:
"@rocket.chat/string-helpers" in
apps/meteor/client/views/navigation/sidepanel/omnichannel/InquireSidePanelItem.tsx
(web.browser)
This PR repoints the import to @rocket.chat/tools, which is already a workspace dependency of apps/meteor and exports the same escapeHTML (packages/tools/src/escapeHTML.ts). It is the module every other escapeHTML call site in the repo uses, so this only aligns the one straggler. No behavior change beyond restoring the escaping that #41595 intended.
No changeset: the breakage exists only on develop and was never released, so there is nothing to tell end users about.
Issue(s)
Regression from #41595, caused by the package removal in #41763.
Steps to test or reproduce
- Check out
developatb2c16d5842or later and build the Meteor app. Note theUnable to resolve some modules: "@rocket.chat/string-helpers"warning. - Enable Omnichannel and turn on the side panel / queue view, then have an incoming inquiry whose last message contains special characters, for example
<b>bold</b> & "quoted". - Open the Omnichannel queue side panel and look at the inquiry item's message preview.
- Expected result: the side panel renders without errors and the preview shows the literal text
<b>bold</b> & "quoted"rather than crashing or rendering markup.
Further comments
escapeHTML moved in #41763; the dangling import arrived in #41595.
Summary by CodeRabbit
- Refactor
- Updated internal HTML escaping utility usage without changing visible functionality.