Note
Reviews paused
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
- Last reviewed commit: eaa04fcdc838e0126d369cc17a5fa84c12af55fd
- Latest commit, not reviewed: 83130f05531c33e166134b79b981083db9344245
Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.
Use the checkboxes below for quick actions:
- ▶️ Resume reviews
- 🔍 Trigger review
Walkthrough
The
textDirectionhelper now selects a majority direction within each sentence, then selects a majority direction across sentences. Ties use the first direction encountered. Tests cover passages that mix Arabic and English.Changes: Sentence-based text direction
Layer / File(s) Summary Sentence direction heuristic and tests
apps/web/src/textDirection.ts,apps/web/src/textDirection.test.tsThe helper classifies words by their first letter and selects majority directions per sentence and across the text. Ties use the first direction encountered. Tests cover mixed Arabic and English passages, inline abbreviations, and sentences after “U.S.” Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- pingdotgg/t3code#24050 — Introduced the shared
textDirectionhelper that this change updates. - pingdotgg/t3code#27019 — Applies the shared direction helper to additional text surfaces.
- pingdotgg/t3code#27685 — Also changes the web direction helper and its tests.
Suggested reviewers:
maria-rcks,yzn-h- pingdotgg/t3code#24050 — Introduced the shared
Merge Risk: External image Low · up to eaa04
Some quoted mixed-language paragraphs can still display left to right despite having more Arabic sentences. This is a narrow visual issue; the change is mergeable with an explicit decision to fix or accept it.
Pre-merge checks: Passed 4
Check name Status Explanation Title check Passed The title names the main change: a fix in the web app so Arabic paragraphs with many English terms render right to left. It matches the textDirection sentence-voting change and the new tests. It is sp… Linked Issues check Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request. Description check Passed The description includes Problem, Change, Scope and approval rationale, and Verification details. It documents the reproduction case, behavior changes, tests, manual checks, limitations, and agent det… Full details: Title check
Explanation
The title names the main change: a fix in the web app so Arabic paragraphs with many English terms render right to left. It matches the textDirection sentence-voting change and the new tests. It is specific and conventional-commit formatted. The title is 74 characters, which is within a normal range.
Full details: Description check
Explanation
The description includes Problem, Change, Scope and approval rationale, and Verification details. It documents the reproduction case, behavior changes, tests, manual checks, limitations, and agent details. The lowercase “verification” heading and lack of a linked issue are minor because the focused-fix rationale and verification information are present.
Finishing Touches
🧪 Generate unit tests (beta)
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts