[TUI / CLI] Thai text input issues in Antigravity CLI: cursor trapping, 2-cell Sara Am width desync, and forward deletion

Hello Antigravity Team,

While using the Antigravity CLI (agy) with Thai text input, I have observed several UX and cursor positioning issues in the terminal input box (textarea).

Below is a detailed report of the observed behavior, reproduction steps, and links to upstream issues already filed in the relevant Go TUI libraries.


1. Observed Issues in CLI Input Box

  1. Cursor Trapping on Combining Marks (Zero-width vowels & tone marks):

    • Behavior: When navigating left/right across Thai text with arrow keys, the cursor stops on zero-width combining characters (e.g. U+0E31 ไม้หันอากาศ, U+0E34-0E3A สระบน/ล่าง, U+0E47-0E4E วรรณยุกต์).
    • User Impact: Pressing Left/Right Arrow requires multiple keypresses to move past a single visual syllable column. The cursor appears visually “stuck” in place before finally moving.
  2. Thai Sara Am (U+0E33 / ำ) 2-Cell Width Desync:

    • Behavior: In standard monospace terminals, syllables ending with Sara Am (such as "นำ" or "น้ำ") visually occupy 2 monospace cells (base consonant + spacing vowel glyph).
    • Issue: The cursor navigation treats the entire syllable as occupying only 1 cell. This causes the cursor to visually desynchronize from the actual text position on screen, and pressing Backspace can accidentally erase the base consonant while leaving the vowel glyph stranded.
  3. Forward Deletion (Delete key) Incompleteness:

    • Behavior: Pressing the Delete key on a complex Thai grapheme cluster (like ที่ or น้ำ) only deletes the base character, leaving orphaned floating tone marks or vowel signs behind.

2. Steps to Reproduce

In the agy interactive prompt:

  1. Type "ที่นี่" (THI-NI).
  2. Press Left Arrow: Notice that the cursor takes 2 keypresses to move across "นี่" because it stops on the tone mark U+0E48 and vowel U+0E35.
  3. Type "นำ" (NAM) and press Left Arrow: The cursor stops in the middle of the syllable instead of jumping across the 2-cell unit.
  4. Move cursor to the beginning of "ที่" and press the Delete key: The base consonant "ท" is deleted, but the vowel " ี่ " remains stranded.

3. Upstream Issue Trackers

Because Go terminal applications commonly rely on open-source libraries such as bubbles, uniseg, and displaywidth, I have documented and opened detailed issues upstream with reproduction cases:

  • Charmbracelet Bubbles (Textarea cursor navigation & deletion):
    charmbracelet/bubbles#1061
  • Rivo Uniseg (Thai Sara Am 2-cell grapheme cluster width calculation):
    rivo/uniseg#63
  • Clipperhouse Displaywidth (Thai Sara Am 2-cell width handling):
    clipperhouse/displaywidth#25

Suggestion

If the Antigravity CLI vendors or depends on these libraries (or internal equivalents), incorporating the grapheme-aware navigation and the 2-cell width adjustment for U+0E33 syllables will significantly improve the terminal experience for Thai users and other complex script languages.

Thank you!

Hi @namin,

Could you please share which version of Antigravity CLI you are using, as well as the reproduction steps or a screen recording of the issue?

Hi @Ambati_Rajendra ,

Thank you for looking into this!

Environment:

  • Antigravity CLI: v1.2.14
  • Terminal Emulators: Ghostty 1.3.1 and WezTerm 0-unstable-2026-03-31 (tested on both)
  • OS: NixOS 26.05.20260903.a5cc6f2 (Yarara) x86_64-linux

Steps to Reproduce:

1. Severe Cursor Desync & Misplaced Insertions

  1. Run agy in ghostty or wezterm, and paste this sentence:
    ผู้นำขี่ม้าสีดำค้ำคูณคนยากจนที่พร่ำรำพันถึงความช้ำใจในยามค่ำคืนจนรุ่งเช้า
  2. Use arrow keys to navigate somewhere into the middle of the sentence.
  3. Type any ASCII letter (e.g. x).
  • Result: The visual cursor is completely desynchronized from the actual buffer. The letter x appears at a completely different position from where the cursor is resting.

2. Ghost Characters & Silent Buffer Corruption on Delete

  1. Clear the prompt, then paste: หนี่
  2. Press Home (to line start), press Right Arrow once, then press Delete.
    • Notice: You will visually see หี่ to the left of the cursor.
  3. Now type the letter x.
  • Result: The combining marks vanish from the screen and it only displays หx. However, the combining marks are still lingering in the internal buffer behind x (หxี่), creating a desync between the terminal display and buffer.

3. Arrow Navigation Traversal

  1. Clear the prompt, then paste: ที่นี่
  2. Press Left Arrow.
  • Result: You need to press the Left Arrow key 3 times just to move back 1 visual character cell.

Hope this helps! Let me know if you need any additional info.