feat(tui): native bidi/RTL rendering for prompts and messages - #48589
Closed
muhamedbeshir wants to merge 3286 commits into
Closed
feat(tui): native bidi/RTL rendering for prompts and messages#48589muhamedbeshir wants to merge 3286 commits into
muhamedbeshir wants to merge 3286 commits into
Conversation
Co-authored-by: Hona <10430890+Hona@users.noreply.github.com>
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
Co-authored-by: Hona <10430890+Hona@users.noreply.github.com>
This reverts commit 0ff9ccb.
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
…7738) Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Co-authored-by: nexxeln <95541290+nexxeln@users.noreply.github.com>
Contributor
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate Found:
|
Port of the UAX anomalyco#9 fix to the opencode2 (v2) codebase, which uses @opentui/core 0.5.10. - bidi engine (bidi-js wrapper): first-strong paragraph direction, LRI/PDI isolation for URLs/paths/numbers/code spans, grapheme/width-aware wrapping, logical<->visual caret maps. - BidiTextareaRenderable for the prompt; edit buffer stays logical. - withBidiMarkdown composes with the existing plugins.markdown() renderNode for assistant paragraphs/headings; code/tables/diffs keep the stock LTR renderer. - BidiTextRenderable for user message echoes. - English-only content takes the stock render path; selection/copy stays logical. - Tests: engine unit tests + real test-renderer component tests (31 passing).
muhamedbeshir
force-pushed
the
oc2-rtl-ar-fix
branch
from
September 12, 2026 03:07
82c4d0c to
4292f8e
Compare
3 tasks
Contributor
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Render Arabic, Persian, Urdu and Hebrew text correctly in the native TUI using UAX #9, without terminal-side bidi support or destructive text rewriting.
Issue for this PR
Closes #
Type of change
What does this PR do?
Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the PR.
If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!
How did you verify your code works?
Screenshots / recordings
If this is a UI change, please include a screenshot or recording.
Checklist
If you do not follow this template your PR will be automatically rejected.