Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
feat(mobile): 安卓交互全面对齐 iOS (#5149)
Dash374923c219ba
diff --git a/apps/mobile/app/automations/[deviceId].tsx b/apps/mobile/app/automations/[deviceId].tsxindex e4b27d1de5..c449c0b1e5 100644--- a/apps/mobile/app/automations/[deviceId].tsx+++ b/apps/mobile/app/automations/[deviceId].tsx@@ -835,9 +835,7 @@ export default function AutomationsScreen() {testID: 'automations.createButton',}}backTestID="automations.backButton"- eyebrow="Remote Automations"onBack={() => goBackGuarded(router)}- subtitle={t('devices.automations.subtitle', { active: overview.activeCount, total: overview.totalCount })}title={deviceName}titleTestID="automations.title"/>diff --git a/apps/mobile/app/companions/direct/[threadId].tsx b/apps/mobile/app/companions/direct/[threadId].tsxindex e6cb69164d..f46d104420 100644--- a/apps/mobile/app/companions/direct/[threadId].tsx+++ b/apps/mobile/app/companions/direct/[threadId].tsx@@ -55,7 +55,7 @@ export default function CompanionDirectMessages() {const messages = Array.isArray(thread?.messages) ? thread.messages : [];return <SafeAreaView edges={simpleScreenSafeAreaEdges()} style={styles.screen}><SimpleStackHeader title={viewer && peer ? `${viewer.name} ⇄ ${peer.name}` : t('devices.companions.messages')}- subtitle={t('devices.companions.readOnly')} onBack={() => goBackGuarded(router)} />+ onBack={() => goBackGuarded(router)} /><ScrollView contentContainerStyle={styles.content} testID="companion.directThread">{!online ? <Text style={styles.note}>{t('devices.resources.hostOffline')}</Text> : null}{messages.map((message) => {diff --git a/apps/mobile/app/devices/[deviceId].tsx b/apps/mobile/app/devices/[deviceId].tsxindex b4c7896654..569251b1dd 100644--- a/apps/mobile/app/devices/[deviceId].tsx+++ b/apps/mobile/app/devices/[deviceId].tsx@@ -686,9 +686,7 @@ function DeviceDetailScreenContent() {<SimpleStackHeadersyncing={!showConnectionBanner && (loading || status === 'connecting')}backTestID="deviceDetail.backButton"- eyebrow={t('devices.detail.automationScope.eyebrow')}onBack={() => goBackGuarded(router)}- subtitle={deviceName}title={automationScopeName ?? t('devices.detail.automationScope.title')}titleTestID="deviceDetail.title"/>@@ -765,9 +763,7 @@ function DeviceDetailScreenContent() {testID: 'deviceDetail.newSessionButton',}}backTestID="deviceDetail.backButton"- eyebrow={t('devices.detail.projectScope.eyebrow')}onBack={() => goBackGuarded(router)}- subtitle={`${projectWorkingDir} · ${deviceName}`}title={projectName ?? deviceName}titleTestID="deviceDetail.title"/>@@ -886,11 +882,7 @@ function DeviceDetailScreenContent() {testID: 'deviceDetail.newSessionButton',}}backTestID="deviceDetail.backButton"- eyebrow="Remote Device"onBack={() => goBackGuarded(router)}- subtitle={projectWorkingDir- ? t('devices.detail.subtitle.deviceActive', { deviceName, count: filterCounts.active })- : t('devices.detail.subtitle.activeAndProjects', { count: filterCounts.active, projects: filterCounts.projectCount })}title={projectName ?? deviceName}titleTestID="deviceDetail.title"/>diff --git a/apps/mobile/app/sessions/[sessionId].tsx b/apps/mobile/app/sessions/[sessionId].tsxindex ad3fbdfcd3..3e6434be92 100644--- a/apps/mobile/app/sessions/[sessionId].tsx+++ b/apps/mobile/app/sessions/[sessionId].tsx@@ -198,8 +198,6 @@ import { BlurBackdrop } from '@/session/BlurBackdrop';import { SheetModal } from '@/session/SheetModal';import { SheetGrabber, SheetSurface } from '@/session/SheetSurface';import { NativePermissionSheet } from '@/session/NativePermissionSheet';-import { MobilePermissionPickerList } from '@/session/MobilePermissionPickerList';-import { computeContextSheetSnapHeights, type ContextSheetSnap } from '@/session/contextSheetModel';import { permissionAccentColor, permissionPresentation } from '@/session/permissionPresentation';import {SessionMenuSheet,@@ -563,7 +561,6 @@ import {findMobileMessageSearchHits,nextMessageSearchIndex,normalizeMessageSearchIndex,- type MobileMessageSearchHit,} from '@/session/messageSearch';import {buildSearchLoadEarlierAction,@@ -1242,14 +1239,6 @@ export default function SessionScreen() {const [modelSheetOpen, setModelSheetOpen] = useState(false);// 权限模式独立浮窗(composer 左侧图标钮点开,与模型浮窗同属 composer 激活态)。const [permissionSheetOpen, setPermissionSheetOpen] = useState(false);- const [permissionSheetSnap, setPermissionSheetSnap] = useState<ContextSheetSnap>('half');- const permissionSheetHeights = useMemo(- () => computeContextSheetSnapHeights({- safeAreaTopInset: insets.top,- screenHeight: windowDimensions.height,- }),- [insets.top, windowDimensions.height],- );// 已建会话的模型浮窗可先浏览另一 Agent;只改此浏览态不触碰会话,选模型才登记 intent。const [modelSheetAgentKind, setModelSheetAgentKind] = useState<MobileSessionAgentKind>('claude-code');const [attachments, setAttachments] = useState<RemoteSerializedAttachment[]>([]);@@ -2850,6 +2839,14 @@ export default function SessionScreen() {() => Math.ceil(bottomOverlayContentHeight),[bottomOverlayContentHeight],);+ // Android 输入区与顶栏一样半透明:整块挂到根浮层盖在常驻消息层上。伙伴对话保持实底。+ const androidFrostedComposer = Platform.OS === 'android' && !companionChat;+ // 浮层不在键盘避让容器里,按容器缩高后的实际高度摆放,输入框才会被键盘照旧顶上去。+ const [keyboardAreaHeight, setKeyboardAreaHeight] = useState<number | null>(null);+ const handleKeyboardAreaLayout = useCallback((event: LayoutChangeEvent) => {+ const next = Math.round(event.nativeEvent.layout.height);+ setKeyboardAreaHeight((current) => (current === next ? current : next));+ }, []);const applyComposerDocument = useCallback((value: ComposerDocument,@@ -6632,7 +6629,6 @@ export default function SessionScreen() {hitSlop={COMPOSER_CONTROL_HIT_SLOP}onPress={() => {setModelSheetOpen(false);- setPermissionSheetSnap('half');setPermissionSheetOpen(true);}}style={[@@ -8865,7 +8861,19 @@ export default function SessionScreen() {{Platform.OS === 'ios' ? (<SessionHeaderNativeBlur height={Math.max(topOverlayHeight, insets.top + 44) + spacing.xxl} />) : null}+ <SessionChromeLayer+ hiddenFromAccessibility={sessionListDrawerOverlayMounted}+ left={paneLayout.detail.x}+ viewport={detailViewport}+ width={paneLayout.detail.width}+ ><View ref={topOverlayRef} onLayout={handleTopOverlayLayout} pointerEvents="box-none" style={styles.sessionChrome} testID="session.chrome">+ {/* Android 顶栏与首页顶栏同一底:半透明 surface + 模糊,消息从下面滚过时能透出一点。 */}+ {Platform.OS !== 'ios' && !companionChat ? (+ <View pointerEvents="none" style={StyleSheet.absoluteFill} testID="session.chromeFrost">+ <BlurBackdrop intensity={50} overlayColor={colors.surfaceTranslucent} />+ </View>+ ) : null}<View style={[styles.sessionChromeContent, { paddingTop: horizontalSystemHeader ? nativeHeaderHeight : insets.top + (paneLayout.persistent ? spacing.lg : 0) }, companionChat && { backgroundColor: colors.surface }]}>{headerNode}@@ -8891,6 +8899,7 @@ export default function SessionScreen() {) : null}</View></View>+ </SessionChromeLayer>{sharedTaskExit.dialog}{currentSession ? (<SessionMenuSheet@@ -8950,7 +8959,6 @@ export default function SessionScreen() {/>) : null}<SessionSearchSheet- activeHit={activeSearchHit}activeIndex={activeSearchIndex}hasOlderMessages={hasOlderMessages && !isScheduleDetail}hitCount={searchHits.length}@@ -9135,38 +9143,18 @@ export default function SessionScreen() {visible={modelSheetOpen && canUseRemoteSessionControls}/>) : null}- {/* 权限模式独立浮窗(composer 权限图标钮点开;列表复用 MobilePermissionPickerList,- 选择走 confirmFullAccessChange + maker:set-permission-mode 后关浮窗)。 */}+ {/* 权限模式独立浮窗(composer 权限图标钮点开)。两端同一语义:点选先关浮窗,关闭完成后+ 再走 confirmFullAccessChange + maker:set-permission-mode。 */}{currentSession && runtimeOptions ? (- Platform.OS === 'ios' ? (<NativePermissionSheet visible={permissionSheetOpen && canUseRemoteSessionControls} onClose={() => setPermissionSheetOpen(false)}- activeMode={displayPermissionMode} disabled={controlBusy || !canUseRemoteSessionControls} onSelect={selectSessionPermissionMode}- options={runtimeOptions.permissionOptions} testID="session.permissionSheet" />) : (<SheetModal- backdropTestID="session.permissionSheet.backdrop"- onBackdropPress={() => setPermissionSheetOpen(false)}- onRequestClose={() => setPermissionSheetOpen(false)}+ <NativePermissionSheetvisible={permissionSheetOpen && canUseRemoteSessionControls}- >- <SheetSurface- bottomInset={insets.bottom}- heights={permissionSheetHeights}- onClose={() => setPermissionSheetOpen(false)}- onSnapChange={setPermissionSheetSnap}- snap={permissionSheetSnap}- testID="session.permissionSheet"- title={t('models.picker.permissionTitle')}- >- <MobilePermissionPickerList- activeMode={displayPermissionMode}- disabled={controlBusy || !canUseRemoteSessionControls}- onSelect={(mode) => {- selectSessionPermissionMode(mode);- setPermissionSheetOpen(false);- }}- options={runtimeOptions.permissionOptions}- testID="session.permissionSheet.option"- />- </SheetSurface>- </SheetModal>)+ onClose={() => setPermissionSheetOpen(false)}+ activeMode={displayPermissionMode}+ disabled={controlBusy || !canUseRemoteSessionControls}+ onSelect={selectSessionPermissionMode}+ options={runtimeOptions.permissionOptions}+ testID="session.permissionSheet"+ />) : null}{composerPreviewUrl && composerGalleryImages.length > 0 ? (// composer 托盘图片的全屏查看(沿用聊天消息同款 ImageLightbox;本地图无需远端取件)。@@ -9216,8 +9204,10 @@ export default function SessionScreen() {key={auth.accountGeneration}activeKey={JSON.stringify([deviceId, sessionId])}ready={topOverlayHeight > 0 && (historyView.snapshot.ready || messageListItems.length > 0 || (!loading && !syncingWhileEmpty))}- topInset={topOverlayHeight}- bottomInset={bottomOverlayHeight}+ // Android 的常驻消息层画在页面之上;顶栏经 SessionChromeLayer 盖在它上面,+ // 所以消息层从顶部开始绘制,滚动时能透过半透明顶栏看到。+ topInset={Platform.OS === 'android' ? 0 : topOverlayHeight}+ bottomInset={androidFrostedComposer ? 0 : bottomOverlayHeight}interactive={!sessionListDrawerOverlayMounted}><ChatFilePathContext.Provider value={chatFilePathContextValue}>@@ -9350,6 +9340,18 @@ export default function SessionScreen() {inset={nativeShellLayout.keyboardBottomInset}/>) : null}+ {Platform.OS === 'android' ? (+ // 量出键盘避让容器的实际可用高度,供挂到根浮层的输入区对齐(见 SessionChromeLayer)。+ <View onLayout={handleKeyboardAreaLayout} pointerEvents="none" style={StyleSheet.absoluteFill} />+ ) : null}+ <SessionChromeLayer+ enabled={androidFrostedComposer}+ height={keyboardAreaHeight ?? windowDimensions.height}+ hiddenFromAccessibility={sessionListDrawerOverlayMounted}+ left={paneLayout.detail.x}+ viewport={detailViewport}+ width={paneLayout.detail.width}+ >{!isSharedTaskAccessRevoked && <ViewpointerEvents="box-none"testID="session.bottomViewport"@@ -9373,6 +9375,7 @@ export default function SessionScreen() {pointerEvents="box-none"style={[styles.sessionBottomLayer,+ androidFrostedComposer && styles.sessionBottomFrosted,// The outer viewport owns reservation clipping; keep the held card// attached to its original responder for release/cancel delivery.sessionOperationLayout.composerSlot === 'editable' && { overflow: 'visible' },@@ -9389,6 +9392,12 @@ export default function SessionScreen() {]}testID="session.bottomLayer">+ {androidFrostedComposer ? (+ // 与顶栏同一底:半透明 surface + 模糊,消息从输入区下面滚过时能透出一点。+ <View pointerEvents="none" style={StyleSheet.absoluteFill} testID="session.composerFrost">+ <BlurBackdrop intensity={50} overlayColor={colors.surfaceTranslucent} />+ </View>+ ) : null}<ViewpointerEvents="box-none"style={[@@ -9671,6 +9680,7 @@ export default function SessionScreen() {</View></View></View>}+ </SessionChromeLayer></ComposerKeyboardAvoidingView></PaneViewportProvider>@@ -9714,6 +9724,46 @@ export default function SessionScreen() {);}+/**+ * 任务顶栏的挂载层。iOS 常驻消息挂在路由里,顶栏原地渲染即可。Android 的常驻消息层由根节点+ * 画在页面之上,顶栏要经 MessageHistoryOverlay 放到它上面(与任务抽屉同一通道),消息才能+ * 从半透明顶栏下面滚过;按详情区的横向位置对齐,抽屉打开时同样从读屏树里摘掉。+ * 底部输入区同理:外框高度取键盘避让容器的实际高度,键盘弹起时输入框照旧被顶上去。+ */+function SessionChromeLayer({+ children,+ enabled = true,+ height,+ hiddenFromAccessibility,+ left,+ viewport,+ width,+}: {+ children: ReactNode;+ /** 关掉时原地渲染(如伙伴对话的输入区保持实底,不需要盖在消息层上)。 */+ enabled?: boolean;+ /** 外框高度;底部输入区按键盘避让后的可用高度摆放,顶栏不传,由内容撑开。 */+ height?: number;+ hiddenFromAccessibility: boolean;+ left: number;+ viewport: { height: number; width: number; x: number; y: number };+ width: number;+}) {+ if (Platform.OS !== 'android' || !enabled) return <>{children}</>;+ return (+ <MessageHistoryOverlay>+ <View+ importantForAccessibility={hiddenFromAccessibility ? 'no-hide-descendants' : 'auto'}+ pointerEvents="box-none"+ style={{ height, left, position: 'absolute', top: 0, width }}+ >+ {/* 浮层挂在根节点,要把详情区的视口重新提供给顶栏。 */}+ <PaneViewportProvider value={viewport}>{children}</PaneViewportProvider>+ </View>+ </MessageHistoryOverlay>+ );+}+type SessionHeaderIcon = typeof Folder;function SessionHeaderBar({@@ -9792,10 +9842,9 @@ function SessionHeaderBar({: null;const actionProjection = overview ? projectMobileSessionActions(overview.actions) : null;// queue 入口已退役:排队消息 inline 到消息流(InlineQueueSection),不再有独立面板。+ // 两端顶栏右侧同为「远程桌面、文件、更多」;搜索从「更多 → 任务详情」进入(ios-native-design §2、§4)。const headerActions = (actionProjection?.primaryActions ?? [])- .filter((action) => action.id !== 'settings'- && action.id !== 'queue'- && (!messageOnly || action.id === 'search' || action.id === 'files'));+ .filter((action) => action.id === 'files');const actionHandlers = {files: onOpenFiles,queue: () => undefined,@@ -9974,14 +10023,14 @@ function SessionHeaderBar({testID={SESSION_ACTION_TEST_IDS[action.id]}/>))}- {!messageOnly ? <SessionHeaderIconButton- accessibilityLabel={t('session.screen.openSessionMenu')}+ <SessionHeaderIconButton+ accessibilityLabel={t('session.menu.details')}active={false}disabled={!currentSession}icon={Ellipsis}onPress={currentSession ? onOpenSettings : undefined}testID="session.controlsToggle"- /> : null}+ /></View>}</View>);@@ -10937,7 +10986,6 @@ function SessionComposerInput({}function SessionSearchSheet({- activeHit,activeIndex,hasOlderMessages,hitCount,@@ -10951,7 +10999,6 @@ function SessionSearchSheet({sheetMaxHeight,visible,}: {- activeHit: MobileMessageSearchHit | null;activeIndex: number;hasOlderMessages: boolean;hitCount: number;@@ -10976,11 +11023,15 @@ function SessionSearchSheet({loading: loadingEarlier,query,});+ // 两端同一套计数文案;命中内容直接在原消息处定位,不再重复展示预览(ios-native-design §5)。+ const counter = normalizedQuery+ ? hasHits ? `${activeIndex + 1} / ${hitCount}` : '0 / 0'+ : t('session.screen.searchEnterKeyword');if (Platform.OS === 'ios') {return <SessionSearchNativevisible={visible}query={query}- counter={normalizedQuery ? hasHits ? `${activeIndex + 1} / ${hitCount}` : '0 / 0' : t('session.screen.searchEnterKeyword')}+ counter={counter}hasHits={hasHits}loadEarlier={loadEarlierAction}onChangeQuery={onChangeQuery}@@ -11011,23 +11062,35 @@ function SessionSearchSheet({</View></View><View style={styles.searchPanel} testID="session.searchPanel">- <TextInput- accessibilityLabel={t('session.screen.searchPlaceholder')}- autoCapitalize="none"- autoCorrect={false}- autoFocus={MOBILE_VISUAL_MOCK_ENABLED && visible}- onChangeText={onChangeQuery}- placeholder={t('session.screen.searchPlaceholder')}- placeholderTextColor={colors.textPlaceholder}- style={styles.searchInput}- testID="session.searchInput"- value={query}- />+ <View style={styles.searchInputRow}>+ <TextInput+ accessibilityLabel={t('session.screen.searchPlaceholder')}+ autoCapitalize="none"+ autoCorrect={false}+ autoFocus={visible}+ onChangeText={onChangeQuery}+ placeholder={t('session.screen.searchPlaceholder')}+ placeholderTextColor={colors.textPlaceholder}+ returnKeyType="search"+ style={styles.searchInput}+ testID="session.searchInput"+ value={query}+ />+ {query ? (+ <Pressable+ accessibilityLabel={t('devices.detail.search.clearA11y')}+ accessibilityRole="button"+ onPress={() => onChangeQuery('')}+ style={({ pressed }) => [styles.searchClearButton, pressed && styles.searchClearButtonPressed]}+ testID="session.searchClearButton"+ >+ <X color={colors.textTertiary} size={iconSize.md} strokeWidth={iconStroke.regular} />+ </Pressable>+ ) : null}+ </View><View style={styles.searchToolbar}><Text style={styles.searchCounter} testID="session.searchCounter">- {normalizedQuery- ? hasHits ? `${activeIndex + 1}/${hitCount}` : '0/0'- : t('session.screen.searchEnterKeyword')}+ {counter}</Text><View style={styles.searchButtons}><RouteActionButton@@ -11050,13 +11113,6 @@ function SessionSearchSheet({</RouteActionButton></View></View>- {activeHit ? (- <Text style={styles.searchPreview} numberOfLines={2} testID="session.searchPreview">- {activeHit.label}: {activeHit.preview}- </Text>- ) : normalizedQuery ? (- <Text style={styles.searchPreview} testID="session.searchPreview">{t('session.screen.searchNoMatch')}</Text>- ) : null}{loadEarlierAction.visible ? (<RouteActionButtonaccessibilityLabel={loadEarlierAction.accessibilityLabel}@@ -11578,7 +11634,7 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({right: 0,top: 0,zIndex: 10,- backgroundColor: Platform.OS === 'ios' ? 'transparent' : colors.surface,+ backgroundColor: 'transparent',},sessionChromeContent: {width: '100%',@@ -11600,6 +11656,9 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({alignSelf: 'center',width: '100%',},+ sessionBottomFrosted: {+ backgroundColor: 'transparent',+ },sessionBottomFloating: {backgroundColor: 'transparent',overflow: 'visible',@@ -11746,17 +11805,32 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({paddingHorizontal: spacing.lg,paddingVertical: spacing.md,},- searchInput: {+ searchInputRow: {+ alignItems: 'center',backgroundColor: colors.surface,borderColor: colors.border,borderRadius: radius.container,borderWidth: StyleSheet.hairlineWidth,+ flexDirection: 'row',+ minHeight: 44,+ paddingLeft: spacing.md,+ },+ searchInput: {color: colors.textPrimary,+ flex: 1,fontSize: typeScale.body,minHeight: 42,- paddingHorizontal: spacing.md,paddingVertical: spacing.xs,},+ searchClearButton: {+ alignItems: 'center',+ height: 44,+ justifyContent: 'center',+ width: 44,+ },+ searchClearButtonPressed: {+ opacity: 0.72,+ },searchToolbar: {alignItems: 'center',flexDirection: 'row',@@ -11779,14 +11853,9 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({borderColor: colors.border,borderRadius: radius.pill,borderWidth: StyleSheet.hairlineWidth,- height: 34,+ height: 44,justifyContent: 'center',- width: 34,- },- searchPreview: {- color: colors.textSecondary,- fontSize: typeScale.caption,- lineHeight: lineHeight.caption,+ width: 44,},searchLoadEarlierButton: {alignItems: 'center',diff --git a/apps/mobile/app/sessions/new.tsx b/apps/mobile/app/sessions/new.tsxindex 3d4b022ea5..5ccd74878e 100644--- a/apps/mobile/app/sessions/new.tsx+++ b/apps/mobile/app/sessions/new.tsx@@ -320,7 +320,6 @@ import type { MobileModelConfiguration } from '@/session/unifiedMobileModels';import { ModelPickerSheet } from '@/session/ModelPickerSheet';import { MobileChoicePickerList } from '@/session/MobileChoicePickerList';import { NativePermissionSheet } from '@/session/NativePermissionSheet';-import { MobilePermissionPickerList } from '@/session/MobilePermissionPickerList';import { SheetModal } from '@/session/SheetModal';import { SheetSurface } from '@/session/SheetSurface';import { computeContextSheetSnapHeights, type ContextSheetSnap } from '@/session/contextSheetModel';@@ -573,9 +572,8 @@ export default function NewRemoteSessionScreen() {}, [workspacePickerOpen, measureWorkspacePicker]);// 模型浮窗(ContextSheet 同款 Modal;新建页权限已提为独立选择器,浮窗只留模型)。const [modelSheetOpen, setModelSheetOpen] = useState(false);- // 权限模式独立浮窗(composer 工具条权限药丸点开;列表复用 MobilePermissionPickerList)。+ // 权限模式独立浮窗(composer 工具条权限药丸点开;面板自持档位,见 NativePermissionSheet)。const [permissionSheetOpen, setPermissionSheetOpen] = useState(false);- const [permissionSheetSnap, setPermissionSheetSnap] = useState<ContextSheetSnap>('half');const [agentPickerOpen, setAgentPickerOpen] = useState(false);// 被控端 runtime 已注册的 agent 集合(null = 未拉到 → fail-open 不过滤入口)。据此过滤新建// agent 选项:被控端 Pi 二进制缺失时其 agent map 无 pi,但模型目录仍投影 Pi,不过滤会让用户@@ -2463,7 +2461,6 @@ export default function NewRemoteSessionScreen() {setAgentPickerOpen(false);setModelSheetOpen(false);setWorktreeBranchSheetOpen(false);- setPermissionSheetSnap('half');setPermissionSheetOpen(true);}, []);@@ -6362,37 +6359,17 @@ export default function NewRemoteSessionScreen() {testID="newSession.modelSheet"visible={modelSheetOpen}/>- {/* 权限模式独立浮窗:composer 权限药丸点开;列表复用 MobilePermissionPickerList,- 选择走 selectPermissionMode(含 Full access 确认弹层 + per-agent 记忆)后关浮窗。 */}- {Platform.OS === 'ios' ? (<NativePermissionSheet visible={permissionSheetOpen} onClose={() => setPermissionSheetOpen(false)}- activeMode={displayPermissionMode} disabled={creating} onSelect={selectPermissionMode}- options={runtimeOptions.permissionOptions} testID="newSession.permissionSheet" />) : (<SheetModal- backdropTestID="newSession.permissionSheet.backdrop"- onBackdropPress={() => setPermissionSheetOpen(false)}- onRequestClose={() => setPermissionSheetOpen(false)}+ {/* 权限模式独立浮窗:composer 权限药丸点开。两端同一语义:点选先关浮窗,关闭完成后再走+ selectPermissionMode(含 Full access 确认弹层 + per-agent 记忆)。 */}+ <NativePermissionSheetvisible={permissionSheetOpen}- >- <SheetSurface- bottomInset={safeAreaInsets.bottom}- heights={permissionSheetHeights}- onClose={() => setPermissionSheetOpen(false)}- onSnapChange={setPermissionSheetSnap}- snap={permissionSheetSnap}- testID="newSession.permissionSheet"- title={t('models.picker.permissionTitle')}- >- <MobilePermissionPickerList- activeMode={displayPermissionMode}- disabled={creating}- onSelect={(mode) => {- selectPermissionMode(mode);- setPermissionSheetOpen(false);- }}- options={runtimeOptions.permissionOptions}- testID="newSession.permissionSheet.option"- />- </SheetSurface>- </SheetModal>)}+ onClose={() => setPermissionSheetOpen(false)}+ activeMode={displayPermissionMode}+ disabled={creating}+ onSelect={selectPermissionMode}+ options={runtimeOptions.permissionOptions}+ testID="newSession.permissionSheet"+ />{composerPreviewUrl && composerGalleryImages.length > 0 ? (// composer 托盘图片的全屏查看(沿用聊天消息同款 ImageLightbox;本地图无需远端取件)。// annotation:托盘图可圈点标注 / 再编辑,保存后烧录替换附件重新上传。diff --git a/apps/mobile/docs/mobile-design-guide.md b/apps/mobile/docs/mobile-design-guide.mdindex 80130385b0..f1c76f4ae5 100644--- a/apps/mobile/docs/mobile-design-guide.md+++ b/apps/mobile/docs/mobile-design-guide.md@@ -227,6 +227,7 @@ iOS 新增与改造界面遵循 [iOS 原生界面规范](../../../docs/design-ru- 系统管理的圆角、字体、材质与反馈保留系统默认,不强制套自绘圆角档位或零阴影约束;自绘内容继续遵守本文 token 规则。- 模型/权限、Context、账号切换等存量自绘面板列为渐进迁移项,不因本规范批量重写。Android 与必要兼容回退继续复用现有基础组件,不降低业务能力。- 首页筛选继续使用原生 UIMenu;左侧抽屉和文件浏览顶部的存量实现不代表已经迁移,需分别审查。+- **Android 交互跟随 iOS**(2026-09-27 产品裁决):入口位置、顺序、分组、显示哪些信息、打开 / 关闭方式与输入校验以 iOS 为准;外观保持 Android 平台实现,不照搬玻璃。贴着控件弹出的菜单(iOS UIMenu)在 Android 用同一个 `NativePullDownMenu`,渲染为 Cindy 自绘的 `AnchoredPullDownMenu`:surfaceElevated 实底 + 1px 边框、零阴影,行首固定列打勾,内联分组带标题与分隔线,子菜单逐层进入,`keepPresented` 的项点完不收起,居中的触发器居中展开。不用系统 PopupMenu(画不出分组标题、给每个可勾选项画空复选框、不跟随主题)。触发器整块是一个读屏按钮;触发控件禁用时传 `disabled`,不挂菜单。首页「所有任务」下拉只负责范围筛选:点设备名直接切换到该设备的任务,不得为补充管理动作改成设备子菜单或增加一次确认。设备详情、重命名与删除集中在左侧抽屉的「设备管理」页;列表不画进入箭头或重命名图标。所有设备无论在线、离线或未开启远程控制,都能点进资料详情,再重命名或删除;右滑显示重命名、左滑显示删除,删除需系统确认。iOS 使用系统原生列表与滑动操作。删除使用服务端接口,在线设备当前需先离线才能删除,不以本地隐藏代替删除。iOS 原生菜单与自绘回退、Android 遵守同一交互边界。diff --git a/apps/mobile/src/__tests__/CompanionAutomationSheet.test.tsx b/apps/mobile/src/__tests__/CompanionAutomationSheet.test.tsxindex 34d7af4069..5e543755db 100644--- a/apps/mobile/src/__tests__/CompanionAutomationSheet.test.tsx+++ b/apps/mobile/src/__tests__/CompanionAutomationSheet.test.tsx@@ -8,7 +8,7 @@ import { emptyRoutineDefinition, type RoutineDefinition } from '../session/compaconst h = vi.hoisted(() => ({read: vi.fn(), invoke: vi.fn(), openLink: vi.fn(), subscribe: vi.fn(), unsubscribe: vi.fn(), changed: vi.fn(), close: vi.fn(),alert: vi.fn(), account: 1, foreground: null as null | ((state: string) => void), nativeWrites: vi.fn(),- definition: null as any, revision: 0, existing: false, now: 0, uuid: 0, perform: vi.fn(), sheet: null as any, platform: 'ios',+ definition: null as any, revision: 0, existing: false, now: 0, uuid: 0, perform: vi.fn(), sheet: null as any, platform: 'ios', preRun: false, legacySheet: null as any,history: [] as { id: string; status: string; createdAt: number }[],}));vi.mock('react-i18next', () => { const t = (key: string) => key.split('.').at(-1)!; return { useTranslation: () => ({ t, i18n: { language: 'en' } }) }; });@@ -21,22 +21,26 @@ vi.mock('react-native', () => ({useWindowDimensions: () => ({ width: 402, height: 874 }), Alert: { alert: h.alert },AppState: { addEventListener: (_name: string, fn: any) => { h.foreground = fn; return { remove() {} }; } },}));-vi.mock('@/components/AppText', () => ({ Text: ({ children }: any) => <span>{children}</span>, TextInput: (p: any) => {+vi.mock('@/components/AppText', () => ({ Text: ({ children, style }: any) => <span data-color={[style].flat(Infinity).filter(Boolean).reduce((color: string | undefined, item: any) => item.color ?? color, undefined)}>{children}</span>, TextInput: (p: any) => {if (h.platform === 'ios') throw new Error('iOS automation must not mount the RN input path');- return <input aria-label={p.accessibilityLabel} value={p.value} disabled={p.editable === false} onInput={e => p.onChangeText(e.currentTarget.value)} onChange={() => {}} />;+ return <input aria-label={p.accessibilityLabel} value={p.value} disabled={p.editable === false} maxLength={p.maxLength} data-keyboard={p.keyboardType ?? 'default'}+ data-autocapitalize={p.autoCapitalize ?? 'sentences'} data-autocorrect={String(p.autoCorrect ?? true)} onInput={e => p.onChangeText(e.currentTarget.value)} onChange={() => {}} />;} }));-vi.mock('lucide-react-native', () => ({ ChevronRight: () => null, Clock3: () => null, Plus: () => null }));+vi.mock('lucide-react-native', () => ({ ChevronDown: () => <i data-chevron="down" />, ChevronRight: () => <i data-chevron="right" />, Clock3: () => null, Plus: () => null }));vi.mock('expo-crypto', () => ({ randomUUID: () => `creation-request-${++h.uuid}` }));vi.mock('@/auth/AuthContext', () => ({ useAuth: () => ({ accountGeneration: h.account }) }));vi.mock('@/device-link/DeviceLinkContext', () => ({ useDeviceLink: () => ({ invoke: h.invoke, openLink: h.openLink, subscribe: h.subscribe, unsubscribe: h.unsubscribe, onRemoteResourceChanged: h.changed, connectionEpoch: 1 }) }));vi.mock('@/device-link/focusedTopicSubscription', () => ({ startFocusedTopicSubscription: () => () => {} }));vi.mock('@/device-link/remoteResources', () => ({ getRemoteResource: (...args: any[]) => h.read(...args), invokeRemoteResourceAction: (...args: any[]) => h.invoke(...args) }));vi.mock('@/device-link/remoteStatus', () => ({ formatRemoteError: (error: Error) => error.message }));-vi.mock('@/theme', () => ({ iconSize: { action: 20, lg: 24, xs: 12 }, spacing: { xs: 4, sm: 8, md: 12 }, useTheme: () => ({ mode: 'light', colors: {} }), useThemedStyles: () => ({}) }));+vi.mock('@/theme', () => ({ iconSize: { action: 20, lg: 24, xs: 12 }, spacing: { xs: 4, sm: 8, md: 12 }, useTheme: () => ({ mode: 'light', colors: {} }),+ // Styles resolve to token names so rendered colours are observable.+ useThemedStyles: (make: (colors: unknown) => unknown) => make(new Proxy({}, { get: (_target, key) => String(key) })) }));vi.mock('../session/CompanionChoice', () => ({ CompanionChoice: () => null }));-vi.mock('../session/CompanionSheet', () => ({ CompanionSheet: ({ children, footer }: any) => {+vi.mock('../session/CompanionSheet', () => ({ CompanionSheet: (props: any) => {if (h.platform === 'ios') throw new Error('legacy automation sheet mounted');- return <div>{children}{footer}</div>;+ h.legacySheet = props;+ return <div data-testid="legacy-sheet">{props.children}{props.footer}</div>;} }));vi.mock('../session/CompanionAutomationNativeView', async () => import('../session/CompanionAutomationNativeView.ios'));vi.mock('../session/ComposerSheet', async () => import('../session/ComposerSheet.ios'));@@ -84,7 +88,7 @@ function resource(id: string) {}));return { ref: { collectionId: 'routines', kind: 'routine', id }, display: { title: 'Automations' }, links: [], revision: String(revision),actions: Object.values(operationActions).map(id => ({ id, label: 'Action' })), blocks: [{ primitive: selected ? 'routine-detail' : 'routine-list', data: selected- ? { id: existing ? 'rule' : null, revision, editable: true, input: h.definition, sources: [{ id: 'mail', name: 'Mail', status: 'ready', events: [{ type: 'received', name: 'Received', fields: ['sender', 'subject'] }] }], history: h.history, operationActions }+ ? { id: existing ? 'rule' : null, revision, editable: true, input: h.definition, supportsPreRunCheck: h.preRun, sources: [{ id: 'mail', name: 'Mail', status: 'ready', events: [{ type: 'received', name: 'Received', fields: ['sender', 'subject'] }] }], history: h.history, operationActions }: { items: h.existing ? [{ id: 'rule', name: 'Existing', enabled: true, revision: h.revision, triggers: [] }] : [], operationActions } }] };}async function render(online = true) { await act(async () => root.render(<CompanionAutomationSheet visible online={online} onClose={h.close} botId="bot" collectionId="routines" deviceId="host" deviceName="Mac" />)); }@@ -94,7 +98,7 @@ async function click(label: string) { await act(async () => { const button = [..async function select(label: string, value: string) { await act(async () => { const node = container.querySelector<HTMLSelectElement>(`select[aria-label="${label}"]`)!; node.value = value; node.dispatchEvent(new Event('change', { bubbles: true })); }); }async function open() { await render(); await click('new'); }beforeEach(() => {- vi.resetAllMocks(); h.account = 1; h.revision = 0; h.existing = false; h.now = 0; h.uuid = 0; h.platform = 'ios'; h.definition = emptyRoutineDefinition();+ vi.resetAllMocks(); h.account = 1; h.revision = 0; h.existing = false; h.now = 0; h.uuid = 0; h.platform = 'ios'; h.definition = emptyRoutineDefinition(); h.preRun = false; h.legacySheet = null;h.history = [];grants.clear(); grantId = 0;h.changed.mockReturnValue(() => {}); h.openLink.mockResolvedValue(undefined);@@ -475,3 +479,39 @@ it('keeps a successful save committed when the following run fails', async () =>expect(h.perform.mock.calls.map(([request]) => request.actionId)).toEqual(['routine-save', 'routine-run', 'routine-run']);expect(h.perform.mock.calls[2][0].input.revision).toBe(2);});++it('lays out the Android form like iOS: titled triggers, in-form save, disclosure chevron and literal or numeric inputs', async () => {+ h.platform = 'android'; h.existing = true; h.revision = 1; h.preRun = true;+ h.definition = { ...emptyRoutineDefinition(), name: 'Existing', prompt: 'Check', preRunHook: { command: 'git status', timeoutMs: 5000 }, triggers: [+ { id: 'daily', kind: 'cron', expression: '0 9 * * *', timezone: 'UTC' }, { id: 'hourly', kind: 'interval', intervalMs: 3_600_000 },+ ] } satisfies RoutineDefinition;+ await render(); await click('Existing');+ expect(h.legacySheet.footer).toBeUndefined();+ const save = container.querySelector<HTMLButtonElement>('[data-testid="companion.automation.save"]')!;+ expect(save.textContent).toBe('save');+ // Save follows the last trigger control and precedes run / history, as the iOS sections do.+ const addTrigger = [...container.querySelectorAll('button')].find(node => node.textContent === 'addTrigger')!;+ const run = [...container.querySelectorAll('button')].find(node => node.textContent === 'run')!;+ expect(addTrigger.compareDocumentPosition(save) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();+ expect(save.compareDocumentPosition(run) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();+ expect([...container.querySelectorAll('span')].filter(node => node.textContent === 'triggers')).toHaveLength(2);+ const advanced = container.querySelector<HTMLButtonElement>('[data-testid="companion.automation.advanced"]')!;+ expect(advanced.querySelector('[data-chevron="right"]')).not.toBeNull();+ await act(async () => { advanced.click(); });+ expect(advanced.querySelector('[data-chevron="down"]')).not.toBeNull();+ for (const label of ['checkCommand', 'timezone']) {+ expect(input(label).dataset.autocapitalize).toBe('none'); expect(input(label).dataset.autocorrect).toBe('false');+ }+ for (const label of ['timeoutMs', 'hour', 'minute', 'minutes']) expect(input(label).dataset.keyboard).toBe('number-pad');+ for (const label of ['hour', 'minute']) expect(input(label).hasAttribute('maxlength')).toBe(false);+ // Without a length cap, an over-long value is still rejected before any write.+ await type('hour', '123'); await click('save');+ expect(h.invoke).not.toHaveBeenCalled(); expect(container.textContent).toContain('invalid');+});++it('keeps the Android offline notice out of the error colour', async () => {+ h.platform = 'android';+ await render(false);+ const notice = [...container.querySelectorAll('span')].find(node => node.textContent === 'offline')!;+ expect(notice.dataset.color).toBe('textSecondary');+});diff --git a/apps/mobile/src/__tests__/CompanionChoice.test.tsx b/apps/mobile/src/__tests__/CompanionChoice.test.tsxnew file mode 100644index 0000000000..7751de3351--- /dev/null+++ b/apps/mobile/src/__tests__/CompanionChoice.test.tsx@@ -0,0 +1,69 @@+// @vitest-environment jsdom+import { act, createElement } from 'react';+import { createRoot, type Root } from 'react-dom/client';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';++const h = vi.hoisted(() => ({ native: true, menu: null as any }));+vi.mock('react-native', () => ({+ StyleSheet: { create: (v: unknown) => v },+ View: ({ children }: any) => <div>{children}</div>,+ Pressable: ({ children, onPress, disabled, accessibilityLabel, accessibilityRole }: any) => <button aria-label={accessibilityLabel} role={accessibilityRole} disabled={disabled} onClick={onPress}>{children}</button>,+}));+vi.mock('lucide-react-native', () => ({ Check: () => <i data-check /> , ChevronDown: () => null }));+vi.mock('@/components/AppText', () => ({ Text: ({ children }: any) => <span>{children}</span> }));+vi.mock('@/platform/chrome/NativePullDownMenu', () => ({+ usesNativePullDownMenu: () => h.native,+ NativePullDownMenu: (props: any) => { h.menu = props; return props.children; },+}));+vi.mock('@/theme', async () => ({ ...await import('@/theme/tokens'), useTheme: () => ({ colors: {} }), useThemedStyles: () => ({}) }));+import { CompanionChoice } from '@/session/CompanionChoice';+Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });++let root: Root; let container: HTMLDivElement;+const change = vi.fn();+const options = [{ value: '', label: 'None' }, { value: 'a', label: 'Model A' }, { value: 'b', label: 'Model B', disabled: true }];+async function render(disabled = false) {+ await act(async () => root.render(createElement(CompanionChoice, { label: 'Route', value: 'a', options, onChange: change, disabled })));+}+beforeEach(() => { vi.clearAllMocks(); h.native = true; h.menu = null; container = document.createElement('div'); root = createRoot(container); });+afterEach(() => { act(() => root.unmount()); });++it('opens the system menu (Android PopupMenu / iOS UIMenu) with the checked value and disabled options', async () => {+ await render();+ expect(h.menu.actions).toEqual([+ { id: '0', title: 'None', state: 'off', disabled: false },+ { id: '1', title: 'Model A', state: 'on', disabled: false },+ { id: '2', title: 'Model B', state: 'off', disabled: true },+ ]);+ expect(container.textContent).toContain('Model A');+ // An empty value is still selectable: menu IDs are positions, not values.+ await act(async () => h.menu.onAction('0')); expect(change).toHaveBeenLastCalledWith('');+ await act(async () => h.menu.onAction('2')); expect(change).toHaveBeenCalledTimes(1);+ // No inline list or search field alongside the system menu.+ await act(async () => { container.querySelector('button')!.click(); });+ expect(container.querySelectorAll('button')).toHaveLength(1); expect(container.querySelector('input')).toBeNull();+});++it('does not attach a menu to a disabled control', async () => {+ await render(true);+ expect(h.menu).toBeNull(); expect(container.querySelector('button')!.disabled).toBe(true);+});++it('falls back to an inline option list when the build has no MenuView', async () => {+ h.native = false; await render();+ await act(async () => { container.querySelector('button')!.click(); });+ const radios = [...container.querySelectorAll('button[role="radio"]')] as HTMLButtonElement[];+ expect(radios.map(node => node.textContent)).toEqual(['None', 'Model A', 'Model B']);+ expect(radios[2]!.disabled).toBe(true); expect(radios[1]!.querySelector('[data-check]')).not.toBeNull();+ await act(async () => { radios[0]!.click(); });+ expect(change).toHaveBeenCalledWith(''); expect(container.querySelectorAll('button[role="radio"]')).toHaveLength(0);+});++it('shows the control as disabled without a menu when nothing can be chosen', async () => {+ const lists: Array<Array<{ value: string; label: string; disabled?: boolean }>> = [[], [{ value: 'b', label: 'Model B', disabled: true }]];+ for (const list of lists) {+ h.menu = null;+ await act(async () => root.render(createElement(CompanionChoice, { label: 'Route', value: 'b', options: list, onChange: change, disabled: false })));+ expect(h.menu).toBeNull(); expect(container.querySelector('button')!.disabled).toBe(true);+ }+});diff --git a/apps/mobile/src/__tests__/CompanionMemoryPage.test.tsx b/apps/mobile/src/__tests__/CompanionMemoryPage.test.tsxindex e01a8f49a4..ac7d1d12f2 100644--- a/apps/mobile/src/__tests__/CompanionMemoryPage.test.tsx+++ b/apps/mobile/src/__tests__/CompanionMemoryPage.test.tsx@@ -9,14 +9,20 @@ vi.mock('react-i18next', () => ({ useTranslation: () => ({ i18n: { language: 'envi.mock('react-native', () => ({Platform: { OS: 'android' }, StyleSheet: { create: (value: unknown) => value, hairlineWidth: 1 }, Alert: { alert: h.alert },View: ({ children }: any) => <div>{children}</div>,- Pressable: ({ children, onPress, testID }: any) => <button data-testid={testID} onClick={onPress}>{children}</button>,+ Pressable: ({ children, onPress, testID, disabled, accessibilityLabel }: any) => <button data-testid={testID} aria-label={accessibilityLabel} disabled={disabled} onClick={onPress}>{children}</button>,+ ActivityIndicator: ({ accessibilityLabel }: any) => <span role="progressbar" aria-label={accessibilityLabel} />,}));+vi.mock('lucide-react-native', () => ({ Search: () => null, X: () => null }));+vi.mock('@/session/CompanionSettingsRow', () => ({ CompanionSettingsRow: ({ label, onPress, disabled, busy, destructive, testID }: any) =>+ <button data-testid={testID} data-destructive={destructive ? 'true' : 'false'} data-busy={busy ? 'true' : 'false'} disabled={disabled || busy} onClick={onPress}>{label}</button> }));vi.mock('@/components/AppText', () => ({- Text: ({ children }: any) => <span>{children}</span>,- TextInput: (p: any) => <input aria-label={p.accessibilityLabel} value={p.value} disabled={p.editable === false} onInput={e => p.onChangeText(e.currentTarget.value)} onChange={() => {}} />,+ // Styles resolve to token names (see the theme mock), so rendered colours are observable.+ Text: ({ children, style, testID }: any) => <span data-testid={testID} data-color={[style].flat(Infinity).filter(Boolean).reduce((color: string | undefined, item: any) => item.color ?? color, undefined)}>{children}</span>,+ TextInput: (p: any) => <input aria-label={p.accessibilityLabel} value={p.value} maxLength={p.maxLength} disabled={p.editable === false} onInput={e => p.onChangeText(e.currentTarget.value)} onChange={() => {}} />,}));vi.mock('@/components/MobilePrimitives', () => ({ MainWindowActionButton: ({ action }: any) => <button disabled={!!action.disabled || !!action.busy} onClick={action.onPress}>{action.label}</button> }));-vi.mock('@/theme', async () => ({ ...await import('@/theme/tokens'), useTheme: () => ({ colors: {} }), useThemedStyles: () => ({}) }));+vi.mock('@/theme', async () => ({ ...await import('@/theme/tokens'), useTheme: () => ({ colors: {} }),+ useThemedStyles: (make: (colors: unknown) => unknown) => make(new Proxy({}, { get: (_target, key) => String(key) })) }));vi.mock('@/device-link/remoteResources', async original => ({ ...await original<object>(), invokeRemoteResourceAction: (...args: unknown[]) => h.invoke(...args) }));vi.mock('@/session/companionProfileData', async original => ({ ...await original<object>(), loadCompanionProfile: (...args: unknown[]) => h.read(...args) }));vi.mock('@/session/ComposerNativeSection', () => ({ ComposerNativeSection: ({ title, children }: any) => <section aria-label={title}>{children}</section> }));@@ -79,15 +85,15 @@ function hostResource(id: string, query = '') {const teammateWrites = (stem: string, body: string) => { const memory = memories.find(item => item.stem === stem)!; memory.body = body; memory.revision++; };let root: Root; let container: HTMLDivElement;-function Harness({ platform }: { platform: string }) {+function Harness({ platform, memoryEnabled = true }: { platform: string; memoryEnabled?: boolean }) {const memory = useCompanionMemory({ invoke: vi.fn() as never, openLink: h.openLink, deviceId: 'host', deviceName: 'Mac', collectionId: 'teammates',resourceKind: 'bot', listResourceId: 'settings:bot/memory', online: true, active: true, binding: 'account-1' });h.state = memory;const Page = platform === 'ios' ? NativeCompanionMemoryPage : CompanionMemoryPage;- return <Page memory={memory} online botName="Sora" memoryEnabled />;+ return <Page memory={memory} online botName="Sora" memoryEnabled={memoryEnabled} />;}const settle = () => act(async () => { for (let i = 0; i < 3; i++) await new Promise(resolve => setTimeout(resolve, 0)); });-async function render(platform: string) { await act(async () => root.render(<Harness platform={platform} />)); await settle(); }+async function render(platform: string, memoryEnabled = true) { await act(async () => root.render(<Harness platform={platform} memoryEnabled={memoryEnabled} />)); await settle(); }const buttons = () => [...container.querySelectorAll('button')];/** Visible copy, including native Section titles (rendered as headers, not body text). */const shown = (text: string) => container.textContent!.includes(text)@@ -223,3 +229,50 @@ it('shows a memory that disappeared as missing rather than as a failure', asyncawait click('companionMemory.user_coffee');expect(h.state.missing).toBe(true); expect(container.textContent).toContain('memoryMissing');});++it('uses a spinner while a memory loads and an iOS-style search field with a clear button', async () => {+ await render('android');+ const search = container.querySelector<HTMLInputElement>('input[aria-label="memorySearch"]')!;+ expect(search.hasAttribute('maxlength')).toBe(false);+ expect(container.querySelector('[data-testid="companionMemory.searchClear"]')).toBeNull();+ await type('memorySearch', 'Link');+ const clear = container.querySelector<HTMLButtonElement>('[data-testid="companionMemory.searchClear"]')!;+ expect(clear.getAttribute('aria-label')).toBe('clearA11y');+ await act(async () => { clear.click(); }); await settle();+ expect(h.state.query).toBe('');+ let finish!: () => void;+ const read = h.read.getMockImplementation()!;+ h.read.mockImplementationOnce((...args: any[]) => new Promise(done => { finish = () => done(read(...args)); }));+ const entry = container.querySelector<HTMLButtonElement>('[data-testid="companionMemory.user_coffee"]')!;+ await act(async () => { entry.click(); });+ expect(container.querySelector('[role="progressbar"]')!.getAttribute('aria-label')).toBe('loading');+ expect(container.textContent).not.toContain('loading');+ await act(async () => finish()); await settle();+ expect(container.textContent).toContain('Black, no sugar.');+});++it('greys only the titles when memory is off and keeps title, preview and date in one row', async () => {+ await render('android', false);+ const title = container.querySelector('[data-testid="companionMemory.user_coffee.title"]')!;+ expect(title.getAttribute('data-color')).toBe('textSecondary');+ const row = container.querySelector('[data-testid="companionMemory.user_coffee"]')!;+ const preview = [...row.querySelectorAll('span')].find(node => node.textContent === 'Black, no sugar.')!;+ expect(preview.getAttribute('data-color')).toBe('textSecondary');+ // Title and preview share the leading column; the date trails it.+ expect(title.parentElement).toBe(preview.parentElement);+ expect(row.lastElementChild!.textContent).not.toBe('');+ expect(row.lastElementChild!.contains(title)).toBe(false);+ await render('android', true);+ expect(container.querySelector('[data-testid="companionMemory.user_coffee.title"]')!.getAttribute('data-color')).toBe('textPrimary');+});++it('offers Edit, Delete and Done as text rows with the delete row in the destructive colour', async () => {+ await render('android'); await click('companionMemory.user_coffee');+ const edit = container.querySelector<HTMLButtonElement>('[data-testid="companionMemory.edit"]')!;+ const remove = container.querySelector<HTMLButtonElement>('[data-testid="companionMemory.delete"]')!;+ expect(edit.textContent).toBe('memoryEdit'); expect(edit.dataset.destructive).toBe('false');+ expect(remove.textContent).toBe('Delete Memory'); expect(remove.dataset.destructive).toBe('true');+ await click('companionMemory.edit');+ const done = container.querySelector<HTMLButtonElement>('[data-testid="companionMemory.done"]')!;+ expect(done.textContent).toBe('memoryDone'); expect(done.disabled).toBe(false);+});diff --git a/apps/mobile/src/__tests__/CompanionMessageActions.test.tsx b/apps/mobile/src/__tests__/CompanionMessageActions.test.tsxnew file mode 100644index 0000000000..25d9bbe3ab--- /dev/null+++ b/apps/mobile/src/__tests__/CompanionMessageActions.test.tsx@@ -0,0 +1,42 @@+// @vitest-environment jsdom+import { act, createElement } from 'react';+import { createRoot, type Root } from 'react-dom/client';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';++const h = vi.hoisted(() => ({ menu: null as any, native: true }));+vi.mock('react-native', () => ({+ View: ({ children }: any) => <div>{children}</div>,+ Pressable: ({ children, onPress, disabled, testID }: any) => <button data-testid={testID} disabled={disabled} onClick={onPress}>{children}</button>,+}));+vi.mock('react-i18next', () => ({ useTranslation: () => ({ t: (key: string) => key }) }));+vi.mock('lucide-react-native', () => ({ Copy: () => null, Check: () => null, Ellipsis: () => null }));+vi.mock('@/components/AppText', () => ({ Text: ({ children }: any) => <span>{children}</span> }));+vi.mock('@/platform/chrome/NativePullDownMenu', () => ({+ usesNativePullDownMenu: () => h.native,+ NativePullDownMenu: (props: any) => { h.menu = props; return props.children; },+}));+vi.mock('@/theme', () => ({ iconSize: { sm: 14 }, spacing: { md: 12 }, useTheme: () => ({ colors: {} }) }));+vi.mock('@/session/CompanionSheet', () => ({ CompanionSheet: () => null }));+import { CompanionMessageActions } from '@/session/CompanionMessageActions';+Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });++let root: Root; let container: HTMLDivElement;+const onAction = vi.fn();+const actions = [{ id: 'copy', title: 'Copy' }, { id: 'time', title: 'Sent 9:41', disabled: true }];+async function render(disabled: boolean) {+ await act(async () => root.render(createElement(CompanionMessageActions, { user: false, copied: false, copying: false, disabled, actions, onAction })));+}+beforeEach(() => { vi.clearAllMocks(); h.menu = null; container = document.createElement('div'); root = createRoot(container); });+afterEach(() => { act(() => root.unmount()); });++it('passes the item list, including the disabled sent-time line, to the system menu', async () => {+ await render(false);+ expect(h.menu.actions).toEqual(actions);+ await act(async () => h.menu.onAction('copy')); expect(onAction).toHaveBeenCalledWith('copy');+});++it('does not open the system menu from a disabled More button', async () => {+ await render(true);+ expect(h.menu).toBeNull();+ expect(container.querySelector<HTMLButtonElement>('[data-testid="companion.messageMore"]')!.disabled).toBe(true);+});diff --git a/apps/mobile/src/__tests__/CompanionProfileSheet.android.test.tsx b/apps/mobile/src/__tests__/CompanionProfileSheet.android.test.tsxindex e52b643972..a73ae020de 100644--- a/apps/mobile/src/__tests__/CompanionProfileSheet.android.test.tsx+++ b/apps/mobile/src/__tests__/CompanionProfileSheet.android.test.tsx@@ -2,96 +2,187 @@import { act, createElement } from 'react';import { createRoot, type Root } from 'react-dom/client';import { afterEach, beforeEach, expect, it, vi } from 'vitest';+const h = vi.hoisted(() => ({- account: 1, sheet: {} as any, inputs: {} as Record<string, any>, buttons: {} as Record<string, any>, pressables: {} as Record<string, any>,- alert: vi.fn(), read: vi.fn(), openLink: vi.fn(), invoke: vi.fn(), close: vi.fn(),+ sheet: null as any, choices: [] as any[], portrait: null as any, read: vi.fn(), openLink: vi.fn(), invoke: vi.fn(), alert: vi.fn(),+ close: vi.fn(), closed: vi.fn(), automation: vi.fn(), search: vi.fn(), created: vi.fn(),+}));+vi.mock('react-native', () => ({+ Platform: { OS: 'android' }, StyleSheet: { create: (v: unknown) => v, hairlineWidth: 1 }, Alert: { alert: h.alert }, Image: () => null,+ View: ({ children, testID }: any) => <div data-testid={testID}>{children}</div>,+ Pressable: ({ children, onPress, disabled, testID }: any) => <button data-testid={testID} disabled={disabled} onClick={onPress}>{children}</button>,+ Switch: ({ accessibilityLabel, value, onValueChange, disabled }: any) => <input type="checkbox" aria-label={accessibilityLabel} checked={value} disabled={disabled} onChange={e => onValueChange(e.currentTarget.checked)} />,+ ActivityIndicator: ({ accessibilityLabel }: any) => <span role="progressbar" aria-label={accessibilityLabel} />,}));-vi.mock('react-native', async () => {- const { createElement: el } = await import('react');- return {- Platform: { OS: 'android' }, StyleSheet: { create: (v: unknown) => v }, View: 'div', Alert: { alert: h.alert }, Image: 'img', ScrollView: 'div', Switch: () => null,- Pressable: (p: any) => { if (p.accessibilityLabel) h.pressables[p.accessibilityLabel] = p; return el('div', null, p.children); },- };-});vi.mock('expo-router', () => ({ useRouter: () => ({ push: vi.fn() }) }));vi.mock('expo-crypto', () => ({ randomUUID: () => 'test-id' }));vi.mock('react-i18next', () => ({ useTranslation: () => ({ t: (key: string) => key, i18n: { language: 'en' } }) }));-vi.mock('lucide-react-native', () => Object.fromEntries(['Brain','Check','ChevronRight','Clock3','FileText','MessageCircle','Search','Settings2','Sparkles','UserRound'].map(key => [key, () => null])));-vi.mock('@/auth/AuthContext', () => ({ useAuth: () => ({ accountGeneration: h.account }) }));+vi.mock('lucide-react-native', () => Object.fromEntries(['Brain', 'Camera', 'Clock3', 'FileText', 'Hand', 'History', 'Info', 'Link2', 'Settings2', 'Sparkles']+ .map(name => [name, Object.assign(() => null, { displayName: name })])));+vi.mock('@/auth/AuthContext', () => ({ useAuth: () => ({ accountGeneration: 1 }) }));vi.mock('@/device-link/DeviceLinkContext', () => ({ useDeviceLink: () => ({ invoke: h.invoke, openLink: h.openLink }) }));vi.mock('@/device-link/remoteResources', () => ({ invokeRemoteResourceAction: (...args: unknown[]) => h.invoke(...args) }));-vi.mock('@/components/AppText', () => ({ Text: 'span', TextInput: (p: any) => { h.inputs[p.accessibilityLabel] = p; return null; } }));-vi.mock('@/components/MobilePrimitives', () => ({ MainWindowActionButton: (p: any) => { h.buttons[p.action.label] = p.action; return null; } }));-vi.mock('@/components/RemoteCompanionAvatar', () => ({ RemoteCompanionAvatar: () => null }));-vi.mock('@/platform/chrome', () => ({ NativePullDownMenu: () => null, usesNativePullDownMenu: () => false }));-vi.mock('@/session/CompanionSettingsRow', () => ({ CompanionSettingsRow: () => null }));-vi.mock('@/session/CompanionSheet', async () => {- const { createElement: el } = await import('react');- return { CompanionSheet: (p: any) => { h.sheet = p; return el('div', null, p.children); } };-});+vi.mock('@/components/AppText', () => ({+ Text: ({ children }: any) => <span>{children}</span>,+ TextInput: (p: any) => <input aria-label={p.accessibilityLabel} value={p.value} maxLength={p.maxLength} disabled={p.editable === false} onInput={e => p.onChangeText(e.currentTarget.value)} onChange={() => {}} />,+}));+vi.mock('@/components/MobilePrimitives', () => ({ MainWindowActionButton: ({ action }: any) => <button disabled={!!action.disabled || !!action.busy} data-tone={action.tone} onClick={action.onPress}>{action.label}</button> }));+vi.mock('@/components/RemoteCompanionAvatar', () => ({ RemoteCompanionAvatar: (p: any) => <span data-testid="avatar" data-size={p.size} /> }));+vi.mock('@/session/CompanionSettingsRow', () => ({ CompanionSettingsRow: ({ label, icon, onPress, disabled, busy, destructive, testID }: any) =>+ <button data-testid={testID} data-icon={icon?.type?.displayName ?? ''} data-destructive={destructive ? 'true' : 'false'} disabled={disabled || busy} onClick={onPress}>{label}</button> }));+vi.mock('@/session/CompanionChoice', () => ({ CompanionChoice: (p: any) => { h.choices.push(p); return <span data-choice={p.label} />; } }));+vi.mock('@/session/CompanionSheet', () => ({ CompanionSheet: (p: any) => { h.sheet = p; return p.visible ? <div data-testid="sheet">{p.children}</div> : null; } }));vi.mock('@/session/CompanionProfileArtifacts', () => ({ CompanionProfileArtifacts: () => null }));+vi.mock('@/session/CompanionPortraitPicker', async original => ({ ...await original<object>(), CompanionPortraitPicker: (p: any) => { h.portrait = p; return <span data-testid="portraits" />; } }));+vi.mock('@/session/CompanionMemoryPage', () => ({ CompanionMemoryPage: () => <div data-testid="memoryPage" /> }));+vi.mock('@/session/useCompanionMemory', () => ({ useCompanionMemory: () => ({ busy: false, dirty: false, flush: async () => true, back: async () => false }) }));+vi.mock('@/session/CompanionProfileNativeView', () => ({ CompanionProfileNativeView: () => { throw new Error('iOS view on Android'); } }));+vi.mock('@/session/CompanionCreateNativeView', () => ({ CompanionCreateNativeView: () => { throw new Error('iOS view on Android'); } }));+vi.mock('@/session/CompanionModelChain', () => ({ readCompanionModelChain: (v: string) => JSON.parse(v || '[]'), CompanionModelChain: () => null, CompanionModelPicker: () => null }));vi.mock('@/theme', async () => ({ ...await import('@/theme/tokens'), useTheme: () => ({ colors: {} }), useThemedStyles: () => ({}) }));vi.mock('@/session/companionProfileData', async original => ({ ...await original<object>(), loadCompanionProfile: (...args: unknown[]) => h.read(...args) }));-vi.mock('@/session/CompanionModelChain', () => ({ readCompanionModelChain: () => [], CompanionModelChain: () => null, CompanionModelPicker: () => null }));-import { CompanionProfileSheet } from '@/session/CompanionProfileSheet';+import { CompanionCreateSheet, CompanionProfileSheet } from '@/session/CompanionProfileSheet';Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });-const resource = { ref: { collectionId: 'teammates', kind: 'bot', id: 'bot' }, display: { title: 'Cindy' }, links: [], revision: 'v1' };-const profilePanel = (disabled = false) => ({ id: 'profile', values: { name: 'Cindy' },- action: { id: 'grant', label: 'Save', disabled, fields: [{ id: 'name', label: 'Name', kind: 'text' }] } });-let root: Root | undefined;-async function render(online = true) {- root ??= createRoot(document.createElement('div'));- await act(async () => root!.render(createElement(CompanionProfileSheet, { visible: true, resource, collectionId: 'teammates', deviceId: 'host', deviceName: 'Mac', online, onClose: h.close, onOpenSearch() {}, onOpenAutomation() {} } as any)));+const ref = { collectionId: 'teammates', kind: 'bot', id: 'bot' };+const resource = { ref, display: { title: 'Cindy', subtitle: 'Teammate on Mac' }, links: [], revision: 'v1' };+const form = (id: string, fields: object[], values: Record<string, unknown> = {}, extra: object = {}) => ({ id, values, action: { id: `${id}-grant`, label: 'Save', fields }, ...extra });+const managed = (id: string, label: string, extra: object = {}) => ({ id, values: {}, action: { id: `${id}-grant`, label, confirmation: { title: `${label}?`, body: `${label} body` }, ...extra } });+const home = () => ({ resource, panels: [+ form('profile', [{ id: 'name', label: 'Name', kind: 'text' }], { name: 'Cindy' }),+ { id: 'avatar', values: {}, entries: [{ id: 'avatar', title: 'Avatar', resourceId: 'settings:bot/avatar' }] },+ { ...form('skills', [{ id: 'skillNote', label: 'Skill note', kind: 'text' }]), text: '' },+ { id: 'connections', values: {}, entries: [{ id: 'refs', title: 'Referenced', resourceId: 'settings:bot/connections' }] },+ // Host order is authoritative: delete before restart here.+ managed('delete', 'Delete teammate'), managed('restart', 'Restart'),+] });+let root: Root; let container: HTMLDivElement;+const buttons = () => [...container.querySelectorAll('button')];+const byTest = (id: string) => container.querySelector<HTMLButtonElement>(`[data-testid="${id}"]`);+const byText = (text: string) => buttons().find(node => node.textContent === text);+const settle = () => act(async () => { for (let i = 0; i < 4; i++) await new Promise(resolve => setTimeout(resolve, 0)); });+async function press(node: HTMLElement | null | undefined) { if (!node) throw new Error('Missing control'); await act(async () => { node.click(); }); await settle(); }+async function type(label: string, value: string) {+ const field = container.querySelector<HTMLInputElement>(`input[aria-label="${label}"]`); if (!field) throw new Error(`Missing ${label}`);+ await act(async () => { field.value = value; field.dispatchEvent(new Event('input', { bubbles: true })); });}-async function openProfile() {- await act(async () => h.pressables['devices.companionProfile.profile'].onPress());-}-function alertButton(label: string) {- const buttons = h.alert.mock.calls.at(-1)?.[2] as { text: string; onPress?: () => void }[];- return buttons.find(button => button.text === label)!;+async function render() {+ await act(async () => root.render(createElement(CompanionProfileSheet, { visible: true, resource: resource as any, collectionId: 'teammates', deviceId: 'host', deviceName: 'Mac', online: true,+ onClose: h.close, onClosed: h.closed, onOpenSearch: h.search, onOpenAutomation: h.automation })));+ await settle();}beforeEach(() => {- vi.clearAllMocks(); h.inputs = {}; h.buttons = {}; h.pressables = {};- h.read.mockResolvedValue({ resource, panels: [profilePanel()] });- h.invoke.mockResolvedValue({ effects: [] });+ vi.clearAllMocks(); h.choices = []; h.sheet = null;+ h.read.mockImplementation(async () => home()); h.openLink.mockResolvedValue(undefined); h.invoke.mockResolvedValue({ effects: [] });+ container = document.createElement('div'); document.body.append(container); root = createRoot(container);+});+afterEach(() => { act(() => root.unmount()); container.remove(); });++it('lays out the iOS identity, entry groups, icons and host-ordered management actions', async () => {+ await render();+ const avatar = container.querySelector('[data-testid="avatar"]')!;+ expect(avatar.getAttribute('data-size')).toBe('48');+ // Identity only: no navigation target and no subtitle line.+ expect(avatar.closest('button')).toBeNull();+ expect(container.textContent).toContain('Cindy'); expect(container.textContent).not.toContain('Teammate on Mac');+ const rows = buttons().map(node => node.dataset.testid ?? '').filter(id => /^companionProfile\.[a-z]+$/.test(id));+ expect(rows).toEqual(['profile', 'memory', 'models', 'skills', 'automation', 'artifacts', 'search', 'permissions'].map(id => `companionProfile.${id}`));+ const icons = Object.fromEntries(rows.map(id => [id.split('.')[1], byTest(id)!.dataset.icon]));+ // 图标与桌面 BotsHomeView 同一动作同一 lucide 图标(mobile-design-guide §6)。+ expect(icons).toMatchObject({ profile: 'Info', memory: 'Brain', models: 'Sparkles', skills: 'Settings2', automation: 'Clock3', artifacts: 'FileText', search: 'History', permissions: 'Hand' });+ expect(new Set(Object.values(icons)).size).toBe(rows.length);+ const actions = buttons().filter(node => node.dataset.testid?.startsWith('companionProfile.action.'));+ expect(actions.map(node => [node.dataset.testid, node.dataset.destructive])).toEqual([['companionProfile.action.delete', 'true'], ['companionProfile.action.restart', 'false']]);+});++it('hands automation and search to the owner like iOS, without closing first', async () => {+ await render();+ await press(byTest('companionProfile.automation')); await press(byTest('companionProfile.search'));+ expect(h.automation).toHaveBeenCalledOnce(); expect(h.search).toHaveBeenCalledOnce(); expect(h.close).not.toHaveBeenCalled();});-afterEach(() => { act(() => root?.unmount()); root = undefined; });-it('keeps a host-disabled action read-only like iOS', async () => {- h.read.mockResolvedValue({ resource, panels: [profilePanel(true)] });- await render(); await openProfile();- expect(h.inputs.Name.editable).toBe(false);- expect(h.buttons['devices.companionProfile.save'].disabled).toBe(true);+it('renders confirmation fields for any confirmed action, not only delete', async () => {+ h.read.mockImplementation(async () => ({ ...home(), panels: [...home().panels.filter(item => item.id !== 'restart'),+ managed('restart', 'Restart', { fields: [{ id: 'reason', label: 'Reason', kind: 'text' }] })] }));+ await render(); await press(byTest('companionProfile.action.restart'));+ expect(h.sheet.title).toBe('Restart?'); expect(h.sheet.preventDismiss).toBe(true); expect(h.sheet.onBack).toBeTypeOf('function');+ expect(container.textContent).toContain('Restart body');+ await type('Reason', 'Stuck on a tool'); await press(byText('Restart'));+ expect(h.invoke.mock.calls[0][2]).toMatchObject({ actionId: 'restart-grant', input: { reason: 'Stuck on a tool' } });});-it('asks to discard an offline draft on back instead of trapping the page', async () => {- await render(); await openProfile();- await act(async () => h.inputs.Name.onChangeText('Unsaved'));- await render(false);- await act(async () => h.sheet.onBack());- expect(h.alert).toHaveBeenCalledOnce(); expect(h.invoke).not.toHaveBeenCalled();- // Keep editing: the draft and page stay.- alertButton('devices.common.cancel').onPress?.();- expect(h.inputs.Name.value).toBe('Unsaved'); expect(h.sheet.onBack).toBeDefined();- await act(async () => h.sheet.onBack());- await act(async () => alertButton('devices.companions.automation.discard').onPress!());- expect(h.sheet.onBack).toBeUndefined(); expect(h.close).not.toHaveBeenCalled();+it('keeps Settings to Permissions and opens selects through the system menu without a search box', async () => {+ const models = form('models', [{ id: 'route0', label: 'Route', kind: 'select', options: [{ value: '', label: 'None' }, { value: 'a', label: 'Model A' }] }], { route0: 'a' });+ h.read.mockImplementation(async (_invoke: unknown, _device: string, target: { id: string }) => target.id === 'settings:bot/avatar'+ ? { resource: { ...resource, ref: { ...ref, id: 'settings:bot/models' }, display: { title: 'Models' } }, panels: [models] } : home());+ await render(); await press(byTest('companionProfile.profile')); await press(byTest('companionProfile.avatar'));+ expect(h.sheet.title).toBe('Models');+ const choice = h.choices.at(-1);+ expect(choice).toMatchObject({ label: 'Route', value: 'a', disabled: false, options: [{ value: '', label: 'None', disabled: false }, { value: 'a', label: 'Model A', disabled: false }] });+ expect(container.querySelector('input[aria-label*="searchOptions"]')).toBeNull();+ await act(async () => choice.onChange(''));+ expect(h.sheet.preventDismiss).toBe(true);+ await act(async () => h.sheet.onBack()); await settle();+ // Back saves the draft first, exactly like the iOS page Back, then lands on Settings.+ expect(h.invoke.mock.calls[0][2]).toMatchObject({ actionId: 'models-grant', input: { route0: '' } });+ const rows = buttons().map(node => node.dataset.testid).filter(Boolean);+ expect(rows).toEqual(['companionProfile.permissions']); expect(byTest('companionProfile.permissions')!.dataset.icon).toBe('Hand');});-it('closes after discarding an offline draft, and still saves an online draft first', async () => {- await render(); await openProfile();- await act(async () => h.inputs.Name.onChangeText('Unsaved'));- await render(false);- await act(async () => h.sheet.onClose());- await act(async () => alertButton('devices.companions.automation.discard').onPress!());- expect(h.close).toHaveBeenCalledOnce(); expect(h.invoke).not.toHaveBeenCalled();+it('follows the iOS skills page: entry rows or the empty note, never an inline form', async () => {+ await render(); await press(byTest('companionProfile.skills'));+ expect(container.textContent).toContain('devices.companionProfile.skillsEmpty');+ expect(container.querySelector('input[aria-label="Skill note"]')).toBeNull();+ expect(byTest('companionProfile.connections')!.dataset.icon).toBe('Link2');+});++it('edits a skill with the host body limit and removes it through a destructive row', async () => {+ const skill = form('skill', [{ id: 'body', label: 'Content', kind: 'multiline' }], { body: 'Original' });+ const remove = { id: 'remove', values: {}, action: { id: 'skill-remove', label: 'Remove skill', tone: 'destructive', confirmation: { title: 'Remove?' } } };+ h.read.mockImplementation(async (_invoke: unknown, _device: string, target: { id: string }) => target.id.startsWith('settings:bot/connections')+ ? { resource: { ...resource, ref: { ...ref, id: 'settings:bot/skills/learned' }, display: { title: 'Learned' } }, panels: [skill, remove] } : home());+ await render(); await press(byTest('companionProfile.skills')); await press(byTest('companionProfile.connections'));+ expect(container.querySelector<HTMLInputElement>('input[aria-label="Content"]')!.maxLength).toBe(55000);+ const row = byTest('companionProfile.action.remove')!;+ expect(row.dataset.destructive).toBe('true');+ await press(row); expect(h.sheet.title).toBe('Remove?');+});++it('shows a spinner, not loading text, while an editor loads', async () => {+ let finish!: (value: unknown) => void;+ h.read.mockImplementation((_invoke: unknown, _device: string, target: { id: string }) => target.id === 'settings:bot/avatar' ? new Promise(done => { finish = done; }) : Promise.resolve(home()));+ await render(); await press(byTest('companionProfile.profile')); await press(byTest('companionProfile.avatar'));+ expect(container.querySelector('[role="progressbar"]')!.getAttribute('aria-label')).toBe('devices.resources.loading');+ expect(container.textContent).not.toContain('devices.resources.loading');+ await act(async () => finish(home()));+});++async function renderCreate() {+ await act(async () => root.render(createElement(CompanionCreateSheet, { visible: true, deviceId: 'host', deviceName: 'Mac', collectionId: 'teammates', online: true, onClose: h.close, onCreated: h.created })));+ await settle();+}+const createPanel = (disabled = false) => ({ resource: { ...resource, ref: { ...ref, id: 'create' } }, panels: [{ id: 'create', values: {}, action: { id: 'create-grant', label: 'Create', disabled,+ fields: [{ id: 'name', label: 'Name', kind: 'text' }, { id: 'avatarImageBase64', label: 'Avatar', kind: 'text' }] } }] });++it('gates Create like iOS and offers an explicit Cancel that guards the draft', async () => {+ h.read.mockResolvedValue(createPanel());+ await renderCreate();+ const create = () => byText('devices.companionProfile.create')!;+ expect(create().disabled).toBe(true);+ await type('Name', 'Nova'); expect(create().disabled).toBe(false);+ await act(async () => h.portrait.onChange('')); expect(create().disabled).toBe(true);+ await act(async () => h.portrait.onChange('portrait')); expect(create().disabled).toBe(false);+ expect(h.sheet.preventDismiss).toBe(true);+ await press(byText('devices.common.cancel'));+ expect(h.close).not.toHaveBeenCalled(); expect(h.alert).toHaveBeenCalledOnce();+ await act(async () => h.alert.mock.calls[0][2][1].onPress()); expect(h.close).toHaveBeenCalledOnce();+});- h.close.mockClear(); h.alert.mockClear();- await render(true); await openProfile();- await act(async () => h.inputs.Name.onChangeText('Saved on close'));- await act(async () => h.sheet.onClose());- expect(h.alert).not.toHaveBeenCalled();- expect(h.invoke.mock.calls[0][2].input).toEqual({ name: 'Saved on close' });- expect(h.close).toHaveBeenCalledOnce();+it('keeps Create disabled for a disabled host action and cancels a clean form directly', async () => {+ h.read.mockResolvedValue(createPanel(true));+ await renderCreate(); await type('Name', 'Nova');+ expect(byText('devices.companionProfile.create')!.disabled).toBe(true);+ await type('Name', '');+ await press(byText('devices.common.cancel'));+ expect(h.alert).not.toHaveBeenCalled(); expect(h.close).toHaveBeenCalledOnce();});diff --git a/apps/mobile/src/__tests__/CompanionProfileSheet.test.tsx b/apps/mobile/src/__tests__/CompanionProfileSheet.test.tsxindex db9fa78ed4..1a8df601f5 100644--- a/apps/mobile/src/__tests__/CompanionProfileSheet.test.tsx+++ b/apps/mobile/src/__tests__/CompanionProfileSheet.test.tsx@@ -3,11 +3,11 @@ import { act, createElement } from 'react';import { createRoot, type Root } from 'react-dom/client';import { afterEach, beforeEach, expect, it, vi } from 'vitest';const h = vi.hoisted(() => ({ account: 1, view: {} as any, create: {} as any, model: {} as any, picker: {} as any, read: vi.fn(), openLink: vi.fn(), invoke: vi.fn(), close: vi.fn(), closed: vi.fn(), push: vi.fn(), created: vi.fn(), deleted: vi.fn() }));-vi.mock('react-native', () => ({ Platform: { OS: 'ios' }, StyleSheet: { create: (v: unknown) => v }, View: 'div', Alert: { alert: vi.fn() }, Image: 'img', Pressable: 'button', ScrollView: 'div', Switch: 'input' }));+vi.mock('react-native', () => ({ Platform: { OS: 'ios' }, StyleSheet: { create: (v: unknown) => v }, View: 'div', Alert: { alert: vi.fn() }, Image: 'img', Pressable: 'button', ScrollView: 'div', Switch: 'input', ActivityIndicator: 'progress' }));vi.mock('expo-router', () => ({ useRouter: () => ({ push: h.push }) }));vi.mock('expo-crypto', () => ({ randomUUID: () => 'test-id' }));vi.mock('react-i18next', () => ({ useTranslation: () => ({ t: (key: string) => key, i18n: { language: 'en' } }) }));-vi.mock('lucide-react-native', () => Object.fromEntries(['Brain','Check','ChevronRight','Clock3','FileText','MessageCircle','Search','Settings2','Sparkles','UserRound'].map(key => [key, () => null])));+vi.mock('lucide-react-native', () => Object.fromEntries(['Brain', 'Camera', 'Clock3', 'FileText', 'Hand', 'History', 'Info', 'Link2', 'Settings2', 'Sparkles'].map(key => [key, () => null])));vi.mock('@/auth/AuthContext', () => ({ useAuth: () => ({ accountGeneration: h.account }) }));vi.mock('@/device-link/DeviceLinkContext', () => ({ useDeviceLink: () => ({ invoke: h.invoke, openLink: h.openLink }) }));vi.mock('@/device-link/remoteResources', () => ({ invokeRemoteResourceAction: (...args: unknown[]) => h.invoke(...args) }));@@ -16,6 +16,7 @@ vi.mock('@/components/MobilePrimitives', () => ({ MainWindowActionButton: () =>vi.mock('@/components/RemoteCompanionAvatar', () => ({ RemoteCompanionAvatar: () => null }));vi.mock('@/platform/chrome', () => ({ NativePullDownMenu: () => null, usesNativePullDownMenu: () => true }));vi.mock('@/session/CompanionSettingsRow', () => ({ CompanionSettingsRow: () => null }));+vi.mock('@/session/CompanionChoice', () => ({ CompanionChoice: () => null }));vi.mock('@/session/CompanionSheet', () => ({ CompanionSheet: () => null }));vi.mock('@/session/CompanionProfileArtifacts', () => ({ CompanionProfileArtifacts: () => null }));vi.mock('@/theme', async () => ({ ...await import('@/theme/tokens'), useTheme: () => ({ colors: {} }), useThemedStyles: () => ({}) }));diff --git a/apps/mobile/src/__tests__/CompanionProfileSheetDraft.android.test.tsx b/apps/mobile/src/__tests__/CompanionProfileSheetDraft.android.test.tsxnew file mode 100644index 0000000000..b1396dd890--- /dev/null+++ b/apps/mobile/src/__tests__/CompanionProfileSheetDraft.android.test.tsx@@ -0,0 +1,110 @@+// @vitest-environment jsdom+import { act, createElement } from 'react';+import { createRoot, type Root } from 'react-dom/client';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';+const h = vi.hoisted(() => ({+ account: 1, sheet: {} as any, inputs: {} as Record<string, any>, buttons: {} as Record<string, any>, pressables: {} as Record<string, any>,+ alert: vi.fn(), read: vi.fn(), openLink: vi.fn(), invoke: vi.fn(), close: vi.fn(),+}));+vi.mock('react-native', async () => {+ const { createElement: el } = await import('react');+ return {+ Platform: { OS: 'android' }, StyleSheet: { create: (v: unknown) => v, hairlineWidth: 1 }, View: 'div', Alert: { alert: h.alert }, Image: 'img', ScrollView: 'div', Switch: () => null,+ ActivityIndicator: () => null,+ Pressable: (p: any) => {+ if (p.accessibilityLabel) h.pressables[p.accessibilityLabel] = p;+ if (p.testID) h.pressables[p.testID] = p;+ return el('div', null, typeof p.children === 'function' ? p.children({ pressed: false }) : p.children);+ },+ };+});+vi.mock('expo-router', () => ({ useRouter: () => ({ push: vi.fn() }) }));+vi.mock('expo-crypto', () => ({ randomUUID: () => 'test-id' }));+vi.mock('react-i18next', () => ({ useTranslation: () => ({ t: (key: string) => key, i18n: { language: 'en' } }) }));+vi.mock('lucide-react-native', () => Object.fromEntries(['Brain','Camera','Check','ChevronRight','Clock3','FileText','Hand','History','Info','Link2','MessageCircle','Search','Settings2','Sparkles','UserRound'].map(key => [key, () => null])));+vi.mock('@/auth/AuthContext', () => ({ useAuth: () => ({ accountGeneration: h.account }) }));+vi.mock('@/device-link/DeviceLinkContext', () => ({ useDeviceLink: () => ({ invoke: h.invoke, openLink: h.openLink }) }));+vi.mock('@/device-link/remoteResources', () => ({ invokeRemoteResourceAction: (...args: unknown[]) => h.invoke(...args) }));+vi.mock('@/components/AppText', () => ({ Text: 'span', TextInput: (p: any) => { h.inputs[p.accessibilityLabel] = p; return null; } }));+vi.mock('@/components/MobilePrimitives', () => ({ MainWindowActionButton: (p: any) => { h.buttons[p.action.label] = p.action; return null; } }));+vi.mock('@/components/RemoteCompanionAvatar', () => ({ RemoteCompanionAvatar: () => null }));+vi.mock('@/platform/chrome', () => ({ NativePullDownMenu: () => null, usesNativePullDownMenu: () => false }));+vi.mock('@/session/CompanionSettingsRow', () => ({ CompanionSettingsRow: (p: any) => { if (p.testID) h.pressables[p.testID] = p; return null; } }));+vi.mock('@/session/CompanionSheet', async () => {+ const { createElement: el } = await import('react');+ return { CompanionSheet: (p: any) => { h.sheet = p; return el('div', null, p.children); } };+});+vi.mock('@/session/CompanionProfileArtifacts', () => ({ CompanionProfileArtifacts: () => null }));+vi.mock('@/theme', async () => ({ ...await import('@/theme/tokens'), useTheme: () => ({ colors: {} }), useThemedStyles: () => ({}) }));+vi.mock('@/session/companionProfileData', async original => ({ ...await original<object>(), loadCompanionProfile: (...args: unknown[]) => h.read(...args) }));+// 伙伴设置页按 iOS 重组后新增的依赖(与 CompanionProfileSheet.android.test 同口径)。+vi.mock('@/session/CompanionChoice', () => ({ CompanionChoice: () => null }));+vi.mock('@/session/CompanionMemoryPage', () => ({ CompanionMemoryPage: () => null }));+vi.mock('@/session/useCompanionMemory', () => ({ useCompanionMemory: () => ({ busy: false, dirty: false, flush: async () => true, back: async () => false }) }));+vi.mock('@/session/CompanionPortraitPicker', async original => ({ ...await original<object>(), CompanionPortraitPicker: () => null }));+vi.mock('@/session/CompanionProfileNativeView', () => ({ CompanionProfileNativeView: () => { throw new Error('iOS view on Android'); } }));+vi.mock('@/session/CompanionCreateNativeView', () => ({ CompanionCreateNativeView: () => { throw new Error('iOS view on Android'); } }));+vi.mock('@/session/CompanionModelChain', () => ({ readCompanionModelChain: () => [], CompanionModelChain: () => null, CompanionModelPicker: () => null }));+import { CompanionProfileSheet } from '@/session/CompanionProfileSheet';+Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });++const resource = { ref: { collectionId: 'teammates', kind: 'bot', id: 'bot' }, display: { title: 'Cindy' }, links: [], revision: 'v1' };+const profilePanel = (disabled = false) => ({ id: 'profile', values: { name: 'Cindy' },+ action: { id: 'grant', label: 'Save', disabled, fields: [{ id: 'name', label: 'Name', kind: 'text' }] } });+let root: Root | undefined;+async function render(online = true) {+ root ??= createRoot(document.createElement('div'));+ await act(async () => root!.render(createElement(CompanionProfileSheet, { visible: true, resource, collectionId: 'teammates', deviceId: 'host', deviceName: 'Mac', online, onClose: h.close, onOpenSearch() {}, onOpenAutomation() {} } as any)));+}+async function openProfile() {+ // 与 iOS 相同,个人资料从首页「个人资料」行进入。+ await act(async () => h.pressables['companionProfile.profile'].onPress());+}+function alertButton(label: string) {+ const buttons = h.alert.mock.calls.at(-1)?.[2] as { text: string; onPress?: () => void }[];+ return buttons.find(button => button.text === label)!;+}+beforeEach(() => {+ vi.clearAllMocks(); h.inputs = {}; h.buttons = {}; h.pressables = {};+ h.read.mockResolvedValue({ resource, panels: [profilePanel()] });+ h.invoke.mockResolvedValue({ effects: [] });+});+afterEach(() => { act(() => root?.unmount()); root = undefined; });++it('keeps a host-disabled action read-only like iOS', async () => {+ h.read.mockResolvedValue({ resource, panels: [profilePanel(true)] });+ await render(); await openProfile();+ expect(h.inputs.Name.editable).toBe(false);+ expect(h.buttons['devices.companionProfile.save'].disabled).toBe(true);+});++it('asks to discard an offline draft on back instead of trapping the page', async () => {+ await render(); await openProfile();+ await act(async () => h.inputs.Name.onChangeText('Unsaved'));+ await render(false);+ await act(async () => h.sheet.onBack());+ expect(h.alert).toHaveBeenCalledOnce(); expect(h.invoke).not.toHaveBeenCalled();+ // Keep editing: the draft and page stay.+ alertButton('devices.common.cancel').onPress?.();+ expect(h.inputs.Name.value).toBe('Unsaved'); expect(h.sheet.onBack).toBeDefined();+ await act(async () => h.sheet.onBack());+ await act(async () => alertButton('devices.companions.automation.discard').onPress!());+ expect(h.sheet.onBack).toBeUndefined(); expect(h.close).not.toHaveBeenCalled();+});++it('closes after discarding an offline draft, and still saves an online draft first', async () => {+ await render(); await openProfile();+ await act(async () => h.inputs.Name.onChangeText('Unsaved'));+ await render(false);+ await act(async () => h.sheet.onClose());+ await act(async () => alertButton('devices.companions.automation.discard').onPress!());+ expect(h.close).toHaveBeenCalledOnce(); expect(h.invoke).not.toHaveBeenCalled();++ h.close.mockClear(); h.alert.mockClear();+ await render(true); await openProfile();+ await act(async () => h.inputs.Name.onChangeText('Saved on close'));+ await act(async () => h.sheet.onClose());+ expect(h.alert).not.toHaveBeenCalled();+ expect(h.invoke.mock.calls[0][2].input).toEqual({ name: 'Saved on close' });+ expect(h.close).toHaveBeenCalledOnce();+});diff --git a/apps/mobile/src/__tests__/CompanionSheet.test.tsx b/apps/mobile/src/__tests__/CompanionSheet.test.tsxnew file mode 100644index 0000000000..267f686f38--- /dev/null+++ b/apps/mobile/src/__tests__/CompanionSheet.test.tsx@@ -0,0 +1,47 @@+// @vitest-environment jsdom+import { act, createElement, useEffect } from 'react';+import { createRoot, type Root } from 'react-dom/client';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';++const h = vi.hoisted(() => ({ modal: null as any, surface: null as any, mounts: 0 }));+vi.mock('react-native', () => ({ useWindowDimensions: () => ({ width: 400, height: 800 }) }));+vi.mock('react-native-safe-area-context', () => ({ useSafeAreaInsets: () => ({ top: 40, bottom: 20, left: 0, right: 0 }) }));+vi.mock('@/session/SheetModal', () => ({ SheetModal: (props: any) => { h.modal = props; return props.children; } }));+vi.mock('@/session/SheetSurface', () => ({ SheetSurface: (props: any) => {+ h.surface = props;+ useEffect(() => { h.mounts++; }, []);+ return props.children;+} }));+import { CompanionSheet } from '@/session/CompanionSheet';+Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });++let root: Root;+const close = vi.fn(); const back = vi.fn();+async function render(props: { preventDismiss?: boolean; onBack?: () => void }) {+ await act(async () => root.render(createElement(CompanionSheet, { visible: true, title: 'Teammate', onClose: close, children: null, ...props })));+}+beforeEach(() => { vi.clearAllMocks(); h.mounts = 0; root = createRoot(document.createElement('div')); });+afterEach(() => { act(() => root.unmount()); });++it('closes from the backdrop, the grabber and the system back key when nothing is at risk', async () => {+ await render({});+ h.modal.onBackdropPress(); h.surface.onClose(); h.modal.onRequestClose();+ expect(close).toHaveBeenCalledTimes(3);+});++it('ignores backdrop, grabber and system back without prompting while the form is protected (iOS interactiveDismissDisabled)', async () => {+ await render({ preventDismiss: true });+ const mounts = h.mounts;+ h.modal.onBackdropPress(); h.modal.onRequestClose();+ await act(async () => h.surface.onClose());+ expect(close).not.toHaveBeenCalled();+ // A blocked drag remounts the surface so it springs back instead of staying half-dismissed.+ expect(h.mounts).toBe(mounts + 1);+});++it.each([false, true])('treats the system back key as the in-page Back on a secondary page (protected: %s)', async preventDismiss => {+ await render({ preventDismiss, onBack: back });+ h.modal.onRequestClose();+ expect(back).toHaveBeenCalledOnce(); expect(close).not.toHaveBeenCalled();+ expect(h.surface.onBack).toBe(back);+});diff --git a/apps/mobile/src/__tests__/anchoredPullDownMenu.test.tsx b/apps/mobile/src/__tests__/anchoredPullDownMenu.test.tsxnew file mode 100644index 0000000000..a8d11795dc--- /dev/null+++ b/apps/mobile/src/__tests__/anchoredPullDownMenu.test.tsx@@ -0,0 +1,327 @@+// @vitest-environment jsdom+import { act, createElement, forwardRef, type ReactNode } from "react";+import { createRoot, type Root } from "react-dom/client";+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";++type AnyProps = Record<string, any>;+const styleOf = (style: unknown, state = { pressed: false }): AnyProps => {+ const value = typeof style === "function" ? style(state) : style;+ if (Array.isArray(value))+ return Object.assign({}, ...value.map((item) => styleOf(item)));+ return value && typeof value === "object" ? (value as AnyProps) : {};+};++vi.mock("react-native", async () => {+ const { createElement: el } = await import("react");+ const Pressable = forwardRef<any, AnyProps>(+ (+ {+ children,+ onPress,+ onLongPress,+ testID,+ accessibilityHint,+ accessibilityLabel,+ accessibilityRole,+ accessibilityState,+ disabled,+ style,+ },+ ref,+ ) => {+ if (ref && typeof ref === "object") {+ (ref as { current: unknown }).current = {+ measureInWindow: (+ cb: (x: number, y: number, w: number, h: number) => void,+ ) => cb(300, 80, 40, 40),+ };+ }+ return el(+ "button",+ {+ "data-testid": testID,+ "aria-label": accessibilityLabel,+ "data-role": accessibilityRole,+ "data-checked":+ accessibilityState?.checked === undefined+ ? undefined+ : String(accessibilityState.checked),+ "data-expanded":+ accessibilityState?.expanded === undefined+ ? undefined+ : String(accessibilityState.expanded),+ "data-selected":+ accessibilityState?.selected === undefined+ ? undefined+ : String(accessibilityState.selected),+ "data-hint": accessibilityHint,+ disabled,+ "data-opacity": styleOf(style).opacity,+ onClick: onPress ?? onLongPress,+ },+ typeof children === "function"+ ? children({ pressed: false })+ : children,+ );+ },+ );+ const View = ({+ children,+ pointerEvents,+ importantForAccessibility,+ testID,+ }: AnyProps) =>+ el(+ "div",+ {+ "data-testid": testID,+ "data-pointer-events": pointerEvents,+ "data-a11y": importantForAccessibility,+ },+ children,+ );+ const Modal = ({ children, visible }: AnyProps) =>+ visible ? el("section", { "data-modal": "true" }, children) : null;+ class AnimatedValue {+ constructor(public v: number) {}+ setValue(v: number) {+ this.v = v;+ }+ interpolate() {+ return 1;+ }+ }+ return {+ Animated: {+ Value: AnimatedValue,+ View,+ timing: () => ({ start: () => undefined }),+ },+ Easing: { bezier: () => () => 0 },+ Modal,+ Pressable,+ ScrollView: ({ children }: AnyProps) => el("div", null, children),+ StyleSheet: { create: <T,>(s: T) => s, absoluteFill: {}, hairlineWidth: 1 },+ View,+ useWindowDimensions: () => ({ width: 400, height: 800 }),+ };+});+vi.mock("react-native-safe-area-context", () => ({+ useSafeAreaInsets: () => ({ top: 24, bottom: 16, left: 0, right: 0 }),+}));+vi.mock("lucide-react-native", async () => {+ const { createElement: el } = await import("react");+ const icon = (name: string) => () => el("i", { "data-icon": name });+ return {+ Check: icon("Check"),+ ChevronLeft: icon("ChevronLeft"),+ ChevronRight: icon("ChevronRight"),+ Minus: icon("Minus"),+ };+});+vi.mock("@/components/AppText", async () => {+ const { createElement: el } = await import("react");+ return {+ Text: ({ children, accessibilityRole }: AnyProps) =>+ el("span", { "data-role": accessibilityRole }, children),+ };+});+vi.mock("@/hooks/useReduceMotion", () => ({+ useReduceMotionEnabled: () => true,+}));+vi.mock("@/theme", () => ({+ fontWeight: {},+ iconSize: {},+ iconStroke: {},+ lineHeight: {},+ radius: {},+ spacing: { sm: 8, md: 12, xs: 4 },+ typeScale: {},+ motionDuration: { fast: 150 },+ motionEasing: { out: [0, 0, 1, 1] },+ useTheme: () => ({ colors: { destructive: "red", textPrimary: "black" } }),+ useThemedStyles: () =>+ new Proxy(+ {},+ { get: (_t, key) => (key === "triggerPressed" ? { opacity: 0.72 } : {}) },+ ),+}));++import { AnchoredPullDownMenu } from "@/platform/chrome/AnchoredPullDownMenu";+import type { NativePullDownAction } from "@/platform/chrome/NativePullDownMenu";++Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });+let root: Root;+let container: HTMLDivElement;+beforeEach(() => {+ container = document.createElement("div");+ root = createRoot(container);+});+afterEach(() => act(() => root.unmount()));++const q = (selector: string) =>+ container.querySelector(selector) as HTMLElement | null;+const click = (selector: string) =>+ act(() => (q(selector) as HTMLElement).click());++const actions: NativePullDownAction[] = [+ {+ id: "group.sort",+ title: "Sort",+ displayInline: true,+ subactions: [+ { id: "sort.time", title: "By time", state: "on" },+ { id: "sort.priority", title: "Priority", state: "off" },+ ],+ },+ {+ id: "group.projects",+ title: "Projects",+ displayInline: true,+ subactions: [+ {+ id: "project.a",+ title: "Alpha",+ state: "off",+ keepPresented: true,+ subtitle: "3 tasks",+ },+ ],+ },+ {+ id: "more",+ title: "More",+ subactions: [{ id: "more.rename", title: "Rename" }],+ },+ { id: "delete", title: "Delete", destructive: true },+ { id: "locked", title: "Locked", disabled: true },+];++function render(+ onAction = vi.fn(),+ children: ReactNode = createElement(+ "span",+ { accessibilityLabel: "Display options" },+ "…",+ ),+) {+ act(() =>+ root.render(+ createElement(AnchoredPullDownMenu, {+ actions,+ onAction,+ testID: "trigger",+ children,+ }),+ ),+ );+ return onAction;+}++describe("Android anchored pull-down menu", () => {+ it("makes the trigger one accessible button and opens the menu from it", () => {+ render();+ const trigger = q('[data-testid="trigger"]')!;+ expect(trigger.getAttribute("aria-label")).toBe("Display options");+ expect(trigger.getAttribute("data-expanded")).toBe("false");+ expect(+ q('[data-a11y="no-hide-descendants"]')?.getAttribute(+ "data-pointer-events",+ ),+ ).toBe("none");+ expect(q("[data-modal]")).toBeNull();+ click('[data-testid="trigger"]');+ expect(q("[data-modal]")).not.toBeNull();+ expect(q('[data-testid="trigger"]')!.getAttribute("data-expanded")).toBe(+ "true",+ );+ });++ it("keeps the trigger's own accessibility state and hint while adding expanded", () => {+ render(+ vi.fn(),+ createElement(+ "span",+ {+ accessibilityHint: "Filters are applied",+ accessibilityLabel: "Filter",+ accessibilityState: { selected: true },+ },+ "filter",+ ),+ );+ const trigger = q('[data-testid="trigger"]')!;+ expect(trigger.getAttribute("aria-label")).toBe("Filter");+ expect(trigger.getAttribute("data-selected")).toBe("true");+ expect(trigger.getAttribute("data-hint")).toBe("Filters are applied");+ expect(trigger.getAttribute("data-expanded")).toBe("false");+ click('[data-testid="trigger"]');+ expect(q('[data-testid="trigger"]')!.getAttribute("data-selected")).toBe(+ "true",+ );+ expect(q('[data-testid="trigger"]')!.getAttribute("data-expanded")).toBe(+ "true",+ );+ });++ it("shows real section titles, a leading check only on selected rows, and subtitles", () => {+ render();+ click('[data-testid="trigger"]');+ const headers = [...container.querySelectorAll('[data-role="header"]')].map(+ (node) => node.textContent,+ );+ expect(headers).toEqual(["Sort", "Projects"]);+ expect(+ q('[data-testid="pullDownMenu.item.sort.time"] [data-icon="Check"]'),+ ).not.toBeNull();+ expect(+ q('[data-testid="pullDownMenu.item.sort.priority"] [data-icon="Check"]'),+ ).toBeNull();+ expect(+ q('[data-testid="pullDownMenu.item.sort.time"]')!.getAttribute(+ "data-checked",+ ),+ ).toBe("true");+ expect(+ q('[data-testid="pullDownMenu.item.project.a"]')!.textContent,+ ).toContain("3 tasks");+ expect(+ (q('[data-testid="pullDownMenu.item.locked"]') as HTMLButtonElement)+ .disabled,+ ).toBe(true);+ });++ it("closes after a normal choice but stays open for keepPresented multi-select", () => {+ const onAction = render();+ click('[data-testid="trigger"]');+ click('[data-testid="pullDownMenu.item.project.a"]');+ expect(onAction).toHaveBeenLastCalledWith("project.a");+ expect(q("[data-modal]")).not.toBeNull();+ click('[data-testid="pullDownMenu.item.sort.priority"]');+ expect(onAction).toHaveBeenLastCalledWith("sort.priority");+ expect(q("[data-modal]")).toBeNull();+ });++ it("enters a submenu like UIMenu and comes back", () => {+ const onAction = render();+ click('[data-testid="trigger"]');+ click('[data-testid="pullDownMenu.item.more"]');+ expect(onAction).not.toHaveBeenCalled();+ expect(q('[data-testid="pullDownMenu.item.more.rename"]')).not.toBeNull();+ expect(q('[data-testid="pullDownMenu.item.sort.time"]')).toBeNull();+ click('[aria-label="More"]');+ expect(q('[data-testid="pullDownMenu.item.sort.time"]')).not.toBeNull();+ click('[data-testid="pullDownMenu.item.more"]');+ click('[data-testid="pullDownMenu.item.more.rename"]');+ expect(onAction).toHaveBeenLastCalledWith("more.rename");+ expect(q("[data-modal]")).toBeNull();+ });++ it("closes from the backdrop without choosing anything", () => {+ const onAction = render();+ click('[data-testid="trigger"]');+ click('[data-testid="trigger.menu.backdrop"]');+ expect(q("[data-modal]")).toBeNull();+ expect(onAction).not.toHaveBeenCalled();+ });+});diff --git a/apps/mobile/src/__tests__/androidModelPickerParity.test.tsx b/apps/mobile/src/__tests__/androidModelPickerParity.test.tsxnew file mode 100644index 0000000000..b0e77a6183--- /dev/null+++ b/apps/mobile/src/__tests__/androidModelPickerParity.test.tsx@@ -0,0 +1,1011 @@+// @vitest-environment jsdom+/**+ * Android 模型 / 权限 / 目标面板与 iOS 的交互对齐(外观仍是 SheetModal + RN 自绘行)。+ * react-native 用 DOM 桩替身渲染,按 testID / aria 属性断言信息结构与交互时机。+ */+import { act, createElement, type ReactNode } from "react";+import { createRoot, type Root } from "react-dom/client";+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";++const native = vi.hoisted(() => ({+ budgetDisabled: false,+ menu: true,+ menus: new Map<+ string,+ {+ actions: Array<{ id: string; title: string; state?: string }>;+ onAction(id: string): void;+ }+ >(),+ onClosed: undefined as (() => void) | undefined,+ layouts: new Map<+ string,+ (event: { nativeEvent: { layout: { y: number } } }) => void+ >(),+}));++type AnyProps = Record<string, any>;+const flatStyle = (style: unknown): AnyProps => {+ const value = typeof style === "function" ? style({ pressed: false }) : style;+ if (Array.isArray(value)) return Object.assign({}, ...value.map(flatStyle));+ return value && typeof value === "object" ? (value as AnyProps) : {};+};+vi.mock("react-native", async () => {+ const { createElement: el } = await import("react");+ const passthrough = ({ children }: AnyProps) => el("div", null, children);+ const View = ({+ children,+ testID,+ accessibilityRole,+ accessibilityValue,+ accessibilityLabel,+ onLayout,+ }: AnyProps) => {+ if (testID && onLayout) native.layouts.set(testID, onLayout);+ return el(+ "div",+ {+ "data-testid": testID,+ role: accessibilityRole,+ "aria-label": accessibilityLabel,+ "aria-valuenow": accessibilityValue?.now,+ },+ children,+ );+ };+ class Value {+ setValue() {}+ interpolate() {+ return this;+ }+ }+ return {+ ActivityIndicator: () => null,+ Animated: {+ Value,+ View: passthrough,+ timing: () => ({ start: (cb?: () => void) => cb?.() }),+ },+ Platform: {+ OS: "android",+ select: (v: AnyProps) => v.android ?? v.default,+ },+ Pressable: ({+ children,+ onPress,+ testID,+ disabled,+ accessibilityLabel,+ accessibilityState,+ onLayout,+ }: AnyProps) => {+ if (onLayout) native.layouts.set(`${testID}:selectedRow`, onLayout);+ return el(+ "button",+ {+ "data-testid": testID,+ "aria-label": accessibilityLabel,+ "aria-selected":+ accessibilityState?.selected === undefined+ ? undefined+ : String(accessibilityState.selected),+ "aria-expanded":+ accessibilityState?.expanded === undefined+ ? undefined+ : String(accessibilityState.expanded),+ disabled,+ onClick: onPress,+ },+ children,+ );+ },+ ScrollView: passthrough,+ StyleSheet: { create: <T,>(styles: T) => styles, hairlineWidth: 1 },+ View,+ useWindowDimensions: () => ({ height: 800, width: 400 }),+ };+});+vi.mock("react-native-safe-area-context", () => ({+ useSafeAreaInsets: () => ({ top: 0, bottom: 0, left: 0, right: 0 }),+}));+vi.mock("react-i18next", () => ({+ useTranslation: () => ({+ t: (key: string, values?: AnyProps) =>+ values?.mode ? `${key}:${values.mode}` : key,+ }),+}));+vi.mock("lucide-react-native", async () => {+ const { createElement: el } = await import("react");+ const icon =+ (name: string) =>+ ({ color, fill }: AnyProps) =>+ el("i", { "data-icon": name, "data-color": color, "data-fill": fill });+ return Object.fromEntries(+ [+ "Brain",+ "Check",+ "ChevronDown",+ "ChevronRight",+ "ChevronsUpDown",+ "LayoutGrid",+ "Search",+ "SlidersHorizontal",+ "Star",+ "X",+ "Zap",+ "Hand",+ "Sparkles",+ "TriangleAlert",+ ].map((name) => [name, icon(name)]),+ );+});+vi.mock("@/components/AppText", async () => {+ const { createElement: el } = await import("react");+ return {+ Text: ({ children, numberOfLines, style, testID }: AnyProps) =>+ el(+ "span",+ {+ "data-testid": testID,+ "data-color": flatStyle(style).color,+ "data-lines": numberOfLines,+ },+ children,+ ),+ TextInput: ({+ value,+ onChangeText,+ onFocus,+ testID,+ accessibilityLabel,+ }: AnyProps) =>+ el("input", {+ "aria-label": accessibilityLabel,+ "data-testid": testID,+ onChange: (event: { target: { value: string } }) =>+ onChangeText?.(event.target.value),+ onFocus,+ value: value ?? "",+ }),+ };+});+vi.mock("@/theme", async () => {+ const tokens = await import("@/theme/tokens");+ const colors = new Proxy({}, { get: (_target, key) => `c.${String(key)}` });+ return {+ ...tokens,+ useTheme: () => ({ colors, mode: "light" }),+ useThemedStyles: (factory: (c: unknown) => unknown) => factory(colors),+ };+});+vi.mock("@/platform/chrome", async () => {+ const { createElement: el } = await import("react");+ return {+ usesNativePullDownMenu: () => native.menu,+ NativePullDownMenu: ({ actions, onAction, children, testID }: AnyProps) => {+ if (native.menu) native.menus.set(testID, { actions, onAction });+ return el("div", null, children);+ },+ NativeSwitch: ({ value, onValueChange, testID, disabled }: AnyProps) =>+ el("button", {+ "data-testid": testID,+ "aria-checked": String(value),+ disabled,+ onClick: () => onValueChange(!value),+ }),+ };+});+vi.mock("@/components/MobileAgentMark", async () => {+ const { createElement: el } = await import("react");+ return {+ MobileAgentMark: ({ agentKind }: AnyProps) =>+ el("i", { "data-agent": agentKind }),+ };+});+vi.mock("@/session/MobileProviderMark", async () => {+ const { createElement: el } = await import("react");+ return {+ MobileProviderMark: ({ providerId }: AnyProps) =>+ el("i", { "data-provider-mark": providerId }),+ MobileModelIconMark: ({ providerId }: AnyProps) =>+ el("i", { "data-model-mark": providerId }),+ };+});+vi.mock("@/session/sessionAgentSwitch", () => ({+ mobileAgentLabel: (agent: string) => `agent:${agent}`,+}));+vi.mock("@/session/contextSheetModel", () => ({+ computeContextSheetSnapHeights: () => ({ half: 400, full: 700 }),+}));+vi.mock("@/session/SheetModal", async () => {+ const { createElement: el } = await import("react");+ return {+ SheetModal: ({ children, onClosed, visible }: AnyProps) => {+ native.onClosed = onClosed;+ return visible ? el("div", null, children) : null;+ },+ };+});+vi.mock("@/session/SheetSurface", async () => {+ const { createElement: el } = await import("react");+ return {+ SheetSurface: ({ children, title, pinnedTop, onBack, testID }: AnyProps) =>+ el(+ "section",+ { "data-testid": testID, "data-title": title },+ onBack+ ? el("button", { "data-testid": `${testID}.back`, onClick: onBack })+ : null,+ pinnedTop,+ children,+ ),+ };+});+vi.mock("@/session/draftModelMemory", () => ({+ useDraftModelMemoryVersion: () => 0,+}));+vi.mock("@/session/sessionModelMirror", () => ({+ useSessionModelMirrorVersion: () => 0,+}));+vi.mock("@/session/permissionPresentation", async () => {+ const { createElement: el } = await import("react");+ const Icon = ({ color }: AnyProps) =>+ el("i", { "data-icon": "permission", "data-color": color });+ return {+ permissionPresentation: (id: string, label?: string) => ({+ Icon,+ label: label ?? id,+ accent:+ id === "auto"+ ? "auto"+ : id === "bypassPermissions"+ ? "bypass"+ : "neutral",+ }),+ permissionAccentColor: (accent: string, colors: AnyProps) =>+ accent === "auto"+ ? colors.permAutoAccent+ : accent === "bypass"+ ? colors.statusAccent+ : colors.textSecondary,+ };+});+vi.mock("@/session/goalStatusLabel", () => ({+ GOAL_STATUS_LABEL: {},+ goalReasonText: (reason?: string) => reason || null,+ goalStatusLabel: (status: string) => `status:${status}`,+}));+vi.mock("@/session/modelPickerRows", () => ({+ budgetDisabledHint: () => "needs key",+ budgetRowDisabled: () => native.budgetDisabled,+ effortLabelFor: (_model: unknown, effort: string) => `effort:${effort}`,+ modelRowAccessibilityLabel: ({ baseLabel }: AnyProps) => baseLabel,+ rowEffortOf: ({ selected, liveEffort, model }: AnyProps) =>+ selected ? liveEffort : model.defaultEffort,+ rowFastEditable: () => true,+ rowFastOn: ({ selected, liveFastMode }: AnyProps) => selected && liveFastMode,+}));++vi.mock("@/i18n", () => ({+ i18n: { t: (key: string) => key, language: "en", resolvedLanguage: "en" },+}));+vi.mock("@/session/UnifiedModelPickerSheet", () => ({+ UnifiedModelPickerSheet: () => null,+}));+vi.mock("@/session/ComposerSheet", () => ({ ComposerSheet: () => null }));+vi.mock("@/session/ModelPickerNativeHeader", () => ({+ ModelPickerNativeHeader: () => null,+}));+vi.mock("@/session/MobileAgentSwitcher", () => ({+ MobileAgentSwitcher: () => null,+}));++import { UnifiedModelPickerView } from "@/session/UnifiedModelPickerView";+import { ModelPickerSheet } from "@/session/ModelPickerSheet";+import { MobileModelPickerList } from "@/session/MobileModelPickerList";+import { MobilePermissionPickerList } from "@/session/MobilePermissionPickerList";+import { NativePermissionSheet } from "@/session/NativePermissionSheet";+import { ContextSheetGoalView } from "@/session/ContextSheetGoalView";++Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });+let root: Root;+let host: HTMLDivElement;+beforeEach(() => {+ native.menu = true;+ native.menus.clear();+ native.onClosed = undefined;+ native.layouts.clear();+ host = document.createElement("div");+ document.body.appendChild(host);+ root = createRoot(host);+});+afterEach(() => {+ act(() => root.unmount());+ host.remove();+});+const byId = (id: string) =>+ host.querySelector(`[data-testid="${id}"]`) as HTMLElement | null;+const click = (id: string) =>+ act(() => (byId(id) as HTMLButtonElement).click());+const render = (node: ReactNode) => act(() => root.render(node as never));++function unifiedRow(overrides: AnyProps = {}) {+ return {+ key: "p1::m1",+ entry: {+ displayName: "Model One",+ providerId: "p1",+ modelId: "m1",+ capabilities: {+ codex: {+ wireModelId: "m1-codex",+ efforts: ["low", "high"],+ defaultEffort: "high",+ },+ pi: { wireModelId: "m1-pi", efforts: [], defaultEffort: null },+ },+ },+ config: {+ providerId: "p1",+ modelId: "m1",+ agent: "codex",+ effort: "low",+ fast: false,+ },+ selected: true,+ disabled: false,+ subtitle: "[email protected] · Low",+ costMarks: "$$",+ effortLabel: "Low",+ quotaLabel: "2d · 70%",+ providerMark: { providerId: "p1", name: "Provider One" },+ ...overrides,+ };+}++function unifiedProps(overrides: AnyProps = {}): AnyProps {+ return {+ visible: true,+ onClose: vi.fn(),+ title: "models.picker.title",+ testID: "modelSheet",+ query: "",+ onQuery: vi.fn(),+ filter: "all",+ onFilter: vi.fn(),+ filters: [+ { id: "all", label: "All models" },+ { id: "favorites", label: "Favorites" },+ {+ id: "p1",+ label: "Provider One",+ providerMark: { providerId: "p1", name: "Provider One" },+ quota: { remaining: 40, label: "Week · 40% left" },+ },+ ],+ groups: [+ {+ key: "favorites",+ title: "Favorites",+ rows: [+ unifiedRow({+ key: "fav-1",+ selected: false,+ favorite: { uid: "fav-1" },+ }),+ ],+ },+ {+ key: "p1",+ title: "Provider One · [email protected]",+ rows: [unifiedRow()],+ },+ ],+ busy: false,+ error: null,+ loading: false,+ emptyHint: "empty",+ onSelect: vi.fn(),+ onOptions: vi.fn(),+ ...overrides,+ };+}++describe("Android unified model picker follows the iOS structure", () => {+ it("pins a labelled search field with a clear action and preserves the query value", () => {+ const props = unifiedProps({ query: "gpt" });+ render(createElement(UnifiedModelPickerView, props as never));+ const input = byId("modelSheet.search") as HTMLInputElement;+ expect(input.getAttribute("aria-label")).toBe(+ "models.picker.searchAccessibility",+ );+ expect(input.value).toBe("gpt");+ const clear = byId("modelSheet.search.clear")!;+ expect(clear.getAttribute("aria-label")).toBe(+ "devices.detail.search.clearA11y",+ );+ click("modelSheet.search.clear");+ expect(props.onQuery).toHaveBeenCalledWith("");+ });++ it("replaces chip filters with a Source entry that opens a secondary page with quota bars", () => {+ const props = unifiedProps();+ render(createElement(UnifiedModelPickerView, props as never));+ expect(byId("modelSheet.source.p1")).toBeNull();+ click("modelSheet.filter");+ expect(byId("modelSheet")!.getAttribute("data-title")).toBe(+ "models.unified.source",+ );+ // 搜索框只在列表页出现;来源页有返回。+ expect(byId("modelSheet.search")).toBeNull();+ const quota = byId("modelSheet.source.p1.quota")!;+ expect(quota.getAttribute("role")).toBe("progressbar");+ expect(quota.getAttribute("aria-valuenow")).toBe("40");+ expect(byId("modelSheet.source.all")!.getAttribute("aria-selected")).toBe(+ "true",+ );+ click("modelSheet.source.p1");+ expect(props.onFilter).toHaveBeenCalledWith("p1");+ expect(byId("modelSheet")!.getAttribute("data-title")).toBe(+ "models.picker.title",+ );+ expect(byId("modelSheet.search")).not.toBeNull();+ });++ it("renders titled groups in the given order with selection state and separate settings targets", () => {+ const props = unifiedProps();+ render(createElement(UnifiedModelPickerView, props as never));+ const groups = [+ ...host.querySelectorAll('[data-testid^="modelSheet.group."]'),+ ].map((node) => node.getAttribute("data-testid"));+ expect(groups).toEqual([+ "modelSheet.group.favorites",+ "modelSheet.group.p1",+ ]);+ expect(host.textContent).toContain("Provider One · [email protected]");+ expect(byId("modelSheet.model.p1::m1")!.getAttribute("aria-selected")).toBe(+ "true",+ );+ expect(byId("modelSheet.model.fav-1")!.getAttribute("aria-selected")).toBe(+ "false",+ );+ click("modelSheet.model.p1::m1");+ expect(props.onSelect).toHaveBeenCalledTimes(1);+ click("modelSheet.model.p1::m1.optionsButton");+ expect(props.onOptions).toHaveBeenCalledTimes(1);+ });++ function optionsProps(overrides: AnyProps = {}) {+ const row = unifiedRow();+ return unifiedProps({+ onBack: vi.fn(),+ title: "Model One",+ options: {+ row,+ agents: ["codex", "pi", "claude-code"],+ fastCapable: true,+ onChange: vi.fn(),+ favoritesDisabled: false,+ onFavorite: vi.fn(),+ onReset: vi.fn(),+ context: "Provider One · 200K context",+ price: "Per 1M tokens\nInput $1 · Output $2",+ ...overrides,+ },+ });+ }++ it("opens Harness as a secondary page and returns to settings after choosing", () => {+ const props = optionsProps();+ render(createElement(UnifiedModelPickerView, props as never));+ expect(byId("modelSheet.harness")!.textContent).toContain("agent:codex");+ click("modelSheet.harness");+ expect(byId("modelSheet")!.getAttribute("data-title")).toBe(+ "models.unified.harness",+ );+ expect(+ byId("modelSheet.harness.codex")!.getAttribute("aria-selected"),+ ).toBe("true");+ // 缺能力的 Harness 不写配置(不再使用非空断言)。+ click("modelSheet.harness.claude-code");+ expect(props.options.onChange).not.toHaveBeenCalled();+ click("modelSheet.harness.pi");+ expect(props.options.onChange).toHaveBeenCalledWith({+ providerId: "p1",+ modelId: "m1-pi",+ agent: "pi",+ effort: "",+ fast: false,+ });+ expect(byId("modelSheet")!.getAttribute("data-title")).toBe("Model One");+ expect(byId("modelSheet.harness")).not.toBeNull();+ });++ it("uses a pull-down menu for effort, a switch for Fast and standalone favorite / reset rows", () => {+ const props = optionsProps();+ render(createElement(UnifiedModelPickerView, props as never));+ const menu = native.menus.get("modelSheet.effortMenu")!;+ expect(menu.actions.map((action) => [action.id, action.state])).toEqual([+ ["low", "on"],+ ["high", "off"],+ ]);+ act(() => menu.onAction("high"));+ expect(props.options.onChange).toHaveBeenLastCalledWith(+ expect.objectContaining({ effort: "high" }),+ );+ act(() => menu.onAction("unknown"));+ expect(props.options.onChange).toHaveBeenCalledTimes(1);+ expect(byId("modelSheet.fast")!.getAttribute("aria-checked")).toBe("false");+ click("modelSheet.fast");+ expect(props.options.onChange).toHaveBeenLastCalledWith(+ expect.objectContaining({ fast: true }),+ );+ click("modelSheet.favorite");+ expect(props.options.onFavorite).toHaveBeenCalledTimes(1);+ click("modelSheet.reset");+ expect(props.options.onReset).toHaveBeenCalledTimes(1);+ expect(byId("modelSheet.price")!.textContent).toContain("Input $1");+ });++ it("falls back to inline effort rows when the build has no native menu", () => {+ native.menu = false;+ const props = optionsProps();+ render(createElement(UnifiedModelPickerView, props as never));+ expect(byId("modelSheet.effort.high")).toBeNull();+ click("modelSheet.effort");+ expect(byId("modelSheet.effort.low")!.getAttribute("aria-selected")).toBe(+ "true",+ );+ click("modelSheet.effort.high");+ expect(props.options.onChange).toHaveBeenCalledWith(+ expect.objectContaining({ effort: "high" }),+ );+ expect(byId("modelSheet.effort.high")).toBeNull();+ });++ it("hides the reset row for favorites", () => {+ const props = optionsProps({+ row: unifiedRow({ favorite: { uid: "fav-1" } }),+ });+ render(createElement(UnifiedModelPickerView, props as never));+ expect(byId("modelSheet.favorite")!.textContent).toContain(+ "models.unified.removeFavorite",+ );+ expect(byId("modelSheet.reset")).toBeNull();+ });+});++describe("Android legacy model list groups by source like iOS", () => {+ const provider = (id: string, name: string, extra: AnyProps = {}) => ({+ id,+ name,+ ...extra,+ });+ const model = (id: string) => ({+ id,+ displayName: `Model ${id}`,+ efforts: ["low"],+ defaultEffort: "low",+ supportsFastMode: true,+ });++ it("titles groups as source · account and shows subscription · effort · Fast with a check mark", () => {+ const subscription = provider("sub", "ChatGPT", {+ access: { kind: "subscription" },+ openAiAccount: { identity: "[email protected]" },+ });+ const api = provider("api", "API [email protected]", {+ openAiAccount: { identity: "[email protected]" },+ });+ render(+ createElement(MobileModelPickerList, {+ providerRows: [+ { provider: subscription, model: model("a") },+ { provider: subscription, model: model("b") },+ { provider: api, model: model("c") },+ ],+ flatOptions: [],+ activeModelId: "a",+ activeSourceId: "sub",+ agentKind: "codex",+ capabilities: { hasFastMode: true },+ selectedEffort: "high",+ selectedFastMode: true,+ onSelectProviderRow: vi.fn(),+ onSelectFlatModel: vi.fn(),+ onOpenOptions: vi.fn(),+ testID: "list",+ } as never),+ );+ const groups = [...host.querySelectorAll('[data-testid^="list.group."]')];+ expect(groups.map((node) => node.getAttribute("data-testid"))).toEqual([+ "list.group.sub",+ "list.group.api",+ ]);+ expect(groups[0].textContent).toContain("ChatGPT · [email protected]");+ // 账号已写进来源名时不重复。+ expect(groups[1].textContent).toContain("API [email protected]");+ expect(groups[1].textContent).not.toContain(+ "API [email protected] · [email protected]",+ );+ const rows = [...host.querySelectorAll('button[data-testid="list"]')];+ expect(rows.map((row) => row.getAttribute("aria-selected"))).toEqual([+ "true",+ "false",+ "false",+ ]);+ expect(rows[0].textContent).toContain(+ "models.picker.subscriptionBadge · effort:high · models.options.fastMode",+ );+ expect(rows[0].querySelector('[data-icon="Check"]')).not.toBeNull();+ expect(rows[1].querySelector('[data-icon="Check"]')).toBeNull();+ // 来源品牌 mark 保留。+ expect(rows[0].querySelector('[data-model-mark="sub"]')).not.toBeNull();+ });++ it("keeps the missing-key hint on its own unrestricted line instead of truncating it", () => {+ native.budgetDisabled = true;+ try {+ render(+ createElement(MobileModelPickerList, {+ providerRows: [{ provider: provider("sub", "ChatGPT", { access: { kind: "subscription" } }), model: model("a") }],+ flatOptions: [],+ activeModelId: "b",+ activeSourceId: "sub",+ agentKind: "codex",+ capabilities: { hasFastMode: true },+ onSelectProviderRow: vi.fn(),+ onSelectFlatModel: vi.fn(),+ testID: "list",+ } as never),+ );+ const hint = host.querySelector('[data-testid="list.disabledHint"]')!;+ expect(hint.textContent).toBe("needs key");+ expect(hint.getAttribute("data-lines")).toBeNull();+ const row = host.querySelector('button[data-testid="list"]')!;+ const meta = [...row.querySelectorAll('span[data-lines="1"]')].map((node) => node.textContent);+ expect(meta.some((text) => text?.includes("needs key"))).toBe(false);+ } finally {+ native.budgetDisabled = false;+ }+ });++ it("reports the selected row offset in scroll-content coordinates after grouping", () => {+ const onSelectedRowLayout = vi.fn();+ const rowsFor = (id: string) => ({+ provider: provider(id, id),+ model: model(`${id}-m`),+ });+ render(+ createElement(MobileModelPickerList, {+ providerRows: [rowsFor("first"), rowsFor("second")],+ flatOptions: [],+ activeModelId: "second-m",+ activeSourceId: "second",+ onSelectProviderRow: vi.fn(),+ onSelectFlatModel: vi.fn(),+ onSelectedRowLayout,+ testID: "list",+ } as never),+ );+ const layout = (key: string, y: number) =>+ act(() => native.layouts.get(key)!({ nativeEvent: { layout: { y } } }));+ // 选中行的布局回调挂在分组的直接子节点上(不是内层按钮),y 相对分组。+ expect(native.layouts.has("list:selectedRow")).toBe(false);+ layout("list.selectedRow", 40);+ expect(onSelectedRowLayout).not.toHaveBeenCalled();+ layout("list.group.second", 200);+ expect(onSelectedRowLayout).toHaveBeenLastCalledWith(240);+ });++ it("adds the flat fallback container offset as well", () => {+ const onSelectedRowLayout = vi.fn();+ render(+ createElement(MobileModelPickerList, {+ providerRows: [],+ flatOptions: [+ { id: "a", label: "A", efforts: [] },+ { id: "b", label: "B", efforts: [] },+ ],+ activeModelId: "b",+ activeSourceId: null,+ onSelectProviderRow: vi.fn(),+ onSelectFlatModel: vi.fn(),+ onSelectedRowLayout,+ testID: "flat",+ } as never),+ );+ act(() => native.layouts.get("flat.selectedRow")!({ nativeEvent: { layout: { y: 60 } } }));+ expect(onSelectedRowLayout).not.toHaveBeenCalled();+ act(() => native.layouts.get("flat.group.__flat__")!({ nativeEvent: { layout: { y: 120 } } }));+ expect(onSelectedRowLayout).toHaveBeenLastCalledWith(180);+ });+});++describe("Android permission picker selection matches iOS", () => {+ const options = [+ { id: "ask", label: "Ask" },+ { id: "auto", label: "Auto" },+ { id: "bypassPermissions", label: "Full access" },+ ];++ it("tints only the selected icon; text and check stay neutral", () => {+ render(+ createElement(MobilePermissionPickerList, {+ options,+ activeMode: "auto",+ onSelect: vi.fn(),+ testID: "perm",+ } as never),+ );+ const rows = [...host.querySelectorAll('button[data-testid="perm"]')];+ expect(rows.map((row) => row.getAttribute("aria-selected"))).toEqual([+ "false",+ "true",+ "false",+ ]);+ const icon = (row: Element) =>+ row.querySelector('[data-icon="permission"]')!.getAttribute("data-color");+ expect(icon(rows[1])).toBe("c.permAutoAccent");+ expect(icon(rows[2])).toBe("c.textSecondary");+ expect(rows[1].querySelector("span")!.getAttribute("data-color")).toBe(+ "c.textPrimary",+ );+ expect(+ rows[1].querySelector('[data-icon="Check"]')!.getAttribute("data-color"),+ ).toBe("c.textPrimary");+ });++ it("closes the Android sheet first and applies the mode only after the close finishes", () => {+ const order: string[] = [];+ const onClose = vi.fn(() => order.push("close"));+ const onSelect = vi.fn((mode: string) => order.push(`select:${mode}`));+ render(+ createElement(NativePermissionSheet, {+ visible: true,+ onClose,+ onSelect,+ options,+ activeMode: "ask",+ testID: "session.permissionSheet",+ } as never),+ );+ const rows = host.querySelectorAll(+ 'button[data-testid="session.permissionSheet.option"]',+ );+ act(() => (rows[2] as HTMLButtonElement).click());+ expect(order).toEqual(["close"]);+ act(() => native.onClosed?.());+ expect(order).toEqual(["close", "select:bypassPermissions"]);+ // 背板关闭等后续 onClosed 不会重放上一次选择。+ act(() => native.onClosed?.());+ expect(onSelect).toHaveBeenCalledTimes(1);+ });+});++describe("Android goal form follows the iOS form", () => {+ const base = {+ busy: false,+ error: null,+ onSetGoal: vi.fn(),+ onPauseGoal: vi.fn(),+ onResumeGoal: vi.fn(),+ onClearGoal: vi.fn(),+ };++ it("keeps limits collapsed until Advanced opens, then edits them through pull-down menus", () => {+ const onSetGoal = vi.fn();+ render(+ createElement(ContextSheetGoalView, {+ ...base,+ goal: null,+ onSetGoal,+ initialObjective: "目标",+ } as never),+ );+ expect(byId("contextSheet.goalMaxTurnsOptions")).toBeNull();+ expect(+ byId("contextSheet.goalAdvancedToggle")!.getAttribute("aria-expanded"),+ ).toBe("false");+ click("contextSheet.goalAdvancedToggle");+ expect(+ byId("contextSheet.goalAdvancedToggle")!.getAttribute("aria-expanded"),+ ).toBe("true");+ const turns = native.menus.get("contextSheet.goalMaxTurnsOptions.menu")!;+ expect(turns.actions.map((action) => action.id)).toEqual([+ "10",+ "20",+ "50",+ "100",+ "unlimited",+ ]);+ expect(turns.actions.find((action) => action.state === "on")!.id).toBe(+ "unlimited",+ );+ act(() => turns.onAction("20"));+ const budget = native.menus.get("contextSheet.goalBudgetOptions.menu")!;+ expect(budget.actions.map((action) => action.title)).toEqual([+ "500K",+ "1M",+ "2M",+ "5M",+ "interaction.contextSheet.unlimited",+ ]);+ click("contextSheet.goalStartButton");+ expect(onSetGoal).toHaveBeenCalledWith({+ objective: "目标",+ limits: { maxTurns: 20, budgetTokens: null, noProgressLimit: 3 },+ });+ });++ it("falls back to inline limit choices without a native menu", () => {+ native.menu = false;+ const onSetGoal = vi.fn();+ render(+ createElement(ContextSheetGoalView, {+ ...base,+ goal: null,+ onSetGoal,+ initial: {+ objective: "恢复",+ limits: { maxTurns: 17, budgetTokens: null, noProgressLimit: 3 },+ },+ } as never),+ );+ click("contextSheet.goalAdvancedToggle");+ click("contextSheet.goalNoProgressOptions.trigger");+ expect(+ byId("contextSheet.goalNoProgressOptions.option.3")!.getAttribute(+ "aria-selected",+ ),+ ).toBe("true");+ click("contextSheet.goalNoProgressOptions.option.unlimited");+ expect(byId("contextSheet.goalNoProgressOptions.option.3")).toBeNull();+ click("contextSheet.goalMaxTurnsOptions.trigger");+ // 历史自定义值前置保留。+ expect(+ byId("contextSheet.goalMaxTurnsOptions.option.17")!.getAttribute(+ "aria-selected",+ ),+ ).toBe("true");+ click("contextSheet.goalStartButton");+ expect(onSetGoal).toHaveBeenCalledWith({+ objective: "恢复",+ limits: { maxTurns: 17, budgetTokens: null, noProgressLimit: null },+ });+ });++ it("shows the disabled hint like iOS when creation is unavailable", async () => {+ const { ContextSheetGoalCreateForm } =+ await import("@/session/ContextSheetGoalView");+ render(+ createElement(ContextSheetGoalCreateForm, {+ busy: false,+ error: null,+ onSetGoal: vi.fn(),+ disabled: true,+ disabledHint: "not ready",+ } as never),+ );+ expect(byId("contextSheet.goalDisabledHint")!.textContent).toBe(+ "not ready",+ );+ });++ it.each([+ [+ "active",+ ["contextSheet.goalPauseButton", "contextSheet.goalClearButton"],+ ],+ [+ "paused",+ ["contextSheet.goalResumeButton", "contextSheet.goalClearButton"],+ ],+ ["completed", ["contextSheet.goalClearButton"]],+ ])("orders the %s status view like iOS", (status, actions) => {+ render(+ createElement(ContextSheetGoalView, {+ ...base,+ goal: {+ status,+ objective: "写完文档",+ turnsUsed: 3,+ tokensUsed: 1_000_000,+ maxTurns: 10,+ budgetTokens: null,+ lastReason: "waiting",+ },+ } as never),+ );+ const text = host.textContent ?? "";+ const order = [+ `status:${status}`,+ "写完文档",+ "interaction.contextSheet.goalMeta",+ "waiting",+ ].map((part) => text.indexOf(part));+ expect(order.every((index) => index >= 0)).toBe(true);+ expect([...order].sort((a, b) => a - b)).toEqual(order);+ const buttons = [+ ...host.querySelectorAll('button[data-testid^="contextSheet.goal"]'),+ ].map((node) => node.getAttribute("data-testid"));+ expect(buttons).toEqual(actions);+ });+});++describe("Android legacy model sheet exposes permissions as a standalone row like iOS", () => {+ function sheetProps(overrides: AnyProps = {}) {+ return {+ visible: true,+ onClose: vi.fn(),+ providers: [],+ flatOptions: [],+ providersReady: true,+ agentKind: "codex",+ capabilities: null,+ activeModelId: "",+ selectedProviderId: null,+ selectedEffort: "",+ selectedFastMode: false,+ onSelectProviderRow: vi.fn(),+ onSelectFlatModel: vi.fn(),+ permissionOptions: [+ { id: "ask", label: "Ask" },+ { id: "auto", label: "Auto" },+ ],+ activePermissionMode: "auto",+ onSelectPermissionMode: vi.fn(),+ keyboardAvoidingBehavior: undefined,+ testID: "modelSheet",+ ...overrides,+ };+ }++ it("shows a Permissions row with the current mode and opens the permission page", () => {+ const props = sheetProps();+ render(createElement(ModelPickerSheet, props as never));+ const row = byId("modelSheet.permissionTrigger")!;+ expect(row.textContent).toContain("models.picker.permissionTitle");+ expect(row.textContent).toContain("Auto");+ expect(row.getAttribute("aria-label")).toBe(+ "models.picker.permissionModeAccessibility:Auto",+ );+ click("modelSheet.permissionTrigger");+ const options = host.querySelectorAll(+ 'button[data-testid="modelSheet.permissionOption"]',+ );+ expect(options).toHaveLength(2);+ act(() => (options[0] as HTMLButtonElement).click());+ expect(props.onSelectPermissionMode).toHaveBeenCalledWith("ask");+ expect(+ host.querySelector('button[data-testid="modelSheet.permissionOption"]'),+ ).toBeNull();+ });++ it("omits the row when the host provides its own permission control", () => {+ render(+ createElement(+ ModelPickerSheet,+ sheetProps({ hidePermissionTrigger: true }) as never,+ ),+ );+ expect(byId("modelSheet.permissionTrigger")).toBeNull();+ });++ it("adds a clear action to the search field", () => {+ render(createElement(ModelPickerSheet, sheetProps() as never));+ expect(byId("modelSheet.search.clear")).toBeNull();+ act(() => {+ const input = byId("modelSheet.search") as HTMLInputElement;+ const setter = Object.getOwnPropertyDescriptor(+ HTMLInputElement.prototype,+ "value",+ )!.set!;+ setter.call(input, "gpt");+ input.dispatchEvent(new Event("input", { bubbles: true }));+ });+ expect((byId("modelSheet.search") as HTMLInputElement).value).toBe("gpt");+ click("modelSheet.search.clear");+ expect((byId("modelSheet.search") as HTMLInputElement).value).toBe("");+ });+});diff --git a/apps/mobile/src/__tests__/androidSessionInteractionParity.test.tsx b/apps/mobile/src/__tests__/androidSessionInteractionParity.test.tsxnew file mode 100644index 0000000000..936dc843d6--- /dev/null+++ b/apps/mobile/src/__tests__/androidSessionInteractionParity.test.tsx@@ -0,0 +1,126 @@+// @vitest-environment jsdom+import { readFileSync } from 'node:fs';+import { resolve } from 'node:path';+import { act, createElement, type ReactNode } from 'react';+import { createRoot, type Root } from 'react-dom/client';+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';++const sheet = vi.hoisted(() => ({ onClosed: undefined as (() => void) | undefined }));++vi.mock('react-native', () => ({+ ActivityIndicator: () => null,+ Pressable: ({ children, onPress, testID }: { children?: ReactNode; onPress?: () => void; testID?: string }) =>+ createElement('button', { 'data-testid': testID, onClick: onPress }, children as ReactNode),+ StyleSheet: { create: <T,>(styles: T) => styles, hairlineWidth: 1 },+ View: ({ children }: { children?: ReactNode }) => createElement('div', null, children),+ useWindowDimensions: () => ({ height: 800, width: 400 }),+}));+vi.mock('react-native-safe-area-context', () => ({ useSafeAreaInsets: () => ({ top: 0, bottom: 0, left: 0, right: 0 }) }));+vi.mock('react-i18next', () => ({ useTranslation: () => ({ t: (key: string) => key }) }));+vi.mock('lucide-react-native', () => ({ ChevronRight: () => null }));+vi.mock('@/components/AppText', () => ({+ Text: ({ children }: { children?: ReactNode }) => createElement('span', null, children),+}));+vi.mock('@/theme', () => ({+ fontWeight: {}, iconSize: {}, iconStroke: {}, lineHeight: {}, radius: {}, spacing: {}, typeScale: {},+ useTheme: () => ({ colors: {} }),+ useThemedStyles: () => new Proxy({}, { get: () => ({}) }),+}));+vi.mock('@/session/contextSheetModel', () => ({ computeContextSheetSnapHeights: () => ({}) }));+vi.mock('@/session/SheetModal', () => ({+ SheetModal: ({ children, onClosed, visible }: { children?: ReactNode; onClosed?: () => void; visible: boolean }) => {+ sheet.onClosed = onClosed;+ return visible ? createElement('div', null, children) : null;+ },+}));+vi.mock('@/session/SheetSurface', () => ({+ SheetSurface: ({ children }: { children?: ReactNode }) => createElement('div', null, children),+}));++import { ContextSheet, ContextSheetRow } from '@/session/ContextSheet';++const readTextLf = (path: string) => String(readFileSync(resolve(process.cwd(), path), 'utf8')).replace(/\r\n/g, '\n');++Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });+let root: Root;+let container: HTMLDivElement;+beforeEach(() => {+ sheet.onClosed = undefined;+ container = document.createElement('div');+ root = createRoot(container);+});+afterEach(() => act(() => root.unmount()));++describe('Android context sheet follows the iOS dismiss-then-present order', () => {+ function render(onClose: () => void, onPress: () => void, dismissBeforePress: boolean) {+ act(() => root.render(createElement(ContextSheet, {+ visible: true,+ onClose,+ title: 'Context',+ keyboardAvoidingBehavior: undefined,+ children: createElement(ContextSheetRow, {+ dismissBeforePress,+ icon: null,+ label: 'Photos',+ onPress,+ testID: 'row',+ }),+ })));+ }++ it('closes the sheet first and runs the picker only after the close finishes', () => {+ const order: string[] = [];+ render(() => order.push('close'), () => order.push('picker'), true);+ act(() => (container.querySelector('[data-testid="row"]') as HTMLButtonElement).click());+ expect(order).toEqual(['close']);+ act(() => sheet.onClosed?.());+ expect(order).toEqual(['close', 'picker']);+ // A later close without a pending row action does not replay the picker.+ act(() => sheet.onClosed?.());+ expect(order).toEqual(['close', 'picker']);+ });++ it('drops a pending picker when the sheet reopens before the close finishes', () => {+ const order: string[] = [];+ render(() => order.push('close'), () => order.push('picker'), true);+ act(() => (container.querySelector('[data-testid="row"]') as HTMLButtonElement).click());+ // Reopened mid-dismiss: the close never completed, then the user closes normally.+ act(() => root.render(createElement(ContextSheet, {+ visible: false, onClose: () => undefined, title: 'Context', keyboardAvoidingBehavior: undefined, children: null,+ })));+ render(() => order.push('close'), () => order.push('picker'), true);+ act(() => sheet.onClosed?.());+ expect(order).toEqual(['close']);+ });++ it('keeps ordinary rows immediate', () => {+ const order: string[] = [];+ render(() => order.push('close'), () => order.push('open'), false);+ act(() => (container.querySelector('[data-testid="row"]') as HTMLButtonElement).click());+ expect(order).toEqual(['open']);+ });+});++describe('Android session chrome matches the iOS entry points', () => {+ const source = readTextLf('app/sessions/[sessionId].tsx');++ it('shows remote desktop, files and details; search lives in the details sheet', () => {+ expect(source).toContain(".filter((action) => action.id === 'files');");+ const header = source.slice(source.indexOf('<View style={styles.sessionHeaderActions}>'));+ const more = header.slice(header.indexOf('icon={Ellipsis}') - 200, header.indexOf('testID="session.controlsToggle"'));+ expect(more).not.toContain('messageOnly');+ expect(more).toContain("accessibilityLabel={t('session.menu.details')}");+ const menu = readTextLf('src/session/SessionMenuSheet.tsx');+ expect(menu).toContain('testID="session.detailsSearch"');+ });++ it('uses the same compact search tool as iOS', () => {+ const start = source.indexOf('function SessionSearchSheet(');+ const search = source.slice(start, source.indexOf('function SessionSyncPlaceholder(', start));+ expect(search).toContain("? hasHits ? `${activeIndex + 1} / ${hitCount}` : '0 / 0'");+ expect(search).toContain('autoFocus={visible}');+ expect(search).toContain('testID="session.searchClearButton"');+ expect(search).not.toContain('session.searchPreview');+ expect(search).not.toContain('MOBILE_VISUAL_MOCK_ENABLED');+ });+});diff --git a/apps/mobile/src/__tests__/conversationSearchFilterMenuPlatform.test.tsx b/apps/mobile/src/__tests__/conversationSearchFilterMenuPlatform.test.tsxnew file mode 100644index 0000000000..3da1735d51--- /dev/null+++ b/apps/mobile/src/__tests__/conversationSearchFilterMenuPlatform.test.tsx@@ -0,0 +1,62 @@+import { createElement } from "react";+import { renderToStaticMarkup } from "react-dom/server";+import { describe, expect, it, vi } from "vitest";++const runtime = vi.hoisted(() => ({ os: "ios" as "ios" | "android" }));+vi.mock("react-native", () => ({+ Platform: {+ get OS() {+ return runtime.os;+ },+ },+}));+vi.mock("react-i18next", () => ({+ initReactI18next: { type: "3rdParty", init: () => undefined },+ useTranslation: () => ({ t: (key: string) => key }),+}));+vi.mock("@/platform/chrome", () => ({ usesNativePullDownMenu: () => true }));++import { useConversationSearchFilterMenu } from "@/session/useConversationSearchFilterMenu";++function probe() {+ let result: ReturnType<typeof useConversationSearchFilterMenu> | undefined;+ function Probe() {+ result = useConversationSearchFilterMenu({+ activeCount: 0,+ agentKind: "all",+ lastActivity: "all",+ lockedProjects: false,+ onAgentKindChange: vi.fn(),+ onLastActivityChange: vi.fn(),+ onProjectsChange: vi.fn(),+ onReset: vi.fn(),+ onSortChange: vi.fn(),+ onStatusChange: vi.fn(),+ projectSelection: { kind: "all" },+ projects: [],+ sortBy: "recent",+ status: "active",+ } as never);+ return null;+ }+ renderToStaticMarkup(createElement(Probe));+ return result!;+}++describe("conversation search filter menu platform split", () => {+ it("uses the system pull-down on iOS", () => {+ runtime.os = "ios";+ const menu = probe();+ expect(menu.filterActions?.length).toBeGreaterThan(0);+ expect(menu.onFilterAction).toBeTypeOf("function");+ });++ it("uses the same pull-down on Android, whose Cindy menu also keeps multi-select open", () => {+ runtime.os = "android";+ const menu = probe();+ expect(menu.filterActions?.length).toBeGreaterThan(0);+ expect(menu.filterActions?.some((action) =>+ action.subactions?.some((item) => item.keepPresented),+ )).toBe(true);+ });+});diff --git a/apps/mobile/src/__tests__/deviceManagementAndroid.test.tsx b/apps/mobile/src/__tests__/deviceManagementAndroid.test.tsxnew file mode 100644index 0000000000..f2b150bb22--- /dev/null+++ b/apps/mobile/src/__tests__/deviceManagementAndroid.test.tsx@@ -0,0 +1,156 @@+import { createElement, type ReactNode } from "react";+import { renderToStaticMarkup } from "react-dom/server";+import type { DeviceView } from "@cindy/device-link";+import { beforeEach, describe, expect, it, vi } from "vitest";+import { lightColors } from "@/theme/tokens";++type Captured = Record<string, unknown>;+const captured = vi.hoisted(() => ({+ icons: [] as { name: string; props: Captured }[],+ listItems: [] as Captured[],+ pressables: [] as Captured[],+ texts: [] as { children: unknown; style: Captured }[],+}));++function flatten(style: unknown): Captured {+ if (Array.isArray(style)) return Object.assign({}, ...style.map(flatten));+ return style && typeof style === "object" ? (style as Captured) : {};+}++vi.mock("react-native", () => ({+ Platform: { OS: "android" },+ Pressable: (props: Captured & { children?: ReactNode }) => {+ captured.pressables.push(props);+ return createElement("div", null, props.children);+ },+ ScrollView: ({ children }: { children?: ReactNode }) => createElement("div", null, children),+ StyleSheet: { create: <T,>(styles: T) => styles, hairlineWidth: 1 },+ View: ({ children }: { children?: ReactNode }) => createElement("div", null, children),+}));+vi.mock("@/components/AppText", () => ({+ Text: ({ children, style }: { children?: ReactNode; style?: unknown }) => {+ captured.texts.push({ children, style: flatten(style) });+ return createElement("span", null, children);+ },+}));+vi.mock("lucide-react-native", () => {+ const icon = (name: string) => (props: Captured) => {+ captured.icons.push({ name, props });+ return null;+ };+ return { Monitor: icon("Monitor"), Pencil: icon("Pencil"), Trash2: icon("Trash2") };+});+vi.mock("@/platform/gestureHandler", () => ({+ ClassicSwipeable: ({+ children,+ renderLeftActions,+ renderRightActions,+ }: {+ children?: ReactNode;+ renderLeftActions(): ReactNode;+ renderRightActions(): ReactNode;+ }) => createElement("div", null, renderLeftActions(), children, renderRightActions()),+}));+vi.mock("@expo/ui", () => ({+ ListItem: (props: Captured) => {+ captured.listItems.push(props);+ return null;+ },+ Text: ({ children }: { children?: ReactNode }) => createElement("span", null, children),+}));+vi.mock("react-i18next", () => ({ useTranslation: () => ({ t: (key: string) => key }) }));+vi.mock("@/theme", async () => {+ const tokens = await import("@/theme/tokens");+ return { ...tokens, useTheme: () => ({ colors: tokens.lightColors, mode: "light" }) };+});++import { DeviceInformationFields } from "@/device-link/DeviceInformationFields";+import { DeviceManagementList } from "@/device-link/DeviceManagementList";++function device(id: string, online: boolean): DeviceView {+ return { deviceId: id, name: `Mac ${id}`, online } as DeviceView;+}++describe("Android device management follows iOS interactions", () => {+ beforeEach(() => {+ captured.icons = [];+ captured.listItems = [];+ captured.pressables = [];+ captured.texts = [];+ });++ it("uses icon-only swipe actions that keep screen-reader labels", () => {+ const onRename = vi.fn();+ const onDelete = vi.fn();+ const target = device("a", true);+ renderToStaticMarkup(+ createElement(DeviceManagementList, {+ busy: false,+ onDelete,+ onOpen: vi.fn(),+ onRename,+ rows: [{ device: target, statusDetail: "just now", statusLabel: "Online" }],+ }),+ );+ const rename = captured.pressables.find((p) => p.testID === "deviceManagement.rename.a");+ const remove = captured.pressables.find((p) => p.testID === "deviceManagement.delete.a");+ expect(rename).toMatchObject({ accessibilityLabel: "devices.list.menu.renameDevice", accessibilityRole: "button" });+ expect(remove).toMatchObject({ accessibilityLabel: "devices.common.delete", accessibilityRole: "button" });+ const pencil = captured.icons.find((icon) => icon.name === "Pencil");+ const trash = captured.icons.find((icon) => icon.name === "Trash2");+ expect(pencil?.props.color).toBe(lightColors.textPrimary);+ expect(trash?.props.color).toBe(lightColors.destructive);+ // 滑动按钮里不再渲染文字标签。+ const labels = captured.texts.map((text) => text.children);+ expect(labels).not.toContain("devices.common.delete");+ expect(labels).not.toContain("devices.list.menu.renameDevice");+ (rename?.onPress as () => void)();+ (remove?.onPress as () => void)();+ expect(onRename).toHaveBeenCalledWith(target);+ expect(onDelete).toHaveBeenCalledWith(target);+ });++ it("shows only the status when online and status · detail when offline", () => {+ renderToStaticMarkup(+ createElement(DeviceManagementList, {+ busy: false,+ onDelete: vi.fn(),+ onOpen: vi.fn(),+ onRename: vi.fn(),+ rows: [+ { device: device("on", true), statusDetail: "just now", statusLabel: "Online" },+ { device: device("off", false), statusDetail: "2h ago", statusLabel: "Offline" },+ ],+ }),+ );+ const contents = captured.texts.map((text) => text.children);+ expect(contents).toContain("Online");+ expect(contents).not.toContain("Online · just now");+ expect(contents).toContain("Offline · 2h ago");+ const offlineName = captured.texts.find((text) => text.children === "Mac off");+ const onlineName = captured.texts.find((text) => text.children === "Mac on");+ expect(offlineName?.style.color).toBe(lightColors.textSecondary);+ expect(onlineName?.style.color).toBe(lightColors.textPrimary);+ });++ it("puts field labels on the left and values on the right", () => {+ renderToStaticMarkup(+ createElement(DeviceInformationFields, {+ fields: [+ ["name", "My Mac"],+ ["status", "Online"],+ ],+ }),+ );+ expect(captured.listItems).toHaveLength(2);+ const [name] = captured.listItems;+ expect(name.children).toBe("devices.management.fields.name");+ expect(name.supportingText).toBeUndefined();+ const trailing = name.trailing as { props: { children: string; textStyle: Captured } };+ expect(trailing.props.children).toBe("My Mac");+ expect(trailing.props.textStyle).toMatchObject({+ color: lightColors.textSecondary,+ textAlign: "right",+ });+ });+});diff --git a/apps/mobile/src/__tests__/homeChromeMenusAndroid.test.ts b/apps/mobile/src/__tests__/homeChromeMenusAndroid.test.tsnew file mode 100644index 0000000000..3a74edf9da--- /dev/null+++ b/apps/mobile/src/__tests__/homeChromeMenusAndroid.test.ts@@ -0,0 +1,142 @@+import { readFileSync } from "node:fs";+import { resolve } from "node:path";+import { describe, expect, it, vi } from "vitest";+import type { MobileHomeDeviceFilterItem } from "@/session/mobileHome";++vi.mock("react-native", () => ({+ Platform: { OS: "android" },+ NativeModules: {},+ UIManager: { getViewManagerConfig: () => ({}) },+}));+vi.mock("@react-native-menu/menu", () => ({ MenuView: () => null }));+vi.mock("@/theme", () => ({ useTheme: () => ({ colors: {} }) }));+vi.mock("@/platform/chrome/AnchoredPullDownMenu", () => ({ AnchoredPullDownMenu: () => null }));++import { usesNativePullDownMenu } from "@/platform/chrome/NativePullDownMenu";+import { buildPullDownMenuSections } from "@/platform/chrome/pullDownMenuModel";+import {+ buildHomeDisplayPullDownActions,+ buildHomeScopePullDownActions,+} from "@/session/homeChromeMenus";++const readSource = (path: string) =>+ readFileSync(resolve(process.cwd(), path), "utf8").replace(/\r\n/g, "\n");++function filter(+ overrides: Partial<MobileHomeDeviceFilterItem>,+): MobileHomeDeviceFilterItem {+ return {+ available: true,+ deviceId: "mac",+ id: "device:mac",+ label: "My Mac",+ selected: false,+ sessionCount: 1,+ state: "ready",+ ...overrides,+ } as MobileHomeDeviceFilterItem;+}++const displayInput = {+ groupByProject: true,+ groupByProjectLabel: "By project",+ groupDialogue: false,+ groupDialogueLabel: "Dialogue",+ groupHeading: "Group",+ projectOrder: "custom" as const,+ projectOrderActivityLabel: "Activity",+ projectOrderCustomLabel: "Manual",+ projectOrderHeading: "Project order",+ showProjectOrder: true,+ sortBy: "priority" as const,+ sortByPriorityLabel: "Priority",+ sortByTimeLabel: "Time",+ sortHeading: "Sort",+ statusActiveLabel: "Active",+ statusAllLabel: "All",+ statusArchivedLabel: "Archived",+ statusFilter: "archived" as const,+ statusHeading: "Status",+};++describe("Android home chrome menus follow the iOS pull-down", () => {+ it("always opens the anchored pull-down on Android", () => {+ expect(usesNativePullDownMenu()).toBe(true);+ });++ it("keeps the scope items, order and checks without device status", () => {+ const actions = buildHomeScopePullDownActions(+ [+ filter({ deviceId: null, id: "all", label: "All", selected: false }),+ filter({ selected: true }),+ filter({ available: false, deviceId: "win", id: "device:win", label: "Win", state: "offline" }),+ ],+ "All tasks",+ [{ id: "teammates", title: "Teammates" }],+ );+ const sections = buildPullDownMenuSections(actions);+ expect(sections).toHaveLength(1);+ const android = sections[0].rows;+ expect(android).toEqual(actions);+ expect(android.map((action) => [action.id, action.title, action.state])).toEqual([+ ["all", "All tasks", "off"],+ ["scope.collection:teammates", "Teammates", undefined],+ ["device:mac", "My Mac", "on"],+ ["device:win", "Win", "off"],+ ]);+ for (const action of android) {+ expect(action).not.toHaveProperty("subtitle");+ expect(action).not.toHaveProperty("image");+ }+ });++ it("renders the display groups as titled sections in iOS order with the same checks", () => {+ const actions = buildHomeDisplayPullDownActions(displayInput);+ const iosLeaves = actions.flatMap((group) => group.subactions ?? []);+ const sections = buildPullDownMenuSections(actions);+ // 每个带标题的内联分组对应一段带标题的分组,和 iOS UIMenu 一样。+ expect(sections.map((section) => section.title)).toEqual(+ actions.map((group) => group.title.trim() || undefined),+ );+ const android = sections.flatMap((section) => section.rows);+ expect(android).toEqual(iosLeaves);+ expect(android.map((action) => [action.id, action.state])).toEqual([+ ["groupByProject", "on"],+ ["groupDialogue", "off"],+ ["sort.recency", "off"],+ ["sort.priority", "on"],+ ["projectOrder.activity", "off"],+ ["projectOrder.custom", "on"],+ ["status.active", "off"],+ ["status.archived", "on"],+ ["status.all", "off"],+ ]);+ });++ it("wires the Android header to the same pull-down actions as the iOS header", () => {+ const home = readSource("src/session/HomeSurface.tsx");+ const androidHeader = home.slice(+ home.indexOf("{nativeHomeHeader ? null : ("),+ home.indexOf("{searchOpen || !!searchQuery.trim()"),+ );+ expect(androidHeader).toContain("actions={homeScopePullDownActions}");+ expect(androidHeader).toContain("onAction={handleHomeScopeAction}");+ expect(androidHeader).toContain("actions={homeDisplayPullDownActions}");+ // 自绘范围 / 显示设置面板只在包里没有 MenuView 时兜底。+ expect(androidHeader).toContain("onPress={nativeHomeMenus ? () => undefined : openDeviceMenu}");+ expect(androidHeader).toContain("onPress={nativeHomeMenus ? () => undefined : openDisplaySettings}");+ const iosHeader = home.slice(home.indexOf("<HomeNativeStackHeader"), home.indexOf("/>", home.indexOf("<HomeNativeStackHeader")));+ expect(iosHeader).toContain("scopeActions={homeScopePullDownActions}");+ expect(iosHeader).toContain("displayActions={homeDisplayPullDownActions}");+ });++ it("routes settings pickers and local-log options through the pull-down on Android", () => {+ const settings = readSource("app/settings.tsx");+ // 只按 MenuView 是否可用分流,不按平台:Android 与 iOS 同走系统下拉,自绘 sheet / Alert 仅作回退。+ expect(settings).not.toMatch(/Platform\.OS\s*===\s*['"]ios['"]/);+ expect(settings).toContain("onPress={usesNativePullDownMenu() ? () => undefined : openAppearancePicker}");+ expect(settings).toContain("onPress={usesNativePullDownMenu() ? () => undefined : openLanguagePicker}");+ expect(settings).toContain("onPress={usesNativePullDownMenu() ? undefined : () => Alert.alert(t('settings.localLogs.options')");+ expect(settings.match(/<NativePullDownMenu/g)).toHaveLength(3);+ });+});diff --git a/apps/mobile/src/__tests__/homeDesktopFirst.test.ts b/apps/mobile/src/__tests__/homeDesktopFirst.test.tsindex 235d49d1cf..9c529d1186 100644--- a/apps/mobile/src/__tests__/homeDesktopFirst.test.ts+++ b/apps/mobile/src/__tests__/homeDesktopFirst.test.ts@@ -351,8 +351,8 @@ describe('mobile home desktop-first surface', () => {expect(primitivesSource).toContain('pulsing && {');expect(primitivesSource).toContain('scale: pulse.interpolate');expect(primitivesSource).not.toContain('statusDotReady: {\n backgroundColor: colors.textPrimary');- expect(homeSource).toContain("return item.available && (item.state === 'ready' || item.state === 'busy') ? 'online' : 'offline';");- expect(homeSource).toContain("tone={status === 'online' ? 'ready' : 'off'}");+ // 范围菜单已跟随 iOS 系统下拉,不再画设备在线点(见 DeviceMenuItem 断言)。+ expect(homeSource).not.toContain("tone={status === 'online' ? 'ready' : 'off'}");});it('mirrors the desktop sidebar Agent identity slot and running treatment', () => {@@ -512,13 +512,18 @@ describe('mobile home desktop-first surface', () => {'const showConnectionRow = selectedDeviceDisconnected || resolveConnectionBannerVisibility(',);expect(source).toContain('homeSyncDeviceIds.filter((id) => unresponsiveDevices.has(id)');- expect(source).toContain("connectionStates={deviceConnectionStates}");expect(source).toContain('function DeviceMenuItem');- expect(source).toContain("tone={status === 'online' ? 'ready' : 'off'}");expect(source).not.toContain('function DeviceConnectionSpinner');- expect(source).not.toContain("connectionState === 'syncing' ? <DeviceConnectionSpinner /> : null");expect(source).not.toContain('deviceConnectionSpinner');- expect(source).toContain("connectionState === 'failed' ? <View style={styles.deviceConnectionFailedRing} /> : null");+ // 范围菜单跟随 iOS 系统下拉:自绘回退也不画在线点 / 同步脉冲 / 失败圈。+ const deviceMenuItem = source.slice(+ source.indexOf('function DeviceMenuItem'),+ source.indexOf('function RevokedAccessTip'),+ );+ expect(deviceMenuItem).not.toContain('<StatusDot');+ expect(deviceMenuItem).not.toContain('connectionState');+ expect(source).not.toContain('connectionStates={deviceConnectionStates}');+ expect(source).not.toContain('deviceConnectionFailedRing');});it('keeps project and session rows at desktop sidebar information density', () => {diff --git a/apps/mobile/src/__tests__/iosChromeActionMenu.test.ts b/apps/mobile/src/__tests__/iosChromeActionMenu.test.tsindex 93ccf694ef..5fabb4b611 100644--- a/apps/mobile/src/__tests__/iosChromeActionMenu.test.ts+++ b/apps/mobile/src/__tests__/iosChromeActionMenu.test.ts@@ -127,8 +127,9 @@ describe("iOS chrome presenters stay on the system menu path", () => {expect(iosTitle).toContain("{title}");expect(iosTitle).not.toContain("eyebrow");expect(iosTitle).not.toContain("subtitle");- expect(simpleHeader).toContain("eyebrow={eyebrow}");- expect(simpleHeader).toContain("subtitle={subtitle}");+ // Android 自绘 ScreenHeader 跟随 iOS:同样不显示 eyebrow / subtitle。+ expect(simpleHeader).not.toContain("eyebrow={eyebrow}");+ expect(simpleHeader).not.toContain("subtitle={subtitle}");});it("keeps Android fallback sheets and Maestro header anchors", () => {@@ -176,6 +177,8 @@ describe("iOS chrome presenters stay on the system menu path", () => {);expect(automations).toContain("<SimpleStackHeader");expect(automations).toContain('backTestID="automations.backButton"');+ expect(automations).not.toContain('eyebrow=');+ expect(deviceDetail).not.toContain('eyebrow=');expect(deviceDetail).toContain("<SimpleStackHeader");expect(deviceDetail).toContain('backTestID="deviceDetail.backButton"');expect(deviceDetail).toContain("<SessionOptionsPresenter");diff --git a/apps/mobile/src/__tests__/mobileModelPickerLayout.test.ts b/apps/mobile/src/__tests__/mobileModelPickerLayout.test.tsindex 0ffae83e42..91c754fe8b 100644--- a/apps/mobile/src/__tests__/mobileModelPickerLayout.test.ts+++ b/apps/mobile/src/__tests__/mobileModelPickerLayout.test.ts@@ -14,37 +14,37 @@ const source = readFileSync().replace(/\s+/g, ' ');describe('MobileModelPickerList compact rows', () => {- it('gives provider-aware model names a dedicated primary line', () => {+ it('gives provider-aware model names a dedicated primary line above the meta line', () => {const modelName = source.indexOf('{row.model.displayName}');- const metadata = source.indexOf(- '{isSubscription || rowEffort || fastOn ? (',- modelName,- );+ const metadata = source.indexOf('{metaLine ? (', modelName);expect(modelName).toBeGreaterThan(-1);expect(metadata).toBeGreaterThan(modelName);- expect(source.slice(modelName, metadata)).toContain('</View>');+ expect(source.slice(modelName, metadata)).toContain('</Text>');});- it('keeps subscription, effort and Fast in the secondary line', () => {- expect(source).toContain('<View style={styles.optionMetaRow}>');- expect(source).toMatch(- /\{t\(["']models\.picker\.subscriptionBadgeCompact["']\)\}/,- );- expect(source).toContain('{compactEffortLabelFor(');- expect(source).toContain('{fastOn ? (');+ it('keeps subscription, effort and Fast in one secondary line like iOS', () => {+ expect(source).toContain("isSubscription ? t('models.picker.subscriptionBadge') : null,");+ expect(source).toContain('fullEffortLabel,');+ expect(source).toContain("fastOn ? t('models.options.fastMode') : null,");+ expect(source).toContain(".join(' · ');");expect(source.match(/accessibilityLabel=\{rowAccessibilityLabel\}/g)).toHaveLength(2);+ // 选中只用勾号表达,不再铺整行底色。+ expect(source).not.toContain('optionRowSelected');+ });++ it('groups provider rows by source with a source · account title', () => {+ expect(source).toContain('groups.set(row.provider.id, rows);');+ expect(source).toContain("identity && !provider.name.includes(identity) ? identity : null,");+ expect(source).toContain('style={styles.groupLabel}>{groupTitle}</Text>');});it('uses the same primary and secondary hierarchy for flat fallback rows', () => {const modelName = source.indexOf('{option.label}');- const metadata = source.indexOf(- '{rowEffort || (fastEditable && selected && selectedFastMode) ? (',- modelName,- );+ const metadata = source.indexOf('{metaLine ? (', modelName);expect(modelName).toBeGreaterThan(-1);expect(metadata).toBeGreaterThan(modelName);- expect(source.slice(modelName, metadata)).toContain('</View>');+ expect(source.slice(modelName, metadata)).toContain('</Text>');});});diff --git a/apps/mobile/src/__tests__/modelPickerRows.test.ts b/apps/mobile/src/__tests__/modelPickerRows.test.tsindex 706733f046..9892ba08d1 100644--- a/apps/mobile/src/__tests__/modelPickerRows.test.ts+++ b/apps/mobile/src/__tests__/modelPickerRows.test.ts@@ -12,7 +12,6 @@ import type { MobileModelMemoryAccessors } from '@/session/draftModelMemory';import {budgetRowDisabled,buildRowMetaLine,- compactEffortLabelFor,effortLabelFor,effortLabelFromRuntime,formatContextWindow,@@ -256,47 +255,6 @@ describe('effortLabelFromRuntime —— 会话摘要按 app 语言覆盖 snapsho});});-describe('compactEffortLabelFor —— 英文列表紧凑标签', () => {- it('英文只压缩长档位,非英文仍用本地化全称', async () => {- const previousLanguage = i18n.language;- try {- await i18n.changeLanguage('en');- expect(effortLabelFor({}, 'xhigh', capabilities)).toBe('Extra High');- expect(- compactEffortLabelFor({ effortDisplayNames: { xhigh: '特高' } }, 'xhigh', capabilities),- ).toBe('Extra');- expect(compactEffortLabelFor({}, 'minimal', capabilities)).toBe('Minimal');- expect(compactEffortLabelFor({}, 'low', capabilities)).toBe('Low');- expect(compactEffortLabelFor({}, 'medium', capabilities)).toBe('Medium');- expect(compactEffortLabelFor({}, 'high', capabilities)).toBe('High');- expect(compactEffortLabelFor({}, 'ultra', capabilities)).toBe('Ultra');- expect(compactEffortLabelFor({}, 'max', capabilities)).toBe('Max');- expect(- compactEffortLabelFor(- { effortDisplayNames: { 'adaptive-fast': 'Adaptive Fast' } },- 'adaptive-fast',- capabilities,- ),- ).toBe('Adaptive Fast');- expect(- compactEffortLabelFor({}, 'adaptive-safe', {- ...capabilities,- effortLevels: [{ id: 'adaptive-safe', label: 'Adaptive Safe' }],- }),- ).toBe('Adaptive Safe');-- await i18n.changeLanguage('zh-CN');- expect(compactEffortLabelFor({}, 'high', null)).toBe('高');- await i18n.changeLanguage('ja');- expect(compactEffortLabelFor({}, 'ultra', null)).toBe('究極');- await i18n.changeLanguage('ko');- expect(compactEffortLabelFor({}, 'medium', null)).toBe('보통');- } finally {- await i18n.changeLanguage(previousLanguage);- }- });-});-describe('modelRowAccessibilityLabel —— 父行保留完整元信息', () => {it('无元信息时只读基础选择动作', () => {expect(modelRowAccessibilityLabel({ baseLabel: 'Select Luna' })).toBe('Select Luna');diff --git a/apps/mobile/src/__tests__/nativePullDownMenu.test.tsx b/apps/mobile/src/__tests__/nativePullDownMenu.test.tsxindex 1403af01c6..6b4d9a3d4a 100644--- a/apps/mobile/src/__tests__/nativePullDownMenu.test.tsx+++ b/apps/mobile/src/__tests__/nativePullDownMenu.test.tsx@@ -8,6 +8,7 @@ import { palettes } from "@/theme/tokens";const native = vi.hoisted(() => ({mode: "light" as "light" | "dark",actions: [] as MenuAction[],+ style: undefined as unknown,}));vi.mock("react-native", () => ({Platform: { OS: "ios" },@@ -18,9 +19,13 @@ vi.mock("@/theme", async () => {const { palettes } = await import("@/theme/tokens");return { useTheme: () => ({ colors: palettes[native.mode] }) };});+vi.mock("@/platform/chrome/AnchoredPullDownMenu", () => ({+ AnchoredPullDownMenu: () => null,+}));vi.mock("@react-native-menu/menu", () => ({- MenuView: ({ actions }: { actions: MenuAction[] }) => {+ MenuView: ({ actions, style }: { actions: MenuAction[]; style?: unknown }) => {native.actions = actions;+ native.style = style;return null;},}));@@ -73,3 +78,98 @@ describe("native menu symbol colors", () => {},);});++describe("disabled triggers", () => {+ it("does not mount the native menu while the trigger is disabled", () => {+ native.actions = [];+ const html = renderToStaticMarkup(+ createElement(NativePullDownMenu, {+ actions: [{ id: "copy", title: "Copy" }],+ children: createElement("span", null, "trigger"),+ disabled: true,+ onAction: vi.fn(),+ }),+ );+ expect(html).toBe("<span>trigger</span>");+ expect(native.actions).toEqual([]);+ });++ it("honors a trigger that marks itself disabled", () => {+ native.actions = [];+ const html = renderToStaticMarkup(+ createElement(NativePullDownMenu, {+ actions: [{ id: "clear", title: "Clear" }],+ children: createElement("button", { disabled: true }, "options"),+ onAction: vi.fn(),+ }),+ );+ expect(html).toBe('<button disabled="">options</button>');+ expect(native.actions).toEqual([]);+ });+});++describe("trigger layout", () => {+ it("hands the caller's layout style to the menu wrapper", () => {+ const style = { flex: 1, minWidth: 0 };+ renderToStaticMarkup(+ createElement(NativePullDownMenu, {+ actions: [{ id: "all", title: "All" }],+ children: createElement("span", null, "title"),+ onAction: vi.fn(),+ style,+ }),+ );+ expect(native.style).toBe(style);+ });+});++describe("menus without an actionable choice", () => {+ it("does not mount an empty menu and disables the trigger instead", () => {+ native.actions = [];+ const html = renderToStaticMarkup(+ createElement(NativePullDownMenu, {+ actions: [],+ children: createElement("button", null, "display"),+ onAction: vi.fn(),+ }),+ );+ expect(html).toBe('<button disabled="">display</button>');+ expect(native.actions).toEqual([]);+ });++ it("treats a menu whose choices are all disabled the same way, including submenus", () => {+ native.actions = [];+ const html = renderToStaticMarkup(+ createElement(NativePullDownMenu, {+ actions: [+ { id: "a", title: "A", disabled: true },+ {+ id: "group",+ title: "Group",+ displayInline: true,+ subactions: [{ id: "b", title: "B", disabled: true }],+ },+ ],+ children: createElement("button", null, "resolution"),+ onAction: vi.fn(),+ }),+ );+ expect(html).toBe('<button disabled="">resolution</button>');+ expect(native.actions).toEqual([]);+ });++ it("still mounts the menu when one nested choice is actionable", () => {+ native.actions = [];+ renderToStaticMarkup(+ createElement(NativePullDownMenu, {+ actions: [+ { id: "a", title: "A", disabled: true },+ { id: "more", title: "More", subactions: [{ id: "b", title: "B" }] },+ ],+ children: createElement("button", null, "more"),+ onAction: vi.fn(),+ }),+ );+ expect(native.actions.map((action) => action.id)).toEqual(["a", "more"]);+ });+});diff --git a/apps/mobile/src/__tests__/pullDownMenuModel.test.ts b/apps/mobile/src/__tests__/pullDownMenuModel.test.tsnew file mode 100644index 0000000000..a0293cf80a--- /dev/null+++ b/apps/mobile/src/__tests__/pullDownMenuModel.test.ts@@ -0,0 +1,72 @@+import { describe, expect, it } from "vitest";+import {+ buildPullDownMenuSections,+ resolvePullDownSubmenu,+} from "@/platform/chrome/pullDownMenuModel";++describe("pull-down menu model", () => {+ it("turns inline groups into titled sections and keeps loose rows together", () => {+ const sections = buildPullDownMenuSections([+ { id: "all", title: "All" },+ { id: "team", title: "Teammates" },+ {+ id: "group.sort",+ title: "Sort",+ displayInline: true,+ subactions: [+ { id: "sort.a", title: "A" },+ {+ id: "nested",+ title: "",+ displayInline: true,+ subactions: [{ id: "sort.b", title: "B" }],+ },+ ],+ },+ {+ id: "group.blank",+ title: " ",+ displayInline: true,+ subactions: [{ id: "x", title: "X" }],+ },+ { id: "tail", title: "Tail" },+ ]);+ expect(+ sections.map((section) => [+ section.title,+ section.rows.map((row) => row.id),+ ]),+ ).toEqual([+ [undefined, ["all", "team"]],+ ["Sort", ["sort.a", "sort.b"]],+ [undefined, ["x"]],+ [undefined, ["tail"]],+ ]);+ });++ it("resolves submenu paths through inline groups and drops stale paths", () => {+ const actions = [+ {+ id: "group",+ title: "Group",+ displayInline: true,+ subactions: [+ {+ id: "more",+ title: "More",+ subactions: [+ {+ id: "deep",+ title: "Deep",+ subactions: [{ id: "leaf", title: "Leaf" }],+ },+ ],+ },+ ],+ },+ ];+ expect(resolvePullDownSubmenu(actions, ["more"])?.id).toBe("more");+ expect(resolvePullDownSubmenu(actions, ["more", "deep"])?.id).toBe("deep");+ expect(resolvePullDownSubmenu(actions, ["missing"])).toBeNull();+ });+});diff --git a/apps/mobile/src/__tests__/sessionBottomViewport.test.ts b/apps/mobile/src/__tests__/sessionBottomViewport.test.tsindex 26d6b336ed..92a8156fac 100644--- a/apps/mobile/src/__tests__/sessionBottomViewport.test.ts+++ b/apps/mobile/src/__tests__/sessionBottomViewport.test.ts@@ -44,7 +44,7 @@ it('clips the input and held card at the selected region while measuring only thconst region = keyboardControlRegion(geometry, keyboardHeight);const bindings = { StyleSheet: { absoluteFill: { position: 'absolute', left: 0, right: 0, top: 0, bottom: 0 } },adaptiveWindow: geometry, composerRegion: region, paneLayout: { detail: { x: 0, width: 800 } },- windowDimensions: geometry, insets: geometry.insets, styles: {}, nativeComposerFrameAvailable: true,+ windowDimensions: geometry, insets: geometry.insets, styles: {}, nativeComposerFrameAvailable: true, androidFrostedComposer: false,sessionOperationLayout: { composerSlot: 'editable' }, shareSelectionActive: false,nativeShellLayout: { keyboardBottomInset: Math.max(0, keyboardHeight - 16) } };const clip = style(viewport, bindings);diff --git a/apps/mobile/src/__tests__/sessionComposerDesktopFirst.test.ts b/apps/mobile/src/__tests__/sessionComposerDesktopFirst.test.tsindex 360f67d517..8c23e75980 100644--- a/apps/mobile/src/__tests__/sessionComposerDesktopFirst.test.ts+++ b/apps/mobile/src/__tests__/sessionComposerDesktopFirst.test.ts@@ -181,13 +181,14 @@ describe('mobile session composer desktop-first surface', () => {expect(source).toContain('const composerCardActive = (canUseComposer && composerFocused)');expect(source).toContain('|| permissionSheetOpen');// 2026-07-29 用户裁决:权限入口是 composer 左侧图标钮 + 独立浮窗- // (MobilePermissionPickerList 由本 screen 直挂 SheetSurface);+ // (两端都经 NativePermissionSheet:点选先关浮窗,关闭完成后再生效);// 浮窗打开时仍属于 composer 激活态,不能因输入框失焦把底排收起。// 2026-08:模型药丸改到左侧组(权限/计划右侧),避免发送/停止出现时横向跳动。// ModelPickerSheet 的 header 权限入口隐藏(hidePermissionTrigger),不再双入口。expect(source).not.toContain('testID="session.composerPermissionButton"');expect(source).toContain('testID="session.permissionIndicator"');- expect(source).toContain('<MobilePermissionPickerList');+ expect(source).toContain('<NativePermissionSheet');+ expect(source).not.toContain('<MobilePermissionPickerList');expect(source).toContain('hidePermissionTrigger');expect(source).toContain('setPermissionSheetOpen(false)');expect(source).toContain('testID="session.composerModelButton"');@@ -325,7 +326,8 @@ describe('mobile session composer desktop-first surface', () => {expect(source).toContain('if (!visualOpenSearch) return;');expect(source).toContain('setSearchOpen(true);');expect(source).toContain('if (visualSearchQuery !== null) setSearchQuery(visualSearchQuery);');- expect(source).toContain('autoFocus={MOBILE_VISUAL_MOCK_ENABLED && visible}');+ // 任务内搜索两端打开即聚焦(与 iOS SessionSearchNative 一致),不再只限视觉演示包。+ expect(source).toContain('autoFocus={visible}');expect(composerInputSource).toContain('autoFocus={visualFocusComposer}');expect(composerInputSource).toContain('cursorColor={colors.inputCaret}');expect(composerInputSource).toContain('selectionColor={colors.inputCaret}');diff --git a/apps/mobile/src/__tests__/sessionHeaderDesktopFirst.test.ts b/apps/mobile/src/__tests__/sessionHeaderDesktopFirst.test.tsindex 63356df8f1..5ab77119d2 100644--- a/apps/mobile/src/__tests__/sessionHeaderDesktopFirst.test.ts+++ b/apps/mobile/src/__tests__/sessionHeaderDesktopFirst.test.ts@@ -68,7 +68,17 @@ describe('mobile session header desktop-first surface', () => {expect(source).not.toContain('colors.chatHeaderSurface');expect(source).toContain('safeArea: { flex: 1, backgroundColor: colors.surface }');const chromeStyle = source.slice(source.indexOf(' sessionChrome: {'), source.indexOf(' sessionChromeContent: {'));- expect(chromeStyle).toContain("backgroundColor: Platform.OS === 'ios' ? 'transparent' : colors.surface");+ // Android 顶栏与首页顶栏同一底:半透明 surface + 模糊,并经根浮层盖在常驻消息层之上。+ expect(chromeStyle).toContain("backgroundColor: 'transparent'");+ expect(source).toContain('<BlurBackdrop intensity={50} overlayColor={colors.surfaceTranslucent} />');+ expect(source).toContain('<SessionChromeLayer');+ expect(source).toContain("topInset={Platform.OS === 'android' ? 0 : topOverlayHeight}");+ // 输入区同理:安卓整块经根浮层盖在消息层上,外框高度取键盘避让容器的实测高度。+ expect(source).toContain("const androidFrostedComposer = Platform.OS === 'android' && !companionChat;");+ expect(source).toContain('bottomInset={androidFrostedComposer ? 0 : bottomOverlayHeight}');+ expect(source).toContain('height={keyboardAreaHeight ?? windowDimensions.height}');+ expect(source).toContain('<View onLayout={handleKeyboardAreaLayout} pointerEvents="none" style={StyleSheet.absoluteFill} />');+ expect(source).toContain('testID="session.composerFrost"');expect(source).toContain('<View ref={topOverlayRef} onLayout={handleTopOverlayLayout} pointerEvents="box-none" style={styles.sessionChrome} testID="session.chrome">');expect(source).toContain('<View style={[styles.sessionChromeContent, { paddingTop: horizontalSystemHeader ? nativeHeaderHeight : insets.top + (paneLayout.persistent ? spacing.lg : 0) }, companionChat && { backgroundColor: colors.surface }]}>');expect(chromeStyle).toContain("position: 'absolute'");diff --git a/apps/mobile/src/__tests__/simpleStackHeaderAndroid.test.tsx b/apps/mobile/src/__tests__/simpleStackHeaderAndroid.test.tsxnew file mode 100644index 0000000000..8ffb78edf6--- /dev/null+++ b/apps/mobile/src/__tests__/simpleStackHeaderAndroid.test.tsx@@ -0,0 +1,96 @@+import { createElement } from "react";+import { renderToStaticMarkup } from "react-dom/server";+import { beforeEach, describe, expect, it, vi } from "vitest";++const captured = vi.hoisted(() => ({+ os: "android" as "android" | "ios",+ screenHeader: [] as Record<string, unknown>[],+ stackOptions: [] as Record<string, unknown>[],+}));++vi.mock("react-native", () => ({+ Platform: {+ get OS() {+ return captured.os;+ },+ },+ StyleSheet: { create: <T,>(styles: T) => styles },+ View: "div",+}));+vi.mock("expo-router", () => {+ const Toolbar = Object.assign(() => null, { Button: () => null });+ return {+ Stack: {+ Screen: ({ options }: { options: Record<string, unknown> }) => {+ captured.stackOptions.push(options);+ return null;+ },+ Toolbar,+ },+ };+});+vi.mock("react-i18next", () => ({ useTranslation: () => ({ t: (key: string) => key }) }));+vi.mock("@/components/QuietSyncIndicator", () => ({ QuietSyncIndicator: () => null }));+vi.mock("@/components/AppText", () => ({ Text: "span" }));+vi.mock("@/components/MobilePrimitives", () => ({+ MainWindowActionButton: () => null,+ ScreenBackButton: () => null,+ ScreenHeader: (props: Record<string, unknown>) => {+ captured.screenHeader.push(props);+ return null;+ },+}));+vi.mock("@/theme", async () => {+ const tokens = await import("@/theme/tokens");+ return {+ ...tokens,+ useTheme: () => ({ colors: tokens.lightColors }),+ useThemedStyles: (make: (colors: unknown) => unknown) => make(tokens.lightColors),+ };+});++import { SimpleStackHeader } from "@/platform/chrome/SimpleStackHeader";++describe("SimpleStackHeader follows the iOS single-line title on Android", () => {+ beforeEach(() => {+ captured.screenHeader = [];+ captured.stackOptions = [];+ });++ it("drops eyebrow and subtitle from the Android ScreenHeader", () => {+ captured.os = "android";+ const onBack = vi.fn();+ renderToStaticMarkup(+ createElement(SimpleStackHeader, {+ backTestID: "deviceDetail.backButton",+ eyebrow: "Remote Device",+ onBack,+ subtitle: "3 active",+ syncing: true,+ title: "My Mac",+ titleTestID: "deviceDetail.title",+ }),+ );+ expect(captured.stackOptions).toHaveLength(0);+ expect(captured.screenHeader).toHaveLength(1);+ const props = captured.screenHeader[0];+ expect(props).toMatchObject({+ backTestID: "deviceDetail.backButton",+ onBack,+ syncing: true,+ title: "My Mac",+ titleTestID: "deviceDetail.title",+ });+ expect(props.eyebrow).toBeUndefined();+ expect(props.subtitle).toBeUndefined();+ });++ it("keeps iOS on the system navigation bar", () => {+ captured.os = "ios";+ renderToStaticMarkup(+ createElement(SimpleStackHeader, { subtitle: "ignored", title: "Settings" }),+ );+ expect(captured.screenHeader).toHaveLength(0);+ expect(captured.stackOptions[0]).toMatchObject({ headerShown: true });+ });+});diff --git a/apps/mobile/src/__tests__/unifiedMobilePickerView.test.tsx b/apps/mobile/src/__tests__/unifiedMobilePickerView.test.tsxindex d1ee869b55..8998a6d300 100644--- a/apps/mobile/src/__tests__/unifiedMobilePickerView.test.tsx+++ b/apps/mobile/src/__tests__/unifiedMobilePickerView.test.tsx@@ -9,6 +9,7 @@ vi.mock('react-native', async () => {return {View, ScrollView: View,Pressable: ({ children, onPress, disabled }: any) => el('button', { onClick: onPress, disabled }, children),+ StyleSheet: { create: (styles: any) => styles, hairlineWidth: 1 },useWindowDimensions: () => ({ height: 800 }),};});@@ -18,13 +19,14 @@ vi.mock('@/components/AppText', async () => {});vi.mock('react-native-safe-area-context', () => ({ useSafeAreaInsets: () => ({ top: 40, bottom: 20 }) }));vi.mock('react-i18next', () => ({ useTranslation: () => ({ t: (key: string) => key }) }));-vi.mock('lucide-react-native', () => Object.fromEntries(['Star', 'SlidersHorizontal', 'Check', 'Zap', 'LayoutGrid'].map(key => [key, () => null])));+vi.mock('lucide-react-native', () => Object.fromEntries(['Brain', 'Star', 'SlidersHorizontal', 'Check', 'Zap', 'LayoutGrid', 'Search', 'X', 'ChevronDown', 'ChevronRight', 'ChevronsUpDown'].map(key => [key, () => null])));+vi.mock('@/platform/chrome', () => ({ NativePullDownMenu: ({ children }: any) => children, NativeSwitch: () => null, usesNativePullDownMenu: () => true }));vi.mock('@/components/MobileAgentMark', () => ({ MobileAgentMark: () => null }));vi.mock('@/session/MobileProviderMark', () => ({ MobileModelIconMark: () => null, MobileProviderMark: () => null }));vi.mock('@/session/SheetModal', () => ({ SheetModal: ({ children }: any) => children }));vi.mock('@/session/SheetSurface', () => ({ SheetSurface: ({ children }: any) => children }));vi.mock('@/session/sessionAgentSwitch', () => ({ mobileAgentLabel: (agent: string) => agent }));-vi.mock('@/theme', () => ({ useTheme: () => ({ colors: {} }), spacing: {}, radius: {}, iconSize: {} }));+vi.mock('@/theme', async () => ({ ...(await import('@/theme/tokens')), useTheme: () => ({ colors: {} }), useThemedStyles: (factory: any) => factory({}) }));let root: ReturnType<typeof createRoot>;let host: HTMLDivElement;beforeEach(() => {diff --git a/apps/mobile/src/device-link/DeviceInformationFields.tsx b/apps/mobile/src/device-link/DeviceInformationFields.tsxindex 6f274da7c7..2679a130a8 100644--- a/apps/mobile/src/device-link/DeviceInformationFields.tsx+++ b/apps/mobile/src/device-link/DeviceInformationFields.tsx@@ -2,6 +2,7 @@ import { ListItem, Text } from '@expo/ui';import { useTranslation } from 'react-i18next';import { useTheme } from '@/theme';+/** 与 iOS LabeledContent 一致:字段标签在左、值在右(次要字色、右对齐)。 */export function DeviceInformationFields({ fields }: { fields: string[][] }) {const { t } = useTranslation();const { colors } = useTheme();@@ -10,8 +11,11 @@ export function DeviceInformationFields({ fields }: { fields: string[][] }) {{fields.map(([key, value]) => (<ListItemkey={key}- supportingText={- <Text textStyle={{ color: colors.textSecondary }}>{value}</Text>+ testID={`deviceInformation.field.${key}`}+ trailing={+ <Text textStyle={{ color: colors.textSecondary, textAlign: 'right' }}>+ {value}+ </Text>}>{t(`devices.management.fields.${key}`)}diff --git a/apps/mobile/src/device-link/DeviceManagementList.tsx b/apps/mobile/src/device-link/DeviceManagementList.tsxindex e8c2173f3d..802425f7fa 100644--- a/apps/mobile/src/device-link/DeviceManagementList.tsx+++ b/apps/mobile/src/device-link/DeviceManagementList.tsx@@ -1,8 +1,9 @@import { useRef } from 'react';import { Pressable, ScrollView, StyleSheet, View } from 'react-native';import { useTranslation } from 'react-i18next';-import { Monitor } from 'lucide-react-native';+import { Monitor, Pencil, Trash2 } from 'lucide-react-native';import { Text } from '@/components/AppText';+import { mobileInteractionStyles } from '@/components/mobileInteractionStyles';import {ClassicSwipeable,type ClassicSwipeableMethods,@@ -44,21 +45,35 @@ function DeviceRow({const ref = useRef<ClassicSwipeableMethods | null>(null);const { colors } = useTheme();const { t } = useTranslation();- const action = (remove: boolean) => (- <Pressable- accessibilityRole="button"- disabled={busy}- onPress={() => {- ref.current?.close();- (remove ? onDelete : onRename)(row.device);- }}- style={[styles.action, { backgroundColor: colors.surfaceElevated }]}- >- <Text style={{ color: remove ? colors.destructive : colors.textPrimary }}>- {t(remove ? 'devices.common.delete' : 'devices.list.menu.renameDevice')}- </Text>- </Pressable>- );+ // 与 iOS 滑动操作一致:只放图标(重命名=铅笔、删除=红色垃圾桶),文字留给读屏。+ const action = (remove: boolean) => {+ const Icon = remove ? Trash2 : Pencil;+ return (+ <Pressable+ accessibilityLabel={t(remove ? 'devices.common.delete' : 'devices.list.menu.renameDevice')}+ accessibilityRole="button"+ accessibilityState={{ disabled: busy }}+ disabled={busy}+ onPress={() => {+ ref.current?.close();+ (remove ? onDelete : onRename)(row.device);+ }}+ style={({ pressed }) => [+ styles.action,+ { backgroundColor: colors.surfaceElevated },+ pressed && styles.pressed,+ busy && styles.disabled,+ ]}+ testID={`deviceManagement.${remove ? 'delete' : 'rename'}.${row.device.deviceId}`}+ >+ <Icon+ color={remove ? colors.destructive : colors.textPrimary}+ size={iconSize.xl}+ strokeWidth={iconStroke.regular}+ />+ </Pressable>+ );+ };return (<ClassicSwipeableref={ref}@@ -85,9 +100,10 @@ function DeviceRow({<View style={styles.labels}><Textstyle={{+ // 离线用二级字色,与 iOS 列表的 secondary 层级一致。color: row.device.online? colors.textPrimary- : colors.textTertiary,+ : colors.textSecondary,fontSize: typeScale.body,lineHeight: lineHeight.body,fontWeight: row.device.online@@ -104,8 +120,10 @@ function DeviceRow({{ backgroundColor: row.device.online ? colors.statusReady : colors.textTertiary },]}/>- <Text style={{ color: colors.textSecondary, flexShrink: 1 }}>- {row.statusLabel} · {row.statusDetail}+ <Text+ style={{ color: colors.textSecondary, flexShrink: 1, fontSize: typeScale.caption, lineHeight: lineHeight.caption }}+ >+ {deviceManagementStatusLine(row)}</Text></View></View>@@ -113,6 +131,13 @@ function DeviceRow({</ClassicSwipeable>);}+/** 与 iOS 一致:在线只写「在线」,离线写「状态 · 详情」。 */+function deviceManagementStatusLine(+ row: Pick<DeviceManagementListProps['rows'][number], 'device' | 'statusLabel' | 'statusDetail'>,+): string {+ return row.device.online ? row.statusLabel : `${row.statusLabel} · ${row.statusDetail}`;+}+const styles = StyleSheet.create({row: {flexDirection: 'row',@@ -126,10 +151,12 @@ const styles = StyleSheet.create({status: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs },statusDot: { width: 6, height: 6, borderRadius: radius.pill, flexShrink: 0 },action: {- minWidth: 88,+ minWidth: 72,minHeight: 44,alignItems: 'center',justifyContent: 'center',padding: spacing.lg,},+ pressed: mobileInteractionStyles.pressed,+ disabled: { opacity: 0.45 },});diff --git a/apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx b/apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsxnew file mode 100644index 0000000000..6312787577--- /dev/null+++ b/apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx@@ -0,0 +1,498 @@+/**+ * Android 的「贴着触发控件弹出」菜单:与 iOS UIMenu 同一交互(点触发器在旁边弹出、点外面+ * 收起、选中项打勾、内联分组带标题、子菜单逐层进入、keepPresented 的项点完不收起),+ * 外观用 Cindy 自己的浮层卡片(与 token 速度浮层同款:surfaceElevated 实底 + 1px 边框、+ * 零阴影)和首页菜单的行样式,跟随浅色 / 深色主题。系统 PopupMenu 画不出分组标题、会给每个可勾选项画空复选框,也不支持保持打开。+ *+ * 触发器整块作为一个无障碍按钮:子控件不再单独接收触摸或读屏焦点,读屏双击即打开菜单。+ */+import {+ isValidElement,+ useCallback,+ useEffect,+ useRef,+ useState,+ type ReactNode,+} from "react";+import {+ Animated,+ Easing,+ Modal,+ Pressable,+ ScrollView,+ StyleSheet,+ View,+ useWindowDimensions,+ type AccessibilityProps,+ type StyleProp,+ type ViewStyle,+} from "react-native";+import { useSafeAreaInsets } from "react-native-safe-area-context";+import { Check, ChevronLeft, ChevronRight, Minus } from "lucide-react-native";+import { Text } from "@/components/AppText";+import { useReduceMotionEnabled } from "@/hooks/useReduceMotion";+import type { NativePullDownAction } from "@/platform/chrome/NativePullDownMenu";+import {+ buildPullDownMenuSections,+ resolvePullDownSubmenu,+} from "@/platform/chrome/pullDownMenuModel";+import {+ fontWeight,+ iconSize,+ iconStroke,+ lineHeight,+ motionDuration,+ motionEasing,+ radius,+ spacing,+ typeScale,+ useTheme,+ useThemedStyles,+ type ThemeColors,+} from "@/theme";++const MENU_MIN_WIDTH = 220;+const MENU_MAX_WIDTH = 300;+const MENU_GAP = 4;+const EDGE_MARGIN = spacing.sm;+/** 下方剩余空间不足这个高度且上方更宽裕时,改为向上弹出。 */+const PREFERRED_MIN_HEIGHT = 240;++type Anchor = { x: number; y: number; width: number; height: number };++type ChildAccessibility = Pick<+ AccessibilityProps,+ | "accessibilityHint"+ | "accessibilityLabel"+ | "accessibilityState"+ | "accessibilityValue"+>;++/**+ * 外层按钮替子控件成为唯一的读屏节点,要带上子控件原有的读屏信息(如筛选按钮的+ * selected),只在状态上叠加菜单的 expanded。+ */+function childAccessibility(children: ReactNode): ChildAccessibility {+ if (!isValidElement(children)) return {};+ const props = children.props as ChildAccessibility;+ return {+ accessibilityHint:+ typeof props.accessibilityHint === "string"+ ? props.accessibilityHint+ : undefined,+ accessibilityLabel:+ typeof props.accessibilityLabel === "string"+ ? props.accessibilityLabel+ : undefined,+ accessibilityState: props.accessibilityState ?? undefined,+ accessibilityValue: props.accessibilityValue ?? undefined,+ };+}++export function AnchoredPullDownMenu({+ accessibilityLabel,+ actions,+ children,+ longPress = false,+ onAction,+ style,+ testID,+}: {+ accessibilityLabel?: string;+ actions: readonly NativePullDownAction[];+ children: ReactNode;+ longPress?: boolean;+ onAction(id: string): void;+ /** 触发器在父布局里的样式(如 flex: 1);外层替子元素占据父布局里的位置。 */+ style?: StyleProp<ViewStyle>;+ testID?: string;+}) {+ const styles = useThemedStyles(makeStyles);+ const anchorRef = useRef<View>(null);+ const [anchor, setAnchor] = useState<Anchor | null>(null);+ const [path, setPath] = useState<string[]>([]);+ const open = anchor !== null;++ const show = useCallback(() => {+ const node = anchorRef.current;+ if (!node) return;+ node.measureInWindow((x, y, width, height) => {+ setPath([]);+ setAnchor({ x, y, width, height });+ });+ }, []);+ const close = useCallback(() => setAnchor(null), []);++ const child = childAccessibility(children);+ return (+ <>+ <Pressable+ ref={anchorRef}+ accessibilityHint={child.accessibilityHint}+ accessibilityLabel={accessibilityLabel ?? child.accessibilityLabel}+ accessibilityRole="button"+ accessibilityState={{ ...child.accessibilityState, expanded: open }}+ accessibilityValue={child.accessibilityValue}+ collapsable={false}+ onLongPress={longPress ? show : undefined}+ onPress={longPress ? undefined : show}+ style={({ pressed }) => [style, pressed && styles.triggerPressed]}+ testID={testID}+ >+ {/* 触发器外观仍是调用方的按钮;它不再单独响应触摸或读屏,整块由外层 Pressable 接管。 */}+ <View+ importantForAccessibility="no-hide-descendants"+ pointerEvents="none"+ style={style ? styles.triggerFill : undefined}+ >+ {children}+ </View>+ </Pressable>+ {open ? (+ <AnchoredMenuOverlay+ actions={actions}+ anchor={anchor}+ onAction={onAction}+ onBack={() => setPath((current) => current.slice(0, -1))}+ onClose={close}+ onEnter={(id) => setPath((current) => [...current, id])}+ path={path}+ testID={testID ? `${testID}.menu` : undefined}+ />+ ) : null}+ </>+ );+}++function AnchoredMenuOverlay({+ actions,+ anchor,+ onAction,+ onBack,+ onClose,+ onEnter,+ path,+ testID,+}: {+ actions: readonly NativePullDownAction[];+ anchor: Anchor;+ onAction(id: string): void;+ onBack(): void;+ onClose(): void;+ onEnter(id: string): void;+ path: readonly string[];+ testID?: string;+}) {+ const styles = useThemedStyles(makeStyles);+ const { colors } = useTheme();+ const window = useWindowDimensions();+ const insets = useSafeAreaInsets();+ const reduceMotion = useReduceMotionEnabled();+ const progress = useRef(new Animated.Value(reduceMotion ? 1 : 0)).current;++ useEffect(() => {+ if (reduceMotion) {+ progress.setValue(1);+ return;+ }+ Animated.timing(progress, {+ toValue: 1,+ duration: motionDuration.fast,+ easing: Easing.bezier(...motionEasing.out),+ useNativeDriver: true,+ }).start();+ }, [progress, reduceMotion]);++ // 子菜单路径失效(actions 已变化)时回到根页,而不是停在一个已不存在的层级。+ const submenu = path.length ? resolvePullDownSubmenu(actions, path) : null;+ const pageActions = submenu?.subactions ?? actions;+ const sections = buildPullDownMenuSections(pageActions);++ const width = Math.min(+ MENU_MAX_WIDTH,+ Math.max(MENU_MIN_WIDTH, anchor.width),+ window.width - EDGE_MARGIN * 2,+ );+ const anchorCenter = anchor.x + anchor.width / 2;+ const clampLeft = (value: number) =>+ Math.min(Math.max(EDGE_MARGIN, value), window.width - EDGE_MARGIN - width);+ // 与 UIMenu 一致:居中的触发器(如首页标题)菜单居中展开,靠边的触发器沿同侧边缘对齐。+ const left =+ Math.abs(anchorCenter - window.width / 2) <= window.width * 0.1+ ? clampLeft(anchorCenter - width / 2)+ : anchorCenter > window.width / 2+ ? clampLeft(+ Math.min(anchor.x + anchor.width, window.width - EDGE_MARGIN) -+ width,+ )+ : clampLeft(anchor.x);+ const spaceBelow =+ window.height -+ insets.bottom -+ EDGE_MARGIN -+ (anchor.y + anchor.height + MENU_GAP);+ const spaceAbove = anchor.y - MENU_GAP - insets.top - EDGE_MARGIN;+ const below = spaceBelow >= PREFERRED_MIN_HEIGHT || spaceBelow >= spaceAbove;+ const maxHeight = Math.max(below ? spaceBelow : spaceAbove, 120);+ const vertical = below+ ? { top: anchor.y + anchor.height + MENU_GAP }+ : { bottom: window.height - anchor.y + MENU_GAP };++ const choose = (action: NativePullDownAction) => {+ if (action.disabled) return;+ if (action.subactions?.length && !action.displayInline) {+ onEnter(action.id);+ return;+ }+ onAction(action.id);+ if (!action.keepPresented) onClose();+ };++ return (+ <Modal+ animationType="none"+ navigationBarTranslucent+ onRequestClose={submenu ? onBack : onClose}+ statusBarTranslucent+ supportedOrientations={[+ "portrait",+ "portrait-upside-down",+ "landscape-left",+ "landscape-right",+ ]}+ transparent+ visible+ >+ <Pressable+ accessible={false}+ onPress={onClose}+ style={StyleSheet.absoluteFill}+ testID={testID ? `${testID}.backdrop` : undefined}+ />+ <Animated.View+ accessibilityViewIsModal+ style={[+ styles.positioner,+ { left, width, ...vertical },+ {+ opacity: progress,+ transform: [+ {+ scale: progress.interpolate({+ inputRange: [0, 1],+ outputRange: [0.96, 1],+ }),+ },+ ],+ },+ ]}+ >+ <View style={styles.panel} testID={testID ?? "pullDownMenu"}>+ <ScrollView+ bounces={false}+ contentContainerStyle={styles.panelBody}+ style={{ maxHeight }}+ showsVerticalScrollIndicator+ >+ {submenu ? (+ <Pressable+ accessibilityLabel={submenu.title}+ accessibilityRole="button"+ onPress={onBack}+ style={({ pressed }) => [+ styles.row,+ pressed && styles.rowPressed,+ ]}+ >+ <View style={styles.leading}>+ <ChevronLeft+ color={colors.textSecondary}+ size={iconSize.md}+ strokeWidth={iconStroke.medium}+ />+ </View>+ <Text numberOfLines={1} style={styles.backTitle}>+ {submenu.title}+ </Text>+ </Pressable>+ ) : null}+ {sections.map((section, index) => (+ <View key={section.key}>+ {index > 0 || submenu ? <View style={styles.divider} /> : null}+ {section.title ? (+ <Text accessibilityRole="header" style={styles.sectionTitle}>+ {section.title}+ </Text>+ ) : null}+ {section.rows.map((action) => (+ <MenuRow+ key={action.id}+ action={action}+ onPress={() => choose(action)}+ />+ ))}+ </View>+ ))}+ </ScrollView>+ </View>+ </Animated.View>+ </Modal>+ );+}++function MenuRow({+ action,+ onPress,+}: {+ action: NativePullDownAction;+ onPress(): void;+}) {+ const styles = useThemedStyles(makeStyles);+ const { colors } = useTheme();+ const submenu = !!action.subactions?.length && !action.displayInline;+ const tint = action.destructive ? colors.destructive : colors.textPrimary;+ return (+ <Pressable+ accessibilityLabel={+ action.subtitle ? `${action.title}, ${action.subtitle}` : action.title+ }+ accessibilityRole="menuitem"+ accessibilityState={{+ checked:+ action.state === "mixed"+ ? "mixed"+ : action.state === "on"+ ? true+ : undefined,+ disabled: !!action.disabled,+ }}+ disabled={action.disabled}+ onPress={onPress}+ style={({ pressed }) => [+ styles.row,+ pressed && styles.rowPressed,+ action.disabled && styles.rowDisabled,+ ]}+ testID={`pullDownMenu.item.${action.id}`}+ >+ {/* 固定对位列:选中打勾(与 iOS UIMenu 一样放在行首),未选中留空,文字列对齐。 */}+ <View style={styles.leading}>+ {action.state === "on" ? (+ <Check+ color={tint}+ size={iconSize.md}+ strokeWidth={iconStroke.medium}+ />+ ) : action.state === "mixed" ? (+ <Minus+ color={tint}+ size={iconSize.md}+ strokeWidth={iconStroke.medium}+ />+ ) : null}+ </View>+ <View style={styles.rowText}>+ <Text+ numberOfLines={2}+ style={[+ styles.rowTitle,+ action.destructive && { color: colors.destructive },+ ]}+ >+ {action.title}+ </Text>+ {action.subtitle ? (+ <Text numberOfLines={2} style={styles.rowSubtitle}>+ {action.subtitle}+ </Text>+ ) : null}+ </View>+ {submenu ? (+ <ChevronRight+ color={colors.textTertiary}+ size={iconSize.md}+ strokeWidth={iconStroke.regular}+ />+ ) : null}+ </Pressable>+ );+}++const makeStyles = (colors: ThemeColors) =>+ StyleSheet.create({+ triggerFill: {+ flexGrow: 1,+ },+ triggerPressed: {+ opacity: 0.72,+ },+ positioner: {+ position: "absolute",+ },+ panel: {+ backgroundColor: colors.surfaceElevated,+ borderColor: colors.border,+ borderRadius: radius.container,+ borderWidth: 1,+ overflow: "hidden",+ },+ panelBody: {+ padding: spacing.xs,+ },+ row: {+ alignItems: "center",+ borderRadius: radius.container,+ flexDirection: "row",+ gap: spacing.md,+ minHeight: 44,+ paddingHorizontal: spacing.md,+ paddingVertical: spacing.sm,+ },+ rowPressed: {+ backgroundColor: colors.surfaceChip,+ },+ rowDisabled: {+ opacity: 0.4,+ },+ leading: {+ alignItems: "center",+ width: iconSize.md,+ },+ rowText: {+ flex: 1,+ minWidth: 0,+ },+ rowTitle: {+ color: colors.textPrimary,+ fontSize: typeScale.body,+ fontWeight: fontWeight.medium,+ lineHeight: lineHeight.body,+ },+ rowSubtitle: {+ color: colors.textSecondary,+ fontSize: typeScale.caption,+ lineHeight: lineHeight.caption,+ },+ backTitle: {+ color: colors.textSecondary,+ flex: 1,+ fontSize: typeScale.body,+ fontWeight: fontWeight.medium,+ lineHeight: lineHeight.body,+ },+ sectionTitle: {+ color: colors.textTertiary,+ fontSize: typeScale.footnote,+ fontWeight: fontWeight.semibold,+ lineHeight: lineHeight.caption,+ paddingBottom: spacing.xs,+ paddingHorizontal: spacing.md,+ paddingTop: spacing.sm,+ },+ divider: {+ backgroundColor: colors.border,+ height: StyleSheet.hairlineWidth,+ marginHorizontal: spacing.sm,+ marginVertical: spacing.xs,+ },+ });diff --git a/apps/mobile/src/platform/chrome/NativePullDownMenu.tsx b/apps/mobile/src/platform/chrome/NativePullDownMenu.tsxindex 7a8491e777..89f001392e 100644--- a/apps/mobile/src/platform/chrome/NativePullDownMenu.tsx+++ b/apps/mobile/src/platform/chrome/NativePullDownMenu.tsx@@ -1,6 +1,13 @@import { MenuView, type MenuAction } from "@react-native-menu/menu";-import { type ReactNode } from "react";-import { NativeModules, Platform, UIManager } from "react-native";+import { cloneElement, isValidElement, type ReactNode } from "react";+import {+ NativeModules,+ Platform,+ UIManager,+ type StyleProp,+ type ViewStyle,+} from "react-native";+import { AnchoredPullDownMenu } from "@/platform/chrome/AnchoredPullDownMenu";import { useTheme, type ThemeColors } from "@/theme";export type NativePullDownAction = {@@ -19,8 +26,12 @@ export type NativePullDownAction = {let nativePullDownAvailable: boolean | null = null;-/** iOS 且当前包里已经编进 MenuView 时才挂 UIMenu;没冷更前自动退回自绘。 */+/**+ * 是否用「贴着触发控件弹出」的菜单:iOS 在包里编进 MenuView 时用系统 UIMenu(没冷更前+ * 自动退回调用方的自绘面板);Android 始终用 Cindy 自绘的 AnchoredPullDownMenu。+ */export function usesNativePullDownMenu(): boolean {+ if (Platform.OS === "android") return true;if (Platform.OS !== "ios") return false;if (nativePullDownAvailable !== null) return nativePullDownAvailable;const config = UIManager.getViewManagerConfig?.("MenuView");@@ -70,25 +81,78 @@ function toMenuAction(};}+/** 至少有一项能点:禁用项不算,子菜单要其中还有能点的项。 */+export function hasActionablePullDownChoice(+ actions: readonly NativePullDownAction[],+): boolean {+ return actions.some(+ (action) =>+ !action.disabled &&+ (action.subactions?.length+ ? hasActionablePullDownChoice(action.subactions)+ : true),+ );+}++/** 子控件自己标了 disabled(如忙碌中的按钮)同样视为禁用。 */+function childDisabled(children: ReactNode): boolean {+ if (!isValidElement(children)) return false;+ return (children.props as { disabled?: unknown }).disabled === true;+}+/**- * 收起时完全是调用方原来的按钮/标题;iOS 点开是系统 UIMenu 下拉。- * Android 或尚未冷更的包只渲染 children,由调用方继续走自绘面板。+ * 收起时完全是调用方原来的按钮/标题;iOS 点开是系统 UIMenu 下拉,Android 是 Cindy 自绘+ * 的同交互菜单(AnchoredPullDownMenu)。iOS 尚未编进 MenuView 的包只渲染 children,+ * 由调用方继续走自绘面板。*/export function NativePullDownMenu({+ accessibilityLabel,actions,children,+ disabled = false,longPress = false,onAction,+ style,testID,}: {+ /** Android 触发器整块作为一个读屏按钮;不传时取子元素的 accessibilityLabel。 */+ accessibilityLabel?: string;actions: readonly NativePullDownAction[];children: ReactNode;+ /** 触发控件禁用时不挂菜单:菜单接管整块点按。子元素自带 disabled 时也会读取。 */+ disabled?: boolean;longPress?: boolean;onAction(id: string): void;+ /**+ * 菜单外层在父布局里的样式。外层替代子元素成为父布局的直接子节点,子元素原本+ * 依赖父布局的样式(如 flex: 1 占满标题区)要同时交给这里。+ */+ style?: StyleProp<ViewStyle>;testID?: string;}) {const { colors } = useTheme();- if (!usesNativePullDownMenu()) return children;+ if (disabled || childDisabled(children) || !usesNativePullDownMenu())+ return children;+ // 一项能点的都没有(空列表或全部禁用)时不挂菜单,触发控件也显示为禁用:+ // 调用方在有菜单时把自己的 onPress 置空,不禁用就会留下一个点了没反应的按钮。+ if (!hasActionablePullDownChoice(actions))+ return isValidElement<{ disabled?: boolean }>(children)+ ? cloneElement(children, { disabled: true })+ : children;+ if (Platform.OS === "android") {+ return (+ <AnchoredPullDownMenu+ accessibilityLabel={accessibilityLabel}+ actions={actions}+ longPress={longPress}+ onAction={onAction}+ style={style}+ testID={testID}+ >+ {children}+ </AnchoredPullDownMenu>+ );+ }return (<MenuViewactions={actions.map((action) => toMenuAction(action, colors))}@@ -96,6 +160,7 @@ export function NativePullDownMenu({if (nativeEvent.event) onAction(nativeEvent.event);}}shouldOpenOnLongPress={longPress}+ style={style}testID={testID}>{children}diff --git a/apps/mobile/src/platform/chrome/SimpleStackHeader.tsx b/apps/mobile/src/platform/chrome/SimpleStackHeader.tsxindex c0f9eb8762..5f7328fcf2 100644--- a/apps/mobile/src/platform/chrome/SimpleStackHeader.tsx+++ b/apps/mobile/src/platform/chrome/SimpleStackHeader.tsx@@ -21,9 +21,9 @@ import {import { lineHeight } from "@/theme/tokens";/**- * 简单页在 iOS 打开系统导航栏;Android 继续自绘 ScreenHeader。- * 不变量:iOS UINavigationBar 的 compact 标题槽只放单行 title。- * eyebrow / subtitle 仍传给 Android ScreenHeader,不进系统顶栏。+ * 简单页在 iOS 打开系统导航栏;Android 继续自绘 ScreenHeader(外观走安卓)。+ * 不变量:顶栏只放单行 title。iOS UINavigationBar 的 compact 标题槽没有+ * eyebrow / subtitle,Android 的交互与信息跟随 iOS,同样不显示。*/export function usesNativeStackHeader(): boolean {return Platform.OS === "ios";@@ -38,9 +38,7 @@ export function SimpleStackHeader({action,right,backTestID,- eyebrow,onBack,- subtitle,title,titleTestID,syncing,@@ -48,8 +46,13 @@ export function SimpleStackHeader({action?: MainWindowAction;right?: ReactNode;backTestID?: string;+ /**+ * @deprecated 两端都不渲染(iOS 系统顶栏无此槽,Android 跟随 iOS)。+ * 仅为存量调用点保留类型兼容;新代码不要传,需要的信息放进页面内容。+ */eyebrow?: string;onBack?: () => void;+ /** @deprecated 同 eyebrow:两端都不渲染,仅保留类型兼容。 */subtitle?: string | null;title: string;titleTestID?: string;@@ -65,9 +68,7 @@ export function SimpleStackHeader({action={action}right={right}backTestID={backTestID}- eyebrow={eyebrow}onBack={onBack}- subtitle={subtitle}title={title}titleTestID={titleTestID}syncing={syncing}diff --git a/apps/mobile/src/platform/chrome/pullDownMenuModel.ts b/apps/mobile/src/platform/chrome/pullDownMenuModel.tsnew file mode 100644index 0000000000..a7ba713730--- /dev/null+++ b/apps/mobile/src/platform/chrome/pullDownMenuModel.ts@@ -0,0 +1,63 @@+import type { NativePullDownAction } from "@/platform/chrome/NativePullDownMenu";++export type PullDownMenuSection = {+ key: string;+ /** UIMenu 内联分组的标题;没有标题的连续条目合成一个无标题分组。 */+ title?: string;+ rows: NativePullDownAction[];+};++/**+ * 把 UIMenu 形态的 actions 整理成 Cindy 自绘菜单的一页:内联分组(displayInline)成为+ * 带标题的分组,分组之间画分隔线;普通子菜单(subactions 且非内联)保留为一行,点开+ * 进入下一页,与 UIMenu 的层级一致。+ */+export function buildPullDownMenuSections(+ actions: readonly NativePullDownAction[],+): PullDownMenuSection[] {+ const sections: PullDownMenuSection[] = [];+ let loose: NativePullDownAction[] = [];+ const flushLoose = () => {+ if (!loose.length) return;+ sections.push({ key: `loose:${loose[0].id}`, rows: loose });+ loose = [];+ };+ for (const action of actions) {+ if (action.displayInline && action.subactions?.length) {+ flushLoose();+ sections.push({+ key: `group:${action.id}`,+ title: action.title.trim() || undefined,+ rows: action.subactions.flatMap((item) =>+ item.displayInline && item.subactions?.length+ ? item.subactions+ : [item],+ ),+ });+ continue;+ }+ loose.push(action);+ }+ flushLoose();+ return sections;+}++/** 按 id 路径逐层找到子菜单;路径失效(actions 已变化)时返回 null,由调用方回到根页。 */+export function resolvePullDownSubmenu(+ actions: readonly NativePullDownAction[],+ path: readonly string[],+): NativePullDownAction | null {+ let level: readonly NativePullDownAction[] = actions;+ let found: NativePullDownAction | null = null;+ for (const id of path) {+ const candidates = level.flatMap((item) =>+ item.displayInline && item.subactions?.length ? item.subactions : [item],+ );+ found =+ candidates.find((item) => item.id === id && !!item.subactions?.length) ??+ null;+ if (!found) return null;+ level = found.subactions ?? [];+ }+ return found;+}diff --git a/apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx b/apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsxindex f202bedd83..db4c1585cd 100644--- a/apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx+++ b/apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx@@ -121,6 +121,7 @@ export function RemoteDesktopClipboardButton({<><NativePullDownMenuactions={actions}+ disabled={!enabled || busy}onAction={(action) => {void run(action);}}diff --git a/apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx b/apps/mobile/src/remote-desktop/RemoteDesktopControls.tsxindex 6838f9c710..d17b3e1ece 100644--- a/apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx+++ b/apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx@@ -367,6 +367,7 @@ export function RemoteDesktopControls({{displays.length > 0 && (<><NativePullDownMenu+ disabled={!nativeDisplayMenu}actions={nativeDisplayMenu? displays.map((display, index) => ({diff --git a/apps/mobile/src/session/CompanionAutomationSheet.tsx b/apps/mobile/src/session/CompanionAutomationSheet.tsxindex 15f60b7c10..1ae86e94ea 100644--- a/apps/mobile/src/session/CompanionAutomationSheet.tsx+++ b/apps/mobile/src/session/CompanionAutomationSheet.tsx@@ -1,7 +1,7 @@import { iconSize } from '@/theme';import { useCallback, useEffect, useMemo, useRef, useState } from 'react';import { ActivityIndicator, Alert, AppState, Platform, Pressable, StyleSheet, Switch, View } from 'react-native';-import { ChevronRight, Clock3, Plus } from 'lucide-react-native';+import { ChevronDown, ChevronRight, Clock3, Plus } from 'lucide-react-native';import { useTranslation } from 'react-i18next';import { randomUUID } from 'expo-crypto';import type { RemoteResource } from '@cindy/device-link';@@ -200,8 +200,8 @@ export function CompanionAutomationSheet({ visible, onClose, collectionId, botId}finally { if (operationGeneration.current === operation) { inFlight.current = false; if (current.current.identity === scope) setBusy(false); } }};- const button = (label: string, onPress: () => void, destructive = false, disabled = false) => (- <Pressable accessibilityRole="button" accessibilityState={{ disabled: disabled || busy }} disabled={disabled || busy} onPress={onPress} style={[styles.row, (disabled || busy) && styles.disabled]}>+ const button = (label: string, onPress: () => void, destructive = false, disabled = false, testID?: string) => (+ <Pressable accessibilityRole="button" accessibilityState={{ disabled: disabled || busy }} disabled={disabled || busy} onPress={onPress} style={[styles.row, (disabled || busy) && styles.disabled]} testID={testID}><Text style={[styles.label, destructive && { color: colors.destructive }]}>{label}</Text></Pressable>);@@ -216,12 +216,14 @@ export function CompanionAutomationSheet({ visible, onClose, collectionId, botId<ChevronRight size={iconSize.sm} color={colors.textTertiary} /></Pressable>);- const field = (label: string, value: string, onChangeText: (value: string) => void, multiline = false) => (- <View style={styles.field}><Text style={styles.secondary}>{label}</Text><TextInput accessibilityLabel={label} value={value} onChangeText={onChangeText} editable={!busy} multiline={multiline} style={[styles.input, multiline && styles.multiline]} /></View>+ // Same input traits as the iOS fields: commands keep their literal case, numbers use the number pad.+ const field = (label: string, value: string, onChangeText: (value: string) => void, { multiline = false, literal = false, numeric = false } = {}) => (+ <View style={styles.field}><Text style={styles.secondary}>{label}</Text><TextInput accessibilityLabel={label} value={value} onChangeText={onChangeText} editable={!busy} multiline={multiline}+ {...(literal ? { autoCapitalize: 'none' as const, autoCorrect: false } : {})} {...(numeric ? { keyboardType: 'number-pad' as const } : {})} style={[styles.input, multiline && styles.multiline]} /></View>);const updateTrigger = (index: number, value: RoutineTrigger) => setDraft((d) => d && ({ ...d, triggers: d.triggers.map((item, i) => i === index ? value : item) }));const choose = (label: string, value: string, options: { value: string; label: string }[], onChange: (value: string) => void) =>- <CompanionChoice {...{ label, value, options, onChange }} disabled={busy || !online} />;+ <View style={styles.choice}><CompanionChoice {...{ label, value, options, onChange }} disabled={busy || !online} /></View>;const confirmDelete = () => Alert.alert(tr('deleteTitle'), tr('deleteBody'), [{ text: tr('cancel'), style: 'cancel' }, { text: tr('delete'), style: 'destructive', onPress: () => void act('routine-delete') }]);if (Platform.OS === 'ios') return <CompanionAutomationNativeView{...{ visible, online, busy, loading, dirty, error, selected, draftGeneration, resource, items, detail, draft }}@@ -229,11 +231,11 @@ export function CompanionAutomationSheet({ visible, onClose, collectionId, botIdonOpen={open} onRetry={() => void load()} onAct={action => void act(action)} onDelete={confirmDelete} />;return <CompanionSheet visible={visible} onClose={() => leave(onClose)} preventDismiss={dirty || busy}title={selected ? draft?.name || tr('new') : t('devices.companionProfile.automation')}- onBack={selected ? () => leave(() => open(null)) : undefined} testID="companion.automationSheet"- footer={selected && detail?.editable ? button(tr('save'), () => void act(selected === 'new' ? 'routine-create' : 'routine-save'), false, !online || !dirty || loading || !getRoutineActionId(resource, selected === 'new' ? 'routine-create' : 'routine-save')) : undefined}>- {!online ? <Text style={styles.error}>{tr('offline')}</Text> : null}+ onBack={selected ? () => leave(() => open(null)) : undefined} testID="companion.automationSheet">+ {/* Offline is a state, not a failure: secondary text like iOS. */}+ {!online ? <Text style={[styles.note, styles.field]}>{tr('offline')}</Text> : null}{error ? <View style={styles.field}><Text selectable style={styles.error}>{error}</Text>{button(tr('retry'), () => void load(), false, !online)}</View> : null}- {loading ? <ActivityIndicator color={colors.textSecondary} style={styles.field} /> : null}+ {loading ? <ActivityIndicator accessibilityLabel={t('devices.resources.loading')} color={colors.textSecondary} style={styles.field} /> : null}{!selected ? <>{items.some((r) => r.activity) ? <View style={styles.group}><Text style={styles.heading}>{tr('inProgress')}</Text>{items.filter((r) => r.activity).map(row)}</View> : null}{items.some((r) => !r.activity) ? <View style={styles.group}><Text style={styles.heading}>{tr('scheduled')}</Text>{items.filter((r) => !r.activity).map(row)}</View> : null}@@ -243,17 +245,21 @@ export function CompanionAutomationSheet({ visible, onClose, collectionId, botId{draft && detail.editable ? <>{field(tr('name'), draft.name, (name) => setDraft({ ...draft, name }))}<View style={styles.row}><Text style={[styles.label, styles.flex]}>{tr('enabled')}</Text><Switch accessibilityLabel={tr('enabled')} disabled={busy} value={draft.enabled} onValueChange={(enabled) => setDraft({ ...draft, enabled })} trackColor={{ true: colors.textSecondary }} /></View>- {field(tr('instructions'), draft.prompt, (prompt) => setDraft({ ...draft, prompt }), true)}- {detail?.supportsPreRunCheck ? <Pressable accessibilityRole="button" accessibilityState={{ expanded: advancedOpen }} onPress={() => setAdvancedOpen(!advancedOpen)} style={styles.row}><Text style={styles.label}>{tr('advanced')}</Text></Pressable> : null}+ {field(tr('instructions'), draft.prompt, (prompt) => setDraft({ ...draft, prompt }), { multiline: true })}+ {detail?.supportsPreRunCheck ? <Pressable accessibilityRole="button" accessibilityState={{ expanded: advancedOpen }} onPress={() => setAdvancedOpen(!advancedOpen)} style={styles.row} testID="companion.automation.advanced">+ <Text style={[styles.label, styles.flex]}>{tr('advanced')}</Text>+ {advancedOpen ? <ChevronDown size={iconSize.sm} color={colors.textTertiary} /> : <ChevronRight size={iconSize.sm} color={colors.textTertiary} />}+ </Pressable> : null}{detail?.supportsPreRunCheck && advancedOpen ? <View style={styles.group}><View style={styles.row}><Text style={[styles.label, styles.flex]}>{tr('quiet')}</Text><Switch accessibilityLabel={tr('quiet')} disabled={busy} value={draft.silentWhenIdle ?? false} onValueChange={(silentWhenIdle) => setDraft({ ...draft, silentWhenIdle })} trackColor={{ true: colors.textSecondary }} /></View><Text style={styles.secondary}>{tr('quietHint')}</Text>- {field(tr('checkCommand'), draft.preRunHook?.command ?? '', (command) => setDraft({ ...draft, preRunHook: command ? { ...draft.preRunHook, command } : null }), true)}+ {field(tr('checkCommand'), draft.preRunHook?.command ?? '', (command) => setDraft({ ...draft, preRunHook: command ? { ...draft.preRunHook, command } : null }), { multiline: true, literal: true })}<Text style={styles.secondary}>{tr('checkHint')}</Text>- {draft.preRunHook ? field(tr('timeoutMs'), draft.preRunHook.timeoutMs === undefined ? '' : String(draft.preRunHook.timeoutMs), (value) => setDraft({ ...draft, preRunHook: { ...draft.preRunHook!, timeoutMs: value ? Number(value) : undefined } })) : null}+ {draft.preRunHook ? field(tr('timeoutMs'), draft.preRunHook.timeoutMs === undefined ? '' : String(draft.preRunHook.timeoutMs), (value) => setDraft({ ...draft, preRunHook: { ...draft.preRunHook!, timeoutMs: value ? Number(value) : undefined } }), { numeric: true }) : null}</View> : null}- <Text style={styles.heading}>{tr('triggers')}</Text>+ {/* One titled group per trigger, as the iOS form sections. */}{draft.triggers.map((trigger, index) => <View key={`${draftGeneration}:${trigger.id}`} style={styles.group}>+ <Text style={styles.heading}>{tr('triggers')}</Text>{choose(tr('triggerType'), trigger.kind, ['cron', 'interval', 'event'].map((value) => ({ value, label: tr(value) })), (kind) => updateTrigger(index, kind === 'interval' ? { id: trigger.id, kind, intervalMs: 3_600_000 } : kind === 'event' ? { id: trigger.id, kind, sourceId: '', eventType: '', filters: [] } : { id: trigger.id, kind: 'cron', expression: '0 9 * * *', timezone: Intl.DateTimeFormat().resolvedOptions().timeZone || 'UTC' }))}{trigger.kind === 'cron' ? <RoutineCronFields trigger={trigger} onChange={(value) => updateTrigger(index, value)} disabled={busy} /> : trigger.kind === 'interval' ? <NumberField key={trigger.id} label={tr('minutes')} value={trigger.intervalMs / 60_000} onChange={(value) => updateTrigger(index, { ...trigger, intervalMs: value * 60_000 })} disabled={busy} /> : <>{choose(tr('source'), trigger.sourceId, detail.sources.map((s) => ({ value: s.id, label: s.name })), (sourceId) => updateTrigger(index, { ...trigger, sourceId, eventType: '', filters: [] }))}@@ -270,6 +276,8 @@ export function CompanionAutomationSheet({ visible, onClose, collectionId, botId</View>)}{draft.triggers.length < 32 ? button(tr('addTrigger'), () => setDraft({ ...draft, triggers: [...draft.triggers, { id: randomUUID(), kind: 'interval', intervalMs: 3_600_000 }] })) : null}</> : <Text style={styles.empty}>{tr('largeDefinition')}</Text>}+ {/* Save sits in the form after the triggers, before run and history, like iOS. */}+ {detail.editable ? button(tr('save'), () => void act(selected === 'new' ? 'routine-create' : 'routine-save'), false, !online || !dirty || loading || !getRoutineActionId(resource, selected === 'new' ? 'routine-create' : 'routine-save'), 'companion.automation.save') : null}{selected !== 'new' ? <View style={styles.group}>{getRoutineActionId(resource, 'routine-run') ? button(tr(dirty ? 'saveAndRun' : 'run'), () => void act('routine-run'), false, loading || !online || detail.history.some((r) => r.status === 'running' || r.status === 'queued')) : null}<Text style={styles.heading}>{tr('history')}</Text>@@ -288,32 +296,36 @@ function RoutineCronFields({ trigger, onChange, disabled }: {const { colors } = useTheme();const { preset, hour, minute, day, changePreset, changeHour, changeMinute, changeDay } = useRoutineCronFields(trigger, onChange);const select = (label: string, value: string, options: { id: string; title: string }[], action: (id: string) => void) =>- <CompanionChoice label={label} value={value} options={options.map(option => ({ value: option.id, label: option.title }))} onChange={action} disabled={disabled} />;+ <View style={styles.choice}><CompanionChoice label={label} value={value} options={options.map(option => ({ value: option.id, label: option.title }))} onChange={action} disabled={disabled} /></View>;return <>{select(tr('repeat'), preset, ['hourly','daily','weekdays','weekly','monthly','custom'].map((id) => ({ id, title: tr(id) })), changePreset)}{preset === 'monthly' ? select(tr('monthDay'), day, Array.from({ length: 31 }, (_, i) => ({ id: String(i + 1), title: String(i + 1) })), changeDay) : null}{preset === 'weekly' ? select(tr('weekday'), day, Array.from({ length: 7 }, (_, i) => ({ id: String(i), title: tr(`day${i}`) })), changeDay) : null}{preset !== 'custom' ? <View style={styles.row}><Text style={[styles.label, styles.flex]}>{tr('time')}</Text>- {preset !== 'hourly' ? <><TextInput accessibilityLabel={tr('hour')} keyboardType="number-pad" maxLength={2} value={hour} editable={!disabled} onChangeText={changeHour} style={[styles.input, styles.clockInput]} /><Text style={styles.label}>:</Text></> : null}- <TextInput accessibilityLabel={tr('minute')} keyboardType="number-pad" maxLength={2} value={minute} editable={!disabled} onChangeText={changeMinute} style={[styles.input, styles.clockInput]} />- </View> : <View style={styles.field}><Text style={styles.secondary}>{tr('cronExpression')}</Text><TextInput accessibilityLabel={tr('cronExpression')} value={trigger.expression} editable={!disabled} onChangeText={(expression) => onChange({ ...trigger, expression })} style={styles.input} /></View>}- <View style={styles.field}><Text style={styles.secondary}>{tr('timezone')}</Text><TextInput accessibilityLabel={tr('timezone')} value={trigger.timezone} editable={!disabled} onChangeText={(timezone) => onChange({ ...trigger, timezone })} autoCapitalize="none" style={styles.input} /></View>+ {/* Number pad without a length cap, as iOS; out-of-range values are caught by draft validation. */}+ {preset !== 'hourly' ? <><TextInput accessibilityLabel={tr('hour')} keyboardType="number-pad" value={hour} editable={!disabled} onChangeText={changeHour} style={[styles.input, styles.clockInput]} /><Text style={styles.label}>:</Text></> : null}+ <TextInput accessibilityLabel={tr('minute')} keyboardType="number-pad" value={minute} editable={!disabled} onChangeText={changeMinute} style={[styles.input, styles.clockInput]} />+ </View> : <View style={styles.field}><Text style={styles.secondary}>{tr('cronExpression')}</Text><TextInput accessibilityLabel={tr('cronExpression')} value={trigger.expression} editable={!disabled} onChangeText={(expression) => onChange({ ...trigger, expression })} autoCapitalize="none" autoCorrect={false} style={styles.input} /></View>}+ <View style={styles.field}><Text style={styles.secondary}>{tr('timezone')}</Text><TextInput accessibilityLabel={tr('timezone')} value={trigger.timezone} editable={!disabled} onChangeText={(timezone) => onChange({ ...trigger, timezone })} autoCapitalize="none" autoCorrect={false} style={styles.input} /></View></>;}function NumberField({ label, value, onChange, disabled }: { label: string; value: number; onChange(value: number): void; disabled: boolean }) {const [text, setText] = useState(String(value));const styles = useThemedStyles(makeStyles);- return <View style={styles.field}><Text style={styles.secondary}>{label}</Text><TextInput accessibilityLabel={label} keyboardType="numeric" editable={!disabled} value={text} onChangeText={(next) => { setText(next); onChange(Number(next)); }} style={styles.input} /></View>;+ return <View style={styles.field}><Text style={styles.secondary}>{label}</Text><TextInput accessibilityLabel={label} keyboardType="number-pad" editable={!disabled} value={text} onChangeText={(next) => { setText(next); onChange(Number(next)); }} style={styles.input} /></View>;}const makeStyles = (colors: ThemeColors) => StyleSheet.create({flex: { flex: 1 }, row: { flexDirection: 'row', alignItems: 'center', gap: spacing.md, minHeight: 48, paddingHorizontal: spacing.md, paddingVertical: spacing.sm },label: { fontSize: typeScale.body, lineHeight: lineHeight.body, color: colors.textPrimary }, secondary: { fontSize: typeScale.caption, lineHeight: lineHeight.caption, color: colors.textSecondary },heading: { fontSize: typeScale.footnote, lineHeight: lineHeight.caption, fontWeight: fontWeight.semibold, color: colors.textTertiary, margin: spacing.md },field: { gap: spacing.sm, marginHorizontal: spacing.md, marginVertical: spacing.sm },+ // Picker rows share the field inset so labels line up with the inputs above and below.+ choice: { marginHorizontal: spacing.md },group: { marginVertical: spacing.sm, borderTopWidth: StyleSheet.hairlineWidth, borderColor: colors.border },input: { minHeight: 44, padding: spacing.md, color: colors.textPrimary, backgroundColor: colors.surfaceElevated, borderWidth: StyleSheet.hairlineWidth, borderColor: colors.border, borderRadius: radius.pill, fontSize: typeScale.body },clockInput: { width: 64, textAlign: 'center' },multiline: { minHeight: 112, textAlignVertical: 'top', borderRadius: radius.control }, empty: { margin: spacing.lg, fontSize: typeScale.bodySmall, lineHeight: lineHeight.bodySmall, color: colors.textSecondary },+ note: { color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },error: { color: colors.statusError, fontSize: typeScale.footnote, lineHeight: lineHeight.caption }, disabled: { opacity: 0.45 },});diff --git a/apps/mobile/src/session/CompanionChoice.tsx b/apps/mobile/src/session/CompanionChoice.tsxindex e2517eaeeb..d26aef2d20 100644--- a/apps/mobile/src/session/CompanionChoice.tsx+++ b/apps/mobile/src/session/CompanionChoice.tsx@@ -1,20 +1,52 @@-import { iconSize } from '@/theme';import { useState } from 'react';-import { Pressable, View } from 'react-native';+import { Pressable, StyleSheet, View } from 'react-native';import { Check, ChevronDown } from 'lucide-react-native';import { Text } from '@/components/AppText';import { NativePullDownMenu, usesNativePullDownMenu } from '@/platform/chrome/NativePullDownMenu';-import { spacing, useTheme } from '@/theme';+import { fontWeight, iconSize, lineHeight, spacing, typeScale, useTheme, useThemedStyles, type ThemeColors } from '@/theme';++export interface CompanionChoiceOption { value: string; label: string; disabled?: boolean }++/**+ * Inline "label · value" picker, the Android counterpart of the iOS `Picker(menu)` rows.+ * The system menu (UIMenu / Android PopupMenu) marks the current value; a build without+ * MenuView falls back to an inline option list. A disabled control never opens a menu.+ */export function CompanionChoice({ label, value, options, onChange, disabled }: {- label: string; value: string; options: { value: string; label: string }[]; onChange(value: string): void; disabled: boolean;+ label: string; value: string; options: CompanionChoiceOption[]; onChange(value: string): void; disabled: boolean;}) {const [expanded, setExpanded] = useState(false); const { colors } = useTheme();- const select = (value: string) => { if (!disabled) { setExpanded(false); onChange(value); } };- return <View><NativePullDownMenu actions={options.map(option => ({ id: option.value, title: option.label, state: option.value === value ? 'on' : 'off', disabled }))} onAction={select}>- <Pressable accessibilityRole="button" accessibilityLabel={label} disabled={disabled} style={{ minHeight: 44, flexDirection: 'row', alignItems: 'center', gap: spacing.sm }} onPress={() => { if (!usesNativePullDownMenu()) setExpanded(!expanded); }}>- <Text style={{ color: colors.textPrimary }}>{label}</Text><Text style={{ flex: 1, textAlign: 'right', color: colors.textSecondary }} numberOfLines={1}>{options.find(option => option.value === value)?.label ?? value}</Text><ChevronDown size={iconSize.md} color={colors.textSecondary} />- </Pressable>- </NativePullDownMenu>{expanded && !usesNativePullDownMenu() ? options.map(option => <Pressable key={option.value} accessibilityRole="radio" accessibilityState={{ checked: value === option.value }} disabled={disabled} onPress={() => select(option.value)} style={{ minHeight: 44, flexDirection: 'row', alignItems: 'center', gap: spacing.sm }}>- <Text style={{ color: colors.textPrimary, flex: 1 }}>{option.label}</Text>{option.value === value ? <Check size={iconSize.lg} color={colors.textPrimary} /> : null}- </Pressable>) : null}</View>;+ const styles = useThemedStyles(makeStyles);+ const native = usesNativePullDownMenu();+ // 没有能选的项时整行按禁用呈现,与下拉菜单「无可操作项不挂菜单」同一判据。+ const inactive = disabled || !options.some(option => !option.disabled);+ const select = (option: CompanionChoiceOption | undefined) => {+ if (disabled || !option || option.disabled) return;+ setExpanded(false); onChange(option.value);+ };+ const trigger = <Pressable accessibilityRole="button" accessibilityLabel={label} accessibilityState={{ disabled: inactive, expanded: !native && expanded }} disabled={inactive}+ style={[styles.row, inactive && styles.disabled]} onPress={() => { if (!native) setExpanded(!expanded); }}>+ <Text style={styles.label}>{label}</Text>+ <Text style={styles.value} numberOfLines={1}>{options.find(option => option.value === value)?.label ?? value}</Text>+ <ChevronDown size={iconSize.md} color={colors.textSecondary} />+ </Pressable>;+ return <View>+ {/* Menu IDs are positions: an empty option value (e.g. "none") is still a selectable item. */}+ {inactive ? trigger : <NativePullDownMenu actions={options.map((option, index) => ({ id: String(index), title: option.label, state: option.value === value ? 'on' : 'off', disabled: !!option.disabled }))}+ onAction={id => select(options[Number(id)])}>+ {trigger}+ </NativePullDownMenu>}+ {expanded && !native && !inactive ? options.map(option => <Pressable key={option.value} accessibilityRole="radio" accessibilityState={{ checked: value === option.value, disabled: !!option.disabled }}+ disabled={!!option.disabled} onPress={() => select(option)} style={[styles.row, option.disabled && styles.disabled]}>+ <Text style={styles.option}>{option.label}</Text>{option.value === value ? <Check size={iconSize.lg} color={colors.textPrimary} /> : null}+ </Pressable>) : null}+ </View>;}++const makeStyles = (colors: ThemeColors) => StyleSheet.create({+ row: { minHeight: 44, flexDirection: 'row', alignItems: 'center', gap: spacing.sm },+ disabled: { opacity: 0.4 },+ label: { fontSize: typeScale.body, lineHeight: lineHeight.body, fontWeight: fontWeight.regular, color: colors.textPrimary },+ value: { flex: 1, textAlign: 'right', fontSize: typeScale.body, lineHeight: lineHeight.body, color: colors.textSecondary },+ option: { flex: 1, fontSize: typeScale.body, lineHeight: lineHeight.body, fontWeight: fontWeight.medium, color: colors.textPrimary },+});diff --git a/apps/mobile/src/session/CompanionMemoryPage.tsx b/apps/mobile/src/session/CompanionMemoryPage.tsxindex 061e83b7e7..1ed471a250 100644--- a/apps/mobile/src/session/CompanionMemoryPage.tsx+++ b/apps/mobile/src/session/CompanionMemoryPage.tsx@@ -1,9 +1,11 @@-import { Pressable, StyleSheet, View } from 'react-native';+import { ActivityIndicator, Pressable, StyleSheet, View } from 'react-native';+import { Search, X } from 'lucide-react-native';import { useTranslation } from 'react-i18next';import { resolveRemoteText } from '@cindy/device-link';import { Text, TextInput } from '@/components/AppText';import { MainWindowActionButton } from '@/components/MobilePrimitives';-import { fontWeight, lineHeight, radius, spacing, typeScale, useTheme, useThemedStyles, type ThemeColors } from '@/theme';+import { fontWeight, iconSize, iconStroke, lineHeight, radius, spacing, typeScale, useTheme, useThemedStyles, type ThemeColors } from '@/theme';+import { CompanionSettingsRow } from './CompanionSettingsRow';import { COMPANION_MEMORY_TITLE_MAX, companionMemoryDate, companionMemoryFieldLabel, type CompanionMemoryState } from './useCompanionMemory';export interface CompanionMemoryPageProps {@@ -23,28 +25,40 @@ export function CompanionMemoryPage({ memory: m, online, botName, memoryEnabledconst note = (text: string, alert = false, error = alert) => <Text selectable accessibilityRole={alert ? 'alert' : undefined} style={[styles.note, error && styles.error]}>{text}</Text>;const date = (timestamp: number | undefined, withTime = false) => companionMemoryDate(timestamp, i18n.language, tr('memoryToday'), withTime);const receipt = m.receipt ? <Text accessibilityLiveRegion="polite" style={styles.note}>{m.receipt}</Text> : null;+ const spinner = <ActivityIndicator accessibilityLabel={t('devices.resources.loading')} color={colors.textSecondary} style={styles.spinner} />;+ // Text rows like the iOS form buttons; `busy` keeps the in-flight spinner on the acting row.+ const action = (label: string, onPress: () => void, blocked: boolean, testID: string, { destructive = false, busy = false } = {}) =>+ <CompanionSettingsRow icon={null} label={label} onPress={onPress} disabled={blocked} busy={busy} destructive={destructive} testID={testID} />;if (m.view === 'list') {const showSearch = !!m.searchPanel && (m.groups.length > 0 || !!m.query);return <View style={styles.content}>{!memoryEnabled ? note(tr('memoryDisabled')) : null}{receipt}- {showSearch ? <TextInput accessibilityLabel={tr('memorySearch')} value={m.query} onChangeText={m.setQuery} autoCorrect={false}- placeholder={m.searchPanel?.placeholder ? resolveRemoteText(m.searchPanel.placeholder, i18n.language) : tr('memorySearch')}- placeholderTextColor={colors.textPlaceholder} maxLength={200} returnKeyType="search" style={styles.input} /> : null}+ {showSearch ? <View style={styles.search}>+ <Search color={colors.textSecondary} size={iconSize.md} strokeWidth={iconStroke.regular} />+ <TextInput accessibilityLabel={tr('memorySearch')} value={m.query} onChangeText={m.setQuery} autoCorrect={false} autoCapitalize="none" testID="companionMemory.search"+ placeholder={m.searchPanel?.placeholder ? resolveRemoteText(m.searchPanel.placeholder, i18n.language) : tr('memorySearch')}+ placeholderTextColor={colors.textPlaceholder} returnKeyType="search" style={styles.searchInput} />+ {m.query ? <Pressable accessibilityRole="button" accessibilityLabel={t('devices.detail.search.clearA11y')} hitSlop={spacing.xs} onPress={() => m.setQuery('')}+ style={({ pressed }) => [styles.clear, pressed && styles.pressed]} testID="companionMemory.searchClear">+ <X color={colors.textTertiary} size={iconSize.md} strokeWidth={iconStroke.regular} />+ </Pressable> : null}+ </View> : null}{m.listFailed ? <View accessibilityRole="alert" style={styles.stack}>{note(tr('memoryLoadFailed'), false, true)}<MainWindowActionButton action={{ label: t('devices.resources.retry'), disabled: !online, onPress: m.retry }} /></View>- : !m.listLoaded ? (online ? note(t('devices.resources.loading')) : null)+ : !m.listLoaded ? (online ? spinner : null): m.groups.length ? m.groups.map(group => <View key={group.id} style={styles.stack} accessibilityLabel={group.title}><Text accessibilityRole="header" style={styles.groupTitle}>{group.title}<Text style={styles.count}>{` ${group.count}`}</Text></Text>- <View style={[styles.group, !memoryEnabled && styles.dimmed]}>{group.entries.map((entry, index) =>+ <View style={styles.group}>{group.entries.map((entry, index) =><Pressable key={entry.resourceId} accessibilityRole="button" accessibilityLabel={entry.title} onPress={() => m.open(entry.resourceId)}style={({ pressed }) => [styles.row, index > 0 && styles.separator, pressed && styles.pressed]} testID={`companionMemory.${entry.id}`}>- <View style={styles.rowHeader}>- <Text numberOfLines={2} style={styles.rowTitle}>{entry.title}</Text>- <Text style={styles.date}>{date(entry.timestamp)}</Text>+ <View style={styles.rowText}>+ {/* Memory off: saved memories stay readable; only the title steps back, as on iOS. */}+ <Text numberOfLines={2} style={[styles.rowTitle, !memoryEnabled && styles.rowTitleOff]} testID={`companionMemory.${entry.id}.title`}>{entry.title}</Text>+ {entry.preview ? <Text numberOfLines={2} style={styles.preview}>{entry.preview}</Text> : null}</View>- {entry.preview ? <Text numberOfLines={2} style={styles.preview}>{entry.preview}</Text> : null}+ <Text style={styles.date}>{date(entry.timestamp)}</Text></Pressable>)}</View></View>)@@ -60,7 +74,7 @@ export function CompanionMemoryPage({ memory: m, online, botName, memoryEnabled{m.missing ? note(tr('memoryMissing'), true): m.detailFailed ? <View accessibilityRole="alert" style={styles.stack}>{note(tr('memoryLoadFailed'), false, true)}<MainWindowActionButton action={{ label: t('devices.resources.retry'), disabled: !online, onPress: m.retry }} /></View>- : !detail ? note(t('devices.resources.loading'))+ : !detail ? spinner: <><View style={styles.stack}><Text selectable accessibilityRole="header" style={styles.title}>{detail.title}</Text>@@ -68,10 +82,10 @@ export function CompanionMemoryPage({ memory: m, online, botName, memoryEnabled</View><Text selectable style={styles.body}>{detail.body}</Text>{m.deleteFailed ? note(tr('memoryDeleteFailed'), true) : null}- <View style={styles.stack}>- {detail.form?.action ? <MainWindowActionButton action={{ label: tr('memoryEdit'), disabled: m.busy || !online || detail.form.action.disabled, onPress: m.edit }} /> : null}- {detail.remove?.action ? <MainWindowActionButton action={{ label: resolveRemoteText(detail.remove.action.label, i18n.language), tone: 'danger', busy: m.busy, disabled: !online || detail.remove.action.disabled, onPress: m.remove }} /> : null}- </View>+ {detail.form?.action || detail.remove?.action ? <View style={styles.actions}>+ {detail.form?.action ? action(tr('memoryEdit'), m.edit, m.busy || !online || !!detail.form.action.disabled, 'companionMemory.edit') : null}+ {detail.remove?.action ? action(resolveRemoteText(detail.remove.action.label, i18n.language), m.remove, m.busy || !online || !!detail.remove.action.disabled, 'companionMemory.delete', { destructive: true, busy: m.busy }) : null}+ </View> : null}</>}</View>;}@@ -82,8 +96,8 @@ export function CompanionMemoryPage({ memory: m, online, botName, memoryEnabled{m.saveState === 'conflict' ? <View accessibilityRole="alert" style={[styles.group, styles.notice]}><Text style={styles.heading}>{tr('memoryChanged', { name: botName })}</Text>{m.latest ? <Text selectable numberOfLines={8} style={styles.preview}>{m.latest.body}</Text> : null}- <MainWindowActionButton action={{ label: tr('memoryUseLatest'), disabled: m.busy, onPress: m.useLatest }} />- <MainWindowActionButton action={{ label: tr('memoryKeepMine'), disabled: m.busy || !online, onPress: m.keepMine }} />+ {action(tr('memoryUseLatest'), m.useLatest, m.busy, 'companionMemory.useLatest')}+ {action(tr('memoryKeepMine'), m.keepMine, m.busy || !online, 'companionMemory.keepMine')}</View> : null}<View style={styles.field}><Text style={styles.heading}>{companionMemoryFieldLabel(m.detail, 'title', i18n.language)}</Text>@@ -96,11 +110,11 @@ export function CompanionMemoryPage({ memory: m, online, botName, memoryEnabledonChangeText={body => m.change({ body })} placeholderTextColor={colors.textPlaceholder} style={[styles.input, styles.multiline]} /></View>{m.tooLong ? note(tr('memoryTooLong'), true) : m.titleMissing || m.bodyMissing ? note(tr('memoryRequired')) : null}- {m.saveState === 'saving' ? note(t('devices.resources.loading'))+ {m.saveState === 'saving' ? spinner: m.saveState === 'saved' ? <Text accessibilityLiveRegion="polite" style={styles.note}>{m.receipt ?? tr('memorySaved')}</Text>: m.saveState === 'error' ? note(tr('memorySaveFailed'), true) : null}- <MainWindowActionButton action={{ label: tr('memoryDone'), tone: 'primary', busy: m.busy,- disabled: !online || m.saveState === 'conflict' || m.dirty && (m.titleMissing || m.bodyMissing || m.tooLong), onPress: () => { void m.done(); } }} />+ <View style={styles.actions}>{action(tr('memoryDone'), () => { void m.done(); }, !online || m.busy || m.saveState === 'conflict' || m.dirty && (m.titleMissing || m.bodyMissing || m.tooLong),+ 'companionMemory.done')}</View></View>;}@@ -116,14 +130,19 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({body: { fontSize: typeScale.body, lineHeight: lineHeight.bodyRelaxed, color: colors.textPrimary },groupTitle: { fontSize: typeScale.footnote, lineHeight: lineHeight.caption, color: colors.textTertiary, fontWeight: fontWeight.semibold, paddingHorizontal: spacing.xs },count: { color: colors.textTertiary, fontWeight: fontWeight.regular },- group: { backgroundColor: colors.surfaceElevated, borderRadius: radius.container, overflow: 'hidden' },- dimmed: { opacity: 0.6 },+ group: { backgroundColor: colors.surfaceElevated, borderColor: colors.border, borderWidth: StyleSheet.hairlineWidth, borderRadius: radius.container, overflow: 'hidden' },+ actions: { backgroundColor: colors.surfaceElevated, borderColor: colors.border, borderWidth: StyleSheet.hairlineWidth, borderRadius: radius.container, overflow: 'hidden', paddingHorizontal: spacing.lg },notice: { padding: spacing.lg, gap: spacing.sm },- row: { minHeight: 44, paddingHorizontal: spacing.lg, paddingVertical: spacing.md, gap: spacing.xs },+ row: { minHeight: 44, flexDirection: 'row', alignItems: 'flex-start', paddingHorizontal: spacing.lg, paddingVertical: spacing.md, gap: spacing.md },+ rowText: { flex: 1, gap: spacing.xs },separator: { borderTopWidth: StyleSheet.hairlineWidth, borderTopColor: colors.border },pressed: { opacity: 0.72 },- rowHeader: { flexDirection: 'row', alignItems: 'flex-start', gap: spacing.md },- rowTitle: { flex: 1, fontSize: typeScale.bodySmall, lineHeight: lineHeight.bodySmall, color: colors.textPrimary, fontWeight: fontWeight.medium },+ spinner: { paddingVertical: spacing.md },+ search: { alignItems: 'center', backgroundColor: colors.surfaceElevated, borderColor: colors.border, borderRadius: radius.pill, borderWidth: 1, flexDirection: 'row', gap: spacing.sm, minHeight: 44, paddingLeft: spacing.lg, paddingRight: spacing.xs },+ searchInput: { flex: 1, minWidth: 0, paddingVertical: spacing.sm, color: colors.textPrimary, fontSize: typeScale.body },+ clear: { alignItems: 'center', justifyContent: 'center', width: 36, height: 36 },+ rowTitle: { fontSize: typeScale.bodySmall, lineHeight: lineHeight.bodySmall, color: colors.textPrimary, fontWeight: fontWeight.medium },+ rowTitleOff: { color: colors.textSecondary },date: { fontSize: typeScale.micro, lineHeight: lineHeight.bodySmall, color: colors.textTertiary },preview: { fontSize: typeScale.footnote, lineHeight: lineHeight.caption, color: colors.textSecondary },input: { minHeight: 44, borderRadius: radius.pill, borderColor: colors.border, borderWidth: 1, padding: spacing.md, color: colors.textPrimary, backgroundColor: colors.surfaceElevated, fontSize: typeScale.body },diff --git a/apps/mobile/src/session/CompanionMessageActions.tsx b/apps/mobile/src/session/CompanionMessageActions.tsxindex 2da4b55f21..50bc8760fd 100644--- a/apps/mobile/src/session/CompanionMessageActions.tsx+++ b/apps/mobile/src/session/CompanionMessageActions.tsx@@ -17,15 +17,16 @@ export function CompanionMessageActions({ user, copied, copying, disabled, onCopconst [open, setOpen] = useState(false);const pending = useRef<string | null>(null);const hit = { width: 44, height: 44, alignItems: 'center' as const, justifyContent: 'center' as const };+ const more = <Pressable style={hit} disabled={disabled} accessibilityRole="button" accessibilityState={{ disabled }} accessibilityLabel={t('message.renderer.moreActions')} testID="companion.messageMore" onPress={() => { if (!usesNativePullDownMenu()) setOpen(true); }}>+ <Ellipsis size={iconSize.sm} color={colors.textSecondary} />+ </Pressable>;return <View style={{ flexDirection: 'row', justifyContent: user ? 'flex-end' : 'flex-start' }} testID="companion.messageActions">{!user && onCopy ? <Pressable style={hit} disabled={disabled || copying} accessibilityRole="button" accessibilityLabel={t(copied ? 'message.renderer.copyStateCopied' : 'message.renderer.copyStateCopy')} onPress={onCopy} testID="message.copyButton">{copied ? <Check size={iconSize.sm} color={colors.textSecondary} /> : <Copy size={iconSize.sm} color={colors.textSecondary} />}</Pressable> : null}- <NativePullDownMenu actions={actions} onAction={onAction}>- <Pressable style={hit} disabled={disabled} accessibilityRole="button" accessibilityLabel={t('message.renderer.moreActions')} testID="companion.messageMore" onPress={() => { if (!usesNativePullDownMenu()) setOpen(true); }}>- <Ellipsis size={iconSize.sm} color={colors.textSecondary} />- </Pressable>- </NativePullDownMenu>+ {/* The system menu (UIMenu / Android PopupMenu) opens over the trigger regardless of its+ own disabled state, so a disabled More button is rendered without one. */}+ {disabled ? more : <NativePullDownMenu actions={actions} onAction={onAction}>{more}</NativePullDownMenu>}<CompanionSheet visible={open} title="" onClose={() => { pending.current = null; setOpen(false); }} onClosed={() => { const id = pending.current; pending.current = null; if (id) onAction(id); }}>{actions.map(action => <Pressable key={action.id} disabled={action.disabled} accessibilityRole="button" style={{ minHeight: 44, justifyContent: 'center', paddingHorizontal: spacing.md }} onPress={() => { pending.current = action.id; setOpen(false); }}><Text style={{ color: action.destructive ? colors.destructive : action.disabled ? colors.textSecondary : colors.textPrimary }}>{action.title}</Text>diff --git a/apps/mobile/src/session/CompanionProfileSheet.tsx b/apps/mobile/src/session/CompanionProfileSheet.tsxindex 2bdc48d113..36c411d44b 100644--- a/apps/mobile/src/session/CompanionProfileSheet.tsx+++ b/apps/mobile/src/session/CompanionProfileSheet.tsx@@ -1,19 +1,19 @@import { useCallback, useEffect, useMemo, useRef, useState } from 'react';import { useRouter } from 'expo-router';import { randomUUID } from 'expo-crypto';-import { Alert, Image, Platform, Pressable, ScrollView, StyleSheet, Switch, View } from 'react-native';+import { ActivityIndicator, Alert, Image, Platform, Pressable, StyleSheet, Switch, View } from 'react-native';import { useTranslation } from 'react-i18next';-import { Brain, Check, ChevronRight, Clock3, FileText, MessageCircle, Search, Settings2, Sparkles, UserRound } from 'lucide-react-native';+import { Brain, Camera, Clock3, FileText, Hand, History, Info, Link2, Settings2, Sparkles } from 'lucide-react-native';import { resolveRemoteText, type RemoteResource, type RemoteResourceRef, type RemoteText } from '@cindy/device-link';import { useAuth } from '@/auth/AuthContext';import { Text, TextInput } from '@/components/AppText';import { MainWindowActionButton } from '@/components/MobilePrimitives';-import { NativePullDownMenu, usesNativePullDownMenu } from '@/platform/chrome';import { RemoteCompanionAvatar } from '@/components/RemoteCompanionAvatar';import { useDeviceLink } from '@/device-link/DeviceLinkContext';import { invokeRemoteResourceAction } from '@/device-link/remoteResources';import { readRemoteCollectionCache } from '@/device-link/remoteResourceAvailability';import { CompanionSettingsRow as ContextSheetRow } from './CompanionSettingsRow';+import { CompanionChoice } from './CompanionChoice';import { CompanionSheet } from './CompanionSheet';import { fontWeight, iconSize, lineHeight, radius, spacing, typeScale, useTheme, useThemedStyles, type ThemeColors } from '@/theme';import { CompanionModelChain, CompanionModelPicker, readCompanionModelChain } from './CompanionModelChain';@@ -25,7 +25,10 @@ import { loadCompanionProfile, profileFormDirty, type CompanionProfileData, typeimport { CompanionMemoryPage } from './CompanionMemoryPage';import { useCompanionMemory } from './useCompanionMemory';-const AVATAR_SIZE = 56;+// Same identity block as iOS: a 48pt avatar and the name, not a navigation target.+const AVATAR_SIZE = 48;+/** Same limits as iOS and the host editor (`botRemoteEditors.ts` rejects a longer skill body). */+const fieldMaxLength = (id: string) => id === 'name' || id === 'confirmName' ? 200 : id === 'body' ? 55000 : 12000;/** Same identity rule as the host and Desktop `normalizeBotName`. */const normalizeTeammateName = (name: string) => name.normalize('NFKC').trim().toLowerCase();@@ -286,13 +289,12 @@ function CompanionProfileSheetContent(props: CompanionProfileSheetProps) {const actionPanel = (id: string) => data?.panels.find(item => item.id === id);const editorTitles: Record<string, string> = { avatar: 'avatar', models: 'models', skills: 'personalSkills', connections: 'connections' };const titleKey = page === 'home' ? 'settingsTitle' : page === 'editor' ? editorTitles[editorResourceId.split('/')[1]] ?? 'title' : page;- const note = (key: string) => <Text selectable style={styles.note}>{t(`devices.companionProfile.${key}`, { deviceName })}</Text>;- const row = (id: string, Icon: typeof Brain) => <ContextSheetRow key={id} trailing="chevron" label={t(`devices.companionProfile.${id}`)} icon={<Icon size={iconSize.lg} color={colors.textSecondary} />} onPress={() => open(id)} />;- // Same as iOS: a host-disabled action (an unavailable connection, a paused teammate's skill) is read-only.- const renderPanel = (target: ProfilePanel | undefined) => target?.action- ? <>{target.id === 'capability' && target.text ? <Text selectable style={styles.note}>{target.text}</Text> : null}- <CompanionProfileForm panel={target} values={editing ? values : target.values} onChange={next => { if (!editing) draftBase.current = target.values; setValues(next); setEditing(true); }} disabled={busy || !online || !!target.action.disabled} /></>- : target?.text ? <Text selectable style={styles.body}>{target.text}</Text> : !data && online ? <Text style={styles.note}>{t('devices.resources.loading')}</Text> : note('hostUpgrade');+ const noteText = (text: string) => <Text selectable style={styles.note}>{text}</Text>;+ const note = (key: string) => noteText(t(`devices.companionProfile.${key}`, { deviceName }));+ const spinner = <ActivityIndicator accessibilityLabel={t('devices.resources.loading')} color={colors.textSecondary} style={styles.spinner} />;+ // Same entries, symbols and test IDs as the iOS rows; lucide glyphs follow Desktop for the same meaning.+ const row = (id: string, Icon: typeof Brain, onPress = () => open(id)) => <ContextSheetRow key={id} trailing="chevron" label={t(`devices.companionProfile.${id}`)}+ icon={<Icon size={iconSize.lg} color={colors.textSecondary} />} onPress={onPress} testID={`companionProfile.${id}`} />;const memoryPage = <CompanionMemoryPage memory={memory} online={online} botName={name} memoryEnabled={actionPanel('memory')?.values.memory !== false} />;const modelValues = editing ? values : panel?.values ?? {};@@ -308,6 +310,11 @@ function CompanionProfileSheetContent(props: CompanionProfileSheetProps) {if (taskId) router.push({ pathname: '/sessions/[sessionId]', params: { sessionId: taskId, deviceId } });};const openArtifactTask = (taskId: string) => { pendingTask.current = taskId; onClose(); };+ // Home management confirmations (restart / resume / delete) start from empty fields so a+ // leftover form value with the same id is never submitted with them.+ const confirm = (target: ProfilePanel | null) => { setConfirmation(target); if (target && (target.id === 'delete' || page === 'home')) { setValues({}); setEditing(false); } };+ const selectEditorPanel = (item: ProfilePanel) => { setEditorPanel(item.id); setValues(item.values); setEditing(false); };+ const retry = () => { if (page === 'editor') void retryEditor(); else void refresh(); };const modelPicker = <CompanionModelPicker visible={visible && modelStage === 'picker'} deviceId={deviceId} route={readCompanionModelChain(modelValues.modelChain)[modelIndex]}onClose={() => setModelStage('closing-picker')} onClosed={() => setModelStage('profile')}onSelect={route => { const chain = readCompanionModelChain(modelValues.modelChain);@@ -323,67 +330,75 @@ function CompanionProfileSheetContent(props: CompanionProfileSheetProps) {memoryPage={memoryPage} hasMemoryEntries={!!memoryList}onClose={dismiss} onClosed={afterClosed} onBack={page !== 'home' || confirmation ? () => void leave(false) : undefined}onOpen={open}- onChange={next => { if (!editing) draftBase.current = panel?.values ?? {}; setValues(next); setEditing(true); }}+ onChange={changeValues}onSubmit={(target, confirmed) => { void submit(target, confirmed); }}- onConfirm={target => { setConfirmation(target); if (target?.id === 'delete') { setValues({}); setEditing(false); } }}- onRetry={() => { if (page === 'editor') void retryEditor(); else void refresh(); }} onDiscard={discardDraft}- onEditor={id => void openEditor(id)} onEditorPanel={item => { setEditorPanel(item.id); setValues(item.values); setEditing(false); }}+ onConfirm={confirm}+ onRetry={retry} onDiscard={discardDraft}+ onEditor={id => void openEditor(id)} onEditorPanel={selectEditorPanel}onSearch={onOpenSearch} onAutomation={onOpenAutomation} /></>;+ // Android mirrors the iOS page map, entry order and save rules; only the surface is platform-drawn.+ const save = (target: ProfilePanel, blocked: boolean) => <MainWindowActionButton action={{ label: t('devices.companionProfile.save'), busy,+ disabled: blocked || !online || !dirty || conflict?.page === page, onPress: () => void submit(target) }} />;+ const formPanel = (target: ProfilePanel | undefined) => target?.action ? <>+ {target.id === 'capability' && target.text ? noteText(target.text) : null}+ <CompanionProfileForm panel={target} values={editing ? values : target.values} onChange={changeValues} disabled={busy || !online || !!target.action.disabled} />+ {save(target, !!target.action.disabled)}+ </> : target?.text ? <Text selectable style={styles.body}>{target.text}</Text> : !data && online ? spinner : note('hostUpgrade');+ const actionRow = (item: ProfilePanel, onPress: () => void, destructive = false) => <ContextSheetRow key={item.id} icon={null} disabled={busy || !online}+ destructive={destructive} label={label(item.action!.label)} onPress={onPress} testID={`companionProfile.action.${item.id}`} />;+ const skills = actionPanel('skills'); const connections = actionPanel('connections');+ const management = data?.panels.filter(item => ['restart', 'resume', 'delete'].includes(item.id) && item.action) ?? [];+ const home = <>+ <View style={styles.identity} testID="companionProfile.identity">+ <RemoteCompanionAvatar avatar={data?.resource.display.avatar ?? resource?.display.avatar} deviceId={deviceId} name={name} online={online} size={AVATAR_SIZE} />+ <Text accessibilityRole="header" numberOfLines={2} style={styles.name}>{name}</Text>+ </View>+ <View style={styles.group}>{row('profile', Info)}{row('memory', Brain)}{row('models', Sparkles)}{row('skills', Settings2)}</View>+ <View style={styles.group}>{row('automation', Clock3, onOpenAutomation)}{row('artifacts', FileText)}{row('search', History, onOpenSearch)}{row('permissions', Hand)}</View>+ {/* Host order, like iOS: restart / resume / delete are whatever the computer offers now. */}+ {management.length ? <View style={styles.group}>{management.map(item => actionRow(item, () => confirm(item), item.id === 'delete'))}</View> : null}+ {online && data && !actionPanel('profile') ? note('hostUpgrade') : null}+ </>;+ const editorView = panel ? <>+ {formPanel(panel)}+ {editor?.panels.filter(item => item.id === 'remove' && item.action).map(item => <View key={item.id} style={styles.group}>{actionRow(item, () => confirm(item), true)}</View>)}+ </> : editor ? <View style={styles.group}>{editor.panels.flatMap(item => item.entries?.length+ ? item.entries.map(entry => <ContextSheetRow key={`${item.id}:${entry.resourceId}`} icon={null} trailing="chevron" label={label(entry.title)} onPress={() => void openEditor(entry.resourceId)} />)+ : [item.action ? <ContextSheetRow key={item.id} icon={null} trailing="chevron" label={label(item.title ?? item.action.label)} onPress={() => selectEditorPanel(item)} />+ : <Text key={item.id} style={[styles.body, styles.groupText]}>{item.text || t('devices.companionProfile.emptyEditor')}</Text>])}</View> : null;+return <>{modelPicker}<CompanionSheet visible={visible && modelStage === 'profile'} onClosed={afterClosed} onClose={dismiss}preventDismiss={dirty || busy || !!confirmation || memory.dirty || memory.busy}onBack={page !== 'home' || confirmation ? () => void leave(false) : undefined}- title={confirmation?.action?.confirmation ? label(confirmation.action.confirmation.title) : page === 'editor' && editor ? label(panel?.title ?? editor.resource.display.title) : t(`devices.companionProfile.${titleKey}`)} testID="companionProfile">+ title={confirmation?.action?.confirmation ? label(confirmation.action.confirmation.title) : page === 'editor' && editor ? label(editor.resource.display.title) : t(`devices.companionProfile.${titleKey}`)} testID="companionProfile"><View style={styles.content}>{!online ? note('offline') : null}- {error ? <View accessibilityRole="alert">{note(deleteFailure ? 'deleteFailed' : nameTakenOnSave ? 'nameTaken' : 'readFailed')}<MainWindowActionButton action={{ label: t('devices.resources.retry'), disabled: busy || !online, onPress: () => { if (page === 'editor') void retryEditor(); else void refresh(); } }} />+ {error ? <View accessibilityRole="alert">{note(deleteFailure ? 'deleteFailed' : nameTakenOnSave ? 'nameTaken' : 'readFailed')}<MainWindowActionButton action={{ label: t('devices.resources.retry'), disabled: busy || !online, onPress: retry }} />{dirty ? <MainWindowActionButton action={{ label: t('devices.companions.automation.discard'), tone: 'danger', disabled: busy, onPress: () => discardDraft(false) }} /> : null}</View> : null}{conflict?.page === page ? <View accessibilityRole="alert">{note('changed')}<MainWindowActionButton action={{ label: t('devices.companionProfile.discardAndReload'), tone: 'danger', disabled: busy, onPress: () => discardDraft(true) }} /></View> : null}{receipt && !confirmation ? <Text accessibilityLiveRegion="polite" style={styles.note}>{label(receipt)}</Text> : null}{deleted ? <MainWindowActionButton action={{ label: t('shared.closePanel'), onPress: onClose }} /> : confirmation?.action?.confirmation ? <>- {confirmation.action.confirmation.body ? <Text selectable style={styles.body}>{label(confirmation.action.confirmation.body)}</Text> : null}- {confirmation.id === 'delete' ? <CompanionProfileForm panel={confirmation} values={values} onChange={next => { setValues(next); setEditing(true); }} disabled={busy || !online} /> : null}+ <Text selectable style={styles.body}>{label(confirmation.action.confirmation.body ?? confirmation.action.label)}</Text>+ {/* Any confirmed action may ask for input (delete's typed name is one case), as on iOS. */}+ {confirmation.action.fields?.length ? <CompanionProfileForm panel={confirmation} values={values} onChange={changeValues} disabled={busy || !online} /> : null}<MainWindowActionButton action={{ label: label(confirmation.action.confirmation.confirmLabel ?? confirmation.action.label), busy, disabled: !online || confirmation.id === 'delete' && values.confirmName !== name, tone: confirmation.action.tone === 'destructive' ? 'danger' : 'primary', onPress: () => void submit(confirmation, true) }} />- <MainWindowActionButton action={{ label: t('devices.common.cancel'), disabled: busy, onPress: () => setConfirmation(null) }} />- </> : page === 'editor' ? <>- {editorLoading ? <Text style={styles.note}>{t('devices.resources.loading')}</Text> : null}- {panel ? <>- {renderPanel(panel)}- <MainWindowActionButton action={{ label: t('devices.companionProfile.save'), busy, disabled: !online || !dirty || conflict?.page === page || !!panel.action?.disabled, onPress: () => void submit(panel) }} />- {editor?.panels.filter(item => item.id === 'remove' && item.action).map(item => <MainWindowActionButton key={item.id} action={{ label: label(item.action!.label), tone: 'danger', disabled: busy || !online, onPress: () => setConfirmation(item) }} />)}- </> : editor?.panels.map(item => item.entries ? item.entries.map(entry => <ContextSheetRow key={entry.id} icon={null} trailing="chevron" label={label(entry.title)} onPress={() => void openEditor(entry.resourceId)} />)- : item.action ? item.id === 'remove' ? <MainWindowActionButton key={item.id} action={{ label: label(item.action.label), tone: 'danger', disabled: busy || !online, onPress: () => setConfirmation(item) }} /> : <ContextSheetRow key={item.id} icon={null} trailing="chevron" label={label(item.title ?? item.action.label)} onPress={() => { setEditorPanel(item.id); setValues(item.values); setEditing(false); }} />- : <Text key={item.id} style={styles.body}>{item.text}</Text>)}- {!editorLoading && editor && editor.panels.every(item => !item.action && !item.entries?.length) ? note('emptyEditor') : null}- </> : page === 'home' ? <>- <Pressable accessibilityRole="button" accessibilityLabel={t('devices.companionProfile.profile')} onPress={() => open('profile')} style={styles.identity}>- <RemoteCompanionAvatar avatar={data?.resource.display.avatar ?? resource?.display.avatar} deviceId={deviceId} name={name} online={online} size={AVATAR_SIZE} />- <View style={styles.identityText}><Text style={styles.name}>{name}</Text><Text numberOfLines={2} style={styles.note}>{label(data?.resource.display.subtitle ?? resource?.display.subtitle ?? '')}</Text></View>- <ChevronRight color={colors.textSecondary} size={iconSize.md} />- </Pressable>- <View style={styles.group}>{row('memory', Brain)}{row('models', Settings2)}{row('skills', Sparkles)}{row('artifacts', FileText)}</View>- <View style={styles.group}>- <ContextSheetRow trailing="chevron" label={t('devices.companionProfile.automation')} icon={<Clock3 size={iconSize.lg} color={colors.textSecondary} />} onPress={() => { onClose(); onOpenAutomation(); }} />- {row('permissions', UserRound)}- <ContextSheetRow trailing="chevron" label={t('devices.companionProfile.search')} icon={<Search size={iconSize.lg} color={colors.textSecondary} />} onPress={() => { onClose(); onOpenSearch(); }} />- </View>- <View style={styles.group}>{(['resume', 'restart', 'delete'] as const).map(id => {- const item = actionPanel(id);- return item?.action ? <ContextSheetRow key={id} icon={null} disabled={busy || !online} destructive={id === 'delete'} label={label(item.action.label)} onPress={() => { setValues({}); setEditing(false); setConfirmation(item); }} /> : null;- })}</View>- {online && data && !actionPanel('profile') ? note('hostUpgrade') : null}- </> : page === 'settings' ? <>- <View style={styles.group}>{row('models', Settings2)}{row('permissions', UserRound)}</View>- </> : page === 'skills' ? <>- {actionPanel('skills')?.entries?.length ? row('personalSkills', Sparkles) : renderPanel(actionPanel('skills'))}{actionPanel('connections')?.entries?.length ? row('connections', Settings2) : renderPanel(actionPanel('connections'))}- </> : page === 'memoryEntries' ? memoryPage : page === 'artifacts' ? sessionId && resource ? <CompanionProfileArtifacts deviceId={deviceId} botId={resource.ref.id} sessionId={sessionId} online={online} onOpenTask={openArtifactTask} /> : note('artifactsRecovery') : page === 'direct' ? actionPanel('direct') ? <><Text selectable style={styles.body}>{actionPanel('direct')!.text || t('devices.companionProfile.directEmpty')}</Text></> : note('directRecovery') : <>- {page === 'profile' && actionPanel('avatar')?.entries?.length ? row('avatar', UserRound) : null}- {page === 'models' && panel?.action ? models : renderPanel(panel)}- {(page === 'profile' || page === 'memory') && panel && !panel.action ? note('largeProfileRecovery') : null}- {panel?.action ? <MainWindowActionButton action={{ label: t('devices.companionProfile.save'), busy, disabled: !online || !dirty || conflict?.page === page || !!panel.action?.disabled, onPress: () => void submit(panel) }} /> : null}- {page === 'memory' && data ? memoryList ? row('memoryEntries', Brain) : panel?.action ? note('hostUpgrade') : null : null}- </>}+ <MainWindowActionButton action={{ label: t('devices.common.cancel'), disabled: busy, onPress: () => confirm(null) }} />+ </> : page === 'home' ? home : editorLoading ? spinner : page === 'editor' ? editorView+ : page === 'models' ? panel?.action ? <>{models}{save(panel, false)}</> : noteText(panel?.text || t('devices.companionProfile.hostUpgrade', { deviceName }))+ : page === 'settings' ? <View style={styles.group}>{row('permissions', Hand)}</View>+ : page === 'skills' ? <>+ {skills?.entries?.length ? <View style={styles.group}>{row('personalSkills', Settings2)}</View> : noteText(skills?.text || t('devices.companionProfile.skillsEmpty'))}+ {connections?.entries?.length ? <View style={styles.group}>{row('connections', Link2)}</View> : noteText(connections?.text || t('devices.companionProfile.emptyEditor'))}+ </>+ : page === 'artifacts' ? sessionId && resource ? <CompanionProfileArtifacts deviceId={deviceId} botId={resource.ref.id} sessionId={sessionId} online={online} onOpenTask={openArtifactTask} /> : note('artifactsRecovery')+ : page === 'memoryEntries' ? memoryPage : <>+ {page === 'profile' && actionPanel('avatar')?.entries?.length ? <View style={styles.group}>{row('avatar', Camera)}</View> : null}+ {formPanel(panel)}+ {(page === 'profile' || page === 'memory') && panel && !panel.action ? note('largeProfileRecovery') : null}+ {page === 'memory' && data ? memoryList ? <View style={styles.group}>{row('memoryEntries', Brain)}</View> : panel?.action ? note('hostUpgrade') : null : null}+ </>}</View></CompanionSheet></>;}@@ -397,6 +412,7 @@ function CompanionCreateSheetContent({ visible, onClose, onClosed, deviceId, devconst { invoke, openLink } = useDeviceLink();const { t, i18n } = useTranslation();const styles = useThemedStyles(makeStyles);+ const { colors } = useTheme();const [data, setData] = useState<CompanionProfileData | null>(null);const [values, setValues] = useState<ProfileValues>({ name: '', avatarImageBase64: '' });const [loading, setLoading] = useState(false);@@ -478,22 +494,29 @@ function CompanionCreateSheetContent({ visible, onClose, onClosed, deviceId, dev}};if (Platform.OS === 'ios') return <CompanionCreateNativeView deviceName={deviceName} nameTaken={nameTaken} duplicate={duplicate} locked={unconfirmed} visible={visible} onClose={close} onClosed={onClosed} panel={data?.panels[0]} values={values} onChange={change} onSubmit={() => void submit()} onRetry={() => void reload()} online={online} busy={busy} loading={loading} error={error} dirty={dirty} />;+ const panel = data?.panels[0];+ const notice = !online ? t('devices.companionProfile.offline', { deviceName }) : error || duplicate ? t(duplicate || nameTaken ? 'devices.companionProfile.nameTaken' : 'devices.companionProfile.createFailed') : null;+ // Same gate as iOS: a live, enabled host action, a name and a portrait.+ const blocked = busy || !online || !panel?.action || !!panel.action.disabled || typeof values.name !== 'string' || !values.name.trim() || !values.avatarImageBase64 || duplicate;return <CompanionSheet visible={visible} onClose={close} onClosed={onClosed} preventDismiss={dirty || busy} title={t('devices.companionProfile.create')}><View style={styles.content}>- {!online ? <Text style={styles.note}>{t('devices.companionProfile.offline', { deviceName })}</Text> : null}- {error || duplicate ? <Text accessibilityRole="alert" style={styles.note}>{t(duplicate || nameTaken ? 'devices.companionProfile.nameTaken' : 'devices.companionProfile.createFailed')}</Text> : null}- {data?.panels[0] ? <CompanionProfileForm panel={data.panels[0]} values={values} onChange={change} disabled={busy || !online || unconfirmed} /> : null}- {loading ? <Text style={styles.note}>{t('devices.resources.loading')}</Text> : null}- {!data && online && !loading ? <MainWindowActionButton action={{ label: t('devices.resources.retry'), disabled: busy, onPress: () => void reload() }} /> : null}- <MainWindowActionButton action={{ label: t('devices.companionProfile.create'), busy, disabled: !online || !data || typeof values.name !== 'string' || !values.name.trim() || duplicate, onPress: () => void submit() }} />+ {notice ? <Text accessibilityRole={online ? 'alert' : undefined} style={styles.note}>{notice}</Text> : null}+ {loading ? <ActivityIndicator accessibilityLabel={t('devices.resources.loading')} color={colors.textSecondary} style={styles.spinner} /> : null}+ {panel ? <CompanionProfileForm panel={panel} values={values} onChange={change} disabled={busy || !online || unconfirmed} /> : null}+ {!panel && online && !loading ? <MainWindowActionButton action={{ label: t('devices.resources.retry'), disabled: busy, onPress: () => void reload() }} /> : null}+ <MainWindowActionButton action={{ label: t('devices.companionProfile.create'), busy, disabled: blocked, onPress: () => void submit() }} />+ {/* The explicit exit while a draft blocks dismissal; `close` still asks before discarding. */}+ <MainWindowActionButton action={{ label: t('devices.common.cancel'), disabled: busy, onPress: close }} /></View></CompanionSheet>;}+/**+ * Host-described fields, laid out like the iOS form: a select or toggle is one inline row+ * (label · value), text and pictures take a heading. Selects open the system menu.+ */function CompanionProfileForm({ panel, values, onChange, disabled }: { panel: ProfilePanel; values: ProfileValues; onChange: (values: ProfileValues) => void; disabled: boolean }) {- const { t, i18n } = useTranslation();- const [openSelect, setOpenSelect] = useState<string | null>(null);- const [selectQuery, setSelectQuery] = useState('');+ const { i18n } = useTranslation();const { colors } = useTheme();const styles = useThemedStyles(makeStyles);return <>{panel.action?.fields?.map(field => {@@ -518,51 +541,34 @@ function CompanionProfileForm({ panel, values, onChange, disabled }: { panel: Pr}} else { next[`effort${slot}`] = ''; next[`fast${slot}`] = false; }}- if (field.kind === 'select') { setOpenSelect(null); setSelectQuery(''); }onChange(next);};+ if (field.kind === 'toggle') return <View key={field.id} style={styles.inline}>+ <Text style={[styles.heading, styles.flex]}>{label}</Text>+ <Switch accessibilityLabel={label} value={values[field.id] === true} onValueChange={change} disabled={fieldDisabled} trackColor={{ false: colors.border, true: colors.cta }} />+ </View>;+ if (field.kind === 'select') return <CompanionChoice key={field.id} label={label} value={typeof values[field.id] === 'string' ? values[field.id] as string : ''} disabled={fieldDisabled}+ options={options.map(option => ({ value: option.value, label: resolveRemoteText(option.label, i18n.language), disabled: optionDisabled(option) }))} onChange={change} />;return <View key={field.id} style={styles.field}><Text style={styles.heading}>{label}</Text>{field.id === 'avatarImageBase64' ? <CompanionPortraitPicker value={String(values[field.id] ?? '')} onChange={change} disabled={disabled} /> : field.id === 'portrait' && panel.portraits ? <View style={styles.choices}>{panel.portraits.map(portrait => <Pressable key={portrait.value} accessibilityRole="button" accessibilityLabel={`${label} ${Number(portrait.value) + 1}`} accessibilityState={{ selected: values[field.id] === portrait.value, disabled }} disabled={disabled} onPress={() => change(portrait.value)} style={[styles.portrait, values[field.id] === portrait.value && { borderColor: colors.textPrimary }]}><Image source={{ uri: portrait.uri }} style={styles.portraitImage} /></Pressable>)}</View>- : field.kind === 'toggle' ? <Switch accessibilityLabel={label} value={values[field.id] === true} onValueChange={change} disabled={fieldDisabled} trackColor={{ false: colors.border, true: colors.cta }} />- : field.kind === 'select' ? <View><NativePullDownMenu actions={options.map((option, index) => ({- id: String(index), title: resolveRemoteText(option.label, i18n.language), disabled: optionDisabled(option),- state: values[field.id] === option.value ? 'on' : 'off',- }))} onAction={(id) => { const option = options[Number(id)]; if (option && !optionDisabled(option)) change(option.value); }}>- <Pressable accessibilityRole="button" accessibilityLabel={label} disabled={fieldDisabled}- accessibilityState={{ disabled: fieldDisabled, expanded: openSelect === field.id }} style={[styles.input, styles.select]}- onPress={() => { if (!usesNativePullDownMenu()) { setOpenSelect(openSelect === field.id ? null : field.id); setSelectQuery(''); } }}>- <Text numberOfLines={2} style={styles.selectText}>{resolveRemoteText(options.find(option => option.value === values[field.id])?.label ?? '', i18n.language)}</Text>- <ChevronRight size={iconSize.md} color={colors.textSecondary} />- </Pressable>- </NativePullDownMenu>- {!fieldDisabled && openSelect === field.id ? <View style={styles.group}>- {field.id === 'permissions' ? null : <TextInput accessibilityLabel={`${label} ${t('devices.companionProfile.searchOptions')}`} placeholder={t('devices.companionProfile.searchOptions')}- value={selectQuery} onChangeText={setSelectQuery} style={styles.input} placeholderTextColor={colors.textPlaceholder} />}- <ScrollView nestedScrollEnabled keyboardShouldPersistTaps="handled" style={styles.optionScroll}>- {options.filter(option => resolveRemoteText(option.label, i18n.language).toLocaleLowerCase().includes(selectQuery.trim().toLocaleLowerCase())).map(option =>- <ContextSheetRow key={option.value} icon={null} label={resolveRemoteText(option.label, i18n.language)} disabled={optionDisabled(option)}- trailing={values[field.id] === option.value ? <Check size={iconSize.md} color={colors.textPrimary} /> : null} onPress={() => change(option.value)} />)}- </ScrollView>- </View> : null}- </View>- : <TextInput accessibilityLabel={label} editable={!disabled} multiline={field.kind === 'multiline'} maxLength={field.id === 'name' || field.id === 'confirmName' ? 200 : field.id === 'body' ? 65536 : 12000} onChangeText={change} value={typeof values[field.id] === 'string' ? values[field.id] as string : ''} placeholderTextColor={colors.textPlaceholder} style={[styles.input, field.kind === 'multiline' && styles.multiline]} />}+ : <TextInput accessibilityLabel={label} editable={!disabled} multiline={field.kind === 'multiline'} maxLength={fieldMaxLength(field.id)} onChangeText={change} value={typeof values[field.id] === 'string' ? values[field.id] as string : ''} placeholderTextColor={colors.textPlaceholder} style={[styles.input, field.kind === 'multiline' && styles.multiline]} />}</View>;})}</>;}const makeStyles = (colors: ThemeColors) => StyleSheet.create({content: { gap: spacing.lg, paddingTop: spacing.md, paddingBottom: spacing.xl },- identity: { flexDirection: 'row', alignItems: 'center', gap: spacing.lg, minHeight: 80 },- identityText: { flex: 1, gap: spacing.xs },- name: { fontSize: typeScale.headline, lineHeight: lineHeight.headline, color: colors.textPrimary, fontWeight: fontWeight.medium },+ identity: { flexDirection: 'row', alignItems: 'center', gap: spacing.md, minHeight: 64 },+ name: { flex: 1, fontSize: typeScale.subtitle, lineHeight: lineHeight.subtitle, color: colors.textPrimary, fontWeight: fontWeight.medium },note: { fontSize: typeScale.footnote, lineHeight: lineHeight.caption, color: colors.textSecondary },body: { fontSize: typeScale.body, lineHeight: lineHeight.body, color: colors.textPrimary },heading: { fontSize: typeScale.body, lineHeight: lineHeight.body, color: colors.textPrimary, fontWeight: fontWeight.medium },- group: { backgroundColor: colors.surfaceElevated, borderRadius: radius.container, overflow: 'hidden' },+ group: { backgroundColor: colors.surfaceElevated, borderColor: colors.border, borderWidth: StyleSheet.hairlineWidth, borderRadius: radius.container, overflow: 'hidden', paddingHorizontal: spacing.lg },+ groupText: { paddingVertical: spacing.md },+ spinner: { paddingVertical: spacing.md },field: { gap: spacing.sm },- select: { flexDirection: 'row', alignItems: 'center', gap: spacing.md },- selectText: { flex: 1, fontSize: typeScale.body, lineHeight: lineHeight.body, color: colors.textPrimary },- optionScroll: { maxHeight: 280 },+ inline: { flexDirection: 'row', alignItems: 'center', gap: spacing.md, minHeight: 44 },+ flex: { flex: 1 },input: { minHeight: 44, borderRadius: radius.pill, borderColor: colors.border, borderWidth: 1, padding: spacing.md, color: colors.textPrimary, backgroundColor: colors.surfaceElevated, fontSize: typeScale.body },multiline: { minHeight: 120, borderRadius: radius.control, textAlignVertical: 'top' },portrait: { padding: spacing.xs, borderRadius: radius.pill, borderWidth: 1, borderColor: colors.border },diff --git a/apps/mobile/src/session/CompanionSheet.tsx b/apps/mobile/src/session/CompanionSheet.tsxindex a82a02294f..4a659a41b8 100644--- a/apps/mobile/src/session/CompanionSheet.tsx+++ b/apps/mobile/src/session/CompanionSheet.tsx@@ -6,16 +6,23 @@ import { SheetSurface } from './SheetSurface';import { computeContextSheetSnapHeights, type ContextSheetSnap } from './contextSheetModel';import type { ComposerSheetProps } from './ComposerSheet';export type CompanionSheetProps = ComposerSheetProps & { preventDismiss?: boolean };+/**+ * Android shell with the iOS dismissal contract (`interactiveDismissDisabled`): while a draft is+ * unsaved or a submit is in flight, the backdrop, the grabber and the system back key neither close+ * nor prompt. The system back key stays the in-page Back when a secondary page offers one.+ */export function CompanionSheet({ visible, title, onClose, onClosed, onBack, children, footer, testID, preventDismiss }: CompanionSheetProps) {const { height } = useWindowDimensions();const insets = useSafeAreaInsets();const [surfaceEpoch, setSurfaceEpoch] = useState(0);- const close = () => { if (preventDismiss) setSurfaceEpoch(value => value + 1); onClose(); };+ // A blocked drag-dismiss remounts the surface so it springs back to its detent.+ const dismiss = () => { if (preventDismiss) setSurfaceEpoch(value => value + 1); else onClose(); };+ const requestClose = () => { if (onBack) onBack(); else if (!preventDismiss) onClose(); };const [snap, setSnap] = useState<ContextSheetSnap>('half');useEffect(() => { if (visible) setSnap('half'); }, [visible]);const heights = useMemo(() => computeContextSheetSnapHeights({ screenHeight: height, safeAreaTopInset: insets.top }), [height, insets.top]);- return <SheetModal visible={visible} onBackdropPress={close} onRequestClose={onBack ?? onClose} onClosed={onClosed} keyboardAvoiding keyboardAvoidingBehavior="height">- <SheetSurface key={surfaceEpoch} title={title} heights={heights} snap={snap} onSnapChange={setSnap} bottomInset={insets.bottom} onClose={close} onBack={onBack} footer={footer} testID={testID}>+ return <SheetModal visible={visible} onBackdropPress={() => { if (!preventDismiss) onClose(); }} onRequestClose={requestClose} onClosed={onClosed} keyboardAvoiding keyboardAvoidingBehavior="height">+ <SheetSurface key={surfaceEpoch} title={title} heights={heights} snap={snap} onSnapChange={setSnap} bottomInset={insets.bottom} onClose={dismiss} onBack={onBack} footer={footer} testID={testID}>{children}</SheetSurface></SheetModal>;diff --git a/apps/mobile/src/session/ContextSheet.ios.tsx b/apps/mobile/src/session/ContextSheet.ios.tsxindex 9a59e54722..b55e84847f 100644--- a/apps/mobile/src/session/ContextSheet.ios.tsx+++ b/apps/mobile/src/session/ContextSheet.ios.tsx@@ -4,6 +4,7 @@ import { ComposerNativeSection as Section } from './ComposerNativeSection';import {createContext,useContext,+ useEffect,useRef,type ReactNode,} from "react";@@ -34,6 +35,11 @@ export function ContextSheet(props: ContextSheetProps) {const { t } = useTranslation();const pending = useRef<(() => void) | null>(null);const { colors } = useTheme();+ // Reopening during the dismiss animation drops the previous row action, so a later+ // ordinary close cannot replay a stale picker.+ useEffect(() => {+ if (props.visible) pending.current = null;+ }, [props.visible]);return (<DismissAction.Providervalue={(action) => {diff --git a/apps/mobile/src/session/ContextSheet.tsx b/apps/mobile/src/session/ContextSheet.tsxindex 8e8a8de930..14212a7a03 100644--- a/apps/mobile/src/session/ContextSheet.tsx+++ b/apps/mobile/src/session/ContextSheet.tsx@@ -8,7 +8,7 @@* 内容由页面以 ContextSheetGroup / ContextSheetRow / ContextSheetFooterButton 组装,* 会话页与新建会话页共用本组件(同 MobileComposerInputRow 的共享约定)。*/-import { useEffect, useMemo, useState, type ReactNode } from 'react';+import { createContext, useContext, useEffect, useMemo, useRef, useState, type ReactNode } from 'react';import { useTranslation } from 'react-i18next';import { ChevronRight } from 'lucide-react-native';import {@@ -41,6 +41,9 @@ export interface ContextSheetProps {testID?: string;}+/** 系统选择器要等面板真正关闭后再呈现,避免叠在面板上(与 iOS ContextSheet 同一语义)。 */+const DismissAction = createContext<(action: () => void) => void>((action) => action());+export function ContextSheet({visible,onClose,@@ -59,10 +62,14 @@ export function ContextSheet({const { height: windowHeight } = useWindowDimensions();const insets = useSafeAreaInsets();const [snap, setSnap] = useState<ContextSheetSnap>('half');+ const pendingAfterClose = useRef<(() => void) | null>(null);- // 每次重新打开都回到 half 档(与 Cursor 行为一致)。+ // 每次重新打开都回到 half 档(与 Cursor 行为一致);关闭动画中途重开时丢弃上次挂起的+ // 选择器动作,避免之后普通关闭时误弹相册 / 相机 / 文件。useEffect(() => {- if (visible) setSnap('half');+ if (!visible) return;+ setSnap('half');+ pendingAfterClose.current = null;}, [visible]);// memo 保持对象身份稳定,避免每次 render 触发 useContextSheetDrag 的吸附 effect 重跑。@@ -72,34 +79,46 @@ export function ContextSheet({}), [insets.top, windowHeight]);return (- <SheetModal- backdropTestID={testID ? `${testID}.backdrop` : undefined}- keyboardAvoiding- keyboardAvoidingBehavior={keyboardAvoidingBehavior}- onBackdropPress={onClose}- // Android 返回键 / iOS 关闭手势:两段式(对齐 ModelPickerSheet / SessionMenuSheet 的- // handleRequestClose 语义)。子视图状态由页面持有,onBack 即「回一级」——目标模式表单 /- // 截图列表(传了 onBack)按返回先回根视图不丢草稿,根视图(无 onBack)才整关。- onRequestClose={onBack ?? onClose}- visible={visible}+ <DismissAction.Provider+ value={(action) => {+ pendingAfterClose.current = action;+ onClose();+ }}>- <SheetSurface- backAccessibilityLabel={t('interaction.contextSheet.backAccessibility')}- bottomInset={insets.bottom}- footer={footer}- heights={heights}- onBack={onBack}- onClose={onClose}- onSnapChange={setSnap}- snap={snap}- testID={testID}- title={title}+ <SheetModal+ backdropTestID={testID ? `${testID}.backdrop` : undefined}+ keyboardAvoiding+ keyboardAvoidingBehavior={keyboardAvoidingBehavior}+ onBackdropPress={onClose}+ onClosed={() => {+ const action = pendingAfterClose.current;+ pendingAfterClose.current = null;+ action?.();+ }}+ // Android 返回键 / iOS 关闭手势:两段式(对齐 ModelPickerSheet / SessionMenuSheet 的+ // handleRequestClose 语义)。子视图状态由页面持有,onBack 即「回一级」——目标模式表单 /+ // 截图列表(传了 onBack)按返回先回根视图不丢草稿,根视图(无 onBack)才整关。+ onRequestClose={onBack ?? onClose}+ visible={visible}>- {media}- {children}- {error ? <Text style={{ color: colors.errorText }}>{error}</Text> : null}- </SheetSurface>- </SheetModal>+ <SheetSurface+ backAccessibilityLabel={t('interaction.contextSheet.backAccessibility')}+ bottomInset={insets.bottom}+ footer={footer}+ heights={heights}+ onBack={onBack}+ onClose={onClose}+ onSnapChange={setSnap}+ snap={snap}+ testID={testID}+ title={title}+ >+ {media}+ {children}+ {error ? <Text style={{ color: colors.errorText }}>{error}</Text> : null}+ </SheetSurface>+ </SheetModal>+ </DismissAction.Provider>);}@@ -133,7 +152,7 @@ function flattenChildren(children: ReactNode): ReactNode[] {}export interface ContextSheetRowProps {- /** Dismiss the iOS sheet before presenting a system picker. */+ /** Dismiss the sheet before presenting a system picker. */dismissBeforePress?: boolean;icon: ReactNode;label: string;@@ -149,6 +168,7 @@ export interface ContextSheetRowProps {}export function ContextSheetRow({+ dismissBeforePress = false,icon,label,onPress,@@ -161,6 +181,7 @@ export function ContextSheetRow({}: ContextSheetRowProps) {const styles = useThemedStyles(makeContextSheetStyles);const { colors } = useTheme();+ const dismiss = useContext(DismissAction);return (<PressableaccessibilityHint={accessibilityHint}@@ -168,7 +189,7 @@ export function ContextSheetRow({accessibilityRole="button"accessibilityState={{ disabled: disabled || busy }}disabled={disabled || busy}- onPress={onPress}+ onPress={() => (dismissBeforePress ? dismiss(onPress) : onPress())}style={({ pressed }) => [styles.row, pressed && styles.rowPressed, disabled && styles.rowDisabled]}testID={testID}>diff --git a/apps/mobile/src/session/ContextSheetGoalView.tsx b/apps/mobile/src/session/ContextSheetGoalView.tsxindex 13bc8acaa6..243f249d41 100644--- a/apps/mobile/src/session/ContextSheetGoalView.tsx+++ b/apps/mobile/src/session/ContextSheetGoalView.tsx@@ -1,16 +1,18 @@/*** Context 面板的「目标模式」二级视图(对照设计稿 S3)。*- * 两态:- * - 无 goal → 新建表单:目标文案 + 三项限制(留空 = 不限)+「开始目标」。- * - 有 goal → 状态视图:状态 chip + 目标文案 + 轮数/token 进度 + 暂停/继续/终止。+ * 两态(交互与 ContextSheetGoalView.ios.tsx 同构,外观保持 Android RN 自绘):+ * - 无 goal → 新建表单:目标文案 +「高级设置」折叠(默认收起;展开后是说明 + 三项上限下拉,+ * NativePullDownMenu,包里没有 MenuView 时退回行内选项)+「开始目标」。+ * - 有 goal → 状态视图:状态分组标题 → 目标文案 → 轮数/token 进度 → 原因;+ * 操作行竖排:暂停 / 继续 → 终止(危险色)。** goal 状态机在被控端 GoalController 执行;这里只发隧道指令(maker:goal:*)并渲染* remoteSessionStore 镜像的状态投影。*/import { useState } from 'react';import { useTranslation } from 'react-i18next';-import { ChevronDown, ChevronRight } from 'lucide-react-native';+import { Check, ChevronDown, ChevronRight, ChevronsUpDown } from 'lucide-react-native';import {ActivityIndicator,Pressable,@@ -18,6 +20,7 @@ import {View,} from 'react-native';import { Text, TextInput } from '@/components/AppText';+import { NativePullDownMenu, usesNativePullDownMenu } from '@/platform/chrome';import type {MobileGoalLimitsInput,MobileGoalStatus,@@ -161,6 +164,7 @@ export function ContextSheetGoalCreateForm({testID="contextSheet.goalObjectiveInput"value={objective}/>+ {/* 与 iOS DisclosureGroup 同构:整行可点,标题在左、展开指示在右。 */}<PressableaccessibilityLabel={t('interaction.contextSheet.advancedSettings')}accessibilityRole="button"@@ -169,10 +173,10 @@ export function ContextSheetGoalCreateForm({style={({ pressed }) => [styles.advancedToggle, pressed && styles.pressed]}testID="contextSheet.goalAdvancedToggle">- {advancedOpen- ? <ChevronDown color={colors.textSecondary} size={iconSize.md} strokeWidth={iconStroke.regular} />- : <ChevronRight color={colors.textSecondary} size={iconSize.md} strokeWidth={iconStroke.regular} />}<Text style={styles.advancedToggleText}>{t('interaction.contextSheet.advancedSettings')}</Text>+ {advancedOpen+ ? <ChevronDown color={colors.textTertiary} size={iconSize.md} strokeWidth={iconStroke.regular} />+ : <ChevronRight color={colors.textTertiary} size={iconSize.md} strokeWidth={iconStroke.regular} />}</Pressable>{advancedOpen ? (<>@@ -206,7 +210,11 @@ export function ContextSheetGoalCreateForm({/></>) : null}- {error ? <Text style={styles.errorText}>{error}</Text> : null}+ {error ? (+ <Text style={styles.errorText}>{error}</Text>+ ) : disabled && disabledHint ? (+ <Text style={styles.hintText} testID="contextSheet.goalDisabledHint">{disabledHint}</Text>+ ) : null}<PressableaccessibilityHint={disabled ? disabledHint : undefined}accessibilityLabel={t('interaction.contextSheet.startGoal')}@@ -260,26 +268,23 @@ function GoalStatusView({const reasonText = goalReasonText(goal.lastReason);return (<View testID={testID}>- <View style={styles.statusHeader}>- <View style={[styles.statusChip, goal.status === 'active' && styles.statusChipActive]}>- <Text style={[styles.statusChipText, goal.status === 'active' && styles.statusChipTextActive]}>- {goalStatusLabel(goal.status, goal.lastReason)}- </Text>- </View>- <Text style={styles.statusMeta}>- {t('interaction.contextSheet.goalMeta', { turns: turnsText, tokens: tokensText })}- </Text>- </View>+ <Text style={styles.groupLabel} testID="contextSheet.goalStatusLabel">+ {goalStatusLabel(goal.status, goal.lastReason)}+ </Text><Text style={styles.objectiveText} testID="contextSheet.goalObjectiveText">{goal.objective}</Text>+ <Text style={styles.statusMeta}>+ {t('interaction.contextSheet.goalMeta', { turns: turnsText, tokens: tokensText })}+ </Text>{reasonText ? <Text style={styles.hintText}>{reasonText}</Text> : null}{error ? <Text style={styles.errorText}>{error}</Text> : null}- <View style={styles.actionRow}>+ <View style={styles.actionGroup}>{canPause ? (<GoalActionButton busy={busy} label={t('interaction.contextSheet.pause')} onPress={onPauseGoal} testID="contextSheet.goalPauseButton" />) : null}{canResume ? (<GoalActionButton busy={busy} label={t('interaction.contextSheet.resume')} onPress={onResumeGoal} testID="contextSheet.goalResumeButton" />) : null}+ {canPause || canResume ? <View style={styles.separator} /> : null}<GoalActionButtonbusy={busy}label={t('interaction.contextSheet.clearGoal')}@@ -313,17 +318,18 @@ function GoalActionButton({accessibilityState={{ disabled: busy }}disabled={busy}onPress={onPress}- style={({ pressed }) => [styles.actionButton, pressed && styles.pressed, busy && styles.ctaButtonDisabled]}+ style={({ pressed }) => [styles.actionRow, pressed && styles.pressed, busy && styles.ctaButtonDisabled]}testID={testID}>- <Text style={[styles.actionButtonText, textColor ? { color: textColor } : null]}>{label}</Text>+ <Text style={[styles.actionRowText, textColor ? { color: textColor } : null]}>{label}</Text></Pressable>);}/**- * 单项上限的 pill 单选组(预设 + 「不限」)。手机端用 pill 组替代桌面的下拉——- * bottom sheet 里嵌套下拉手感差;当前值不在预设里(历史自定义)时前置保留(对齐桌面)。+ * 单项上限的下拉选择(预设 + 「不限」),与 iOS Picker(menu) 同构:整行显示「名称 … 当前值」,+ * 点开是系统下拉菜单(NativePullDownMenu);包里没有 MenuView 时退回行内展开的单选行。+ * 当前值不在预设里(历史自定义)时前置保留(对齐桌面)。*/function LimitOptionsRow({label,@@ -343,66 +349,82 @@ function LimitOptionsRow({testID?: string;}) {const styles = useThemedStyles(makeGoalStyles);+ const { colors } = useTheme();const { t } = useTranslation();+ const [expanded, setExpanded] = useState(false);+ const nativeMenu = usesNativePullDownMenu();const options = value != null && !presets.includes(value) ? [value, ...presets] : presets;+ const unlimited = t('interaction.contextSheet.unlimited');+ const currentLabel = value === null ? unlimited : format(value);+ const choose = (id: string) => {+ if (disabled) return;+ if (id === 'unlimited') onSelect(null);+ else {+ const next = Number(id);+ if (options.includes(next)) onSelect(next);+ }+ setExpanded(false);+ };+ const choices = [+ ...options.map((option) => ({ id: String(option), title: format(option), selected: value === option })),+ { id: 'unlimited', title: unlimited, selected: value === null },+ ];return (- <View style={styles.limitOptionsRow} testID={testID}>- <Text style={styles.limitLabel}>{label}</Text>- <View style={styles.limitPillRow}>- {options.map((preset) => (- <LimitPill- disabled={disabled}- key={preset}- label={format(preset)}- onPress={() => onSelect(preset)}- selected={value === preset}- />- ))}- <LimitPill+ <View testID={testID}>+ <NativePullDownMenu+ disabled={disabled}+ actions={choices.map((choice) => ({+ id: choice.id,+ title: choice.title,+ state: choice.selected ? 'on' : 'off',+ disabled,+ }))}+ onAction={choose}+ testID={`${testID}.menu`}+ >+ <Pressable+ accessibilityLabel={`${label}, ${currentLabel}`}+ accessibilityRole="button"+ accessibilityState={{ disabled: !!disabled, expanded: nativeMenu ? undefined : expanded }}disabled={disabled}- label={t('interaction.contextSheet.unlimited')}- onPress={() => onSelect(null)}- selected={value === null}- />- </View>+ onPress={() => {+ if (!nativeMenu) setExpanded((open) => !open);+ }}+ style={({ pressed }) => [styles.limitRow, disabled && styles.ctaButtonDisabled, pressed && styles.pressed]}+ testID={`${testID}.trigger`}+ >+ <Text numberOfLines={1} style={styles.limitLabel}>{label}</Text>+ <Text numberOfLines={1} style={styles.limitValue}>{currentLabel}</Text>+ <ChevronsUpDown color={colors.textTertiary} size={iconSize.sm} strokeWidth={iconStroke.regular} />+ </Pressable>+ </NativePullDownMenu>+ {!nativeMenu && expanded+ ? choices.map((choice) => (+ <Pressable+ accessibilityLabel={choice.title}+ accessibilityRole="button"+ accessibilityState={{ disabled: !!disabled, selected: choice.selected }}+ disabled={disabled}+ key={choice.id}+ onPress={() => choose(choice.id)}+ style={({ pressed }) => [styles.limitChoice, pressed && styles.pressed]}+ testID={`${testID}.option.${choice.id}`}+ >+ <Text numberOfLines={1} style={styles.limitChoiceText}>{choice.title}</Text>+ {choice.selected ? (+ <Check color={colors.textPrimary} size={iconSize.md} strokeWidth={iconStroke.medium} />+ ) : null}+ </Pressable>+ ))+ : null}</View>);}-function LimitPill({- label,- selected,- onPress,- disabled,-}: {- label: string;- selected: boolean;- onPress: () => void;- disabled?: boolean;-}) {- const styles = useThemedStyles(makeGoalStyles);- return (- <Pressable- accessibilityLabel={label}- accessibilityRole="button"- accessibilityState={{ disabled, selected }}- disabled={disabled}- onPress={onPress}- style={({ pressed }) => [- styles.limitPill,- selected && styles.limitPillSelected,- pressed && styles.pressed,- ]}- >- <Text style={[styles.limitPillText, selected && styles.limitPillTextSelected]}>{label}</Text>- </Pressable>- );-}--+/** 与 iOS 同口径的进度数字:1.0M 写作 1M、千位用大写 K。 */function formatTokens(tokens: number): string {- if (tokens >= 1_000_000) return `${(tokens / 1_000_000).toFixed(1)}M`;- if (tokens >= 1_000) return `${Math.round(tokens / 1_000)}k`;+ if (tokens >= 1_000_000) return `${Number((tokens / 1_000_000).toFixed(1))}M`;+ if (tokens >= 1_000) return `${Math.round(tokens / 1_000)}K`;return String(tokens);}@@ -411,6 +433,7 @@ function makeGoalStyles(colors: ThemeColors) {groupLabel: {color: colors.textTertiary,fontSize: typeScale.footnote,+ fontWeight: fontWeight.semibold,lineHeight: lineHeight.caption,paddingTop: spacing.lg,},@@ -427,58 +450,61 @@ function makeGoalStyles(colors: ThemeColors) {padding: spacing.md + 2,textAlignVertical: 'top' as const,},+ // 「高级设置」折叠行:整行 44pt 可点,标题在左、展开指示在右(对齐 iOS DisclosureGroup)。advancedToggle: {alignItems: 'center' as const,flexDirection: 'row' as const,- gap: spacing.xs,- paddingTop: spacing.lg,+ gap: spacing.sm,+ justifyContent: 'space-between' as const,+ marginTop: spacing.md,+ minHeight: 44,},advancedToggleText: {- color: colors.textSecondary,- fontSize: typeScale.footnote,- lineHeight: lineHeight.caption,+ color: colors.textPrimary,+ flex: 1,+ fontSize: typeScale.body,+ lineHeight: lineHeight.body,fontWeight: fontWeight.medium,},- limitOptionsRow: {- paddingTop: spacing.lg,+ limitRow: {+ alignItems: 'center' as const,+ flexDirection: 'row' as const,+ gap: spacing.sm,+ minHeight: 44,},limitLabel: {color: colors.textPrimary,- fontSize: typeScale.footnote,- lineHeight: lineHeight.caption,+ flex: 1,+ fontSize: typeScale.body,+ lineHeight: lineHeight.body,fontWeight: fontWeight.medium,},- limitPillRow: {- flexDirection: 'row' as const,- flexWrap: 'wrap' as const,- gap: spacing.sm,- paddingTop: spacing.sm,+ limitValue: {+ color: colors.textSecondary,+ flexShrink: 1,+ fontSize: typeScale.body,+ lineHeight: lineHeight.body,+ fontWeight: fontWeight.regular,},- limitPill: {+ limitChoice: {alignItems: 'center' as const,- backgroundColor: colors.surfaceChip,- borderRadius: radius.pill,- height: 30,- justifyContent: 'center' as const,- paddingHorizontal: spacing.md,- },- limitPillSelected: {- backgroundColor: colors.cta,+ flexDirection: 'row' as const,+ gap: spacing.sm,+ minHeight: 44,+ paddingLeft: spacing.lg,},- limitPillText: {+ limitChoiceText: {color: colors.textPrimary,- fontSize: typeScale.footnote,- lineHeight: lineHeight.caption,+ flex: 1,+ fontSize: typeScale.bodySmall,+ lineHeight: lineHeight.bodySmall,fontWeight: fontWeight.medium,},- limitPillTextSelected: {- color: colors.ctaText,- },hintText: {- color: colors.textTertiary,+ color: colors.textSecondary,fontSize: typeScale.footnote,lineHeight: lineHeight.caption,- paddingTop: spacing.md,+ paddingTop: spacing.sm,},errorText: {color: colors.errorText,@@ -506,58 +532,35 @@ function makeGoalStyles(colors: ThemeColors) {pressed: {opacity: 0.7,},- statusHeader: {- alignItems: 'center' as const,- flexDirection: 'row' as const,- gap: spacing.md,- paddingTop: spacing.lg,- },- statusChip: {- backgroundColor: colors.surfaceChip,- borderRadius: radius.pill,- paddingHorizontal: spacing.md,- paddingVertical: 4,- },- statusChipActive: {- backgroundColor: colors.cta,- },- statusChipText: {- color: colors.textPrimary,- fontSize: typeScale.caption,- lineHeight: lineHeight.caption,- fontWeight: fontWeight.medium,- },- statusChipTextActive: {- color: colors.ctaText,- },statusMeta: {- color: colors.textTertiary,- fontSize: typeScale.caption,+ color: colors.textSecondary,+ fontSize: typeScale.footnote,lineHeight: lineHeight.caption,+ fontWeight: fontWeight.regular,+ paddingTop: spacing.xs,},objectiveText: {color: colors.textPrimary,fontSize: typeScale.body,lineHeight: lineHeight.body,- paddingTop: spacing.md,+ paddingTop: spacing.sm,},- actionRow: {- flexDirection: 'row' as const,- gap: spacing.md,- paddingTop: spacing.xl,+ // 操作行竖排成一组(对齐 iOS 同一 Section 内的暂停/继续 → 终止),行间 hairline。+ actionGroup: {+ paddingTop: spacing.lg,},- actionButton: {- alignItems: 'center' as const,- backgroundColor: colors.surfaceChip,- borderRadius: radius.pill,- flex: 1,- height: 44,+ separator: {+ backgroundColor: colors.border,+ height: StyleSheet.hairlineWidth,+ },+ actionRow: {justifyContent: 'center' as const,+ minHeight: 44,},- actionButtonText: {+ actionRowText: {color: colors.textPrimary,- fontSize: typeScale.footnote,- lineHeight: lineHeight.caption,+ fontSize: typeScale.body,+ lineHeight: lineHeight.body,fontWeight: fontWeight.medium,},};diff --git a/apps/mobile/src/session/HomeSurface.tsx b/apps/mobile/src/session/HomeSurface.tsxindex e279a5f873..37455317c7 100644--- a/apps/mobile/src/session/HomeSurface.tsx+++ b/apps/mobile/src/session/HomeSurface.tsx@@ -89,7 +89,6 @@ import {NativePullDownMenu,usesNativePullDownMenu,usesNativeStackHeader,- usesSystemActionMenu,} from '@/platform/chrome';import {buildHomeDisplayPullDownActions,@@ -2488,15 +2487,11 @@ function HomeScreenContent({ active = true, onModeChange, width, onDismiss, newSwindowWidth: screenWidth,});+ // 只服务系统下拉(iOS UIMenu / Android PopupMenu):点选即收起,没有自绘菜单的+ // onClosed 可等,撤权提示直接挂;自绘回退菜单走 DeviceMenuModal 的 onSelect。const selectHomeScope = useCallback((item: MobileHomeDeviceFilterItem) => {if (item.deviceId && item.state === 'access_revoked') {- const deviceId = item.deviceId;- if (usesSystemActionMenu()) {- setRevokedTipDeviceId(deviceId);- return;- }- pendingMenuActionRef.current = () => setRevokedTipDeviceId(deviceId);- setDeviceMenuOpen(false);+ setRevokedTipDeviceId(item.deviceId);return;}viewPrefsTouchedRef.current = true;@@ -2846,6 +2841,7 @@ function HomeScreenContent({ active = true, onModeChange, width, onDismiss, newS<NativePullDownMenuactions={homeScopePullDownActions}onAction={handleHomeScopeAction}+ style={styles.headerTitleSlot}><PressableaccessibilityLabel={t('devices.list.a11y.selectScope')}@@ -2956,7 +2952,6 @@ function HomeScreenContent({ active = true, onModeChange, width, onDismiss, newS/><DeviceMenuModalcollections={remoteHomeCollections}- connectionStates={deviceConnectionStates}filters={home.deviceFilters}onClose={() => setDeviceMenuOpen(false)}onClosed={handleDeviceMenuClosed}@@ -3123,7 +3118,6 @@ function HomeInitialLoadingState({ style }: { style?: StyleProp<ViewStyle> }) {function DeviceMenuModal({collections,- connectionStates,filters,onClose,onClosed,@@ -3133,7 +3127,6 @@ function DeviceMenuModal({visible,}: {collections: readonly RemoteHomeCollection[];- connectionStates: Record<string, HomeDeviceConnectionState>;filters: readonly MobileHomeDeviceFilterItem[];onClose(): void;/** 淡出动画完成、Modal 真正卸载后触发;父级用它把「打开第二个 Modal」延后到菜单卸载之后。 */@@ -3160,6 +3153,8 @@ function DeviceMenuModal({});const allFilter = filters.find((item) => item.deviceId === null) ?? null;// 离线电脑保留缓存入口;关远控和撤权不由缓存恢复访问权限。+ // 自绘回退与系统下拉(buildHomeScopePullDownActions)同一组条目与勾选:全部 → 集合 → 设备;+ // 不画在线点 / 同步脉冲 / 失败圈,连接状态交给顶栏同步指示与连接条。const deviceFilters = filters.filter((item) => item.deviceId !== null && canBrowseMobileHomeDevice(item));return (<HomeMenuScrim@@ -3197,13 +3192,11 @@ function DeviceMenuModal({))}{deviceFilters.map((item) => (<DeviceMenuItem- connectionState={item.deviceId ? connectionStates[item.deviceId] ?? 'idle' : 'idle'}dimmed={!canBrowseMobileHomeDevice(item)}key={item.id}label={item.label}onPress={() => onSelect(item)}selected={item.selected}- status={deviceMenuStatus(item)}testID={item.deviceId ? `home.deviceChip.${sanitizeDeviceChipTestId(item.deviceId)}` : undefined}/>))}@@ -3341,23 +3334,19 @@ function HomeDisplaySettingsModal({function DeviceMenuItem({checked = false,- connectionState,dimmed = false,icon,label,onPress,selected,- status,testID,}: {checked?: boolean;- connectionState?: HomeDeviceConnectionState;dimmed?: boolean;icon?: ReactNode;label: string;onPress(): void;selected: boolean;- status?: 'online' | 'offline';testID?: string;}) {const styles = useThemedStyles(makeStyles);@@ -3387,12 +3376,6 @@ function DeviceMenuItem({) : null)}</View><Text numberOfLines={1} style={styles.deviceMenuItemText}>{label}</Text>- {status ? (- <View style={styles.deviceMenuStatusSlot}>- <StatusDot tone={status === 'online' ? 'ready' : 'off'} pulsing={connectionState === 'syncing'} />- {connectionState === 'failed' ? <View style={styles.deviceConnectionFailedRing} /> : null}- </View>- ) : null}</Pressable>);}@@ -3459,10 +3442,6 @@ function sanitizeDeviceChipTestId(value: string): string {return value.replace(/[^A-Za-z0-9_-]/g, '_');}-function deviceMenuStatus(item: MobileHomeDeviceFilterItem): 'online' | 'offline' {- return item.available && (item.state === 'ready' || item.state === 'busy') ? 'online' : 'offline';-}-function projectDragInsertY(drag: ProjectDragSession): number | null {const sourceIndex = drag.layouts.findIndex((item) => item.key === drag.key);if (sourceIndex < 0 || drag.hoverIndex === sourceIndex) return null;@@ -4596,6 +4575,11 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({flexDirection: 'row',gap: spacing.xs,},+ // 菜单外层替标题占住顶栏中间的剩余宽度,长设备名在这里截断而不是挤开右侧按钮。+ headerTitleSlot: {+ flex: 1,+ minWidth: 0,+ },headerTitleWrap: {alignItems: 'center',flex: 1,@@ -4659,15 +4643,6 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({justifyContent: 'center',width: 28,},- deviceConnectionFailedRing: {- borderColor: colors.errorBorder,- // 16×16 圆环:语义是正圆,用 pill(RN 钳制到半高)而非碰巧同值的 control 档。- borderRadius: radius.pill,- borderWidth: 1.5,- height: 16,- position: 'absolute',- width: 16,- },deviceMenuBackdrop: {backgroundColor: colors.overlay,flex: 1,@@ -4724,13 +4699,6 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({paddingHorizontal: spacing.md,paddingVertical: spacing.sm,},- deviceMenuStatusSlot: {- alignItems: 'center',- height: 20,- justifyContent: 'center',- position: 'relative',- width: 20,- },deviceMenuDivider: {backgroundColor: colors.border,height: StyleSheet.hairlineWidth,diff --git a/apps/mobile/src/session/MessageRenderer.tsx b/apps/mobile/src/session/MessageRenderer.tsxindex cd272bff35..903a69c64f 100644--- a/apps/mobile/src/session/MessageRenderer.tsx+++ b/apps/mobile/src/session/MessageRenderer.tsx@@ -3780,6 +3780,7 @@ function MessageBubble({if (id === 'more') {return (<NativePullDownMenu+ disabled={disabled && !forkBusy}actions={messageMenu.map((item) => ({image: item.image,destructive: item.destructive,diff --git a/apps/mobile/src/session/MobileModelPickerList.tsx b/apps/mobile/src/session/MobileModelPickerList.tsxindex 11b8b07cc2..9121adcbf7 100644--- a/apps/mobile/src/session/MobileModelPickerList.tsx+++ b/apps/mobile/src/session/MobileModelPickerList.tsx@@ -1,24 +1,22 @@/**- * MobileModelPickerList —— 模型浮窗一级视图的行列表(新建会话页 + 会话内 composer 共用,- * 由 ModelPickerSheet 装配)。+ * MobileModelPickerList —— 旧版模型浮窗一级视图的行列表(统一选择器不可用时的回退路径,+ * 由 ModelPickerSheet 装配;iOS 见 MobileModelPickerList.ios.tsx)。*- * 展现内容对齐桌面 ModelSelector 的 renderModelItem:每行 = 来源官方 mark + 模型名主行 +- * `订阅`(订阅制来源)+ 当前 effort 标签 + Fast 闪电(点亮时)的紧凑副行 +- * 选中 Check + 行内「配置」入口。- * 触屏适配:桌面 hover「Edit」→ 每行右侧常驻配置图标,点击经 `onOpenOptions` 通知浮窗- * 打开二级「模型选项」SheetSurface(元信息 / 快速开关 / 推理强度,见 ModelOptionsSheetView),- * 本组件不再承载行内展开。折扣版被控端无 gateway key → 整行置灰 + 行内提示。+ * 信息结构与 iOS 同构:按来源分组,分组标题「来源 · 账号」;每行 = 来源官方 mark(Cindy 业务+ * 图标,保留)+ 模型名 + 副行「订阅 · 强度 · Fast」(折扣版缺 key 时追加提示)+ 选中勾号 ++ * 行内「配置」入口(打开二级「模型选项」,见 ModelOptionsSheetView)。选中只用勾号表达,不铺整行底色。*- * 三态:① 供应商分段(providerRows 非空,选行 = 选「来源 + 模型」);② 扁平回退(flatOptions,+ * 三态:① 供应商分组(providerRows 非空,选行 = 选「来源 + 模型」);② 扁平回退(flatOptions,* 旧被控端,无来源 mark、无记忆,仅选中行可配置);③ 空 → 加载中 / 暂无文案。** 不含 ScrollView —— 由 SheetSurface 的滚动区承载。行显示逻辑在 modelPickerRows.ts* (纯逻辑可单测),本组件只做渲染。*/+import { useRef } from 'react';import { Pressable, StyleSheet, View, type StyleProp, type ViewStyle } from 'react-native';import { useTranslation } from 'react-i18next';import { Text } from '@/components/AppText';-import { Check, SlidersHorizontal, Zap } from 'lucide-react-native';+import { Check, SlidersHorizontal } from 'lucide-react-native';import type { MobileAgentCapabilities, MobileModelOption } from '@/session/agentCapabilities';import type { DeviceApiKeyStatus } from '@/device-link/deviceModelMetaCache';@@ -30,7 +28,6 @@ import { useSessionModelMirrorVersion } from '@/session/sessionModelMirror';import {budgetDisabledHint,budgetRowDisabled,- compactEffortLabelFor,effortLabelFor,modelRowAccessibilityLabel,rowEffortOf,@@ -39,7 +36,7 @@ import {} from '@/session/modelPickerRows';import type { ProviderModelRow } from '@/session/providerModelSections';import { iconSize, iconStroke, useTheme, useThemedStyles, type ThemeColors } from '@/theme';-import { fontWeight, lineHeight, radius, spacing, typeScale } from '@/theme/tokens';+import { fontWeight, lineHeight, spacing, typeScale } from '@/theme/tokens';/** 行内配置入口的目标(providerId null = flat 行)。 */export interface ModelOptionsOpenTarget {@@ -85,75 +82,61 @@ export interface MobileModelPickerListProps {const makeStyles = (c: ThemeColors) =>StyleSheet.create({- optionRow: {+ // 分组节奏与 ContextSheetGroup 一致:小标题 + 行间 hairline;选中只用勾号表达(对齐 iOS)。+ group: {+ paddingTop: spacing.lg,+ },+ groupLabel: {+ color: c.textTertiary,+ fontSize: typeScale.footnote,+ fontWeight: fontWeight.semibold,+ lineHeight: lineHeight.caption,+ paddingBottom: spacing.xs,+ },+ separator: {+ backgroundColor: c.border,+ height: StyleSheet.hairlineWidth,+ },+ rowWrap: {alignItems: 'center',- borderRadius: radius.pill,flexDirection: 'row',- gap: spacing.sm,- minHeight: 48,- paddingHorizontal: spacing.sm,},- optionRowSelected: {- backgroundColor: c.surfaceChip,+ optionRow: {+ alignItems: 'center',+ flex: 1,+ flexDirection: 'row',+ gap: spacing.md,+ minHeight: 52,+ minWidth: 0,+ paddingVertical: spacing.xs,},optionRowDisabled: {opacity: 0.45,},+ pressed: {+ opacity: 0.65,+ },optionMain: {flex: 1,minWidth: 0,},- optionTitleRow: {- alignItems: 'center',- flexDirection: 'row',- minWidth: 0,- },- optionMetaRow: {- alignItems: 'center',- flexDirection: 'row',- gap: spacing.xs,- minWidth: 0,- },optionText: {color: c.textPrimary,- flexShrink: 1,fontSize: typeScale.body,fontWeight: fontWeight.medium,lineHeight: lineHeight.body,- minWidth: 0,- },- effortLabel: {- color: c.textTertiary,- flexShrink: 1,- fontSize: typeScale.footnote,- lineHeight: lineHeight.caption,- fontWeight: fontWeight.regular,- minWidth: 0,- },- disabledHint: {- color: c.textTertiary,- fontSize: typeScale.micro,- lineHeight: lineHeight.micro,- marginTop: 1,},- subscriptionBadge: {- backgroundColor: c.surfaceChip,- borderRadius: radius.pill,- paddingHorizontal: spacing.sm,- paddingVertical: 1,- },- subscriptionBadgeText: {+ metaLine: {color: c.textSecondary,- fontSize: typeScale.micro,- lineHeight: lineHeight.micro,- fontWeight: fontWeight.semibold,+ fontSize: typeScale.caption,+ fontWeight: fontWeight.regular,+ lineHeight: lineHeight.caption,},optionsButton: {alignItems: 'center',- borderRadius: radius.pill,- height: 32,+ height: 44,justifyContent: 'center',- width: 32,+ width: 44,},empty: {color: c.textTertiary,@@ -165,6 +148,8 @@ const makeStyles = (c: ThemeColors) =>},});+const FLAT_GROUP_ID = '__flat__';+export function MobileModelPickerList({providerRows,flatOptions,@@ -197,15 +182,56 @@ export function MobileModelPickerList({const storeVersion = useDraftModelMemoryVersion() + useSessionModelMirrorVersion();void storeVersion;+ // 分组后选中行的 onLayout y 相对分组容器;加上分组在滚动内容里的 y 才是滚动定位值。+ // 扁平回退同样包在一个分组容器里,用 FLAT_GROUP_ID 走同一条换算。+ const groupOffsets = useRef(new Map<string, number>());+ const selectedRowRef = useRef<{ groupId: string; y: number } | null>(null);+ const reportSelectedRow = (): void => {+ const selectedRow = selectedRowRef.current;+ if (!selectedRow || !onSelectedRowLayout) return;+ const groupY = groupOffsets.current.get(selectedRow.groupId);+ if (groupY === undefined) return;+ onSelectedRowLayout(groupY + selectedRow.y);+ };+const hasFastModeCap = capabilities?.hasFastMode === true;const configEnabled = !!agentKind; // 新调用点传 agentKind 才启用行内展示(旧调用点行为不变)if (providerRows.length > 0) {+ // 与 iOS 同构:按来源分组,分组标题「来源 · 账号」(账号已写进来源名时不重复)。+ const groups = new Map<string, ProviderModelRow[]>();+ for (const row of providerRows) {+ const rows = groups.get(row.provider.id) ?? [];+ rows.push(row);+ groups.set(row.provider.id, rows);+ }return (<>- {providerRows.map((row) => {+ {[...groups].map(([groupId, rows]) => {+ const provider = rows[0].provider;+ const identity =+ provider.openAiAccount?.identity?.trim() ||+ provider.subscriptionAccount?.identity?.trim();+ const groupTitle = [+ provider.name,+ identity && !provider.name.includes(identity) ? identity : null,+ ]+ .filter(Boolean)+ .join(' · ');+ return (+ <View+ key={groupId}+ onLayout={(e) => {+ groupOffsets.current.set(groupId, e.nativeEvent.layout.y);+ reportSelectedRow();+ }}+ style={styles.group}+ testID={`${testID}.group.${groupId}`}+ >+ <Text numberOfLines={1} style={styles.groupLabel}>{groupTitle}</Text>+ {rows.map((row, index) => {const selected = row.model.id === activeModelId && row.provider.id === activeSourceId;- // 对齐桌面 ModelSelector:订阅制来源(Claude.ai / ChatGPT 等)的模型带「订阅」徽标。+ // 对齐桌面 ModelSelector:订阅制来源(Claude.ai / ChatGPT 等)的模型带「订阅」。const isSubscription = row.provider.access?.kind === 'subscription';const rowDisabled = budgetRowDisabled(row.model.id, apiKeyStatus);const fastEditable =@@ -240,6 +266,15 @@ export function MobileModelPickerList({const fullEffortLabel = rowEffort? effortLabelFor(row.model, rowEffort, capabilities ?? null): null;+ // 副行与 iOS 同口径:「订阅 · 强度 · Fast」。折扣版缺 key 的提示是整句恢复指引,+ // 单独成行且不限行数,不挤在单行元信息里被截掉。+ const metaLine = [+ isSubscription ? t('models.picker.subscriptionBadge') : null,+ fullEffortLabel,+ fastOn ? t('models.options.fastMode') : null,+ ]+ .filter(Boolean)+ .join(' · ');const rowAccessibilityLabel = modelRowAccessibilityLabel({baseLabel: t('models.picker.selectProviderModelAccessibility', {provider: row.provider.name,@@ -260,84 +295,70 @@ export function MobileModelPickerList({(row.model.efforts.length > 0 || fastEditable) &&(selected || !!modelMemory);return (- <Pressable- accessibilityLabel={rowAccessibilityLabel}- accessibilityRole="button"- accessibilityState={{ selected, disabled: disabled || rowDisabled }}- disabled={disabled || rowDisabled}+ <Viewkey={`${row.provider.id}::${row.model.id}`}+ // 行外层是分组 View 的直接子节点,y 才是相对分组的偏移。+ testID={selected ? `${testID}.selectedRow` : undefined}onLayout={selected && onSelectedRowLayout- ? (e) => onSelectedRowLayout(e.nativeEvent.layout.y)+ ? (e) => {+ selectedRowRef.current = { groupId, y: e.nativeEvent.layout.y };+ reportSelectedRow();+ }: undefined}- onPress={() => onSelectProviderRow(row)}- style={({ pressed }) => [- styles.optionRow,- rowStyle,- selected && styles.optionRowSelected,- rowDisabled && styles.optionRowDisabled,- pressed && { opacity: 0.65 },- ]}- testID={testID}>- <MobileModelIconMark- icon={row.model.icon}- name={row.provider.name}- providerId={row.provider.id}- routing={row.provider.routing}- logoKind={row.provider.logoKind}- />- <View style={styles.optionMain}>- <View style={styles.optionTitleRow}>- <Text numberOfLines={1} style={styles.optionText}>{row.model.displayName}</Text>- </View>- {isSubscription || rowEffort || fastOn ? (- <View style={styles.optionMetaRow}>- {isSubscription ? (- <View style={styles.subscriptionBadge}>- <Text- accessibilityLabel={t('models.picker.subscriptionBadge')}- numberOfLines={1}- style={styles.subscriptionBadgeText}- >- {t('models.picker.subscriptionBadgeCompact')}- </Text>- </View>- ) : null}- {rowEffort ? (- <Text- accessibilityLabel={fullEffortLabel ?? undefined}- numberOfLines={1}- style={styles.effortLabel}- >- {compactEffortLabelFor(row.model, rowEffort, capabilities ?? null)}- </Text>+ {index > 0 ? <View style={styles.separator} /> : null}+ <View style={styles.rowWrap}>+ <Pressable+ accessibilityLabel={rowAccessibilityLabel}+ accessibilityRole="button"+ accessibilityState={{ selected, disabled: disabled || rowDisabled }}+ disabled={disabled || rowDisabled}+ onPress={() => onSelectProviderRow(row)}+ style={({ pressed }) => [+ styles.optionRow,+ rowStyle,+ rowDisabled && styles.optionRowDisabled,+ pressed && styles.pressed,+ ]}+ testID={testID}+ >+ <MobileModelIconMark+ icon={row.model.icon}+ name={row.provider.name}+ providerId={row.provider.id}+ routing={row.provider.routing}+ logoKind={row.provider.logoKind}+ />+ <View style={styles.optionMain}>+ <Text numberOfLines={1} style={styles.optionText}>{row.model.displayName}</Text>+ {metaLine ? (+ <Text numberOfLines={1} style={styles.metaLine}>{metaLine}</Text>) : null}- {fastOn ? (- <Zap color={colors.textTertiary} size={iconSize.sm} strokeWidth={iconStroke.regular} />+ {rowDisabled ? (+ <Text style={styles.metaLine} testID={`${testID}.disabledHint`}>{budgetDisabledHint()}</Text>) : null}</View>- ) : null}- {rowDisabled ? (- <Text numberOfLines={1} style={styles.disabledHint}>{budgetDisabledHint()}</Text>+ {selected ? <Check color={colors.textPrimary} size={iconSize.lg} strokeWidth={iconStroke.medium} /> : null}+ </Pressable>+ {hasOptions ? (+ <Pressable+ accessibilityLabel={t('models.picker.configureAccessibility', { model: row.model.displayName })}+ accessibilityRole="button"+ disabled={disabled}+ onPress={() => onOpenOptions({ providerId: row.provider.id, modelId: row.model.id })}+ style={({ pressed }) => [styles.optionsButton, pressed && styles.pressed]}+ testID={`${testID}.optionsButton`}+ >+ <SlidersHorizontal color={colors.textSecondary} size={iconSize.md} strokeWidth={iconStroke.regular} />+ </Pressable>) : null}</View>- {selected ? <Check color={colors.textPrimary} size={iconSize.lg} strokeWidth={iconStroke.medium} /> : null}- {hasOptions ? (- <Pressable- accessibilityLabel={t('models.picker.configureAccessibility', { model: row.model.displayName })}- accessibilityRole="button"- disabled={disabled}- hitSlop={6}- onPress={() => onOpenOptions({ providerId: row.provider.id, modelId: row.model.id })}- style={({ pressed }) => [styles.optionsButton, pressed && { opacity: 0.65 }]}- testID={`${testID}.optionsButton`}- >- <SlidersHorizontal color={colors.textTertiary} size={iconSize.md} strokeWidth={iconStroke.regular} />- </Pressable>- ) : null}- </Pressable>+ </View>+ );+ })}+ </View>);})}</>@@ -346,8 +367,15 @@ export function MobileModelPickerList({if (flatOptions.length > 0) {return (- <>- {flatOptions.map((option) => {+ <View+ onLayout={(e) => {+ groupOffsets.current.set(FLAT_GROUP_ID, e.nativeEvent.layout.y);+ reportSelectedRow();+ }}+ style={styles.group}+ testID={`${testID}.group.${FLAT_GROUP_ID}`}+ >+ {flatOptions.map((option, index) => {const selected = option.id === activeModelId;// 扁平回退(旧被控端):无供应商结构 → 无来源 mark、无 per-provider fast 判定,// fast 支持退化为 capabilities gate × 模型自述;非选中行无记忆可写 → 仅选中行可配置。@@ -370,74 +398,66 @@ export function MobileModelPickerList({const fullEffortLabel = rowEffort? effortLabelFor(option, rowEffort, capabilities ?? null): null;+ const fastOn = fastEditable && selected && selectedFastMode;+ const metaLine = [fullEffortLabel, fastOn ? t('models.options.fastMode') : null]+ .filter(Boolean)+ .join(' · ');const rowAccessibilityLabel = modelRowAccessibilityLabel({baseLabel: t('models.picker.selectModelAccessibility', { model: option.label }),effortLabel: fullEffortLabel? t('models.options.reasoningEffortAccessibility', { label: fullEffortLabel }): null,- fastLabel:- fastEditable && selected && selectedFastMode ? t('models.options.fastMode') : null,+ fastLabel: fastOn ? t('models.options.fastMode') : null,});return (- <Pressable- accessibilityLabel={rowAccessibilityLabel}- accessibilityRole="button"- accessibilityState={{ selected, disabled }}- disabled={disabled}+ <Viewkey={option.id}+ testID={selected ? `${testID}.selectedRow` : undefined}onLayout={selected && onSelectedRowLayout- ? (e) => onSelectedRowLayout(e.nativeEvent.layout.y)+ ? (e) => {+ selectedRowRef.current = { groupId: FLAT_GROUP_ID, y: e.nativeEvent.layout.y };+ reportSelectedRow();+ }: undefined}- onPress={() => onSelectFlatModel(option)}- style={({ pressed }) => [- styles.optionRow,- rowStyle,- selected && styles.optionRowSelected,- pressed && { opacity: 0.65 },- ]}- testID={testID}>- <View style={styles.optionMain}>- <View style={styles.optionTitleRow}>- <Text numberOfLines={1} style={styles.optionText}>{option.label}</Text>- </View>- {rowEffort || (fastEditable && selected && selectedFastMode) ? (- <View style={styles.optionMetaRow}>- {rowEffort ? (- <Text- accessibilityLabel={fullEffortLabel ?? undefined}- numberOfLines={1}- style={styles.effortLabel}- >- {compactEffortLabelFor(option, rowEffort, capabilities ?? null)}- </Text>- ) : null}- {fastEditable && selected && selectedFastMode ? (- <Zap color={colors.textTertiary} size={iconSize.sm} strokeWidth={iconStroke.regular} />- ) : null}- </View>- ) : null}- </View>- {selected ? <Check color={colors.textPrimary} size={iconSize.lg} strokeWidth={iconStroke.medium} /> : null}- {hasOptions ? (+ {index > 0 ? <View style={styles.separator} /> : null}+ <View style={styles.rowWrap}><Pressable- accessibilityLabel={t('models.picker.configureAccessibility', { model: option.label })}+ accessibilityLabel={rowAccessibilityLabel}accessibilityRole="button"+ accessibilityState={{ selected, disabled }}disabled={disabled}- hitSlop={6}- onPress={() => onOpenOptions({ providerId: null, modelId: option.id })}- style={({ pressed }) => [styles.optionsButton, pressed && { opacity: 0.65 }]}- testID={`${testID}.optionsButton`}+ onPress={() => onSelectFlatModel(option)}+ style={({ pressed }) => [styles.optionRow, rowStyle, pressed && styles.pressed]}+ testID={testID}>- <SlidersHorizontal color={colors.textTertiary} size={iconSize.md} strokeWidth={iconStroke.regular} />+ <View style={styles.optionMain}>+ <Text numberOfLines={1} style={styles.optionText}>{option.label}</Text>+ {metaLine ? (+ <Text numberOfLines={1} style={styles.metaLine}>{metaLine}</Text>+ ) : null}+ </View>+ {selected ? <Check color={colors.textPrimary} size={iconSize.lg} strokeWidth={iconStroke.medium} /> : null}</Pressable>- ) : null}- </Pressable>+ {hasOptions ? (+ <Pressable+ accessibilityLabel={t('models.picker.configureAccessibility', { model: option.label })}+ accessibilityRole="button"+ disabled={disabled}+ onPress={() => onOpenOptions({ providerId: null, modelId: option.id })}+ style={({ pressed }) => [styles.optionsButton, pressed && styles.pressed]}+ testID={`${testID}.optionsButton`}+ >+ <SlidersHorizontal color={colors.textSecondary} size={iconSize.md} strokeWidth={iconStroke.regular} />+ </Pressable>+ ) : null}+ </View>+ </View>);})}- </>+ </View>);}diff --git a/apps/mobile/src/session/MobilePermissionPickerList.tsx b/apps/mobile/src/session/MobilePermissionPickerList.tsxindex fc851e0d05..c812d7ea37 100644--- a/apps/mobile/src/session/MobilePermissionPickerList.tsx+++ b/apps/mobile/src/session/MobilePermissionPickerList.tsx@@ -1,11 +1,12 @@/**- * MobilePermissionPickerList —— 权限模式下拉的行列表(新建会话页 + 会话内 composer 共用)。+ * MobilePermissionPickerList —— 权限模式选择的行列表(新建会话页 + 会话内 composer 共用;+ * iOS 见 MobilePermissionPickerList.ios.tsx)。*- * 每行 = 权限图标(`permissionPresentation`,与桌面 PermissionSelector 对齐)+ 文案 + 选中 Check;- * auto / bypass 着色(`permissionAccentColor`),其余中性。不含容器/ScrollView —— 由调用方套- * (新建页 in-flow panel,会话内 composer 浮层)。+ * 每行 = 权限图标(`permissionPresentation`,与桌面 PermissionSelector 对齐)+ 文案 + 选中勾号。+ * 选中态与 iOS 同口径:只有选中行的图标按档位着色(`permissionAccentColor`,auto / bypass+ * 有语义色,其余中性),文字与勾号不着色,也不铺整行底色。不含容器/ScrollView —— 由调用方套。*/-import { Pressable, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';+import { Pressable, StyleSheet, View, type StyleProp, type ViewStyle } from 'react-native';import { useTranslation } from 'react-i18next';import { Text } from '@/components/AppText';import { Check } from 'lucide-react-native';@@ -14,7 +15,7 @@ import type { MobileChoiceOption } from '@/session/agentCapabilities';import { permissionOptionsForDisplay } from '@/session/mobilePermissionPickerOptions';import { permissionAccentColor, permissionPresentation } from '@/session/permissionPresentation';import { fontWeight, iconSize, iconStroke, lineHeight, useTheme, useThemedStyles, type ThemeColors } from '@/theme';-import { radius, spacing, typeScale } from '@/theme/tokens';+import { spacing, typeScale } from '@/theme/tokens';export interface MobilePermissionPickerListProps {options: readonly MobileChoiceOption[];@@ -29,14 +30,14 @@ const makeStyles = (c: ThemeColors) =>StyleSheet.create({optionRow: {alignItems: 'center',- borderRadius: radius.pill,flexDirection: 'row',- gap: spacing.sm,+ gap: spacing.md,minHeight: 48,paddingHorizontal: spacing.sm,},- optionRowSelected: {- backgroundColor: c.surfaceChip,+ separator: {+ backgroundColor: c.border,+ height: StyleSheet.hairlineWidth,},optionText: {color: c.textPrimary,@@ -64,39 +65,38 @@ export function MobilePermissionPickerList({const visibleOptions = permissionOptionsForDisplay(options, activeMode);return (<>- {visibleOptions.map((option) => {+ {visibleOptions.map((option, index) => {const presentation = permissionPresentation(option.id, option.label);const selected = option.id === activeMode;- const accent = permissionAccentColor(presentation.accent, colors);- const tinted = selected && presentation.accent !== 'neutral';return (- <Pressable- accessibilityLabel={t('interaction.permission.pickerSelect', { mode: presentation.label })}- accessibilityRole="button"- accessibilityState={{ selected, disabled }}- disabled={disabled}- key={option.id}- onPress={() => onSelect(option.id)}- style={({ pressed }) => [- styles.optionRow,- rowStyle,- selected && styles.optionRowSelected,- pressed && { opacity: 0.65 },- ]}- testID={testID}- >- <presentation.Icon- color={tinted ? accent : selected ? colors.textPrimary : colors.textSecondary}- size={iconSize.action}- strokeWidth={iconStroke.regular}- />- <Text numberOfLines={1} style={[styles.optionText, tinted && { color: accent }]}>- {presentation.label}- </Text>- {selected ? (- <Check color={tinted ? accent : colors.textPrimary} size={iconSize.lg} strokeWidth={iconStroke.medium} />- ) : null}- </Pressable>+ <View key={option.id}>+ {index > 0 ? <View style={styles.separator} /> : null}+ <Pressable+ accessibilityLabel={t('interaction.permission.pickerSelect', { mode: presentation.label })}+ accessibilityRole="button"+ accessibilityState={{ selected, disabled }}+ disabled={disabled}+ onPress={() => onSelect(option.id)}+ style={({ pressed }) => [+ styles.optionRow,+ rowStyle,+ pressed && { opacity: 0.65 },+ ]}+ testID={testID}+ >+ <presentation.Icon+ color={selected ? permissionAccentColor(presentation.accent, colors) : colors.textSecondary}+ size={iconSize.action}+ strokeWidth={iconStroke.regular}+ />+ <Text numberOfLines={1} style={styles.optionText}>+ {presentation.label}+ </Text>+ {selected ? (+ <Check color={colors.textPrimary} size={iconSize.lg} strokeWidth={iconStroke.medium} />+ ) : null}+ </Pressable>+ </View>);})}</>diff --git a/apps/mobile/src/session/ModelOptionsSheetView.tsx b/apps/mobile/src/session/ModelOptionsSheetView.tsxindex a31f22c2a2..568f85c28a 100644--- a/apps/mobile/src/session/ModelOptionsSheetView.tsx+++ b/apps/mobile/src/session/ModelOptionsSheetView.tsx@@ -3,7 +3,8 @@** 承接原先行内 accordion 的配置区语义:顶部元信息行(供应商全名 · 上下文 · 极速)+* 价格块(折后价 + 可选折扣说明,对齐桌面 ModelConfigFlyout)+- * 「快速模式」Switch + 「推理强度」竖排单选。+ * 「快速模式」Switch + 「推理强度」竖排单选(顺序与 iOS 版一致:元信息/价格 → Fast → 强度;+ * 选中档只用勾号表达,不铺整行底色)。* 读写语义与桌面完全一致:目标行是**选中行** → 改 live(onChangeSelectedEffort/FastMode);* **非选中行** → 写注入记忆(草稿 = draftModelMemory / 会话 = sessionModelMirror 写穿被控端)。* effort 点击后停留(可连续调 Fast),返回/把手下拉由浮窗层负责。@@ -36,13 +37,7 @@ import {useThemedStyles,type ThemeColors,} from "@/theme";-import {- fontWeight,- lineHeight,- radius,- spacing,- typeScale,-} from "@/theme/tokens";+import { fontWeight, lineHeight, spacing, typeScale } from "@/theme/tokens";export interface ModelOptionsSheetViewProps {/** 目标行模型(SheetSurface 标题已是 displayName,这里只消费元数据)。 */@@ -100,7 +95,7 @@ const makeStyles = (c: ThemeColors) =>fontWeight: fontWeight.medium,lineHeight: lineHeight.caption,},- // 与推理强度选项行同一水平内边距(effortOptionRow 的 pill 内距):+ // 与推理强度选项行同一水平内边距:// label 与选项文字左对齐,Switch 与选项行的 Check 右对齐。fastRow: {alignItems: "center",@@ -128,15 +123,11 @@ const makeStyles = (c: ThemeColors) =>},effortOptionRow: {alignItems: "center",- borderRadius: radius.pill,flexDirection: "row",gap: spacing.sm,minHeight: 48,paddingHorizontal: spacing.sm,},- effortOptionRowSelected: {- backgroundColor: c.surfaceChip,- },effortOptionText: {color: c.textPrimary,flex: 1,@@ -291,7 +282,6 @@ export function ModelOptionsSheetView({onPress={() => setEffort(effortId)}style={({ pressed }) => [styles.effortOptionRow,- effortSelected && styles.effortOptionRowSelected,pressed && { opacity: 0.65 },]}testID={`${testID}.effortOption`}diff --git a/apps/mobile/src/session/ModelPickerSheet.tsx b/apps/mobile/src/session/ModelPickerSheet.tsxindex 71053404fb..acbb7b0e13 100644--- a/apps/mobile/src/session/ModelPickerSheet.tsx+++ b/apps/mobile/src/session/ModelPickerSheet.tsx@@ -7,7 +7,7 @@import { UnifiedModelPickerSheet, type UnifiedMobilePickerOptions } from './UnifiedModelPickerSheet';import { useCallback, useEffect, useMemo, useRef, useState } from 'react';import { useTranslation } from 'react-i18next';-import { ChevronDown, Search } from 'lucide-react-native';+import { ChevronRight, Search, X } from 'lucide-react-native';import {Animated,Platform,@@ -45,7 +45,7 @@ import {type ModelPickerSheetView,} from '@/session/modelPickerSheetModel';import { rowFastEditable } from '@/session/modelPickerRows';-import { permissionAccentColor, permissionPresentation } from '@/session/permissionPresentation';+import { permissionPresentation } from '@/session/permissionPresentation';import {buildMobileModelSections,flattenProviderSections,@@ -355,6 +355,18 @@ function LegacyModelPickerSheet({testID={`${testID}.search`}value={query}/>+ {query ? (+ <Pressable+ accessibilityLabel={t('devices.detail.search.clearA11y')}+ accessibilityRole="button"+ hitSlop={8}+ onPress={() => setQuery('')}+ style={({ pressed }) => [styles.searchClear, pressed && { opacity: 0.6 }]}+ testID={`${testID}.search.clear`}+ >+ <X color={colors.textTertiary} size={iconSize.sm} strokeWidth={iconStroke.regular} />+ </Pressable>+ ) : null}</View>);@@ -386,33 +398,32 @@ function LegacyModelPickerSheet({</View>);- // 权限入口:header 右侧「图标 + 文案 + 下拉箭头」,与桌面 composer 的 PermissionSelector- // trigger 同构——透明底、整体着色(中性 = textSecondary,auto / bypass = 语义色),点开二级- // 权限选择。按产品反馈刻意轻量化——不占列表整行,浮窗主体只留模型。- const permissionColor = permissionAccentColor(permission.accent, colors);- const permissionTrigger = (+ // 权限入口:与 iOS ModelPickerNativeHeader 同构的独立「权限」行(标题 + 副标题为当前模式),+ // 位于搜索之后、模型列表之前;点开二级权限选择。Android 外观沿用 RN 自绘行 + chevron。+ const permissionRowDisabled = permissionDisabled || browsingOtherAgent;+ const permissionRow = hidePermissionTrigger ? null : (<PressableaccessibilityLabel={t('models.picker.permissionModeAccessibility', { mode: permissionLabel })}accessibilityRole="button"- accessibilityState={{ disabled: permissionDisabled || browsingOtherAgent }}- disabled={permissionDisabled || browsingOtherAgent}- hitSlop={6}+ accessibilityState={{ disabled: permissionRowDisabled }}+ disabled={permissionRowDisabled}onPress={() => openSecondary({ kind: 'permission' })}style={({ pressed }) => [- styles.permissionTrigger,- (permissionDisabled || browsingOtherAgent) && styles.permissionTriggerDisabled,+ styles.permissionRow,+ permissionRowDisabled && styles.permissionRowDisabled,pressed && { opacity: 0.6 },]}testID={`${testID}.permissionTrigger`}>- <permission.Icon color={permissionColor} size={iconSize.sm} strokeWidth={iconStroke.regular} />- <Text- numberOfLines={1}- style={[styles.permissionTriggerLabel, { color: permissionColor }]}- >- {permissionLabel}- </Text>- <ChevronDown color={permissionColor} size={iconSize.sm} strokeWidth={iconStroke.regular} />+ <View style={styles.permissionRowMain}>+ <Text numberOfLines={1} style={styles.permissionRowTitle}>+ {t('models.picker.permissionTitle')}+ </Text>+ <Text numberOfLines={1} style={styles.permissionRowSubtitle}>+ {permissionLabel}+ </Text>+ </View>+ <ChevronRight color={colors.textTertiary} size={iconSize.md} strokeWidth={iconStroke.regular} /></Pressable>);@@ -514,7 +525,6 @@ function LegacyModelPickerSheet({><SheetSurfacebottomInset={insets.bottom}- headerTrailing={hidePermissionTrigger ? undefined : permissionTrigger}heights={heights}onClose={onClose}onSnapChange={handlePrimarySnapChange}@@ -524,6 +534,7 @@ function LegacyModelPickerSheet({testID={testID}title={t('models.picker.title')}>+ {permissionRow}{noResults ? (<Text style={styles.noResults} testID={`${testID}.noResults`}>{t('models.picker.noResults')}</Text>) : (@@ -586,7 +597,14 @@ function makeStyles(colors: ThemeColors) {gap: spacing.sm,marginBottom: spacing.xs,minHeight: 36,- paddingHorizontal: spacing.md,+ paddingLeft: spacing.md,+ paddingRight: spacing.xs,+ },+ searchClear: {+ alignItems: 'center' as const,+ height: 36,+ justifyContent: 'center' as const,+ width: 36,},searchInput: {color: colors.textPrimary,@@ -612,23 +630,32 @@ function makeStyles(colors: ThemeColors) {lineHeight: lineHeight.caption,paddingHorizontal: spacing.xs,},- // 对齐桌面 PermissionSelector trigger:透明底 + gap 4 + 13px 文案,整体随权限档着色。- permissionTrigger: {+ // 独立「权限」行:行标题 body 500 + 当前模式副标题(短元数据),整行可点。+ permissionRow: {alignItems: 'center' as const,- borderRadius: radius.pill,+ borderBottomColor: colors.border,+ borderBottomWidth: StyleSheet.hairlineWidth,flexDirection: 'row' as const,- gap: 4,- height: 36,- justifyContent: 'flex-end' as const,- paddingHorizontal: 2,+ gap: spacing.md,+ minHeight: 52,},- permissionTriggerLabel: {- fontSize: typeScale.footnote,+ permissionRowMain: {+ flex: 1,+ minWidth: 0,+ },+ permissionRowTitle: {+ color: colors.textPrimary,+ fontSize: typeScale.body,+ lineHeight: lineHeight.body,+ fontWeight: fontWeight.medium,+ },+ permissionRowSubtitle: {+ color: colors.textSecondary,+ fontSize: typeScale.caption,lineHeight: lineHeight.caption,fontWeight: fontWeight.regular,- maxWidth: 120,},- permissionTriggerDisabled: {+ permissionRowDisabled: {opacity: 0.5,},};diff --git a/apps/mobile/src/session/NativePermissionSheet.tsx b/apps/mobile/src/session/NativePermissionSheet.tsxindex e04b6bdd0c..6c289b8672 100644--- a/apps/mobile/src/session/NativePermissionSheet.tsx+++ b/apps/mobile/src/session/NativePermissionSheet.tsx@@ -1,8 +1,86 @@-import type { MobilePermissionPickerListProps } from "./MobilePermissionPickerList";+/**+ * 权限模式独立浮窗(Android / 兼容呈现;iOS 见 NativePermissionSheet.ios.tsx)。+ *+ * 交互与 iOS 同口径:点选某一档先收起面板,等 SheetModal 关闭动画播完(onClosed)+ * 再把选择交给调用方生效——Full access 确认弹层等后续呈现不会与本面板叠加。+ * 外观保持 Android:SheetModal + SheetSurface + RN 自绘行。+ */+import { useEffect, useMemo, useRef, useState } from "react";+import { useWindowDimensions } from "react-native";+import { useSafeAreaInsets } from "react-native-safe-area-context";+import { useTranslation } from "react-i18next";+import {+ computeContextSheetSnapHeights,+ type ContextSheetSnap,+} from "./contextSheetModel";+import {+ MobilePermissionPickerList,+ type MobilePermissionPickerListProps,+} from "./MobilePermissionPickerList";+import { SheetModal } from "./SheetModal";+import { SheetSurface } from "./SheetSurface";+export interface NativePermissionSheetProps extends MobilePermissionPickerListProps {visible: boolean;onClose(): void;}-export function NativePermissionSheet(_props: NativePermissionSheetProps) {- return null;++export function NativePermissionSheet(props: NativePermissionSheetProps) {+ const { t } = useTranslation();+ const insets = useSafeAreaInsets();+ const { height } = useWindowDimensions();+ const heights = useMemo(+ () =>+ computeContextSheetSnapHeights({+ safeAreaTopInset: insets.top,+ screenHeight: height,+ }),+ [insets.top, height],+ );+ const [snap, setSnap] = useState<ContextSheetSnap>("half");+ const pending = useRef<(() => void) | null>(null);+ // 关闭动画期间调用方可能已重渲染;兑现时用最新的 onSelect,而不是点选那一刻的闭包。+ const onSelectRef = useRef(props.onSelect);+ onSelectRef.current = props.onSelect;+ useEffect(() => {+ if (!props.visible) return;+ setSnap("half");+ // 新一轮打开不继承上一轮未兑现的选择(例如关闭动画中途被重新打开)。+ pending.current = null;+ }, [props.visible]);+ return (+ <SheetModal+ backdropTestID={props.testID ? `${props.testID}.backdrop` : undefined}+ onBackdropPress={props.onClose}+ onClosed={() => {+ const action = pending.current;+ pending.current = null;+ action?.();+ }}+ onRequestClose={props.onClose}+ visible={props.visible}+ >+ <SheetSurface+ bottomInset={insets.bottom}+ heights={heights}+ onClose={props.onClose}+ onSnapChange={setSnap}+ snap={snap}+ testID={props.testID}+ title={t("models.picker.permissionTitle")}+ >+ <MobilePermissionPickerList+ activeMode={props.activeMode}+ disabled={props.disabled}+ onSelect={(mode) => {+ pending.current = () => onSelectRef.current(mode);+ props.onClose();+ }}+ options={props.options}+ rowStyle={props.rowStyle}+ testID={props.testID ? `${props.testID}.option` : undefined}+ />+ </SheetSurface>+ </SheetModal>+ );}diff --git a/apps/mobile/src/session/UnifiedModelPickerView.tsx b/apps/mobile/src/session/UnifiedModelPickerView.tsxindex c0f76aedb9..8d84d5afc9 100644--- a/apps/mobile/src/session/UnifiedModelPickerView.tsx+++ b/apps/mobile/src/session/UnifiedModelPickerView.tsx@@ -1,19 +1,55 @@+/**+ * 统一模型选择器的 Android / 兼容呈现(iOS 见 UnifiedModelPickerView.ios.tsx)。+ *+ * 交互与 iOS 同构:顶部搜索(跨来源)+ 右侧「来源」入口进二级来源页(带周配额进度条);+ * 列表按 收藏 → 推荐(仅已有任务)→ 各来源 分组(分组与顺序由 UnifiedModelPickerSheet 产出);+ * 行内设置入口进单模型设置页:Harness 二级页选完自动回设置主页、推理强度下拉+ * (NativePullDownMenu,包里没有 MenuView 时退回行内展开)、Fast 开关、收藏 / 恢复推荐独立行。+ * 外观保持 Android:SheetModal + SheetSurface 单 Modal 内导航、RN 自绘分组行与主题 token。+ */import type { ReactNode } from "react";+import { useEffect, useMemo, useRef, useState } from "react";import {- Star,- SlidersHorizontal,+ Brain,+ ChevronRight,+ ChevronsUpDown,Check,- Zap,LayoutGrid,+ Search,+ SlidersHorizontal,+ Star,+ X,+ Zap,} from "lucide-react-native";-import { MobileAgentMark } from "@/components/MobileAgentMark";-import { MobileModelIconMark, MobileProviderMark } from "./MobileProviderMark";-import { useState } from "react";-import { Pressable, ScrollView, View, useWindowDimensions } from "react-native";+import {+ Pressable,+ StyleSheet,+ View,+ useWindowDimensions,+ type TextInput as RNTextInput,+} from "react-native";import { useSafeAreaInsets } from "react-native-safe-area-context";import { useTranslation } from "react-i18next";import { Text, TextInput } from "@/components/AppText";-import { useTheme, spacing, radius, iconSize } from "@/theme";+import { MobileAgentMark } from "@/components/MobileAgentMark";+import {+ NativePullDownMenu,+ NativeSwitch,+ usesNativePullDownMenu,+} from "@/platform/chrome";+import {+ fontWeight,+ iconSize,+ iconStroke,+ lineHeight,+ radius,+ spacing,+ typeScale,+ useTheme,+ useThemedStyles,+ type ThemeColors,+} from "@/theme";+import { MobileModelIconMark, MobileProviderMark } from "./MobileProviderMark";import { SheetModal } from "./SheetModal";import { SheetSurface } from "./SheetSurface";import {@@ -21,313 +57,838 @@ import {type ContextSheetSnap,} from "./contextSheetModel";import { mobileAgentLabel } from "./sessionAgentSwitch";-import type { UnifiedMobilePickerViewProps } from "./UnifiedModelPickerSheet";-export function UnifiedModelPickerView(p: UnifiedMobilePickerViewProps) {+import type {+ UnifiedMobilePickerViewProps,+ UnifiedMobileRow,+} from "./UnifiedModelPickerSheet";++type Page = "sources" | "harness" | null;++/** 分组:可选小标题 + 行间 hairline(与 ContextSheetGroup 的安卓分组行同一套节奏)。 */+function Group({+ title,+ children,+ testID,+}: {+ title?: string;+ children: ReactNode;+ testID?: string;+}) {+ const styles = useThemedStyles(makeStyles);+ const rows = flatten(children);+ return (+ <View style={styles.group} testID={testID}>+ {title ? <Text style={styles.groupLabel}>{title}</Text> : null}+ {rows.map((row, index) => (+ <View key={index}>+ {index > 0 ? <View style={styles.separator} /> : null}+ {row}+ </View>+ ))}+ </View>+ );+}++function flatten(children: ReactNode): ReactNode[] {+ if (+ children === null ||+ children === undefined ||+ typeof children === "boolean"+ )+ return [];+ if (Array.isArray(children)) return children.flatMap(flatten);+ return [children];+}++/** 设置页 / 来源页的单行:leading + 标题(+副标题)+ 右侧取值 / 勾号 / chevron。 */+function Row({+ title,+ subtitle,+ value,+ leading,+ trailing,+ selected,+ disabled,+ onPress,+ accessibilityLabel,+ testID,+}: {+ title: string;+ subtitle?: string | null;+ value?: string | null;+ leading?: ReactNode;+ trailing?: ReactNode;+ selected?: boolean;+ disabled?: boolean;+ onPress(): void;+ accessibilityLabel?: string;+ testID?: string;+}) {+ const styles = useThemedStyles(makeStyles);const { colors } = useTheme();- const { t } = useTranslation();- const insets = useSafeAreaInsets();- const { height } = useWindowDimensions();- const [snap, setSnap] = useState<ContextSheetSnap>("half");- const button = (- label: string,- onPress: () => void,- selected = false,- icon?: ReactNode,- disabled = false,- ) => (+ return (<Pressable- key={label}+ accessibilityLabel={+ accessibilityLabel ??+ [title, subtitle, value].filter(Boolean).join(", ")+ }accessibilityRole="button"- accessibilityLabel={label}- disabled={p.busy || disabled}+ accessibilityState={{ selected: !!selected, disabled: !!disabled }}+ disabled={disabled}onPress={onPress}- style={{- opacity: disabled ? 0.4 : 1,- flexDirection: "row",- alignItems: "center",- gap: spacing.sm,- minHeight: 44,- padding: spacing.md,- backgroundColor: selected ? colors.surfaceChip : undefined,- borderRadius: radius.pill,- }}+ style={({ pressed }) => [+ styles.row,+ disabled && styles.rowDisabled,+ pressed && styles.pressed,+ ]}+ testID={testID}>- {icon}- <Text style={{ color: colors.textPrimary }}>{label}</Text>+ {leading ? <View style={styles.leading}>{leading}</View> : null}+ <View style={styles.rowMain}>+ <Text numberOfLines={1} style={styles.rowTitle}>+ {title}+ </Text>+ {subtitle ? (+ <Text numberOfLines={1} style={styles.rowSubtitle}>+ {subtitle}+ </Text>+ ) : null}+ </View>+ {value ? (+ <Text numberOfLines={1} style={styles.rowValue}>+ {value}+ </Text>+ ) : null}+ {trailing}+ {selected ? (+ <Check+ color={colors.textPrimary}+ size={iconSize.lg}+ strokeWidth={iconStroke.medium}+ />+ ) : null}</Pressable>);- const o = p.options;+}++function QuotaBar({+ remaining,+ label,+ testID,+}: {+ remaining: number;+ label: string;+ testID?: string;+}) {+ const styles = useThemedStyles(makeStyles);+ const now = Math.max(0, Math.min(100, remaining));return (- <SheetModal- visible={p.visible}- onClosed={p.onClosed}- onBackdropPress={p.onClose}- onRequestClose={p.onBack ?? p.onClose}- keyboardAvoiding+ <View+ accessibilityLabel={label}+ accessibilityRole="progressbar"+ accessibilityValue={{ min: 0, max: 100, now }}+ style={styles.quotaTrack}+ testID={testID}>- <SheetSurface- title={p.title}- onBack={p.onBack}- onClose={p.onClose}- heights={computeContextSheetSnapHeights({- screenHeight: height,- safeAreaTopInset: insets.top,- })}- snap={snap}- onSnapChange={setSnap}- bottomInset={insets.bottom}- testID={p.testID}- >- {p.error ? (- <Text style={{ color: colors.errorText }}>{p.error}</Text>- ) : null}- {o ? (- <>- <Text style={{ color: colors.textSecondary }}>{o.context}</Text>- <Text>{t("models.unified.harness")}</Text>- {o.agents.map((agent) =>- button(- mobileAgentLabel(agent),- () => {- const cap = o.row.entry.capabilities[agent]!;- o.onChange({- ...o.row.config,- agent,- modelId: cap.wireModelId,- effort: cap.defaultEffort ?? cap.efforts[0] ?? "",- fast: false,- });- },- agent === o.row.config.agent,- <MobileAgentMark- agentKind={agent}- color={colors.textSecondary}- />,- ),- )}- <Text>{t("models.options.reasoningEffort")}</Text>- {o.row.entry.capabilities[o.row.config.agent]?.efforts.map(- (effort) =>- button(- t(`models.options.effortLevels.${effort}`),- () => o.onChange({ ...o.row.config, effort }),- effort === o.row.config.effort,- ),- )}- {o.fastCapable- ? button(- t("models.options.fastMode"),- () =>- o.onChange({ ...o.row.config, fast: !o.row.config.fast }),- o.row.config.fast,- <Zap- size={iconSize.action}- color={colors.textSecondary}- fill={colors.textSecondary}- />,- )- : null}- {o.price ? <Text>{o.price}</Text> : null}- {button(- t(- o.row.favorite- ? "models.unified.removeFavorite"- : "models.unified.addFavorite",- ),- o.onFavorite,- false,- <Star+ <View style={[styles.quotaFill, { width: `${now}%` }]} />+ </View>+ );+}++export function UnifiedModelPickerView(p: UnifiedMobilePickerViewProps) {+ const styles = useThemedStyles(makeStyles);+ const { colors } = useTheme();+ const { t } = useTranslation();+ const insets = useSafeAreaInsets();+ const { height } = useWindowDimensions();+ const heights = useMemo(+ () =>+ computeContextSheetSnapHeights({+ screenHeight: height,+ safeAreaTopInset: insets.top,+ }),+ [height, insets.top],+ );+ const [snap, setSnap] = useState<ContextSheetSnap>("half");+ const [page, setPage] = useState<Page>(null);+ const [effortExpanded, setEffortExpanded] = useState(false);+ const searchRef = useRef<RNTextInput>(null);+ // 与 iOS 同口径:重新打开或切换设置对象都回到主页。+ useEffect(() => {+ setPage(null);+ setEffortExpanded(false);+ }, [p.visible, p.options?.row.key]);+ useEffect(() => {+ if (p.visible) setSnap("half");+ }, [p.visible]);++ const icon = (Icon: typeof Star, filled = false) => (+ <Icon+ color={colors.textSecondary}+ fill={filled ? colors.textSecondary : "none"}+ size={iconSize.action}+ strokeWidth={iconStroke.regular}+ />+ );+ const level = (id: string) =>+ t(`models.options.effortLevels.${id}`, { defaultValue: id });+ const options = p.options;+ const config = options?.row.config;+ const back = page ? () => setPage(null) : p.onBack;+ const currentFilter = p.filters.find((item) => item.id === p.filter);+ const title =+ page === "sources"+ ? t("models.unified.source")+ : page === "harness"+ ? t("models.unified.harness")+ : p.title;++ const filterMark = (filter = currentFilter, selected = false) =>+ !filter || filter.id === "all" ? (+ icon(LayoutGrid)+ ) : filter.id === "favorites" ? (+ icon(Star, selected || p.filter === "favorites")+ ) : filter.providerMark ? (+ <MobileProviderMark {...filter.providerMark} />+ ) : (+ icon(LayoutGrid)+ );++ const searchHeader =+ !options && !page ? (+ <View style={styles.searchRow}>+ <View style={styles.searchField}>+ <Search+ color={colors.textSecondary}+ size={iconSize.md}+ strokeWidth={iconStroke.regular}+ />+ <TextInput+ accessibilityLabel={t("models.picker.searchAccessibility")}+ autoCapitalize="none"+ autoCorrect={false}+ onChangeText={p.onQuery}+ // Android adjustResize:聚焦搜索时吸到 full,边输边看列表(与旧版模型浮窗同口径)。+ onFocus={() => setSnap("full")}+ placeholder={t("models.picker.searchPlaceholder")}+ placeholderTextColor={colors.textPlaceholder}+ ref={searchRef}+ style={styles.searchInput}+ testID={`${p.testID}.search`}+ value={p.query}+ />+ {p.query ? (+ <Pressable+ accessibilityLabel={t("devices.detail.search.clearA11y")}+ accessibilityRole="button"+ hitSlop={4}+ onPress={() => p.onQuery("")}+ style={({ pressed }) => [+ styles.iconButton,+ pressed && styles.pressed,+ ]}+ testID={`${p.testID}.search.clear`}+ >+ <X+ color={colors.textTertiary}+ size={iconSize.md}+ strokeWidth={iconStroke.regular}+ />+ </Pressable>+ ) : null}+ </View>+ <Pressable+ accessibilityLabel={t("models.unified.source")}+ accessibilityRole="button"+ accessibilityValue={{ text: currentFilter?.label ?? "" }}+ onPress={() => setPage("sources")}+ style={({ pressed }) => [+ styles.sourceButton,+ pressed && styles.pressed,+ ]}+ testID={`${p.testID}.filter`}+ >+ <View style={styles.markBox}>{filterMark()}</View>+ <Text numberOfLines={1} style={styles.sourceLabel}>+ {currentFilter?.label ?? ""}+ </Text>+ <ChevronRight+ color={colors.textTertiary}+ size={iconSize.sm}+ strokeWidth={iconStroke.regular}+ />+ </Pressable>+ </View>+ ) : undefined;++ const sourcesPage = (+ <Group testID={`${p.testID}.sources`}>+ {p.filters.map((item) => (+ <Row+ key={item.id}+ leading={+ <View style={styles.sourceLeading}>+ {filterMark(+ item,+ item.id === "favorites" && p.filter === "favorites",+ )}+ {item.quota ? (+ <QuotaBar+ label={item.quota.label}+ remaining={item.quota.remaining}+ testID={`${p.testID}.source.${item.id}.quota`}+ />+ ) : null}+ </View>+ }+ onPress={() => {+ p.onFilter(item.id);+ setPage(null);+ }}+ selected={p.filter === item.id}+ subtitle={item.quota?.label}+ testID={`${p.testID}.source.${item.id}`}+ title={item.label}+ />+ ))}+ </Group>+ );++ const harnessPage =+ options && config ? (+ <Group testID={`${p.testID}.harnessPage`}>+ {options.agents.map((agent) => (+ <Row+ disabled={p.busy}+ key={agent}+ leading={+ <MobileAgentMark+ agentKind={agent}+ color={colors.textSecondary}size={iconSize.action}+ />+ }+ onPress={() => {+ const cap = options.row.entry.capabilities[agent];+ if (!cap) return;+ options.onChange({+ ...config,+ agent,+ modelId: cap.wireModelId,+ effort: cap.defaultEffort ?? cap.efforts[0] ?? "",+ fast: false,+ });+ setPage(null);+ }}+ selected={config.agent === agent}+ testID={`${p.testID}.harness.${agent}`}+ title={mobileAgentLabel(agent)}+ />+ ))}+ </Group>+ ) : null;++ const efforts =+ options && config+ ? (options.row.entry.capabilities[config.agent]?.efforts ?? [])+ : [];+ const nativeMenu = usesNativePullDownMenu();+ const effortRow =+ options && config && efforts.length ? (+ <View>+ <NativePullDownMenu+ disabled={p.busy}+ actions={efforts.map((effort) => ({+ id: effort,+ title: level(effort),+ state: effort === config.effort ? "on" : "off",+ disabled: p.busy,+ }))}+ onAction={(id) => {+ const effort = efforts.find((item) => item === id);+ if (p.busy || !effort) return;+ options.onChange({ ...config, effort });+ }}+ testID={`${p.testID}.effortMenu`}+ >+ <Row+ accessibilityLabel={`${t("models.options.reasoningEffort")}, ${level(config.effort)}`}+ disabled={p.busy}+ onPress={() => {+ if (!nativeMenu) setEffortExpanded((open) => !open);+ }}+ leading={icon(Brain)}+ testID={`${p.testID}.effort`}+ title={t("models.options.reasoningEffort")}+ trailing={+ <ChevronsUpDown+ color={colors.textTertiary}+ size={iconSize.sm}+ strokeWidth={iconStroke.regular}+ />+ }+ value={config.effort ? level(config.effort) : null}+ />+ </NativePullDownMenu>+ {!nativeMenu && effortExpanded+ ? efforts.map((effort) => (+ <Row+ disabled={p.busy}+ key={effort}+ onPress={() => {+ options.onChange({ ...config, effort });+ setEffortExpanded(false);+ }}+ selected={effort === config.effort}+ testID={`${p.testID}.effort.${effort}`}+ title={level(effort)}+ />+ ))+ : null}+ </View>+ ) : null;++ const settingsPage =+ options && config ? (+ <>+ {options.context ? (+ <Text style={styles.footnote} testID={`${p.testID}.context`}>+ {options.context}+ </Text>+ ) : null}+ <Group>+ <Row+ disabled={p.busy}+ leading={+ <MobileAgentMark+ agentKind={config.agent}color={colors.textSecondary}- fill={o.row.favorite ? colors.textSecondary : "none"}- />,- o.favoritesDisabled,+ size={iconSize.action}+ />+ }+ onPress={() => setPage("harness")}+ testID={`${p.testID}.harness`}+ title={t("models.unified.harness")}+ trailing={+ <ChevronRight+ color={colors.textTertiary}+ size={iconSize.md}+ strokeWidth={iconStroke.regular}+ />+ }+ value={mobileAgentLabel(config.agent)}+ />+ {effortRow}+ {options.fastCapable ? (+ <View style={styles.row}>+ <View style={styles.leading}>{icon(Zap, true)}</View>+ <Text numberOfLines={1} style={[styles.rowTitle, styles.rowMain]}>+ {t("models.options.fastMode")}+ </Text>+ <NativeSwitch+ accessibilityLabel={t("models.options.fastMode")}+ disabled={p.busy}+ onValueChange={(fast) => options.onChange({ ...config, fast })}+ seedColor={colors.cta}+ testID={`${p.testID}.fast`}+ value={config.fast}+ />+ </View>+ ) : null}+ </Group>+ {options.price ? (+ <Text+ style={[styles.footnote, styles.price]}+ testID={`${p.testID}.price`}+ >+ {options.price}+ </Text>+ ) : null}+ <Group>+ <Row+ disabled={p.busy || options.favoritesDisabled}+ leading={icon(Star, !!options.row.favorite)}+ onPress={options.onFavorite}+ testID={`${p.testID}.favorite`}+ title={t(+ options.row.favorite+ ? "models.unified.removeFavorite"+ : "models.unified.addFavorite",)}- {!o.row.favorite- ? button(t("models.unified.restoreRecommended"), o.onReset)- : null}- </>- ) : (- <>- <TextInput- value={p.query}- onChangeText={p.onQuery}- placeholder={t("models.picker.searchPlaceholder")}- style={{- flexDirection: "row",- alignItems: "center",- gap: spacing.sm,- minHeight: 44,- color: colors.textPrimary,- }}+ />+ {!options.row.favorite ? (+ <Row+ disabled={p.busy}+ onPress={options.onReset}+ testID={`${p.testID}.reset`}+ title={t("models.unified.restoreRecommended")}/>- <ScrollView horizontal>- {p.filters.map((item) =>- button(- item.quota- ? `${item.label} · ${item.quota.label}`- : item.label,- () => p.onFilter(item.id),- p.filter === item.id,- item.providerMark ? (- <View- accessibilityLabel={item.quota?.label}- style={{ alignItems: "center", gap: spacing.xs }}- >- <MobileProviderMark {...item.providerMark} />- {item.quota ? (- <View- accessibilityRole="progressbar"- accessibilityValue={{- min: 0,- max: 100,- now: item.quota.remaining,- }}- style={{- width: 24,- height: 3,- borderRadius: radius.pill,- backgroundColor: colors.surfaceChip,- overflow: "hidden",- }}- >- <View- style={{- width: `${item.quota.remaining}%`,- height: "100%",- backgroundColor: colors.textSecondary,- }}- />- </View>- ) : null}- </View>- ) : item.id === "favorites" ? (- <Star size={iconSize.action} color={colors.textSecondary} />- ) : (- <LayoutGrid- size={iconSize.action}- color={colors.textSecondary}- />- ),- ),- )}- </ScrollView>- {p.groups.map((group) => (- <View key={group.key}>- <Text style={{ color: colors.textSecondary }}>- {group.title}+ ) : null}+ </Group>+ </>+ ) : null;++ const modelRow = (row: UnifiedMobileRow) => {+ const agentLabel = mobileAgentLabel(row.config.agent);+ const disabled = p.busy || row.disabled;+ return (+ <View key={row.key} style={styles.modelRow}>+ <Pressable+ accessibilityLabel={[+ row.entry.displayName,+ agentLabel,+ row.subtitle,+ row.config.fast ? t("models.options.fastMode") : null,+ row.quotaLabel,+ ]+ .filter(Boolean)+ .join(", ")}+ accessibilityRole="button"+ accessibilityState={{ selected: row.selected, disabled }}+ disabled={disabled}+ onPress={() => p.onSelect(row)}+ style={({ pressed }) => [+ styles.modelMain,+ row.disabled && styles.rowDisabled,+ pressed && styles.pressed,+ ]}+ testID={`${p.testID}.model.${row.key}`}+ >+ <View style={styles.leading}>+ <MobileModelIconMark+ icon={row.entry.icon}+ {...row.providerMark}+ color={colors.textSecondary}+ />+ </View>+ <View style={styles.rowMain}>+ <View style={styles.titleLine}>+ <Text+ numberOfLines={1}+ style={[styles.rowTitle, styles.titleText]}+ >+ {row.entry.displayName}+ </Text>+ {row.costMarks ? (+ <Text style={styles.meta}>{row.costMarks}</Text>+ ) : null}+ <MobileAgentMark+ agentKind={row.config.agent}+ color={colors.textSecondary}+ />+ {row.effortLabel ? (+ <Text numberOfLines={1} style={styles.meta}>+ {row.effortLabel}</Text>- {group.rows.map((row) => (- <View- key={row.key}- style={{ flexDirection: "row", alignItems: "center" }}- >- <Pressable- disabled={p.busy || row.disabled}- onPress={() => p.onSelect(row)}- style={{- flex: 1,- minHeight: 52,- padding: 12,- flexDirection: "row",- alignItems: "center",- gap: spacing.sm,- }}- >- <MobileModelIconMark- icon={row.entry.icon}- {...row.providerMark}- />- <View style={{ flex: 1 }}>- <View- style={{- flexDirection: "row",- alignItems: "center",- gap: spacing.xs,- }}- >- <Text- numberOfLines={1}- style={{ color: colors.textPrimary, flexShrink: 1 }}- >- {row.entry.displayName}- </Text>- {row.costMarks ? (- <Text style={{ color: colors.textSecondary }}>- {row.costMarks}- </Text>- ) : null}- <MobileAgentMark- agentKind={row.config.agent}- color={colors.textSecondary}- />- <Text style={{ color: colors.textSecondary }}>- {row.effortLabel}- </Text>- {row.config.fast ? (- <Zap- size={iconSize.sm}- color={colors.textSecondary}- />- ) : null}- </View>- {row.subtitle ? (- <Text numberOfLines={1} style={{ color: colors.textSecondary }}>- {row.subtitle}- </Text>- ) : null}- {row.quotaLabel ? (- <Text style={{ color: colors.textSecondary }}>- {row.quotaLabel}- </Text>- ) : null}- </View>- {row.favorite ? (- <Star- size={iconSize.action}- color={colors.textSecondary}- fill={colors.textSecondary}- />- ) : null}- {row.selected ? (- <Check- size={iconSize.action}- color={colors.textSecondary}- />- ) : null}- </Pressable>- <Pressable- accessibilityRole="button"- accessibilityLabel={t(- "models.picker.configureAccessibility",- { model: row.entry.displayName },- )}- disabled={p.busy || row.disabled}- onPress={() => p.onOptions(row)}- style={{- width: 44,- height: 44,- alignItems: "center",- justifyContent: "center",- }}- >- <SlidersHorizontal- size={iconSize.action}- color={colors.textSecondary}- />- </Pressable>- </View>- ))}- </View>- ))}- {!p.groups.length ? (- <Text>- {p.loading ? t("models.picker.loadingDefault") : p.emptyHint}+ ) : null}+ {row.config.fast ? (+ <Zap+ color={colors.textSecondary}+ fill={colors.textSecondary}+ size={iconSize.sm}+ strokeWidth={iconStroke.regular}+ />+ ) : null}+ </View>+ {row.subtitle ? (+ <Text numberOfLines={1} style={styles.rowSubtitle}>+ {row.subtitle}+ </Text>+ ) : null}+ {row.quotaLabel ? (+ <Text numberOfLines={1} style={styles.quotaText}>+ {row.quotaLabel}</Text>) : null}- </>- )}+ </View>+ {row.favorite ? (+ <Star+ color={colors.textSecondary}+ fill={colors.textSecondary}+ size={iconSize.md}+ strokeWidth={iconStroke.regular}+ />+ ) : null}+ {row.selected ? (+ <Check+ color={colors.textPrimary}+ size={iconSize.lg}+ strokeWidth={iconStroke.medium}+ />+ ) : null}+ </Pressable>+ <Pressable+ accessibilityLabel={t("models.picker.configureAccessibility", {+ model: row.entry.displayName,+ })}+ accessibilityRole="button"+ accessibilityState={{ disabled }}+ disabled={disabled}+ onPress={() => p.onOptions(row)}+ style={({ pressed }) => [+ styles.optionsButton,+ pressed && styles.pressed,+ ]}+ testID={`${p.testID}.model.${row.key}.optionsButton`}+ >+ <SlidersHorizontal+ color={colors.textSecondary}+ size={iconSize.action}+ strokeWidth={iconStroke.regular}+ />+ </Pressable>+ </View>+ );+ };++ const listPage = (+ <>+ {p.groups.map((group) => (+ <Group+ key={group.key}+ testID={`${p.testID}.group.${group.key}`}+ title={group.title}+ >+ {group.rows.map(modelRow)}+ </Group>+ ))}+ {!p.groups.length ? (+ <Text style={styles.empty} testID={`${p.testID}.empty`}>+ {p.loading ? t("models.picker.loadingDefault") : p.emptyHint}+ </Text>+ ) : null}+ </>+ );++ return (+ <SheetModal+ keyboardAvoiding+ onBackdropPress={p.onClose}+ onClosed={p.onClosed}+ onRequestClose={back ?? p.onClose}+ visible={p.visible}+ >+ <SheetSurface+ backAccessibilityLabel={+ page ? undefined : t("models.picker.backToModels")+ }+ bottomInset={insets.bottom}+ heights={heights}+ onBack={back}+ onClose={p.onClose}+ onSnapChange={(next) => {+ // 拖回 half 视为想收起键盘(与旧版模型浮窗同口径)。+ if (next === "half") searchRef.current?.blur();+ setSnap(next);+ }}+ pinnedTop={searchHeader}+ snap={snap}+ testID={p.testID}+ title={title}+ >+ {p.error ? <Text style={styles.error}>{p.error}</Text> : null}+ {page === "sources"+ ? sourcesPage+ : page === "harness" && options+ ? harnessPage+ : options+ ? settingsPage+ : listPage}</SheetSurface></SheetModal>);}++function makeStyles(colors: ThemeColors) {+ return StyleSheet.create({+ searchRow: {+ alignItems: "center",+ flexDirection: "row",+ gap: spacing.sm,+ paddingBottom: spacing.sm,+ },+ searchField: {+ alignItems: "center",+ backgroundColor: colors.surfaceElevated,+ borderColor: colors.border,+ borderRadius: radius.pill,+ borderWidth: StyleSheet.hairlineWidth,+ flex: 1,+ flexDirection: "row",+ gap: spacing.sm,+ minHeight: 44,+ minWidth: 0,+ paddingLeft: spacing.md,+ paddingRight: spacing.xs,+ },+ searchInput: {+ color: colors.textPrimary,+ flex: 1,+ fontSize: typeScale.bodySmall,+ minWidth: 0,+ paddingVertical: spacing.sm,+ },+ iconButton: {+ alignItems: "center",+ height: 36,+ justifyContent: "center",+ width: 36,+ },+ sourceButton: {+ alignItems: "center",+ flexDirection: "row",+ gap: spacing.xs,+ maxWidth: 140,+ minHeight: 44,+ },+ sourceLabel: {+ color: colors.textSecondary,+ flexShrink: 1,+ fontSize: typeScale.bodySmall,+ fontWeight: fontWeight.medium,+ lineHeight: lineHeight.bodySmall,+ },+ markBox: {+ alignItems: "center",+ height: 24,+ justifyContent: "center",+ width: 24,+ },+ group: {+ paddingTop: spacing.lg,+ },+ groupLabel: {+ color: colors.textTertiary,+ fontSize: typeScale.footnote,+ fontWeight: fontWeight.semibold,+ lineHeight: lineHeight.caption,+ paddingBottom: spacing.xs,+ },+ separator: {+ backgroundColor: colors.border,+ height: StyleSheet.hairlineWidth,+ },+ row: {+ alignItems: "center",+ flexDirection: "row",+ gap: spacing.md,+ minHeight: 48,+ paddingVertical: spacing.xs,+ },+ rowDisabled: {+ opacity: 0.4,+ },+ pressed: {+ opacity: 0.6,+ },+ leading: {+ alignItems: "center",+ justifyContent: "center",+ minHeight: 28,+ width: 28,+ },+ rowMain: {+ flex: 1,+ minWidth: 0,+ },+ rowTitle: {+ color: colors.textPrimary,+ fontSize: typeScale.body,+ fontWeight: fontWeight.medium,+ lineHeight: lineHeight.body,+ },+ rowSubtitle: {+ color: colors.textSecondary,+ fontSize: typeScale.caption,+ fontWeight: fontWeight.regular,+ lineHeight: lineHeight.caption,+ },+ rowValue: {+ color: colors.textSecondary,+ flexShrink: 1,+ fontSize: typeScale.body,+ fontWeight: fontWeight.regular,+ lineHeight: lineHeight.body,+ maxWidth: "50%",+ },+ sourceLeading: {+ alignItems: "center",+ gap: spacing.xs,+ },+ quotaTrack: {+ backgroundColor: colors.surfaceChip,+ borderRadius: radius.pill,+ height: 3,+ overflow: "hidden",+ width: 24,+ },+ quotaFill: {+ backgroundColor: colors.textSecondary,+ height: "100%",+ },+ modelRow: {+ alignItems: "center",+ flexDirection: "row",+ },+ modelMain: {+ alignItems: "center",+ flex: 1,+ flexDirection: "row",+ gap: spacing.md,+ minHeight: 56,+ minWidth: 0,+ paddingVertical: spacing.sm,+ },+ titleLine: {+ alignItems: "center",+ flexDirection: "row",+ gap: spacing.xs,+ minWidth: 0,+ },+ titleText: {+ flexShrink: 1,+ },+ meta: {+ color: colors.textSecondary,+ flexShrink: 0,+ fontSize: typeScale.caption,+ fontWeight: fontWeight.regular,+ lineHeight: lineHeight.caption,+ },+ quotaText: {+ color: colors.textTertiary,+ fontSize: typeScale.caption,+ fontWeight: fontWeight.regular,+ lineHeight: lineHeight.caption,+ },+ optionsButton: {+ alignItems: "center",+ height: 44,+ justifyContent: "center",+ width: 44,+ },+ footnote: {+ color: colors.textSecondary,+ fontSize: typeScale.footnote,+ fontWeight: fontWeight.regular,+ lineHeight: lineHeight.caption,+ paddingTop: spacing.md,+ },+ price: {+ paddingTop: spacing.lg,+ },+ empty: {+ color: colors.textSecondary,+ fontSize: typeScale.footnote,+ lineHeight: lineHeight.caption,+ paddingVertical: spacing.lg,+ textAlign: "center",+ },+ error: {+ color: colors.errorText,+ fontSize: typeScale.footnote,+ lineHeight: lineHeight.caption,+ paddingTop: spacing.md,+ },+ });+}diff --git a/apps/mobile/src/session/modelPickerRows.ts b/apps/mobile/src/session/modelPickerRows.tsindex 11fe893e51..619f75cca2 100644--- a/apps/mobile/src/session/modelPickerRows.ts+++ b/apps/mobile/src/session/modelPickerRows.ts@@ -10,10 +10,7 @@ import { getModel, modelSupportsFastMode, type ProviderView } from '@cindy/modelimport type { SectionModel } from '@cindy/model-providers/sections';import type { AgentKind } from '@cindy/model-providers/types';-import {- compactEnglishEffortLabel,- MOBILE_EFFORT_LABELS,-} from '@cindy/maker-shared/agent-capabilities';+import { MOBILE_EFFORT_LABELS } from '@cindy/maker-shared/agent-capabilities';import { i18n } from '@/i18n';@@ -264,24 +261,6 @@ export function effortLabelFromRuntime();}-/**- * 一级列表使用稳定 effort id 生成英文紧凑标签,避免被控端下发的长文案或混合语言挤占模型名。- * 非英文界面继续使用完整本地化标签;完整英文名称仍由模型选项页展示。- */-export function compactEffortLabelFor(- model: Pick<PickerRowModel, 'effortDisplayNames'>,- effort: string,- capabilities: MobileAgentCapabilities | null,-): string {- const fullLabel = effortLabelFor(model, effort, capabilities);- const language = (i18n.resolvedLanguage ?? i18n.language).toLowerCase();- if (!language.startsWith('en')) {- return fullLabel;- }-- return compactEnglishEffortLabel(effort, fullLabel);-}-/** 父 Pressable 的完整无障碍名称:基础选择动作 + 当前可见元信息的完整语义。 */export function modelRowAccessibilityLabel(args: {baseLabel: string;diff --git a/docs/design-rules/design-inventory.md b/docs/design-rules/design-inventory.mdindex 0842e38480..70b89de253 100644--- a/docs/design-rules/design-inventory.md+++ b/docs/design-rules/design-inventory.md@@ -51,21 +51,21 @@| `desktop.window.sidebar` | desktop | 右侧栏独立窗口 | `?sidebarWindow=1` → renderer/sidebar-window-entry.tsx;hash `/sidebar-window` | RightSidebar, RightSidebarShell, SidebarWindowLayout | apps/desktop/src/main/right-sidebar-window/controller.ts, apps/desktop/src/main/right-sidebar-window/ipc.ts, apps/desktop/src/main/right-sidebar-window/registry.ts, apps/desktop/src/main/right-sidebar-window/resolveHostContext.ts, apps/desktop/src/main/right-sidebar-window/settings-store.ts, apps/desktop/src/main/right-sidebar-window/window.ts, apps/desktop/src/renderer/components/layout/SidebarWindowLayout.tsx, apps/desktop/src/renderer/features/right-sidebar/AddTabDropdown.tsx, apps/desktop/src/renderer/features/right-sidebar/EmptyState.tsx, apps/desktop/src/renderer/features/right-sidebar/RightSidebarShell.tsx, apps/desktop/src/renderer/features/right-sidebar/TabBar.tsx, apps/desktop/src/renderer/features/right-sidebar/TabBodyErrorBoundary.tsx, apps/desktop/src/renderer/features/right-sidebar/hooks/useBrowserWebview.ts, apps/desktop/src/renderer/features/right-sidebar/hooks/useNativePopupSurface.ts, apps/desktop/src/renderer/features/right-sidebar/iosSimulatorPluginAvailability.ts, apps/desktop/src/renderer/features/right-sidebar/lib/browserPartition.ts, apps/desktop/src/renderer/features/right-sidebar/lib/browserWebviewPool.ts, apps/desktop/src/renderer/features/right-sidebar/lib/detachedSidebarRouting.ts, apps/desktop/src/renderer/features/right-sidebar/lib/executeSidebarCommand.ts, apps/desktop/src/renderer/features/right-sidebar/lib/iosSimulatorFocusBridge.ts, apps/desktop/src/renderer/features/right-sidebar/lib/lastTurnChangedFiles.ts, apps/desktop/src/renderer/features/right-sidebar/lib/nativePopupTabs.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openBackgroundTasksTab.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openInSidebarBrowser.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openInSidebarFileBrowser.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openRoutinesTab.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openSubagentsTab.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openTerminalShortcut.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openTurnReview.ts, apps/desktop/src/renderer/features/right-sidebar/lib/popupRouter.ts, apps/desktop/src/renderer/features/right-sidebar/lib/popupTabs.ts, apps/desktop/src/renderer/features/right-sidebar/lib/rsbBrowserBridge.ts, apps/desktop/src/renderer/features/right-sidebar/lib/sidebarCommands.ts, apps/desktop/src/renderer/features/right-sidebar/lib/sidebarHostSession.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/BackgroundTasksBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/WorkflowAgentStrip.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/WorkflowProgressTree.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/chatTaskFocusIntent.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/listSessionTasks.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/workflowProgressModel.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/cindy-make/CindyMakeTabBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/cindy-make/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/FileBrowserBody.css, apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/FileBrowserBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/dropExternalFile.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/fileTreeImagePreview.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/useSessionScopedTreeWidth.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/index.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/ios-simulator/IOSSimulatorInstanceGrid.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/ios-simulator/IOSSimulatorTabBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/ios-simulator/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/ios-simulator/iosSimulatorH264Decoder.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/orca-workers/OrcaWorkersAttentionIcon.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/orca-workers/OrcaWorkersTabBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/orca-workers/actions.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/orca-workers/closeDecision.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/orca-workers/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/resource-usage/ResourceUsageBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/resource-usage/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/resource-usage/resource-usage.css, apps/desktop/src/renderer/features/right-sidebar/plugins/resource-usage/subscription.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/ImageDiffPreview.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/MarkdownDiffPreview.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/PlainUnifiedDiff.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/diffRows.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/highlight.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/inlineDiff.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/useDiffHighlights.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/ReviewTabBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/review/diffExpansionPreference.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/fileTree.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/gitApplyCommand.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/review/markdownPreview.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/useLastTurnFilter.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/useReviewGitState.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/useReviewSource.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/routines/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/ConversationStream.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/DetailView.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/RunList.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/SubagentChrome.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/SubagentToolCard.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/SubagentsBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/subagentChangeFence.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/subagentConversation.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/subagentFormat.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/terminal/TerminalTabBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/terminal/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/terminal/lib/xtermPool.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserChrome.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserCommentPopover.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserTabBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/browserCommentEditorDraft.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/lib/parseOmnibox.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/useBrowserComment.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/useLocalHtmlAutoReload.ts, apps/desktop/src/renderer/features/right-sidebar/registry.ts, apps/desktop/src/renderer/features/right-sidebar/store.ts, apps/desktop/src/renderer/features/right-sidebar/types.ts, apps/desktop/src/renderer/sidebar-window-entry.tsx, apps/desktop/src/renderer/styles/generated/tokens.css, apps/desktop/src/renderer/styles/globals.css | 103 | 45 | 179 || `desktop.window.voice-dictionary-toast` | desktop | 语音词典 Toast 窗 | `?view=voice-input-dictionary-toast` → main-entry.tsx → VoiceInputDictionaryToast | VoiceInputDictionaryToast | apps/desktop/src/renderer/voice-input/VoiceInputDictionaryToast.tsx | 6 | 0 | 2 || `desktop.window.voice-overlay` | desktop | 语音输入浮窗 | `?view=voice-input-overlay` → main-entry.tsx → VoiceInputOverlay | VoiceInputOverlay, VoiceInputStatusNotice | apps/desktop/src/main/voice-input/global.ts, apps/desktop/src/renderer/styles/generated/tokens.css, apps/desktop/src/renderer/styles/globals.css, apps/desktop/src/renderer/voice-input/VoiceInputOverlay.tsx, apps/desktop/src/renderer/voice-input/VoiceInputStatusNotice.tsx | 69 | 38 | 19 |-| `mobile.account-deletion` | mobile | 账号注销 | app/account-deletion.tsx | AdaptiveWindow, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, _layout, account-deletion, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/account-deletion.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 58 |-| `mobile.auth` | mobile | 登录与添加账号 | app/(auth)/login.tsx / app/add-account.tsx | AccountSwitcherSheet, AdaptiveWindow, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, IncomingShareBridge, LoginCaptchaWebView, LoginNativeButton, LoginNativeButton.ios, LoginSkinControls, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, StartupSplashOverlay, SystemNavigationBack, ThemeProvider, _layout, add-account, gestureHandler, login, peerFileTransport, useLocale | apps/mobile/app/(auth)/login.tsx, apps/mobile/app/_layout.tsx, apps/mobile/app/add-account.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/LoginCaptchaWebView.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/LoginNativeButton.ios.tsx, apps/mobile/src/components/LoginNativeButton.tsx, apps/mobile/src/components/LoginSkinControls.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SystemNavigationBack.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 213 | 80 |-| `mobile.automations` | mobile | 自动化 | app/automations/[deviceId].tsx | AdaptiveWindow, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, [deviceId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/automations/[deviceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 74 |-| `mobile.chat.new` | mobile | 新建任务 | app/sessions/new.tsx | AdaptiveWindow, AndroidUpdateSheet, AnnotationBurnInWebView, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerAttachmentTray, ComposerFrame, ComposerFrame.ios, ComposerKeyboardAvoidingView, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ContextSheetGoalView, ContextSheetGoalView.ios, ContextSheetMediaViews, DeviceLinkContext, FileTypeIcon, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, ImageLightbox, IncomingShareBridge, MobileAgentMark, MobileAgentSwitcher, MobileChoicePickerList, MobileComposerInputRow, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileModelPickerList, MobileModelPickerList.ios, MobileOutboxBridge, MobilePermissionPickerList, MobilePermissionPickerList.ios, MobilePrimitives, MobileProviderMark, MobileVendorIcon, ModelOptionsSheetView, ModelOptionsSheetView.ios, ModelPickerNativeHeader, ModelPickerNativeHeader.ios, ModelPickerSheet, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePermissionSheet, NativePermissionSheet.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, NewTaskSelectionSheet, NewTaskSelectionSheet.ios, OutsideTap, PaperPlaneIcon, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PlanModeChip, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, SimpleStackHeader, SlowSendNotice, StartupSplashOverlay, ThemeProvider, UnifiedModelPickerSheet, UnifiedModelPickerView, UnifiedModelPickerView.ios, VoiceRecordingPill, _layout, gestureHandler, new, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/sessions/new.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/FileTypeIcon.tsx, apps/mobile/src/components/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/PaperPlaneIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AnnotationBurnInWebView.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerAttachmentTray.tsx, apps/mobile/src/session/ComposerFrame.ios.tsx, apps/mobile/src/session/ComposerFrame.tsx, apps/mobile/src/session/ComposerKeyboardAvoidingView.tsx, apps/mobile/src/session/ComposerNativeRow.ios.tsx, apps/mobile/src/session/ComposerNativeRow.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/ContextSheetGoalView.ios.tsx, apps/mobile/src/session/ContextSheetGoalView.tsx, apps/mobile/src/session/ContextSheetMediaViews.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/ImageLightbox.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileAgentSwitcher.tsx, apps/mobile/src/session/MobileChoicePickerList.tsx, apps/mobile/src/session/MobileComposerInputRow.tsx, apps/mobile/src/session/MobileModelPickerList.ios.tsx, apps/mobile/src/session/MobileModelPickerList.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/MobilePermissionPickerList.ios.tsx, apps/mobile/src/session/MobilePermissionPickerList.tsx, apps/mobile/src/session/MobileProviderMark.tsx, apps/mobile/src/session/ModelOptionsSheetView.ios.tsx, apps/mobile/src/session/ModelOptionsSheetView.tsx, apps/mobile/src/session/ModelPickerNativeHeader.ios.tsx, apps/mobile/src/session/ModelPickerNativeHeader.tsx, apps/mobile/src/session/ModelPickerSheet.tsx, apps/mobile/src/session/NativePermissionSheet.ios.tsx, apps/mobile/src/session/NativePermissionSheet.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/NewTaskSelectionSheet.ios.tsx, apps/mobile/src/session/NewTaskSelectionSheet.tsx, apps/mobile/src/session/PlanModeChip.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/SlowSendNotice.tsx, apps/mobile/src/session/UnifiedModelPickerSheet.tsx, apps/mobile/src/session/UnifiedModelPickerView.ios.tsx, apps/mobile/src/session/UnifiedModelPickerView.tsx, apps/mobile/src/session/VoiceRecordingPill.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 238 | 113 |-| `mobile.chat.session` | mobile | 任务内容与输入 | app/sessions/[sessionId].tsx | AccountSwitcherSheet, AdaptiveWindow, AgentErrorDetails, AndroidUpdateSheet, AnnotationBurnInWebView, AppText, AuthContext, AuthorizationMessageCard, AutomationTimerIcon, BlurBackdrop, CenteredScreen, ChatFileChipMenuSheet, CompanionAutomationNativeView, CompanionAutomationNativeView.ios, CompanionAutomationSheet, CompanionChoice, CompanionCreateNativeView, CompanionCreateNativeView.ios, CompanionHeader, CompanionMemoryPage, CompanionMemoryPage.ios, CompanionMessageActions, CompanionMessageCard, CompanionModelChain, CompanionNativeContent.ios, CompanionNavigationDrawer, CompanionPortraitPicker, CompanionProfileArtifacts, CompanionProfileNativeView, CompanionProfileNativeView.ios, CompanionProfileSheet, CompanionSettingsRow, CompanionSettingsRow.ios, CompanionSheet, CompanionSheet.ios, CompanionTaskResultCard, CompanionWorkingStatus, ComposerAttachmentTray, ComposerExpandButton, ComposerExpandButton.ios, ComposerFrame, ComposerFrame.ios, ComposerKeyboardAvoidingView, ComposerNativeInput, ComposerNativeInput.ios, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerRichInput, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ContextSheetGoalView, ContextSheetGoalView.ios, ContextSheetMediaViews, ConversationSearchFilterSheet, ConversationShareSvg, ConversationShareWebView, DeviceLinkContext, FailedScheduleNotice, FileTypeIcon, FoldTouchpad, HomeChromeDrawer, HomeChromeFrost, HomeEntryProvider, HomeGlassMenuPanel, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeListVisuals, HomeModeSwitch, HomeNativeStackHeader, HomeNewTaskButton, HomeProjectMachineLabel, HomeSearchBar, HomeSurface, ImageLightbox, IncomingShareBridge, InlineQueueSection, InlineQuoteChip, InlineReferenceChip, InteractionPanel, LoginNativeButton, LoginNativeButton.ios, MarkdownBlockContent, MessageActionSheet, MessageRenderer, MobileAgentMark, MobileAgentSwitcher, MobileBoundaryNotice, MobileComposerInputRow, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileModelPickerList, MobileModelPickerList.ios, MobileOutboxBridge, MobilePermissionPickerList, MobilePermissionPickerList.ios, MobilePrimitives, MobileProviderMark, MobileVendorIcon, ModalContentArea, ModelOptionsSheetView, ModelOptionsSheetView.ios, ModelPickerNativeHeader, ModelPickerNativeHeader.ios, ModelPickerSheet, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePermissionSheet, NativePermissionSheet.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PaperPlaneIcon, PendingSendBubble, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PlanModeChip, PluginInvocationHeader, PromptRecommendation, PushNotificationsBridge, QuietSyncIndicator, QuoteCapsule, RecentMessageHistories, RemoteAccessGuide, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteTaskSuggestions, RenameSessionModal, ResidentHomeList, RewindPreviewPanel, RunningTokenRatePopover, SentInlineAtomBody, SessionActionSheet, SessionDetailsNative, SessionDetailsNative.ios, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, SessionListDrawer, SessionMenuSheet, SessionOptionsExpoSheet, SessionResourceCards, SessionSearchNative, SessionSearchNative.ios, SessionTailBanner, SessionUsageSummary, ShareImageNativeButton, ShareImageNativeButton.ios, ShareMessageCheckbox, ShareSelectAllButton, ShareSelectionBar, SharedTaskEndedState, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, SlowSendNotice, StartupSplashOverlay, StreamingStatusText, SwipeableSessionRow, SwipeableSessionRow.ios, SystemNavigationBack, TaskTags, TaskTagsSheet, TeammateGenerationLabel, TeammateList, TeammatePicker, ThemeProvider, UnifiedModelPickerSheet, UnifiedModelPickerView, UnifiedModelPickerView.ios, VoiceRecordingPill, WorkingStatusText, [sessionId], _layout, gestureHandler, mathWebView, mediaPlayerWebView, mermaidWebView, peerFileTransport, useLocale, useSharedTaskConfirmation | apps/mobile/app/_layout.tsx, apps/mobile/app/sessions/[sessionId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/FileTypeIcon.tsx, apps/mobile/src/components/LoginNativeButton.ios.tsx, apps/mobile/src/components/LoginNativeButton.tsx, apps/mobile/src/components/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/PaperPlaneIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteAccessGuide.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/chrome/SystemNavigationBack.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/AgentErrorDetails.tsx, apps/mobile/src/session/AnnotationBurnInWebView.tsx, apps/mobile/src/session/AuthorizationMessageCard.tsx, apps/mobile/src/session/AutomationTimerIcon.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ChatFileChipMenuSheet.tsx, apps/mobile/src/session/CompanionAutomationNativeView.ios.tsx, apps/mobile/src/session/CompanionAutomationNativeView.tsx, apps/mobile/src/session/CompanionAutomationSheet.tsx, apps/mobile/src/session/CompanionChoice.tsx, apps/mobile/src/session/CompanionCreateNativeView.ios.tsx, apps/mobile/src/session/CompanionCreateNativeView.tsx, apps/mobile/src/session/CompanionHeader.tsx, apps/mobile/src/session/CompanionMemoryPage.ios.tsx, apps/mobile/src/session/CompanionMemoryPage.tsx, apps/mobile/src/session/CompanionMessageActions.tsx, apps/mobile/src/session/CompanionMessageCard.tsx, apps/mobile/src/session/CompanionModelChain.tsx, apps/mobile/src/session/CompanionNativeContent.ios.tsx, apps/mobile/src/session/CompanionNavigationDrawer.tsx, apps/mobile/src/session/CompanionPortraitPicker.tsx, apps/mobile/src/session/CompanionProfileArtifacts.tsx, apps/mobile/src/session/CompanionProfileNativeView.ios.tsx, apps/mobile/src/session/CompanionProfileNativeView.tsx, apps/mobile/src/session/CompanionProfileSheet.tsx, apps/mobile/src/session/CompanionSettingsRow.ios.tsx, apps/mobile/src/session/CompanionSettingsRow.tsx, apps/mobile/src/session/CompanionSheet.ios.tsx, apps/mobile/src/session/CompanionSheet.tsx, apps/mobile/src/session/CompanionTaskResultCard.tsx, apps/mobile/src/session/CompanionWorkingStatus.tsx, apps/mobile/src/session/ComposerAttachmentTray.tsx, apps/mobile/src/session/ComposerExpandButton.ios.tsx, apps/mobile/src/session/ComposerExpandButton.tsx, apps/mobile/src/session/ComposerFrame.ios.tsx, apps/mobile/src/session/ComposerFrame.tsx, apps/mobile/src/session/ComposerKeyboardAvoidingView.tsx, apps/mobile/src/session/ComposerNativeInput.ios.tsx, apps/mobile/src/session/ComposerNativeInput.tsx, apps/mobile/src/session/ComposerNativeRow.ios.tsx, apps/mobile/src/session/ComposerNativeRow.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerRichInput.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/ContextSheetGoalView.ios.tsx, apps/mobile/src/session/ContextSheetGoalView.tsx, apps/mobile/src/session/ContextSheetMediaViews.tsx, apps/mobile/src/session/ConversationSearchFilterSheet.tsx, apps/mobile/src/session/ConversationShareSvg.tsx, apps/mobile/src/session/ConversationShareWebView.tsx, apps/mobile/src/session/FailedScheduleNotice.tsx, apps/mobile/src/session/HomeChromeDrawer.tsx, apps/mobile/src/session/HomeChromeFrost.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeGlassMenuPanel.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/HomeListVisuals.tsx, apps/mobile/src/session/HomeModeSwitch.tsx, apps/mobile/src/session/HomeNewTaskButton.tsx, apps/mobile/src/session/HomeProjectMachineLabel.tsx, apps/mobile/src/session/HomeSearchBar.tsx, apps/mobile/src/session/HomeSurface.tsx, apps/mobile/src/session/ImageLightbox.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/InlineQueueSection.tsx, apps/mobile/src/session/InlineQuoteChip.tsx, apps/mobile/src/session/InlineReferenceChip.tsx, apps/mobile/src/session/InteractionPanel.tsx, apps/mobile/src/session/MarkdownBlockContent.tsx, apps/mobile/src/session/MessageActionSheet.tsx, apps/mobile/src/session/MessageRenderer.tsx, apps/mobile/src/session/MobileAgentSwitcher.tsx, apps/mobile/src/session/MobileBoundaryNotice.tsx, apps/mobile/src/session/MobileComposerInputRow.tsx, apps/mobile/src/session/MobileModelPickerList.ios.tsx, apps/mobile/src/session/MobileModelPickerList.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/MobilePermissionPickerList.ios.tsx, apps/mobile/src/session/MobilePermissionPickerList.tsx, apps/mobile/src/session/MobileProviderMark.tsx, apps/mobile/src/session/ModelOptionsSheetView.ios.tsx, apps/mobile/src/session/ModelOptionsSheetView.tsx, apps/mobile/src/session/ModelPickerNativeHeader.ios.tsx, apps/mobile/src/session/ModelPickerNativeHeader.tsx, apps/mobile/src/session/ModelPickerSheet.tsx, apps/mobile/src/session/NativePermissionSheet.ios.tsx, apps/mobile/src/session/NativePermissionSheet.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/PendingSendBubble.tsx, apps/mobile/src/session/PlanModeChip.tsx, apps/mobile/src/session/PluginInvocationHeader.tsx, apps/mobile/src/session/PromptRecommendation.tsx, apps/mobile/src/session/QuoteCapsule.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteTaskSuggestions.tsx, apps/mobile/src/session/RenameSessionModal.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/RewindPreviewPanel.tsx, apps/mobile/src/session/RunningTokenRatePopover.tsx, apps/mobile/src/session/SentInlineAtomBody.tsx, apps/mobile/src/session/SessionActionSheet.tsx, apps/mobile/src/session/SessionDetailsNative.ios.tsx, apps/mobile/src/session/SessionDetailsNative.tsx, apps/mobile/src/session/SessionHeaderNativeControls.ios.tsx, apps/mobile/src/session/SessionHeaderNativeControls.tsx, apps/mobile/src/session/SessionListDrawer.tsx, apps/mobile/src/session/SessionMenuSheet.tsx, apps/mobile/src/session/SessionOptionsExpoSheet.tsx, apps/mobile/src/session/SessionResourceCards.tsx, apps/mobile/src/session/SessionSearchNative.ios.tsx, apps/mobile/src/session/SessionSearchNative.tsx, apps/mobile/src/session/SessionTailBanner.tsx, apps/mobile/src/session/SessionUsageSummary.tsx, apps/mobile/src/session/ShareImageNativeButton.ios.tsx, apps/mobile/src/session/ShareImageNativeButton.tsx, apps/mobile/src/session/ShareMessageCheckbox.tsx, apps/mobile/src/session/ShareSelectAllButton.tsx, apps/mobile/src/session/ShareSelectionBar.tsx, apps/mobile/src/session/SharedTaskEndedState.tsx, apps/mobile/src/session/SharedTaskScreen.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/SlowSendNotice.tsx, apps/mobile/src/session/StreamingStatusText.tsx, apps/mobile/src/session/SwipeableSessionRow.ios.tsx, apps/mobile/src/session/SwipeableSessionRow.tsx, apps/mobile/src/session/TaskTags.tsx, apps/mobile/src/session/TaskTagsSheet.tsx, apps/mobile/src/session/TeammateGenerationLabel.tsx, apps/mobile/src/session/TeammateList.tsx, apps/mobile/src/session/TeammatePicker.tsx, apps/mobile/src/session/UnifiedModelPickerSheet.tsx, apps/mobile/src/session/UnifiedModelPickerView.ios.tsx, apps/mobile/src/session/UnifiedModelPickerView.tsx, apps/mobile/src/session/VoiceRecordingPill.tsx, apps/mobile/src/session/WorkingStatusText.tsx, apps/mobile/src/session/composerRichInputHtml.ts, apps/mobile/src/session/conversationShareWebViewHtml.ts, apps/mobile/src/session/mathWebView.tsx, apps/mobile/src/session/mathWebViewHtml.ts, apps/mobile/src/session/mediaPlayerWebView.tsx, apps/mobile/src/session/mediaPlayerWebViewHtml.ts, apps/mobile/src/session/mermaidWebView.tsx, apps/mobile/src/session/mermaidWebViewHtml.ts, apps/mobile/src/session/selectableMarkdownHtml.ts, apps/mobile/src/session/useSharedTaskConfirmation.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 7 | 239 | 309 |-| `mobile.chat.sharing` | mobile | 共享任务邀请与成员 | app/shared-session.tsx | AdaptiveWindow, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskEndedState, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, _layout, gestureHandler, peerFileTransport, shared-session, useLocale, useSharedTaskConfirmation | apps/mobile/app/_layout.tsx, apps/mobile/app/shared-session.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SharedTaskEndedState.tsx, apps/mobile/src/session/SharedTaskScreen.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/useSharedTaskConfirmation.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 61 |-| `mobile.companions.direct` | mobile | 伙伴私聊回看 | app/companions/direct/[threadId].tsx | AdaptiveWindow, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, [threadId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/companions/direct/[threadId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 56 |-| `mobile.device-management` | mobile | 设备管理 | app/devices/manage.tsx / app/devices/manage/[deviceId].tsx | AdaptiveWindow, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceInformationFields, DeviceInformationFields.ios, DeviceLinkContext, DeviceManagementDialogs, DeviceManagementList, DeviceManagementList.ios, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, ModalContentArea, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RenameDeviceModal, ResidentHomeList, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, [deviceId], _layout, gestureHandler, manage, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/devices/manage.tsx, apps/mobile/app/devices/manage/[deviceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceInformationFields.ios.tsx, apps/mobile/src/device-link/DeviceInformationFields.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/DeviceManagementDialogs.tsx, apps/mobile/src/device-link/DeviceManagementList.ios.tsx, apps/mobile/src/device-link/DeviceManagementList.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RenameDeviceModal.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 56 |-| `mobile.devices` | mobile | 主机详情 | app/devices/[deviceId].tsx | AccountSwitcherSheet, AdaptiveWindow, AndroidUpdateSheet, AppText, AuthContext, AutomationTimerIcon, BlurBackdrop, CenteredScreen, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ConversationSearchFilterSheet, DeviceLinkContext, FoldTouchpad, HomeChromeDrawer, HomeChromeFrost, HomeEntryProvider, HomeGlassMenuPanel, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeListVisuals, HomeModeSwitch, HomeNativeStackHeader, HomeNewTaskButton, HomeProjectMachineLabel, HomeSearchBar, HomeSurface, IncomingShareBridge, LoginNativeButton, LoginNativeButton.ios, MobileAgentMark, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, MobileVendorIcon, ModalContentArea, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteAccessGuide, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteTaskSuggestions, RenameSessionModal, ResidentHomeList, SessionActionSheet, SessionDetailsNative, SessionDetailsNative.ios, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, SessionOptionsExpoSheet, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, SwipeableSessionRow, SwipeableSessionRow.ios, TaskTags, ThemeProvider, [deviceId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/devices/[deviceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/LoginNativeButton.ios.tsx, apps/mobile/src/components/LoginNativeButton.tsx, apps/mobile/src/components/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteAccessGuide.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/AutomationTimerIcon.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeRow.ios.tsx, apps/mobile/src/session/ComposerNativeRow.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/ConversationSearchFilterSheet.tsx, apps/mobile/src/session/HomeChromeDrawer.tsx, apps/mobile/src/session/HomeChromeFrost.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeGlassMenuPanel.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/HomeListVisuals.tsx, apps/mobile/src/session/HomeModeSwitch.tsx, apps/mobile/src/session/HomeNewTaskButton.tsx, apps/mobile/src/session/HomeProjectMachineLabel.tsx, apps/mobile/src/session/HomeSearchBar.tsx, apps/mobile/src/session/HomeSurface.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteTaskSuggestions.tsx, apps/mobile/src/session/RenameSessionModal.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SessionActionSheet.tsx, apps/mobile/src/session/SessionDetailsNative.ios.tsx, apps/mobile/src/session/SessionDetailsNative.tsx, apps/mobile/src/session/SessionHeaderNativeControls.ios.tsx, apps/mobile/src/session/SessionHeaderNativeControls.tsx, apps/mobile/src/session/SessionOptionsExpoSheet.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/SwipeableSessionRow.ios.tsx, apps/mobile/src/session/SwipeableSessionRow.tsx, apps/mobile/src/session/TaskTags.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 113 |-| `mobile.files` | mobile | 任务文件与预览 | app/files/[sessionId].tsx / app/files/preview/[sessionId].tsx | AdaptiveWindow, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FileTypeIcon, FileTypeTile, FoldTouchpad, HomeEntryProvider, HtmlBrowserChrome, HtmlBrowserChrome.ios, HtmlFileReader, HtmlWebsiteBrowser, ImageLightbox, IncomingShareBridge, MarkdownFileReader, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, ModalContentArea, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, StartupSplashOverlay, SystemNavigationBack, ThemeProvider, [sessionId], _layout, gestureHandler, mediaPlayerWebView, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/files/[sessionId].tsx, apps/mobile/app/files/preview/[sessionId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/FileTypeIcon.tsx, apps/mobile/src/components/FileTypeTile.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SystemNavigationBack.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HtmlBrowserChrome.ios.tsx, apps/mobile/src/session/HtmlBrowserChrome.tsx, apps/mobile/src/session/HtmlFileReader.tsx, apps/mobile/src/session/HtmlWebsiteBrowser.tsx, apps/mobile/src/session/ImageLightbox.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MarkdownFileReader.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/mathWebViewHtml.ts, apps/mobile/src/session/mediaPlayerWebView.tsx, apps/mobile/src/session/mediaPlayerWebViewHtml.ts, apps/mobile/src/session/selectableMarkdownHtml.ts, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 238 | 79 |-| `mobile.home` | mobile | 主机与资源首页 | app/index.tsx / app/devices/index.tsx | AccountSwitcherSheet, AdaptiveWindow, AndroidUpdateSheet, AppText, AuthContext, AutomationTimerIcon, BlurBackdrop, CenteredScreen, CompanionCreateNativeView, CompanionCreateNativeView.ios, CompanionMemoryPage, CompanionMemoryPage.ios, CompanionModelChain, CompanionNativeContent.ios, CompanionPortraitPicker, CompanionProfileArtifacts, CompanionProfileNativeView, CompanionProfileNativeView.ios, CompanionProfileSheet, CompanionSettingsRow, CompanionSettingsRow.ios, CompanionSheet, CompanionSheet.ios, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ConversationSearchFilterSheet, DeviceLinkContext, FoldTouchpad, HomeChromeDrawer, HomeChromeFrost, HomeEntryProvider, HomeGlassMenuPanel, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeListVisuals, HomeModePanes, HomeModeSwitch, HomeNativeStackHeader, HomeNewTaskButton, HomeProjectMachineLabel, HomeSearchBar, HomeSurface, IncomingShareBridge, LoginNativeButton, LoginNativeButton.ios, MobileAgentMark, MobileAgentSwitcher, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileModelPickerList, MobileModelPickerList.ios, MobileOutboxBridge, MobilePermissionPickerList, MobilePermissionPickerList.ios, MobilePrimitives, MobileProviderMark, MobileVendorIcon, ModalContentArea, ModelOptionsSheetView, ModelOptionsSheetView.ios, ModelPickerNativeHeader, ModelPickerNativeHeader.ios, ModelPickerSheet, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteAccessGuide, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteTaskSuggestions, RenameSessionModal, ResidentHomeList, SessionActionSheet, SessionDetailsNative, SessionDetailsNative.ios, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, SessionOptionsExpoSheet, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, SwipeableSessionRow, SwipeableSessionRow.ios, TaskTags, TeammateCreateButton, TeammateGenerationLabel, TeammateHomeScreen, TeammateList, ThemeProvider, UnifiedModelPickerSheet, UnifiedModelPickerView, UnifiedModelPickerView.ios, WorkingStatusText, _layout, gestureHandler, index, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/devices/index.tsx, apps/mobile/app/index.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/LoginNativeButton.ios.tsx, apps/mobile/src/components/LoginNativeButton.tsx, apps/mobile/src/components/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteAccessGuide.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/AutomationTimerIcon.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/CompanionCreateNativeView.ios.tsx, apps/mobile/src/session/CompanionCreateNativeView.tsx, apps/mobile/src/session/CompanionMemoryPage.ios.tsx, apps/mobile/src/session/CompanionMemoryPage.tsx, apps/mobile/src/session/CompanionModelChain.tsx, apps/mobile/src/session/CompanionNativeContent.ios.tsx, apps/mobile/src/session/CompanionPortraitPicker.tsx, apps/mobile/src/session/CompanionProfileArtifacts.tsx, apps/mobile/src/session/CompanionProfileNativeView.ios.tsx, apps/mobile/src/session/CompanionProfileNativeView.tsx, apps/mobile/src/session/CompanionProfileSheet.tsx, apps/mobile/src/session/CompanionSettingsRow.ios.tsx, apps/mobile/src/session/CompanionSettingsRow.tsx, apps/mobile/src/session/CompanionSheet.ios.tsx, apps/mobile/src/session/CompanionSheet.tsx, apps/mobile/src/session/ComposerNativeRow.ios.tsx, apps/mobile/src/session/ComposerNativeRow.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/ConversationSearchFilterSheet.tsx, apps/mobile/src/session/HomeChromeDrawer.tsx, apps/mobile/src/session/HomeChromeFrost.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeGlassMenuPanel.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/HomeListVisuals.tsx, apps/mobile/src/session/HomeModePanes.tsx, apps/mobile/src/session/HomeModeSwitch.tsx, apps/mobile/src/session/HomeNewTaskButton.tsx, apps/mobile/src/session/HomeProjectMachineLabel.tsx, apps/mobile/src/session/HomeSearchBar.tsx, apps/mobile/src/session/HomeSurface.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileAgentSwitcher.tsx, apps/mobile/src/session/MobileModelPickerList.ios.tsx, apps/mobile/src/session/MobileModelPickerList.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/MobilePermissionPickerList.ios.tsx, apps/mobile/src/session/MobilePermissionPickerList.tsx, apps/mobile/src/session/MobileProviderMark.tsx, apps/mobile/src/session/ModelOptionsSheetView.ios.tsx, apps/mobile/src/session/ModelOptionsSheetView.tsx, apps/mobile/src/session/ModelPickerNativeHeader.ios.tsx, apps/mobile/src/session/ModelPickerNativeHeader.tsx, apps/mobile/src/session/ModelPickerSheet.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteTaskSuggestions.tsx, apps/mobile/src/session/RenameSessionModal.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SessionActionSheet.tsx, apps/mobile/src/session/SessionDetailsNative.ios.tsx, apps/mobile/src/session/SessionDetailsNative.tsx, apps/mobile/src/session/SessionHeaderNativeControls.ios.tsx, apps/mobile/src/session/SessionHeaderNativeControls.tsx, apps/mobile/src/session/SessionOptionsExpoSheet.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/SwipeableSessionRow.ios.tsx, apps/mobile/src/session/SwipeableSessionRow.tsx, apps/mobile/src/session/TaskTags.tsx, apps/mobile/src/session/TeammateCreateButton.tsx, apps/mobile/src/session/TeammateGenerationLabel.tsx, apps/mobile/src/session/TeammateHomeScreen.tsx, apps/mobile/src/session/TeammateList.tsx, apps/mobile/src/session/UnifiedModelPickerSheet.tsx, apps/mobile/src/session/UnifiedModelPickerView.ios.tsx, apps/mobile/src/session/UnifiedModelPickerView.tsx, apps/mobile/src/session/WorkingStatusText.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 139 |-| `mobile.overlay.connection-startup` | mobile | 根布局挂载的启动与连接反馈 | app/_layout.tsx → StartupSplashOverlay / ConnectionNoticeProvider;各页面 ConnectionBanner | AdaptiveWindow, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ConnectionNoticeProvider, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, StartupSplashOverlay, ThemeProvider, _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 50 |-| `mobile.remote-desktop` | mobile | 远程桌面 | app/devices/desktop/[deviceId].tsx | AdaptiveWindow, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, StartupSplashOverlay, ThemeProvider, [deviceId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/devices/desktop/[deviceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 50 |-| `mobile.resources` | mobile | 远程资源列表与详情 | app/resources/[collectionId].tsx / app/resources/[collectionId]/[resourceId].tsx | AdaptiveWindow, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, TeammateGenerationLabel, TeammateList, ThemeProvider, WorkingStatusText, [collectionId], [resourceId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/resources/[collectionId].tsx, apps/mobile/app/resources/[collectionId]/[resourceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/TeammateGenerationLabel.tsx, apps/mobile/src/session/TeammateList.tsx, apps/mobile/src/session/WorkingStatusText.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 63 |-| `mobile.settings` | mobile | 设置(含调试与日志上传可见入口) | app/settings.tsx | AdaptiveWindow, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileChoicePickerList, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, _layout, gestureHandler, peerFileTransport, settings, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/settings.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileChoicePickerList.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 59 |+| `mobile.account-deletion` | mobile | 账号注销 | app/account-deletion.tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, _layout, account-deletion, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/account-deletion.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 60 |+| `mobile.auth` | mobile | 登录与添加账号 | app/(auth)/login.tsx / app/add-account.tsx | AccountSwitcherSheet, AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, IncomingShareBridge, LoginCaptchaWebView, LoginNativeButton, LoginNativeButton.ios, LoginSkinControls, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, StartupSplashOverlay, SystemNavigationBack, ThemeProvider, _layout, add-account, gestureHandler, login, peerFileTransport, useLocale | apps/mobile/app/(auth)/login.tsx, apps/mobile/app/_layout.tsx, apps/mobile/app/add-account.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/LoginCaptchaWebView.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/LoginNativeButton.ios.tsx, apps/mobile/src/components/LoginNativeButton.tsx, apps/mobile/src/components/LoginSkinControls.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SystemNavigationBack.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 213 | 82 |+| `mobile.automations` | mobile | 自动化 | app/automations/[deviceId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, [deviceId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/automations/[deviceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 76 |+| `mobile.chat.new` | mobile | 新建任务 | app/sessions/new.tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AnnotationBurnInWebView, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerAttachmentTray, ComposerFrame, ComposerFrame.ios, ComposerKeyboardAvoidingView, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ContextSheetGoalView, ContextSheetGoalView.ios, ContextSheetMediaViews, DeviceLinkContext, FileTypeIcon, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, ImageLightbox, IncomingShareBridge, MobileAgentMark, MobileAgentSwitcher, MobileChoicePickerList, MobileComposerInputRow, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileModelPickerList, MobileModelPickerList.ios, MobileOutboxBridge, MobilePermissionPickerList, MobilePermissionPickerList.ios, MobilePrimitives, MobileProviderMark, MobileVendorIcon, ModelOptionsSheetView, ModelOptionsSheetView.ios, ModelPickerNativeHeader, ModelPickerNativeHeader.ios, ModelPickerSheet, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePermissionSheet, NativePermissionSheet.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, NewTaskSelectionSheet, NewTaskSelectionSheet.ios, OutsideTap, PaperPlaneIcon, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PlanModeChip, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, SimpleStackHeader, SlowSendNotice, StartupSplashOverlay, ThemeProvider, UnifiedModelPickerSheet, UnifiedModelPickerView, UnifiedModelPickerView.ios, VoiceRecordingPill, _layout, gestureHandler, new, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/sessions/new.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/FileTypeIcon.tsx, apps/mobile/src/components/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/PaperPlaneIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AnnotationBurnInWebView.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerAttachmentTray.tsx, apps/mobile/src/session/ComposerFrame.ios.tsx, apps/mobile/src/session/ComposerFrame.tsx, apps/mobile/src/session/ComposerKeyboardAvoidingView.tsx, apps/mobile/src/session/ComposerNativeRow.ios.tsx, apps/mobile/src/session/ComposerNativeRow.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/ContextSheetGoalView.ios.tsx, apps/mobile/src/session/ContextSheetGoalView.tsx, apps/mobile/src/session/ContextSheetMediaViews.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/ImageLightbox.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileAgentSwitcher.tsx, apps/mobile/src/session/MobileChoicePickerList.tsx, apps/mobile/src/session/MobileComposerInputRow.tsx, apps/mobile/src/session/MobileModelPickerList.ios.tsx, apps/mobile/src/session/MobileModelPickerList.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/MobilePermissionPickerList.ios.tsx, apps/mobile/src/session/MobilePermissionPickerList.tsx, apps/mobile/src/session/MobileProviderMark.tsx, apps/mobile/src/session/ModelOptionsSheetView.ios.tsx, apps/mobile/src/session/ModelOptionsSheetView.tsx, apps/mobile/src/session/ModelPickerNativeHeader.ios.tsx, apps/mobile/src/session/ModelPickerNativeHeader.tsx, apps/mobile/src/session/ModelPickerSheet.tsx, apps/mobile/src/session/NativePermissionSheet.ios.tsx, apps/mobile/src/session/NativePermissionSheet.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/NewTaskSelectionSheet.ios.tsx, apps/mobile/src/session/NewTaskSelectionSheet.tsx, apps/mobile/src/session/PlanModeChip.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/SlowSendNotice.tsx, apps/mobile/src/session/UnifiedModelPickerSheet.tsx, apps/mobile/src/session/UnifiedModelPickerView.ios.tsx, apps/mobile/src/session/UnifiedModelPickerView.tsx, apps/mobile/src/session/VoiceRecordingPill.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 238 | 106 |+| `mobile.chat.session` | mobile | 任务内容与输入 | app/sessions/[sessionId].tsx | AccountSwitcherSheet, AdaptiveWindow, AgentErrorDetails, AnchoredPullDownMenu, AndroidUpdateSheet, AnnotationBurnInWebView, AppText, AuthContext, AuthorizationMessageCard, AutomationTimerIcon, BlurBackdrop, CenteredScreen, ChatFileChipMenuSheet, CompanionAutomationNativeView, CompanionAutomationNativeView.ios, CompanionAutomationSheet, CompanionChoice, CompanionCreateNativeView, CompanionCreateNativeView.ios, CompanionHeader, CompanionMemoryPage, CompanionMemoryPage.ios, CompanionMessageActions, CompanionMessageCard, CompanionModelChain, CompanionNativeContent.ios, CompanionNavigationDrawer, CompanionPortraitPicker, CompanionProfileArtifacts, CompanionProfileNativeView, CompanionProfileNativeView.ios, CompanionProfileSheet, CompanionSettingsRow, CompanionSettingsRow.ios, CompanionSheet, CompanionSheet.ios, CompanionTaskResultCard, CompanionWorkingStatus, ComposerAttachmentTray, ComposerExpandButton, ComposerExpandButton.ios, ComposerFrame, ComposerFrame.ios, ComposerKeyboardAvoidingView, ComposerNativeInput, ComposerNativeInput.ios, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerRichInput, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ContextSheetGoalView, ContextSheetGoalView.ios, ContextSheetMediaViews, ConversationSearchFilterSheet, ConversationShareSvg, ConversationShareWebView, DeviceLinkContext, FailedScheduleNotice, FileTypeIcon, FoldTouchpad, HomeChromeDrawer, HomeChromeFrost, HomeEntryProvider, HomeGlassMenuPanel, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeListVisuals, HomeModeSwitch, HomeNativeStackHeader, HomeNewTaskButton, HomeProjectMachineLabel, HomeSearchBar, HomeSurface, ImageLightbox, IncomingShareBridge, InlineQueueSection, InlineQuoteChip, InlineReferenceChip, InteractionPanel, LoginNativeButton, LoginNativeButton.ios, MarkdownBlockContent, MessageActionSheet, MessageRenderer, MobileAgentMark, MobileAgentSwitcher, MobileBoundaryNotice, MobileComposerInputRow, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileModelPickerList, MobileModelPickerList.ios, MobileOutboxBridge, MobilePermissionPickerList, MobilePermissionPickerList.ios, MobilePrimitives, MobileProviderMark, MobileVendorIcon, ModalContentArea, ModelOptionsSheetView, ModelOptionsSheetView.ios, ModelPickerNativeHeader, ModelPickerNativeHeader.ios, ModelPickerSheet, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePermissionSheet, NativePermissionSheet.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PaperPlaneIcon, PendingSendBubble, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PlanModeChip, PluginInvocationHeader, PromptRecommendation, PushNotificationsBridge, QuietSyncIndicator, QuoteCapsule, RecentMessageHistories, RemoteAccessGuide, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteTaskSuggestions, RenameSessionModal, ResidentHomeList, RewindPreviewPanel, RunningTokenRatePopover, SentInlineAtomBody, SessionActionSheet, SessionDetailsNative, SessionDetailsNative.ios, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, SessionListDrawer, SessionMenuSheet, SessionOptionsExpoSheet, SessionResourceCards, SessionSearchNative, SessionSearchNative.ios, SessionTailBanner, SessionUsageSummary, ShareImageNativeButton, ShareImageNativeButton.ios, ShareMessageCheckbox, ShareSelectAllButton, ShareSelectionBar, SharedTaskEndedState, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, SlowSendNotice, StartupSplashOverlay, StreamingStatusText, SwipeableSessionRow, SwipeableSessionRow.ios, SystemNavigationBack, TaskTags, TaskTagsSheet, TeammateGenerationLabel, TeammateList, TeammatePicker, ThemeProvider, UnifiedModelPickerSheet, UnifiedModelPickerView, UnifiedModelPickerView.ios, VoiceRecordingPill, WorkingStatusText, [sessionId], _layout, gestureHandler, mathWebView, mediaPlayerWebView, mermaidWebView, peerFileTransport, useLocale, useSharedTaskConfirmation | apps/mobile/app/_layout.tsx, apps/mobile/app/sessions/[sessionId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/FileTypeIcon.tsx, apps/mobile/src/components/LoginNativeButton.ios.tsx, apps/mobile/src/components/LoginNativeButton.tsx, apps/mobile/src/components/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/PaperPlaneIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteAccessGuide.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/chrome/SystemNavigationBack.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/AgentErrorDetails.tsx, apps/mobile/src/session/AnnotationBurnInWebView.tsx, apps/mobile/src/session/AuthorizationMessageCard.tsx, apps/mobile/src/session/AutomationTimerIcon.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ChatFileChipMenuSheet.tsx, apps/mobile/src/session/CompanionAutomationNativeView.ios.tsx, apps/mobile/src/session/CompanionAutomationNativeView.tsx, apps/mobile/src/session/CompanionAutomationSheet.tsx, apps/mobile/src/session/CompanionChoice.tsx, apps/mobile/src/session/CompanionCreateNativeView.ios.tsx, apps/mobile/src/session/CompanionCreateNativeView.tsx, apps/mobile/src/session/CompanionHeader.tsx, apps/mobile/src/session/CompanionMemoryPage.ios.tsx, apps/mobile/src/session/CompanionMemoryPage.tsx, apps/mobile/src/session/CompanionMessageActions.tsx, apps/mobile/src/session/CompanionMessageCard.tsx, apps/mobile/src/session/CompanionModelChain.tsx, apps/mobile/src/session/CompanionNativeContent.ios.tsx, apps/mobile/src/session/CompanionNavigationDrawer.tsx, apps/mobile/src/session/CompanionPortraitPicker.tsx, apps/mobile/src/session/CompanionProfileArtifacts.tsx, apps/mobile/src/session/CompanionProfileNativeView.ios.tsx, apps/mobile/src/session/CompanionProfileNativeView.tsx, apps/mobile/src/session/CompanionProfileSheet.tsx, apps/mobile/src/session/CompanionSettingsRow.ios.tsx, apps/mobile/src/session/CompanionSettingsRow.tsx, apps/mobile/src/session/CompanionSheet.ios.tsx, apps/mobile/src/session/CompanionSheet.tsx, apps/mobile/src/session/CompanionTaskResultCard.tsx, apps/mobile/src/session/CompanionWorkingStatus.tsx, apps/mobile/src/session/ComposerAttachmentTray.tsx, apps/mobile/src/session/ComposerExpandButton.ios.tsx, apps/mobile/src/session/ComposerExpandButton.tsx, apps/mobile/src/session/ComposerFrame.ios.tsx, apps/mobile/src/session/ComposerFrame.tsx, apps/mobile/src/session/ComposerKeyboardAvoidingView.tsx, apps/mobile/src/session/ComposerNativeInput.ios.tsx, apps/mobile/src/session/ComposerNativeInput.tsx, apps/mobile/src/session/ComposerNativeRow.ios.tsx, apps/mobile/src/session/ComposerNativeRow.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerRichInput.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/ContextSheetGoalView.ios.tsx, apps/mobile/src/session/ContextSheetGoalView.tsx, apps/mobile/src/session/ContextSheetMediaViews.tsx, apps/mobile/src/session/ConversationSearchFilterSheet.tsx, apps/mobile/src/session/ConversationShareSvg.tsx, apps/mobile/src/session/ConversationShareWebView.tsx, apps/mobile/src/session/FailedScheduleNotice.tsx, apps/mobile/src/session/HomeChromeDrawer.tsx, apps/mobile/src/session/HomeChromeFrost.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeGlassMenuPanel.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/HomeListVisuals.tsx, apps/mobile/src/session/HomeModeSwitch.tsx, apps/mobile/src/session/HomeNewTaskButton.tsx, apps/mobile/src/session/HomeProjectMachineLabel.tsx, apps/mobile/src/session/HomeSearchBar.tsx, apps/mobile/src/session/HomeSurface.tsx, apps/mobile/src/session/ImageLightbox.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/InlineQueueSection.tsx, apps/mobile/src/session/InlineQuoteChip.tsx, apps/mobile/src/session/InlineReferenceChip.tsx, apps/mobile/src/session/InteractionPanel.tsx, apps/mobile/src/session/MarkdownBlockContent.tsx, apps/mobile/src/session/MessageActionSheet.tsx, apps/mobile/src/session/MessageRenderer.tsx, apps/mobile/src/session/MobileAgentSwitcher.tsx, apps/mobile/src/session/MobileBoundaryNotice.tsx, apps/mobile/src/session/MobileComposerInputRow.tsx, apps/mobile/src/session/MobileModelPickerList.ios.tsx, apps/mobile/src/session/MobileModelPickerList.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/MobilePermissionPickerList.ios.tsx, apps/mobile/src/session/MobilePermissionPickerList.tsx, apps/mobile/src/session/MobileProviderMark.tsx, apps/mobile/src/session/ModelOptionsSheetView.ios.tsx, apps/mobile/src/session/ModelOptionsSheetView.tsx, apps/mobile/src/session/ModelPickerNativeHeader.ios.tsx, apps/mobile/src/session/ModelPickerNativeHeader.tsx, apps/mobile/src/session/ModelPickerSheet.tsx, apps/mobile/src/session/NativePermissionSheet.ios.tsx, apps/mobile/src/session/NativePermissionSheet.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/PendingSendBubble.tsx, apps/mobile/src/session/PlanModeChip.tsx, apps/mobile/src/session/PluginInvocationHeader.tsx, apps/mobile/src/session/PromptRecommendation.tsx, apps/mobile/src/session/QuoteCapsule.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteTaskSuggestions.tsx, apps/mobile/src/session/RenameSessionModal.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/RewindPreviewPanel.tsx, apps/mobile/src/session/RunningTokenRatePopover.tsx, apps/mobile/src/session/SentInlineAtomBody.tsx, apps/mobile/src/session/SessionActionSheet.tsx, apps/mobile/src/session/SessionDetailsNative.ios.tsx, apps/mobile/src/session/SessionDetailsNative.tsx, apps/mobile/src/session/SessionHeaderNativeControls.ios.tsx, apps/mobile/src/session/SessionHeaderNativeControls.tsx, apps/mobile/src/session/SessionListDrawer.tsx, apps/mobile/src/session/SessionMenuSheet.tsx, apps/mobile/src/session/SessionOptionsExpoSheet.tsx, apps/mobile/src/session/SessionResourceCards.tsx, apps/mobile/src/session/SessionSearchNative.ios.tsx, apps/mobile/src/session/SessionSearchNative.tsx, apps/mobile/src/session/SessionTailBanner.tsx, apps/mobile/src/session/SessionUsageSummary.tsx, apps/mobile/src/session/ShareImageNativeButton.ios.tsx, apps/mobile/src/session/ShareImageNativeButton.tsx, apps/mobile/src/session/ShareMessageCheckbox.tsx, apps/mobile/src/session/ShareSelectAllButton.tsx, apps/mobile/src/session/ShareSelectionBar.tsx, apps/mobile/src/session/SharedTaskEndedState.tsx, apps/mobile/src/session/SharedTaskScreen.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/SlowSendNotice.tsx, apps/mobile/src/session/StreamingStatusText.tsx, apps/mobile/src/session/SwipeableSessionRow.ios.tsx, apps/mobile/src/session/SwipeableSessionRow.tsx, apps/mobile/src/session/TaskTags.tsx, apps/mobile/src/session/TaskTagsSheet.tsx, apps/mobile/src/session/TeammateGenerationLabel.tsx, apps/mobile/src/session/TeammateList.tsx, apps/mobile/src/session/TeammatePicker.tsx, apps/mobile/src/session/UnifiedModelPickerSheet.tsx, apps/mobile/src/session/UnifiedModelPickerView.ios.tsx, apps/mobile/src/session/UnifiedModelPickerView.tsx, apps/mobile/src/session/VoiceRecordingPill.tsx, apps/mobile/src/session/WorkingStatusText.tsx, apps/mobile/src/session/composerRichInputHtml.ts, apps/mobile/src/session/conversationShareWebViewHtml.ts, apps/mobile/src/session/mathWebView.tsx, apps/mobile/src/session/mathWebViewHtml.ts, apps/mobile/src/session/mediaPlayerWebView.tsx, apps/mobile/src/session/mediaPlayerWebViewHtml.ts, apps/mobile/src/session/mermaidWebView.tsx, apps/mobile/src/session/mermaidWebViewHtml.ts, apps/mobile/src/session/selectableMarkdownHtml.ts, apps/mobile/src/session/useSharedTaskConfirmation.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 7 | 239 | 303 |+| `mobile.chat.sharing` | mobile | 共享任务邀请与成员 | app/shared-session.tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskEndedState, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, _layout, gestureHandler, peerFileTransport, shared-session, useLocale, useSharedTaskConfirmation | apps/mobile/app/_layout.tsx, apps/mobile/app/shared-session.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SharedTaskEndedState.tsx, apps/mobile/src/session/SharedTaskScreen.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/useSharedTaskConfirmation.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 63 |+| `mobile.companions.direct` | mobile | 伙伴私聊回看 | app/companions/direct/[threadId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, [threadId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/companions/direct/[threadId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 58 |+| `mobile.device-management` | mobile | 设备管理 | app/devices/manage.tsx / app/devices/manage/[deviceId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceInformationFields, DeviceInformationFields.ios, DeviceLinkContext, DeviceManagementDialogs, DeviceManagementList, DeviceManagementList.ios, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, ModalContentArea, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RenameDeviceModal, ResidentHomeList, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, [deviceId], _layout, gestureHandler, manage, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/devices/manage.tsx, apps/mobile/app/devices/manage/[deviceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceInformationFields.ios.tsx, apps/mobile/src/device-link/DeviceInformationFields.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/DeviceManagementDialogs.tsx, apps/mobile/src/device-link/DeviceManagementList.ios.tsx, apps/mobile/src/device-link/DeviceManagementList.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RenameDeviceModal.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 58 |+| `mobile.devices` | mobile | 主机详情 | app/devices/[deviceId].tsx | AccountSwitcherSheet, AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, AutomationTimerIcon, BlurBackdrop, CenteredScreen, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ConversationSearchFilterSheet, DeviceLinkContext, FoldTouchpad, HomeChromeDrawer, HomeChromeFrost, HomeEntryProvider, HomeGlassMenuPanel, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeListVisuals, HomeModeSwitch, HomeNativeStackHeader, HomeNewTaskButton, HomeProjectMachineLabel, HomeSearchBar, HomeSurface, IncomingShareBridge, LoginNativeButton, LoginNativeButton.ios, MobileAgentMark, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, MobileVendorIcon, ModalContentArea, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteAccessGuide, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteTaskSuggestions, RenameSessionModal, ResidentHomeList, SessionActionSheet, SessionDetailsNative, SessionDetailsNative.ios, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, SessionOptionsExpoSheet, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, SwipeableSessionRow, SwipeableSessionRow.ios, TaskTags, ThemeProvider, [deviceId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/devices/[deviceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/LoginNativeButton.ios.tsx, apps/mobile/src/components/LoginNativeButton.tsx, apps/mobile/src/components/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteAccessGuide.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/AutomationTimerIcon.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeRow.ios.tsx, apps/mobile/src/session/ComposerNativeRow.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/ConversationSearchFilterSheet.tsx, apps/mobile/src/session/HomeChromeDrawer.tsx, apps/mobile/src/session/HomeChromeFrost.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeGlassMenuPanel.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/HomeListVisuals.tsx, apps/mobile/src/session/HomeModeSwitch.tsx, apps/mobile/src/session/HomeNewTaskButton.tsx, apps/mobile/src/session/HomeProjectMachineLabel.tsx, apps/mobile/src/session/HomeSearchBar.tsx, apps/mobile/src/session/HomeSurface.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteTaskSuggestions.tsx, apps/mobile/src/session/RenameSessionModal.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SessionActionSheet.tsx, apps/mobile/src/session/SessionDetailsNative.ios.tsx, apps/mobile/src/session/SessionDetailsNative.tsx, apps/mobile/src/session/SessionHeaderNativeControls.ios.tsx, apps/mobile/src/session/SessionHeaderNativeControls.tsx, apps/mobile/src/session/SessionOptionsExpoSheet.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/SwipeableSessionRow.ios.tsx, apps/mobile/src/session/SwipeableSessionRow.tsx, apps/mobile/src/session/TaskTags.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 114 |+| `mobile.files` | mobile | 任务文件与预览 | app/files/[sessionId].tsx / app/files/preview/[sessionId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FileTypeIcon, FileTypeTile, FoldTouchpad, HomeEntryProvider, HtmlBrowserChrome, HtmlBrowserChrome.ios, HtmlFileReader, HtmlWebsiteBrowser, ImageLightbox, IncomingShareBridge, MarkdownFileReader, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, ModalContentArea, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, StartupSplashOverlay, SystemNavigationBack, ThemeProvider, [sessionId], _layout, gestureHandler, mediaPlayerWebView, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/files/[sessionId].tsx, apps/mobile/app/files/preview/[sessionId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/FileTypeIcon.tsx, apps/mobile/src/components/FileTypeTile.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SystemNavigationBack.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HtmlBrowserChrome.ios.tsx, apps/mobile/src/session/HtmlBrowserChrome.tsx, apps/mobile/src/session/HtmlFileReader.tsx, apps/mobile/src/session/HtmlWebsiteBrowser.tsx, apps/mobile/src/session/ImageLightbox.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MarkdownFileReader.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/mathWebViewHtml.ts, apps/mobile/src/session/mediaPlayerWebView.tsx, apps/mobile/src/session/mediaPlayerWebViewHtml.ts, apps/mobile/src/session/selectableMarkdownHtml.ts, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 238 | 81 |+| `mobile.home` | mobile | 主机与资源首页 | app/index.tsx / app/devices/index.tsx | AccountSwitcherSheet, AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, AutomationTimerIcon, BlurBackdrop, CenteredScreen, CompanionChoice, CompanionCreateNativeView, CompanionCreateNativeView.ios, CompanionMemoryPage, CompanionMemoryPage.ios, CompanionModelChain, CompanionNativeContent.ios, CompanionPortraitPicker, CompanionProfileArtifacts, CompanionProfileNativeView, CompanionProfileNativeView.ios, CompanionProfileSheet, CompanionSettingsRow, CompanionSettingsRow.ios, CompanionSheet, CompanionSheet.ios, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ConversationSearchFilterSheet, DeviceLinkContext, FoldTouchpad, HomeChromeDrawer, HomeChromeFrost, HomeEntryProvider, HomeGlassMenuPanel, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeListVisuals, HomeModePanes, HomeModeSwitch, HomeNativeStackHeader, HomeNewTaskButton, HomeProjectMachineLabel, HomeSearchBar, HomeSurface, IncomingShareBridge, LoginNativeButton, LoginNativeButton.ios, MobileAgentMark, MobileAgentSwitcher, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileModelPickerList, MobileModelPickerList.ios, MobileOutboxBridge, MobilePermissionPickerList, MobilePermissionPickerList.ios, MobilePrimitives, MobileProviderMark, MobileVendorIcon, ModalContentArea, ModelOptionsSheetView, ModelOptionsSheetView.ios, ModelPickerNativeHeader, ModelPickerNativeHeader.ios, ModelPickerSheet, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteAccessGuide, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteTaskSuggestions, RenameSessionModal, ResidentHomeList, SessionActionSheet, SessionDetailsNative, SessionDetailsNative.ios, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, SessionOptionsExpoSheet, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, SwipeableSessionRow, SwipeableSessionRow.ios, TaskTags, TeammateCreateButton, TeammateGenerationLabel, TeammateHomeScreen, TeammateList, ThemeProvider, UnifiedModelPickerSheet, UnifiedModelPickerView, UnifiedModelPickerView.ios, WorkingStatusText, _layout, gestureHandler, index, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/devices/index.tsx, apps/mobile/app/index.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/LoginNativeButton.ios.tsx, apps/mobile/src/components/LoginNativeButton.tsx, apps/mobile/src/components/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteAccessGuide.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/AutomationTimerIcon.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/CompanionChoice.tsx, apps/mobile/src/session/CompanionCreateNativeView.ios.tsx, apps/mobile/src/session/CompanionCreateNativeView.tsx, apps/mobile/src/session/CompanionMemoryPage.ios.tsx, apps/mobile/src/session/CompanionMemoryPage.tsx, apps/mobile/src/session/CompanionModelChain.tsx, apps/mobile/src/session/CompanionNativeContent.ios.tsx, apps/mobile/src/session/CompanionPortraitPicker.tsx, apps/mobile/src/session/CompanionProfileArtifacts.tsx, apps/mobile/src/session/CompanionProfileNativeView.ios.tsx, apps/mobile/src/session/CompanionProfileNativeView.tsx, apps/mobile/src/session/CompanionProfileSheet.tsx, apps/mobile/src/session/CompanionSettingsRow.ios.tsx, apps/mobile/src/session/CompanionSettingsRow.tsx, apps/mobile/src/session/CompanionSheet.ios.tsx, apps/mobile/src/session/CompanionSheet.tsx, apps/mobile/src/session/ComposerNativeRow.ios.tsx, apps/mobile/src/session/ComposerNativeRow.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/ConversationSearchFilterSheet.tsx, apps/mobile/src/session/HomeChromeDrawer.tsx, apps/mobile/src/session/HomeChromeFrost.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeGlassMenuPanel.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/HomeListVisuals.tsx, apps/mobile/src/session/HomeModePanes.tsx, apps/mobile/src/session/HomeModeSwitch.tsx, apps/mobile/src/session/HomeNewTaskButton.tsx, apps/mobile/src/session/HomeProjectMachineLabel.tsx, apps/mobile/src/session/HomeSearchBar.tsx, apps/mobile/src/session/HomeSurface.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileAgentSwitcher.tsx, apps/mobile/src/session/MobileModelPickerList.ios.tsx, apps/mobile/src/session/MobileModelPickerList.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/MobilePermissionPickerList.ios.tsx, apps/mobile/src/session/MobilePermissionPickerList.tsx, apps/mobile/src/session/MobileProviderMark.tsx, apps/mobile/src/session/ModelOptionsSheetView.ios.tsx, apps/mobile/src/session/ModelOptionsSheetView.tsx, apps/mobile/src/session/ModelPickerNativeHeader.ios.tsx, apps/mobile/src/session/ModelPickerNativeHeader.tsx, apps/mobile/src/session/ModelPickerSheet.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteTaskSuggestions.tsx, apps/mobile/src/session/RenameSessionModal.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SessionActionSheet.tsx, apps/mobile/src/session/SessionDetailsNative.ios.tsx, apps/mobile/src/session/SessionDetailsNative.tsx, apps/mobile/src/session/SessionHeaderNativeControls.ios.tsx, apps/mobile/src/session/SessionHeaderNativeControls.tsx, apps/mobile/src/session/SessionOptionsExpoSheet.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/SwipeableSessionRow.ios.tsx, apps/mobile/src/session/SwipeableSessionRow.tsx, apps/mobile/src/session/TaskTags.tsx, apps/mobile/src/session/TeammateCreateButton.tsx, apps/mobile/src/session/TeammateGenerationLabel.tsx, apps/mobile/src/session/TeammateHomeScreen.tsx, apps/mobile/src/session/TeammateList.tsx, apps/mobile/src/session/UnifiedModelPickerSheet.tsx, apps/mobile/src/session/UnifiedModelPickerView.ios.tsx, apps/mobile/src/session/UnifiedModelPickerView.tsx, apps/mobile/src/session/WorkingStatusText.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 136 |+| `mobile.overlay.connection-startup` | mobile | 根布局挂载的启动与连接反馈 | app/_layout.tsx → StartupSplashOverlay / ConnectionNoticeProvider;各页面 ConnectionBanner | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ConnectionNoticeProvider, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, StartupSplashOverlay, ThemeProvider, _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 52 |+| `mobile.remote-desktop` | mobile | 远程桌面 | app/devices/desktop/[deviceId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, StartupSplashOverlay, ThemeProvider, [deviceId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/devices/desktop/[deviceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 52 |+| `mobile.resources` | mobile | 远程资源列表与详情 | app/resources/[collectionId].tsx / app/resources/[collectionId]/[resourceId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, TeammateGenerationLabel, TeammateList, ThemeProvider, WorkingStatusText, [collectionId], [resourceId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/resources/[collectionId].tsx, apps/mobile/app/resources/[collectionId]/[resourceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/TeammateGenerationLabel.tsx, apps/mobile/src/session/TeammateList.tsx, apps/mobile/src/session/WorkingStatusText.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 65 |+| `mobile.settings` | mobile | 设置(含调试与日志上传可见入口) | app/settings.tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileChoicePickerList, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, _layout, gestureHandler, peerFileTransport, settings, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/settings.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MobileChoicePickerList.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 206 | 61 |### 生产路由覆盖