# fix\(text\): keep surrogate pairs whole outside SafeText display truncates \(\#546\) · lucenx/codexbar-plasma

[View on GitCafe](https://git.cafe/lucenx/codexbar-plasma/commit/c2cae56db55eac6bad2bc9720f24abda49bd2484)

Repository: [lucenx/codexbar-plasma](https://git.cafe/lucenx/codexbar-plasma)

Visibility: public

Requested revision: c2cae56db55eac6bad2bc9720f24abda49bd2484

Requested commit: c2cae56db55eac6bad2bc9720f24abda49bd2484

Commit: c2cae56db55eac6bad2bc9720f24abda49bd2484

Tree: 0aa53b6a0a23329913505f83427612cd5285a208

Author: Simone

Committer: GitHub

## Message

```
fix(text): keep surrogate pairs whole outside SafeText display truncates (#546)

#543 closed the shared SafeText display path, but notifications, AI Insights
summaries, cost labels, and support-report text still sliced UTF-16 code units
and could leave a lone high surrogate (half an emoji) at the bound. Route those
truncations through SafeText.truncatedText and cover each site with a regression
test.
```

## Parents

- [8f849c25dcbb8f573fc48c0b5cdd7a5459dc4ac7](https://git.cafe/lucenx/codexbar-plasma/commit/8f849c25dcbb8f573fc48c0b5cdd7a5459dc4ac7?format=markdown)

[Source at this commit](https://git.cafe/lucenx/codexbar-plasma/tree/c2cae56db55eac6bad2bc9720f24abda49bd2484?format=markdown)
