Files
orca/mobile/src/session/MobileTerminalLiveInputStatus.tsx
T
e8c2b79a93 Fix mobile live input keyboard and Korean IME (#7273)
* feat: 모바일 터미널 한글 미러 스텝 순수 모델 추가

* feat: 미러 델타 순서 보장용 send 체인 추가

* fix: 모바일 터미널 한글 입력을 미러 모델로 전환

* fix: 탭 상태 지연 중 한글 조합 상태 소실 방지

* fix: 미러 가드와 send 체인 리뷰 지적사항 반영

탭 상태 지연으로 활성 탭 타입이 일시적으로 null이 될 때 runMirrorStep의 stale-handle 가드가 조합 중 음절을 버리지 않도록 pending-clear 효과와 동일한 null 허용 패턴 적용. 테스트 하네스가 ref와 prop을 동일 소스에서 파생하도록 결합해 실제 경로의 lag 프레임을 검증. queueTerminalLiveMirrorSend의 previousSend await를 catch로 보호.

* refactor(mobile): drop dead queueTerminalLivePendingFlush orphaned by the mirror model

The mirror model migrated all live-input sends to queueTerminalLiveMirrorSend,
leaving queueTerminalLivePendingFlush referenced only by its own tests. Remove
the dead function and its three tests.

Co-authored-by: Orca <help@stably.ai>

* fix(mobile): expose live terminal keyboard target

Co-authored-by: Orca <help@stably.ai>

* fix(mobile): refocus live keyboard after dismissal

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: realitsyourman <wongil@demodev.io>
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
Co-authored-by: Orca <help@stably.ai>
2026-07-03 16:47:59 -07:00

64 lines
1.4 KiB
TypeScript

import { StyleSheet, Text, View } from 'react-native'
import { colors, typography } from '../theme/mobile-theme'
type DictationStatus = {
readonly isStarting: boolean
readonly isRecording: boolean
readonly isProcessing: boolean
}
type MobileTerminalLiveInputStatusProps = {
readonly dictation: DictationStatus
readonly isAttaching: boolean
}
export function MobileTerminalLiveInputStatus({
dictation,
isAttaching
}: MobileTerminalLiveInputStatusProps) {
const title = dictation.isRecording
? 'Listening'
: dictation.isProcessing
? 'Processing'
: dictation.isStarting
? 'Starting mic'
: 'Live input'
const detail = dictation.isRecording
? 'Tap mic to stop'
: dictation.isProcessing
? 'Transcribing on desktop'
: dictation.isStarting
? 'Preparing microphone'
: isAttaching
? 'Uploading image to host'
: 'Tap to show keyboard'
return (
<View style={styles.status}>
<Text style={styles.title} numberOfLines={1}>
{title}
</Text>
<Text style={styles.detail} numberOfLines={1}>
{detail}
</Text>
</View>
)
}
const styles = StyleSheet.create({
status: {
flex: 1,
gap: 1
},
title: {
color: colors.textPrimary,
fontSize: typography.metaSize,
fontWeight: '600'
},
detail: {
color: colors.textSecondary,
fontSize: typography.metaSize,
fontFamily: typography.monoFamily
}
})