May 16, 2026
When emoji go bad
My Favorite Bugs: Invalid Surrogate Pairs
Tiny emoji glitch sparks big panic as coders roast the nightmare and swap Unicode war stories
TLDR: A rare bug made an editor silently stop saving when certain emoji were placed together in just the wrong spot. Commenters turned it into a full therapy session about how text handling is secretly cursed, with reactions ranging from smart testing advice to rage-filled demands for simpler character rules.
A seemingly cute editor bug turned into full-on office horror: type away, everything looks normal, and then—surprise—your latest work never actually saves. The villain? Putting certain emoji next to each other in just the wrong way, which made the app quietly choke and stop syncing. The author’s product manager deserves the detective medal here; commenters clearly loved the image of a weekly red-and-green status update accidentally uncovering a deeply cursed bug that had been haunting the team for ages.
And the crowd absolutely ran with it. One camp responded with the classic developer mood of “this is why strings are evil”, saying that once you learn how text really works, you can never look at it normally again. Another group piled on with battle stories about broken flags, weird character handling, and the painful discovery that what looks like “one character” on screen may secretly be several moving parts under the hood. There was also a mini culture clash between the practical folks saying, basically, test this stuff harder, and the fed-up hot-take crowd dreaming of a world where every character was just a giant fixed-size block so nobody would have to think about this nonsense ever again.
The funniest energy in the thread is that mix of terror and admiration: everyone agrees this bug is awful, but also exactly the kind of weird little gremlin that programmers secretly love. Bonus points to the author for dropping an interactive tool so people can poke the monster themselves.
Key Points
- •The article recounts a silent data-loss bug in a collaborative editor migration using TipTap, ProseMirror, and Yjs.
- •The failure caused edits to stop syncing to the Yjs document even though users could continue typing normally.
- •A product manager identified a reproducible trigger involving inserting certain emoji adjacent to each other.
- •The root cause was a CRDT splice that split a UTF-16 surrogate pair, creating invalid string handling for emoji above U+FFFF.
- •The article explains code units, code points, and grapheme clusters to show why JavaScript string operations can break multi-unit characters.