Upstream contribution · heygen-com/hyperframes
hyperframes · Encoding Hyperframes feedback that ends at an emoji boundary
Problem
The feedback command could truncate between two UTF-16 surrogate units. URL encoding the partial emoji then threw an exception before the issue URL was available.
Engineering response
The truncator removes a trailing high surrogate if its matching low surrogate was cut off, while keeping the established limits and ellipsis.
Evidence and scope
A focused Vitest run found two baseline failures and recorded nine passes with the correction. Complete emoji at the boundary and ordinary ASCII were included as controls.