hex/ios/docs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel c7c6dc7f1f iOS keyboard: keep a dictation the screen lock cut short
When the iPhone locks mid-dictation, the keyboard's viewWillDisappear stops
the in-keyboard recording at once and transcribes what was said. On the
iOS 27.2 simulator, iOS then gives the keyboard about 11 s before it
freezes it until the keyboard is shown again. If the keyboard is ended while
frozen (here its process was killed 20 s after the lock), the next keyboard
offered nothing: the text was lost, and the recording sat unheard in the
keyboard's tmp folder.

Now the recording of a dictation the keyboard closed during stays on disk,
recorded in the App Group (KeyboardInterruptedRecording,
keyboard.interruptedRecording, one at a time), until its text is held. Any
keyboard that finds a recording no process of its own is transcribing
transcribes it and holds the text as the first keyboard would have. A
recording older than 24 hours is deleted unheard. A transcription given up
on while the keyboard was away keeps its recording for the next keyboard
instead of deleting it.

A dictation cut short this way also says where it stopped, for 8 s beside
its Paste dictation. In the full keyboard's strip that is a notice:
"Stopped at 0:44" over "The screen locked or you left the app", with Paste.
In the dictation bar it is one line. A keyboard extension can't tell the
screen locking from another app coming forward, so the note names both.
KeyboardHeldDictation gains stoppedAfter. It is optional, so text held by an
earlier build still decodes.

Unchanged: what is said after the lock is not recorded (a keyboard
extension can't record in the background), and the held text is still
offered as Paste dictation, not inserted by itself.

Verified:
- iOS 27.2 simulator on the Mac Studio, probe build with a stand-in final
  pass and the capture-debug.js ramp voice, locked with the simulator's lock
  button.
- Before: lock at 20 s, keyboard process killed 20 s later, unlock at 80 s:
  nothing offered, and the 19.1 s recording orphaned in tmp.
- After, same run: the new keyboard process transcribed the 19.7 s left
  recording and offered it with "Stopped at 0:19".
- After, lock at 45 s, no kill: the note "Stopped at 0:44" showed, and its
  Paste inserted the 44.8 s text into the field.
- KeyboardBridgeTests.testARecordingTheKeyboardClosedDuringWaitsForTheNextKeyboard
  covers the record, its clear and expiry, the note, held-dictation
  decoding and the view model's note. Full HEXMobileTests suite on a fresh
  iOS 27.2 iPhone 17 Pro simulator: 976 tests, 4 skipped, 0 failures.
- scripts/code-shape.py --check passes. KeyboardViewController.swift is at
  1,494 non-test lines.
2026-11-23 17:25:47 -05:00
..
acknowledgements.md Split ios/README.md into area docs under ios/docs/ (#2447) 2026-11-22 18:16:37 -08:00
build-and-test.md Split ios/README.md into area docs under ios/docs/ (#2447) 2026-11-22 18:16:37 -08:00
dictation.md iOS keyboard: keep a dictation the screen lock cut short 2026-11-23 17:25:47 -05:00
keyboard.md iOS keyboard: every point of the emoji panel takes touches, so a glide can be caught (#2547) 2026-11-23 12:45:02 -05:00
onboarding-and-setup.md Split ios/README.md into area docs under ios/docs/ (#2447) 2026-11-22 18:16:37 -08:00
releasing.md Split ios/README.md into area docs under ios/docs/ (#2447) 2026-11-22 18:16:37 -08:00
settings-and-home.md iOS: Send feedback form (Bellhop), email decides anonymous (#2575) 2026-11-23 16:00:03 -05:00
typing-logs.md Split ios/README.md into area docs under ios/docs/ (#2447) 2026-11-22 18:16:37 -08:00
verification.md iOS Settings: Home refreshes again while it shows, Into field falls back to the words over the keys, the speech model card lands on its row, docs match (#2471) 2026-11-22 23:00:12 -05:00