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
-
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.
- Behavior: When navigating left/right across Thai text with arrow keys, the cursor stops on zero-width combining characters (e.g.
-
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.
- Behavior: In standard monospace terminals, syllables ending with Sara Am (such as
-
Forward Deletion (
Deletekey) Incompleteness:- Behavior: Pressing the
Deletekey on a complex Thai grapheme cluster (likeที่orน้ำ) only deletes the base character, leaving orphaned floating tone marks or vowel signs behind.
- Behavior: Pressing the
2. Steps to Reproduce
In the agy interactive prompt:
- Type
"ที่นี่"(THI-NI). - Press Left Arrow: Notice that the cursor takes 2 keypresses to move across
"นี่"because it stops on the tone markU+0E48and vowelU+0E35. - Type
"นำ"(NAM) and press Left Arrow: The cursor stops in the middle of the syllable instead of jumping across the 2-cell unit. - Move cursor to the beginning of
"ที่"and press theDeletekey: 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!