TypeScript
fix(mobile): explain why voice input is unavailable (#28698)
shivamd890e5c40120
diff --git a/apps/mobile/src/features/settings/SettingsMicrophoneRouteScreen.tsx b/apps/mobile/src/features/settings/SettingsMicrophoneRouteScreen.tsxindex 0af6eacd30c..480ae40232e 100644--- a/apps/mobile/src/features/settings/SettingsMicrophoneRouteScreen.tsx+++ b/apps/mobile/src/features/settings/SettingsMicrophoneRouteScreen.tsx@@ -18,6 +18,7 @@ import {microphoneEntryKey,microphoneOrder,} from "../../lib/microphonePriority";+import { getLocalVoiceTranscriber } from "../../native/voiceTranscription";import { mobilePreferencesAtom, updateMobilePreferencesAtom } from "../../state/preferences";import { ListRowLayout } from "../../components/ui/ListRowLayout";import { ThreadSwipeable } from "../home/thread-swipe-actions";@@ -89,6 +90,35 @@ const KINDS: Record<};export function SettingsMicrophoneRouteScreen() {+ return getLocalVoiceTranscriber() === null ? <VoiceInputUnavailable /> : <MicrophoneSettings />;+}++function VoiceInputUnavailable() {+ const insets = useSafeAreaInsets();+ return (+ <View collapsable={false} className="flex-1 bg-sheet">+ <ScrollView+ contentInsetAdjustmentBehavior="automatic"+ showsVerticalScrollIndicator={false}+ className="flex-1"+ contentContainerClassName="gap-3 px-5 pt-4"+ contentContainerStyle={{ paddingBottom: Math.max(insets.bottom, 18) + 18 }}+ >+ <SettingsSection title="Voice input">+ <ListRowLayout icon="mic" label="Not available on this device" />+ </SettingsSection>+ <Text className="px-2 text-sm text-foreground-muted">+ T3 Code's voice input uses Apple's on-device speech transcription, which needs iOS 26 or+ later on a device that supports it. Without it, the composer has no microphone button, and+ allowing microphone access won't add one. Apple keyboard dictation is separate and isn't+ affected.+ </Text>+ </ScrollView>+ </View>+ );+}++function MicrophoneSettings() {const insets = useSafeAreaInsets();const preferencesResult = useAtomValue(mobilePreferencesAtom);const savePreferences = useAtomSet(updateMobilePreferencesAtom);diff --git a/docs/user/composer.md b/docs/user/composer.mdindex 49f49a87e36..e0c8e69bab6 100644--- a/docs/user/composer.md+++ b/docs/user/composer.md@@ -182,6 +182,10 @@ On supported iPhones with iOS 26 or later, use the composer's microphone to recothen confirm to transcribe. Text is inserted where your selection was whenrecording started, ready for you to review and edit before sending.+Voice input depends on Apple's on-device speech transcription. On a device without+it, the composer has no microphone button and **Settings → Microphone** says voice+input isn't available.+The first use may download Apple's speech model and needs a network connection.Later transcription works offline for that language. Recordings can be up to fiveminutes long. Canceling, leaving the screen, or an audio interruption discards the