Environment: opencode 1.18.11, Windows, reproduced identically in both Windows Terminal and the desktop app.
Any line containing both Persian/Arabic (RTL) and an embedded Latin word (LTR) renders in scrambled order instead of correct right-to-left. Pure single-direction lines render fine.
The TUI appears to lay text out cell-by-cell in a monospace grid without applying the Unicode bidi algorithm, so directional runs within a line are not reordered correctly. Since this reproduces identically across terminals, it is the opencode renderer, not the terminal.
Example: a Persian sentence containing an embedded Latin token (e.g. a filename or config key) renders with wrong character order wherever the Latin token sits mid-Persian.
There is no config option for this (checked the config schema - no rtl/bidi/direction field). Please add proper Unicode bidi handling (and ideally RTL shaping) to the TUI text renderer.
Environment: opencode 1.18.11, Windows, reproduced identically in both Windows Terminal and the desktop app.
Any line containing both Persian/Arabic (RTL) and an embedded Latin word (LTR) renders in scrambled order instead of correct right-to-left. Pure single-direction lines render fine.
The TUI appears to lay text out cell-by-cell in a monospace grid without applying the Unicode bidi algorithm, so directional runs within a line are not reordered correctly. Since this reproduces identically across terminals, it is the opencode renderer, not the terminal.
Example: a Persian sentence containing an embedded Latin token (e.g. a filename or config key) renders with wrong character order wherever the Latin token sits mid-Persian.
There is no config option for this (checked the config schema - no rtl/bidi/direction field). Please add proper Unicode bidi handling (and ideally RTL shaping) to the TUI text renderer.