CJK/Chinese Text Display Truncation Issue in Terminal UI (Only Left Half Visible)
Environment
- Version: v1.7.0
- Platform: iOS (mobile) 26.1
- opencode
- mac mini
- terminal: xterminal
Problem
When displaying Chinese (or other CJK) characters in the terminal interface, the text is rendered incompletely, with only the left portion of each character visible. This makes the text unreadable and significantly impacts usability for non-English users.
Steps to Reproduce
- Establish a session in the terminal for opencode.
- Output or input text containing Chinese characters.
- Observe that the characters are horizontally truncated, showing only the left half.
Expected Behavior
Chinese/CJK characters should be rendered completely and legibly, with their full width visible, similar to how ASCII characters are displayed.
Additional Context
This issue appears to be related to incorrect character cell width calculation for double-width CJK characters. The terminal UI may be allocating the same horizontal space for CJK characters as it does for ASCII characters, which is insufficient.
Hi @zhouyanbl ,
Thank you for reporting the issue.
I will upload the new version of app to App Store today.
It should be available pretty soon