Repository navigation
fix(tui): handle wide Bengali graphemes - #46112
Blackman99 wants to merge 1 commit into
Conversation
|
Independently verified this on Linux with ghostty 1.3.1, which also fills in the "Terminal: Unknown" field from #46107. Isolated comparison of the two versions, same sample, 24 column bordered box. 0.4.5, requesting 0.5.9, requesting 0.5.9 on the plain Confirmed end to end as well: running the TUI from this branch in ghostty 1.3.1, the Bengali sample stays inside the panel and the border stays aligned. Word internal spacing from ghostty's two cell advance looks the same as it did on 0.4.5, so that part is not a regression. Bump checks on a local branch off dev:
One suggestion: consider dropping Also, 0.5.10 is published now. |
|
Clarification on my numbers above: those were from a bump-only branch, without this PR's test file, which is why I saw 193 pass where you report 194. I have since run this branch directly: |
|
I tested with Hindi also. same problem, same fix. Mentioning @nexxeln because he is maybe from India. |
|
Cross-linking another issue that may benefit from this OpenTUI upgrade: #36454. OpenCode on OpenTUI 0.4.5 still emits the same shutdown warning: Upstream tracked that teardown race in anomalyco/opentui#1319 and closed it as completed after renderer teardown ordering changed. The reproduction above is on macOS with OpenCode 1.18.30. Would be useful to verify #36454 against this PR / current OpenTUI before merge. If the warning disappears, this PR may address both renderer issues; if not, that gives a clear remaining upstream gap. No claim yet that the bump fixes #36454 — just flagging the likely overlap. |
|
hello @nexxeln, it's urgent |
|
This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2. — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊 |
Issue for this PR
Closes #46107
Type of change
What does this PR do?
Upgrades OpenTUI from 0.4.5 to 0.5.9 so terminals that use the
unicode-wideprofile 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-opentuiscript. 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?
origin/devbecause the width method falls back tounicode, then passes with OpenTUI 0.5.9 andunicode-wide.bun run testinpackages/tui: 194 passed, 1 skipped.bun typecheckinpackages/tui,packages/plugin, andpackages/opencode.bun turbo typecheck: 30/30 packages passed.bun install --frozen-lockfile.Screenshots / recordings
N/A — terminal-specific rendering is covered by exact wide and resized frame assertions.
Checklist