cotabby icon indicating copy to clipboard operation
cotabby copied to clipboard

[Bug] : Broken RTL inline completion alignment

Open Wyetgf opened this issue 6 months ago • 2 comments

Summary

When typing in Arabic (Right-to-Left language), the inline text completion/ghost text does not align properly next to the last word. Instead, it appears overlapping above the text or drifting too far to the edge, unlike English which works seamlessly.

Environment

macOS version: : 26.4.1

Host app: all the apps

Tabby engine: ollama

Model name (if Open Source): tabby-fast-1

Accessibility permission granted: yes

Input Monitoring permission granted: yes

Steps to reproduce

Switch the system keyboard layout to Arabic (Right-to-Left).

Open a supported host application and start typing a sentence in Arabic.

Observe the position and behavior of the generated inline completion (ghost text).

Switch back to English (Left-to-Right) and type to compare the behavior.

Expected behavior

The inline text completion should seamlessly adapt to Right-to-Left (RTL) text orientation. The ghost text should automatically and accurately align right next to the last typed Arabic word, maintaining a smooth and non-disruptive writing flow. Actual behavior

When switching to Arabic, the layout alignment breaks. The completion text becomes confusing and misplaced—either floating directly on top of the current word or shifting far away towards the screen/container boundary. This makes the typing experience disorienting, whereas switching to English instantly resolves the alignment and works perfectly. Notes

Note: This persistent RTL alignment bug is a regression that has been present for a long time, causing users who rely on Arabic to abandon the apps like cotypist.

https://github.com/user-attachments/assets/ed404cb8-c903-48af-89b6-5ae852eb4de0

Wyetgf avatar May 21 '26 16:05 Wyetgf

Thanks for the report, currently investigating

FuJacob avatar May 23 '26 09:05 FuJacob

@Wyetgf we just added support for RTL in latest release 0.0.5-beta It may have some positioning issues for ghost text, we will continually try to improve the experience. For browser, firefox currently has the best experience, please let us know your thoughts and feel free open issues again or comment here if you see anymore issues.

FuJacob avatar May 23 '26 10:05 FuJacob