Skip to content

fix(ui): preserve UTF-16 workshop previews#104047

Merged
steipete merged 1 commit into
mainfrom
codex/fix-skill-workshop-preview-utf16
Jul 11, 2026
Merged

fix(ui): preserve UTF-16 workshop previews#104047
steipete merged 1 commit into
mainfrom
codex/fix-skill-workshop-preview-utf16

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Skill Workshop's Today preview truncates proposal list items at 120 UTF-16 code units. A raw String.slice can stop after an emoji's high surrogate, leaving malformed text in the rendered preview.

Why This Change Was Made

Use the browser-compatible truncateUtf16Safe primitive already used across Control UI. Preserve the existing 120-unit budget, word-boundary behavior, and ellipsis presentation; only the unsafe cutoff changes.

User Impact

Long Skill Workshop proposal previews no longer render a replacement character when their truncation boundary falls inside an emoji.

Evidence

  • Blacksmith Testbox tbx_01kx7a49qv2xqp9yt3dbrt1mmh: focused Skill Workshop UI tests passed 4/4.
  • The regression renders a real Today preview in the DOM with an emoji spanning the old cutoff and verifies the clean ellipsis result.
  • Same Testbox: path-scoped core production/test type checks, lint, import-cycle checks, and repository guards passed.
  • git diff --check passed.
  • Fresh autoreview: no actionable findings; correctness confidence 0.99.

The path-scoped lane emitted only the unrelated warning-only temporary-directory migration report already present on current main.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Jul 11, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head 14431d3f4d256dc40b1943cb82df1113018d61d0:

  • GitHub Actions run 29134974526 completed successfully for this exact SHA.
  • Blacksmith Testbox tbx_01kx7a49qv2xqp9yt3dbrt1mmh: all 4 focused Skill Workshop UI tests passed, including a rendered-DOM regression whose emoji spans the old cutoff.
  • The same Testbox passed path-scoped core production/test type checks, lint, import-cycle checks, and repository guards. Its only warning was the unrelated temporary-directory migration report already present on current main.
  • Fresh autoreview completed with no actionable findings (correctness confidence 0.99).
  • Native review artifacts validated with zero findings; OPENCLAW_TESTBOX=1 scripts/pr prepare-run 104047 passed and verified the exact PR head.

The fix keeps the existing preview budget, word-boundary logic, and ellipsis presentation while replacing the sole unsafe raw cutoff with the established browser-safe primitive.

@steipete
steipete merged commit 67e1d43 into main Jul 11, 2026
93 of 97 checks passed
@steipete
steipete deleted the codex/fix-skill-workshop-preview-utf16 branch July 11, 2026 01:45
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant