fix(ui): keep session/tool/card label truncation UTF-16 safe#101640
fix(ui): keep session/tool/card label truncation UTF-16 safe#101640lsr911 wants to merge 1 commit into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 7, 2026, 8:25 AM ET / 12:25 UTC. Summary PR surface: Source +33. Total +33 across 5 files. Reproducibility: yes. source inspection plus a focused Node check shows raw slicing can leave a dangling surrogate at the reported boundaries. I did not establish a live failing Control UI reproduction in this read-only review. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the focused helper substitution after the contributor adds redacted real Control UI behavior proof and exact-head checks remain green. Do we have a high-confidence way to reproduce the issue? Yes, source inspection plus a focused Node check shows raw slicing can leave a dangling surrogate at the reported boundaries. I did not establish a live failing Control UI reproduction in this read-only review. Is this the best way to solve the issue? Yes, this appears to be the narrow maintainable fix: the browser-safe AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2ba622ca3019. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +33. Total +33 across 5 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
|
|
Closed as superseded by #101685, landed in |
What Problem This Solves
Six Control UI label truncation sites use raw
.slice(0, N)where the boundary can split emoji or CJK surrogate pairs:Why This Change Was Made
truncateUtf16Safefrom@openclaw/normalization-core/utf16-sliceis the canonical leaf helper.Evidence
Branch prerun (commit ef303a2)
Files Changed
ui/src/pages/usage/view-overview.ts.slice(0, 20)→truncateUtf16Safe+ importui/src/pages/usage/view-details.ts.slice(0, 50)→truncateUtf16Safe+ importui/src/lib/chat/tool-cards.ts.slice(0, 120)→truncateUtf16Safe+ importui/src/lib/workboard/index.ts.slice()→truncateUtf16Safe+ importui/src/app/custom-theme.ts.slice(0, 80)→truncateUtf16Safe+ import