You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Locate text in a snapshot by terminal row and cell span #102
A string search for a button label returns code-point offsets. A clickable cell following three wide characters is at column 7 while the string match begins at index 4.
Motivation
Expose every exact match as a row and a half-open range of terminal columns on an immutable snapshot.
From the tagged libvt checkout, install the locked development dependencies with uv sync --frozen --python 3.14 --all-groups --all-extras. Use the checkout root as the working directory.
Save the following as case.py at the checkout root and run uv run --no-sync python case.py.
CPython 3.14.6 on Linux ARM64 under WSL2. The example produced the reported result against both v0.0.1a4 and the tested trunk revision.
Observed output
string index 4 actual G cells [7, 10]
Proposal
Start with complete grapheme matches within a single viewport row. Return all matching spans in row order and define missing, duplicate and clipped-glyph behavior.
Developer experience — Downstream TUIs can reuse one locator for clicking, assertions and highlighting.
Immediate benefit — A click lands on the intended label regardless of the width of its prefix.
Longer-term benefit — A cell-aware query surface can support multiple input transports and screen profiles.
End-user experience — Clicking a translated or emoji-prefixed label reaches the visible choice.
The local PTY replay searched 界界界·Go Go. It found the two Go spans at display columns 7 and 10. Clicking with the returned cell span chose Ferry. Replacing it with a Python string index chose Harbor. Related PR #133
Activity
tony commentedon Dec 3, 2026
The local PTY replay searched
界界界·Go Go. It found the twoGospans at display columns 7 and 10. Clicking with the returned cell span chose Ferry. Replacing it with a Python string index chose Harbor. Related PR #133