Skip to content

fix(tui): handle wide Bengali graphemes - #46112

Open
Blackman99 wants to merge 1 commit into
anomalyco:devfrom
Blackman99:bengali-width
Open

fix(tui): handle wide Bengali graphemes#46112
Blackman99 wants to merge 1 commit into
anomalyco:devfrom
Blackman99:bengali-width

Conversation

@Blackman99

Copy link
Copy Markdown

Issue for this PR

Closes #46107

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Upgrades OpenTUI from 0.4.5 to 0.5.9 so terminals that use the unicode-wide profile measure complex Bengali graphemes correctly. The reported sample measured 12 cells before the upgrade and 18 cells after it, which prevents cumulative drift past the panel border.

The dependency and plugin peer versions were updated with the repository's upgrade-opentui script. A renderer regression test covers Bengali wrapping inside a border, a repeated render, terminal resize, and unchanged ASCII/CJK content.

How did you verify your code works?

  • The renderer test fails on origin/dev because the width method falls back to unicode, then passes with OpenTUI 0.5.9 and unicode-wide.
  • bun run test in packages/tui: 194 passed, 1 skipped.
  • bun typecheck in packages/tui, packages/plugin, and packages/opencode.
  • Pre-push bun turbo typecheck: 30/30 packages passed.
  • bun install --frozen-lockfile.
  • Prettier and oxlint on the new test: 0 warnings, 0 errors.

Screenshots / recordings

N/A — terminal-specific rendering is covered by exact wide and resized frame assertions.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bengali graphemes can render outside TUI borders

1 participant