ly-wang19
1069c60e1e
fix(slack): truncate on code-point boundaries to avoid splitting surrogate pairs ( #96382 )
...
truncateSlackText sliced by UTF-16 code unit ('trimmed.slice(0, max - 1)'), so an
emoji or other astral character straddling the limit was cut in half, leaving a
lone high surrogate before the ellipsis — e.g. truncateSlackText('abc😀 def', 5)
returned 'abc\uD83D…' instead of 'abc…'. That invalid half-character is sent in
live Slack payloads (message text and Block Kit section/button/header/option
labels, which truncate at limits as small as 75).
Use the repo's canonical sliceUtf16Safe (already re-exported from
plugin-sdk/text-utility-runtime, the module slack code imports from) so a
straddling pair is dropped whole. Behavior is byte-identical for all-BMP input.
Co-authored-by: ly-wang19 <ly-wang19@users.noreply.github.com >
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-24 19:30:29 +08:00
..
2026-06-24 11:51:14 +08:00
2026-06-22 19:33:21 +02:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 18:29:56 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-19 00:33:04 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 17:47:44 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 16:19:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 15:39:38 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 15:07:48 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 17:52:16 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 19:30:29 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-19 01:20:06 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-24 11:51:14 +08:00
2026-06-19 01:20:06 +08:00