fix: preserve emoji at remaining bounded-text edges#101711
Conversation
Co-authored-by: ben.li <[email protected]> Co-authored-by: 0668001336 <[email protected]> Co-authored-by: Alix-007 <[email protected]>
|
Codex review: needs maintainer review before merge. Reviewed July 7, 2026, 10:46 AM ET / 14:46 UTC. Summary PR surface: Source +12, Tests +134. Total +146 across 15 files. Reproducibility: yes. source-reproducible. Current main uses raw String.slice at the affected bounded text caps, so a non-BMP character crossing the cap can leave a lone surrogate; the PR adds focused boundary tests for the changed paths. Review metrics: none identified. Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Next step before merge
Security Review detailsBest possible solution: Land the consolidated UTF-16 bounded-text fix after maintainer review and exact-head gates, preserving the existing limits and avoiding any new config or API surface. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible. Current main uses raw String.slice at the affected bounded text caps, so a non-BMP character crossing the cap can leave a lone surrogate; the PR adds focused boundary tests for the changed paths. Is this the best way to solve the issue? Yes. Reusing truncateUtf16Safe and sliceUtf16Safe at each owning boundary is the narrow maintainable fix; adding a new helper, config option, or transport-specific workaround would duplicate an existing shared contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fdc7892a6e5a. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +12, Tests +134. Total +146 across 15 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
|
Land-ready proof for exact head
Known proof gap: the paid Parallel REST endpoint was not invoked. Its transport is unchanged, both Parallel runtimes share the tested normalization path, and the free MCP path was exercised live. Native review artifacts validate with zero findings and |
|
Merged via squash.
|
* fix: keep remaining text bounds UTF-16 safe Co-authored-by: ben.li <[email protected]> Co-authored-by: 0668001336 <[email protected]> Co-authored-by: Alix-007 <[email protected]> * docs: credit bounded Unicode fixes * test: update UTF-16 browser import boundary * chore: leave Unicode note to release changelog --------- Co-authored-by: ben.li <[email protected]> Co-authored-by: 0668001336 <[email protected]> Co-authored-by: Alix-007 <[email protected]>
* fix: keep remaining text bounds UTF-16 safe Co-authored-by: ben.li <[email protected]> Co-authored-by: 0668001336 <[email protected]> Co-authored-by: Alix-007 <[email protected]> * docs: credit bounded Unicode fixes * test: update UTF-16 browser import boundary * chore: leave Unicode note to release changelog --------- Co-authored-by: ben.li <[email protected]> Co-authored-by: 0668001336 <[email protected]> Co-authored-by: Alix-007 <[email protected]>
Related: #101679, #101684, #101692
What Problem This Solves
Fixes an issue where emoji and other supplementary Unicode characters could become malformed when text landed exactly on remaining length limits in Parallel search requests, compaction summaries, telemetry logs, system presence, workboard context and badges, or Control UI command metadata.
Why This Change Was Made
Routes each real text boundary through the shared UTF-16-safe slicing helpers at its owning core, UI, or plugin layer. This clean replacement also protects the compaction suffix-tail boundary missed by the source proposals, while omitting duplicate fixes already on
mainand unrelated formatting churn.User Impact
Bounded text keeps valid Unicode at these edges: a complete character is retained or omitted, never split into a dangling surrogate. Existing length caps, markers, and fallback behavior remain unchanged.
Evidence
tbx_01kwyae3xcaszr9ckk2z1bg0ew: 407 focused behavior tests plus the 2-test Control UI browser-import contract passed.check:changedpassed, including guards, four typecheck lanes, and core/UI/package/extension lint.git diff --checkpassed.