hex/ios/HEXMobileTests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel 4c07a743da
iOS: say why the keyboard couldn't use its speech model, and offer Try again (#2858)
* iOS: say why the keyboard couldn't use its speech model, and offer Try again

What: Settings › Dictation's speech model line said "The keyboard can't use it right now,
so it uses Apple's speech recognition." for six causes. The keyboard now records why with
.unavailable (KeyboardParakeetSettings.UnavailableReason: shortOfMemory, noNeuralEngine,
notOnNeuralEngine, loadFailed), and the line says it and what happens next:
- short of memory at the keyboard's last open: it tries again the next time it opens;
- a keyboard limit under 131 MB (hold .keyboardTooSmall, for good): this iPhone's keyboard
  doesn't have the memory for it;
- no Neural Engine: this iPhone can't run it in the keyboard;
- a load that threw or wasn't on the Neural Engine: the keyboard couldn't load it, with
  Try again (purgesCompiled, and the keyboard now clears its per-process set-aside when it
  sees that flag, so it really loads again);
- an older keyboard's reasonless .unavailable: couldn't use it when it last opened, tries
  again next time.
Getting ready now adds that it takes longer after a download or an update. The keyboard no
longer writes .unavailable for a load still going after loadPatience (180 s); it only logs
it. Removed: the "can't use it right now" string, which also stayed up after the cause had
passed, since nothing but the keyboard's next load, the switch or a model removal clears it.
Fixture scenes settings-dictation-model-english-<preparing|short|noengine|failed|unknown|toosmall>
for screenshots. zh-Hans for every new line.

Why: a post on X (2026-11-25) showed the sentence with no way to tell why.

Verified: DictationSSOTTests (each reason's line, the reason round trip, Try again, no line
says right now); suite and screenshots in a simbox, separately.

* iOS: run the keyboard model line test on the main actor

What: testTheKeyboardsSpeechModelLineSaysWhyItCouldntUseItAndWhatHappensNext is @MainActor.
Why: KeyboardParakeetStatus.retryInKeyboard is main-actor isolated (a View's static), and
passing the settings to it from a nonisolated test didn't compile under Swift 6.
Verified: test build in the simbox.
2026-11-25 12:22:40 -05:00
..
Fixtures iOS: emoji panel with on-device suggestions (Experiments › Emoji) (#2051) 2026-11-20 15:53:24 +00:00
AppleSpeechAssetReservationsTests.swift iOS: speech model preparation that never answers fails with Try again (#2372) 2026-11-22 12:31:22 -05:00
AutocorrectEngineTests.swift iOS: call Settings' unfinished features Labs (#2613) 2026-11-24 23:36:26 -08:00
CleanupTaggerTests.swift iOS dictation: spoken numbers written in digits for every engine (Numbers as digits) (#2414) 2026-11-22 13:55:16 -05:00
CustomVocabularyTests.swift iOS: Hex words files and Word replacements (behind Custom vocabulary) (#2782) 2026-11-24 18:58:06 -05:00
DictationControllerTests.swift iOS: both speech models download on Wi-Fi, with Use mobile data (#2846) 2026-11-25 09:10:45 -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 tests: the live words' hold cases stop depending on the Mac's uptime (#2534) 2026-11-23 11:40:53 -05:00
DictationSSOTTests.swift iOS: say why the keyboard couldn't use its speech model, and offer Try again (#2858) 2026-11-25 12:22:40 -05:00
DictationStateMachineTests.swift refactor(ios): simplify dictation capture phase, controller shims, and Parakeet wrappers\n\n- Slim KeyboardLocalCapturePhase to a read-only snapshot projection and remove its unused mutating state-machine helpers, StartupStage, ArmedFailure, ArmedReadiness, and KeepArmedOutcome\n- Remove duplicate DictationController.markModelReadyPreservingCapture(), unused keyboardSessionExpiresAt, and the redundant KeyboardJob enum wrapper in favor of String?\n- Point FullKeyboardView.offerModelNotice directly at KeyboardParakeetPlan.current().awaitsV2Download and delete legacy boolean-flattening shims (KeyboardParakeetNotice.modelAwaitsDownload, dictatesEnglish, and KeyboardParakeetDownload.hold(otherEngine:...))\n- Update DictationStateMachineTests, KeyboardBridgeTests, and DictationControllerTests to cover real snapshot projections, controller transitions, and KeyboardParakeetPlan (#2626) 2026-11-23 19:19:00 -08:00
DotScopeTests.swift fix(ios): show recording only once audio starts flowing (#2478) 2026-11-22 21:59:22 -08:00
EmojiPanelLettersKeyTests.swift iOS: call Settings' unfinished features Labs (#2613) 2026-11-24 23:36:26 -08:00
EmojiShortcodeTests.swift iOS: call Settings' unfinished features Labs (#2613) 2026-11-24 23:36:26 -08:00
EmojiSuggesterTests.swift iOS: "heart" offers ❤️; the whole-name rule moves into the emoji index (#2465) 2026-11-22 22:20:13 -05:00
FullKeyboardEngineTests+AdaptiveTouch.swift iOS: call Settings' unfinished features Labs (#2613) 2026-11-24 23:36:26 -08:00
FullKeyboardEngineTests+Layouts.swift iOS: call Settings' unfinished features Labs (#2613) 2026-11-24 23:36:26 -08:00
FullKeyboardEngineTests+Punctuation.swift iOS keyboard: Svenska, Apple's Swedish keys and long presses, the iPhone's sv dictionary (#2558) 2026-11-24 18:20:36 -05:00
FullKeyboardEngineTests+Suggestions.swift iOS keyboard: Open Hex as the last row of the Hex key menu (#2791) 2026-11-24 20:22:47 -05:00
FullKeyboardEngineTests+SwipeSpacing.swift iOS: call Settings' unfinished features Labs (#2613) 2026-11-24 23:36:26 -08:00
FullKeyboardEngineTests+SwipeTyping.swift iOS keyboard: Apple's key flicks on the docked iPad (#2549) 2026-11-24 17:48:58 -05:00
FullKeyboardEngineTests+TrackpadAndLanguages.swift iOS keyboard: Slovenčina, on Czech's keys with Apple's Slovak long presses (#2462) 2026-11-24 18:21:24 -05:00
FullKeyboardEngineTests.swift iOS: call Settings' unfinished features Labs (#2613) 2026-11-24 23:36:26 -08:00
GreeklishRomanizerTests.swift iOS: call Settings' unfinished features Labs (#2613) 2026-11-24 23:36:26 -08:00
HangulComposerTests.swift iOS: call Settings' unfinished features Labs (#2613) 2026-11-24 23:36:26 -08:00
HexKeyGestureTests.swift iOS keyboard: Open Hex as the last row of the Hex key menu (#2791) 2026-11-24 20:22:47 -05:00
HexWordsSharedCasesTests.swift iOS: Hex words files and Word replacements (behind Custom vocabulary) (#2782) 2026-11-24 18:58:06 -05:00
KeyboardBridgeTests.swift iOS: call Settings' unfinished features Labs (#2613) 2026-11-24 23:36:26 -08:00
KeyboardClipboardTests.swift iOS keyboard: a Passwords chip in login fields (#2542) 2026-11-24 17:48:47 -05:00
KeyboardDuoCoverTests.swift ios: smaller key labels on the duo's cover screen (#2346) 2026-11-22 04:35:44 -05:00
KeyboardLayoutTests.swift iOS: call Settings' unfinished features Labs (#2613) 2026-11-24 23:36:26 -08:00
KeyboardSwitchGuessTests.swift iOS: the dictation bar can start dictating by itself (Auto-start: never, on switch, always) (#2267) 2026-11-21 17:08:50 -05:00
KeyboardThemeTests.swift iOS: call Settings' unfinished features Labs (#2613) 2026-11-24 23:36:26 -08:00
LaggingField.swift iOS keyboard: Korean two-set (두벌식) layout with Hangul composition (experiment, off by default) (#2339) 2026-11-22 04:39:53 -05:00
LanguageLearningTests.swift ios: learn each language separately (experiment) (#2188) 2026-11-21 09:00:58 -05:00
SettingsHierarchyTests.swift iOS: tighten Settings information hierarchy, copy, and page split (#2450) 2026-11-22 18:35:27 -08:00
ShiftStateMachineTests.swift iOS keyboard: Hex's own number pad for number fields (#2541) 2026-11-24 17:48:35 -05:00
SwipeDecoderTests.swift iOS: call Settings' unfinished features Labs (#2613) 2026-11-24 23:36:26 -08:00
TranscriptCleanupTests.swift iOS: call Settings' unfinished features Labs (#2613) 2026-11-24 23:36:26 -08:00
TwoLanguageMergeTests.swift iOS: call Settings' unfinished features Labs (#2613) 2026-11-24 23:36:26 -08:00
TwoThumbSelectionTests.swift iOS: call Settings' unfinished features Labs (#2613) 2026-11-24 23:36:26 -08:00
TypingGateReplayTests.swift iOS keyboard: Polish autocorrects with Hex's own model, word list and capitals (#2423) 2026-11-22 14:45:55 -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
TypingReplayTests.swift ios: swipe typing in more languages (off by default) (#2428) 2026-11-22 15:46:27 -05:00