hex/ios/HEXShared/FullKeyboard
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel e82cabb561 iOS keyboard: a failure from Hex shows for seconds, not forever, and the Hex key retries it
X testers on build 56 and earlier: "The keyboard keeps either bringing me back to
the app or telling me another app is using the microphone" (@itsjling) and "The
another app is using audio message seems inaccurate cause it's showing for me all
the time although it's working fine" (@RedaSjakur).

Cause, reproduced on build 56 (2ef08aa4) in an iOS 27.2 simulator on the Mac Studio
(no microphone input): Hex's dictation failed ("Hex couldn't start the microphone.
Try again."), Hex was then closed, and a minute later the Hex keyboard's strip in
Settings' search field still said so. Hex writes its snapshot only while it runs,
so a failed snapshot (heartbeat 0, no time) stayed in the App Group, and
KeyboardViewModel read any .failed snapshot as failed whatever its age. The code
path is unchanged on origin/dev. With a warm session up it was worse: Hex stayed
in .failed, consumeKeyboardCommand ignored every start unless the phase was .ready,
and the full keyboard's Hex key (isWarm = Full Access && warm available) kept
sending starts to it, so nothing recorded until Hex was opened. The keyboard's own
failure snapshot also reads as available for its 6 s, so a Hex key tap right after
an in-keyboard failure went to a warm session that doesn't exist.

Now:
- KeyboardSnapshot.messageAt: when Hex wrote the message (DictationController
  stamps a failure when its phase becomes failed, and keyboardMessage when set; the
  keyboard's own failure stamps its snapshot). The keyboard drops a message, and
  reads a failure as offline, 8 s after it (messageShownFor), and at once for a
  snapshot with no time (an earlier build's). Whether a warm session is up and any
  result stay as they were.
- KeyboardViewModel.dictatesThroughHex (Full Access, warm available, not failed),
  used by the full keyboard's Hex key and its touch-down capture: after a failure
  both keyboards dictate in the keyboard, as the Dictation bar already did.
- Hex takes a keyboard start while failed when the failure was the microphone for
  a keyboard dictation with the model loaded (captureFailed): the next Hex key is
  its Try again. Model failures still wait for Hex to get ready again.

Not changed: the 32 MB memory threshold and keyboardNeedsHex, the two ways the Hex
key opens Hex. In the simulator the handoffs logged "speech model missing here"
after the keyboard's own asset check failed ("anomaly.hex.mobile.keyboard is not
subscribed to assistant.en_US") on a sim whose Hex had never installed a model,
which is the intended path; a device's reason needs its probe log.

Verified: new KeyboardBridgeTests.testAFailureHexWroteAWhileAgoIsOver and
DictationControllerTests.testAWarmSessionsMicrophoneFailureIsRetriedFromTheKeyboard;
KeyboardBridgeTests and DictationControllerTests pass (79 tests, 0 failures, iPhone
17 Pro iOS 27.2 simulator). In the simulator with this build, the same failure no
longer shows in the keyboard a minute later.
2026-11-21 10:00:12 -05:00
..
Emoji iOS: delete keeps an autocorrection and the strip offers the revert, smart quotes, a two-way trackpad, and key clicks (#2192) 2026-11-21 09:22:10 -05:00
AccentPicker.swift iOS: Greek keyboard, tonos autocorrect, and a final ς in Lowercase (#2184) 2026-11-21 08:26:30 -05:00
AdaptiveTouch.swift iOS: the full keyboard matches the system keyboard one to one (#2178) 2026-11-21 07:20:46 -05:00
AdaptiveTouchLabels.swift iOS: Adaptive touch, personal key centres learned on device (Experiment, off by default) (#2146) 2026-11-21 06:13:04 +00:00
AutocorrectEngine+Dictionaries.swift iOS: text replacements fire like the system's and stay put, and no stray capitals from suggestions (#2173) 2026-11-21 06:10:45 -05:00
AutocorrectEngine+Distance.swift ios: learn each language separately (experiment) (#2188) 2026-11-21 09:00:58 -05:00
AutocorrectEngine.swift iOS: delete keeps an autocorrection and the strip offers the revert, smart quotes, a two-way trackpad, and key clicks (#2192) 2026-11-21 09:22:10 -05:00
DeleteWordSwipe.swift iOS: delete keeps an autocorrection and the strip offers the revert, smart quotes, a two-way trackpad, and key clicks (#2192) 2026-11-21 09:22:10 -05:00
FullKeyboardEngine+Keys.swift ios: learn each language separately (experiment) (#2188) 2026-11-21 09:00:58 -05:00
FullKeyboardEngine+Revert.swift iOS: delete keeps an autocorrection and the strip offers the revert, smart quotes, a two-way trackpad, and key clicks (#2192) 2026-11-21 09:22:10 -05:00
FullKeyboardEngine+SwipeTyping.swift iOS: delete keeps an autocorrection and the strip offers the revert, smart quotes, a two-way trackpad, and key clicks (#2192) 2026-11-21 09:22:10 -05:00
FullKeyboardEngine.swift iOS: delete keeps an autocorrection and the strip offers the revert, smart quotes, a two-way trackpad, and key clicks (#2192) 2026-11-21 09:22:10 -05:00
FullKeyboardPalette.swift iOS: Return follows the app's return key type, and the dictation bar's does too (#2200) 2026-11-21 09:54:57 -05:00
FullKeyboardSettings.swift iOS: the full keyboard matches the system keyboard one to one (#2178) 2026-11-21 07:20:46 -05:00
FullKeyboardTouch.swift iOS: delete keeps an autocorrection and the strip offers the revert, smart quotes, a two-way trackpad, and key clicks (#2192) 2026-11-21 09:22:10 -05:00
FullKeyboardView+Emoji.swift iOS: text replacements without autocorrect, End with a period, and emoji and symbols on the Dictation bar (#2147) 2026-11-21 06:24:16 +00:00
FullKeyboardView.swift iOS keyboard: a failure from Hex shows for seconds, not forever, and the Hex key retries it 2026-11-21 10:00:12 -05:00
GermanCapitals.swift iOS: German autocorrect capitalises common nouns (haus, auto, zeit) (#2169) 2026-11-21 05:30:03 -05:00
GreekTyping.swift iOS: delete keeps an autocorrection and the strip offers the revert, smart quotes, a two-way trackpad, and key clicks (#2192) 2026-11-21 09:22:10 -05:00
HexKeyGesture.swift iOS: the keyboard starts listening on touch-down, with its capture page ready when it opens (#2089) 2026-11-20 20:04:35 +00:00
HexKeyViews.swift iOS: the Hex key's mark sits on the suggestions' line (#2202) 2026-11-21 09:59:24 -05:00
KeyboardBackdropView.swift iOS: opaque keyboard panel so stale system layers can't show through, and a nil-safe field ID (#2139) 2026-11-21 03:45:47 +00:00
KeyboardClipboard.swift iOS: Code from Messages shows only when Apple's keyboard is on (#2187) 2026-11-21 08:39:11 -05:00
KeyboardKeyPlaneView.swift iOS: Return follows the app's return key type, and the dictation bar's does too (#2200) 2026-11-21 09:54:57 -05:00
KeyboardLanguage.swift iOS: Latin American Spanish dictates with US or Mexican Spanish, and labels name the variant (#2191) 2026-11-21 09:15:50 -05:00
KeyboardLaunchWork.swift iOS keyboard: nothing heavy before the keys' first frame (#2185) 2026-11-21 08:28:59 -05:00
KeyboardLayout.swift iOS: the top bar's words, dividers and pill sit on Apple's line (#2201) 2026-11-21 09:55:54 -05:00
KeyboardStripView.swift iOS: the top bar's words, dividers and pill sit on Apple's line (#2201) 2026-11-21 09:55:54 -05:00
LanguageLearning.swift ios: learn each language separately (experiment) (#2188) 2026-11-21 09:00:58 -05:00
never-suggest.tsv iOS: never suggest slurs, and swear words only when asked (#2093) 2026-11-20 20:17:31 +00:00
OffensiveWords.swift iOS: never suggest slurs, and swear words only when asked (#2093) 2026-11-20 20:17:31 +00:00
ReturnKeyStyle.swift iOS: Return follows the app's return key type, and the dictation bar's does too (#2200) 2026-11-21 09:54:57 -05:00
ShiftStateMachine.swift iOS: Greek keyboard, tonos autocorrect, and a final ς in Lowercase (#2184) 2026-11-21 08:26:30 -05:00
SmartPunctuation.swift iOS: delete keeps an autocorrection and the strip offers the revert, smart quotes, a two-way trackpad, and key clicks (#2192) 2026-11-21 09:22:10 -05:00
SwipeDecoder.swift iOS: swipe reads the letters under the path, and the emoji bar scrubs (#2189) 2026-11-21 08:47:45 -05:00
SwipeTyping.swift iOS: swipe reads the letters under the path, and the emoji bar scrubs (#2189) 2026-11-21 08:47:45 -05:00
TextChecking.swift iOS: German autocorrect capitalises common nouns (haus, auto, zeit) (#2169) 2026-11-21 05:30:03 -05:00
TrackpadCursor.swift iOS: delete keeps an autocorrection and the strip offers the revert, smart quotes, a two-way trackpad, and key clicks (#2192) 2026-11-21 09:22:10 -05:00
TypingDecoder.swift iOS: Adaptive touch, personal key centres learned on device (Experiment, off by default) (#2146) 2026-11-21 06:13:04 +00:00
TypingJournal.swift ios: learn each language separately (experiment) (#2188) 2026-11-21 09:00:58 -05:00
TypingJournalLearning.swift ios: learn each language separately (experiment) (#2188) 2026-11-21 09:00:58 -05:00