Repository navigation
Add an opt-in per-character delay to type - #166
Merged
Merged
Conversation
bitomule
force-pushed
the
worktree-t-mav-153-type-delay
branch
from
December 2, 2026 23:49
c29a08a to
a394649
Compare
bitomule
force-pushed
the
worktree-t-mav-153-type-delay
branch
2 times, most recently
from
December 3, 2026 10:02
efd2cad to
f09e8d0
Compare
bitomule
force-pushed
the
worktree-t-mav-153-type-delay
branch
from
December 3, 2026 10:25
f09e8d0 to
917c1c8
Compare
A field that fetches suggestions on every keystroke can drop characters when the whole text arrives in one burst. `mav ui type TEXT --delay-per-char 100ms` and the flow param `delayPerChar` send one character per driver call with a pause between them. Without the option the text is still typed in a single call. An unreadable, negative or over-5s value is rejected before anything is typed, and a flow with a bad `delayPerChar` fails when it loads. Fixes #153
bitomule
force-pushed
the
worktree-t-mav-153-type-delay
branch
from
December 3, 2026 11:00
917c1c8 to
dcf8847
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #153.
What
typegets an opt-in pause between characters, for fields that fetch suggestions on every keystroke and drop characters when the whole text arrives in one burst.mav ui type "Kitchen table" --delay-per-char 100ms(also--delay-per-char=100ms)- type: { text: "Kitchen table", delayPerChar: 100ms }Accepted values:
100ms,0.1s, or a bare number of milliseconds (same spellings flows already use for durations).How
AXe's
typehas no delay option, so mav does it: with a delay set, each character is its own driver call and mav pauses between two characters (not before the first or after the last, so a one-character text costs nothing). The element selector only goes with the first character, since it is what focuses the field. Without the flag nothing changes: the text is still one driver call.type_delay_invalid) before anything is typed, rather than silently ignored.delayPerChar(or one on a non-typestep) fails when the flow loads.--stdin,--fileor--spec, the flag is refused rather than ignored.chars_sent); the pause stops on context cancellation.type_delay.go, plus small hooks inuiType, the flowtypestep, the flow payload struct, the usage text/golden, README and skill docs.Tests
New
type_delay_test.go: duration parsing, flag splitting, the per-character loop (order of calls and pauses, selector only on the first character, partial failure, cancellation),uiTypethrough the real AXe driver with a fake runner (oneaxe typeper character with the flag; one call without; invalid values and--stdinrefused), and flow parse/validation.Ablation: with the delayed branch in
uiTypedisabled,TestUITypeDelayPerCharTypesEachCharacterSeparatelyfails (axe type calls = [Table]); restored, it passes.make testis green on the rebased tree.Not verified against a live simulator and a suggestion-as-you-type field; the behaviour is covered by the driver-level tests above.