hex/ios/HEXMobileTests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel 2a7b12bfa6
iOS: Undo dictation works after the cursor moves, and goes when it can't (#2240)
TestFlight build 56 (2ef08aa4): after moving the cursor into the dictated
text, Undo dictation did nothing. The chip stayed up for its 12 s after any
cursor move, but undoDictation only deleted when the dictation was still
right before the cursor, so a tap after a move just hid it. origin/dev
(96b4f365) had the same code.

Now the keyboard keeps the text either side of the dictation from when it
went in (DictationUndo) and finds it again in the host's context around
the cursor. When it is shown whole and exactly once, and the text either
side still matches, Undo moves the cursor to its end (UTF-16 offsets that
stay inside what the host showed), deletes it and puts the cursor back in
the text it was moved to. Text views that show only the cursor's sentence
leave out the space before it; that space goes too when the sentence starts
what they show. When it can't be found (a selection, another sentence, the
same words twice, text changed around it) the chip hides as the host
reports the change instead of sitting there doing nothing. The unmoved case
keeps its old check, now also refused while text is selected (deleteBackward
would have taken the selection first) and when what followed it moved.
KeyboardTextTarget gains selectedText (nil by default) for this.

Verified: iPhone 16 Pro simulator, iOS 27.0, a UITextView host, a real
dictation insert through Hex's hosted-keyboard-tour fixture ("Hi Sam." +
" See you at ten."), real touches: build 56 left the text unchanged after
moving into the dictation or before it; this change restores "Hi Sam."
with the cursor at 7 after moving into it, unmoved undo still works, and
moving to another sentence (before it, or into later text) hides the chip
with nothing deleted. HEXMobile tests on that simulator: 661 run, the new
case passes; the 11 cleanup-tagger failures were the unfetched model and
pass (78/78) after scripts/fetch-cleanup-model.sh.
2026-11-21 15:15:23 -05:00
..
Fixtures iOS: emoji panel with on-device suggestions (Experiments › Emoji) (#2051) 2026-11-20 15:53:24 +00:00
AutocorrectEngineTests.swift iOS: the next word gives the word before its language's accents (#2231) 2026-11-21 14:35:35 -05:00
CleanupTaggerTests.swift iOS keyboard: stale microphone errors clear, Hex key audio calls leave the main thread, counts read 1, 2, 3 (#2203) 2026-11-21 10:08:42 -05:00
CustomVocabularyTests.swift ios: custom vocabulary experiment (#1547) 2026-11-08 12:15:00 -05:00
DictationControllerTests.swift iOS: Czech keyboard, and custom words for typing (#2205) 2026-11-21 10:37:55 -05:00
DictationLanguageTests.swift iOS: dictate Latin American Spanish with Latin America's model, and keep a picked variant when the keyboard switches (#2193) 2026-11-21 09:53:34 -05:00
DictationLearningTests.swift iOS: hold the bar to dictate, Learn how I type on, a plain centred Paste, and typing logs off (#2210) 2026-11-21 12:11:58 -05:00
DotScopeTests.swift fix(ios): eliminate handoff frame stalls and add overlapping ballistic swipe throw (t1153) (#757) 2026-10-31 22:14:22 -07:00
EmojiPanelLettersKeyTests.swift iOS: experiment to put the emoji panel's ABC under the emoji key (#2221) 2026-11-21 13:41:53 -05:00
EmojiSuggesterTests.swift iOS: swipe reads the letters under the path, and the emoji bar scrubs (#2189) 2026-11-21 08:47:45 -05:00
FullKeyboardEngineTests.swift iOS: a quick space tap that drifts still types a space, and space keeps its place in a rollover (#2233) 2026-11-21 14:36:17 -05:00
HexKeyGestureTests.swift iOS: Undo dictation works after the cursor moves, and goes when it can't (#2240) 2026-11-21 15:15:23 -05:00
KeyboardBridgeTests.swift iOS: onboarding always shows the Hex key, and practice needs Hex's dictation (#2211) 2026-11-21 12:20:32 -05:00
KeyboardLayoutTests.swift iOS: Czech keyboard, and custom words for typing (#2205) 2026-11-21 10:37:55 -05:00
LanguageLearningTests.swift ios: learn each language separately (experiment) (#2188) 2026-11-21 09:00:58 -05:00
ShiftStateMachineTests.swift iOS: Greek keyboard, tonos autocorrect, and a final ς in Lowercase (#2184) 2026-11-21 08:26:30 -05:00
SwipeDecoderTests.swift iOS: swipe reads the letters under the path, and the emoji bar scrubs (#2189) 2026-11-21 08:47:45 -05:00
TranscriptCleanupTests.swift fix(labs): Apple Intelligence cleanup never pastes an answer or a preamble (#2212) 2026-11-21 13:43:24 -05:00
TypingLogTests.swift iOS: hold the bar to dictate, Learn how I type on, a plain centred Paste, and typing logs off (#2210) 2026-11-21 12:11:58 -05:00