Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(mobile): 对齐伙伴生成状态、对话卡片与列表的桌面呈现 (#5068)

Chris Zhanga17dc8f177e9
diff --git a/apps/desktop/src/renderer/features/bots/botConversationTimeline.ts b/apps/desktop/src/renderer/features/bots/botConversationTimeline.ts
index 16ecf114e2..aebd2755ad 100644
--- a/apps/desktop/src/renderer/features/bots/botConversationTimeline.ts
+++ b/apps/desktop/src/renderer/features/bots/botConversationTimeline.ts
@@ -1,86 +1,2 @@
-export const BOT_MESSAGE_TIME_GROUP_MS = 5 * 60 * 1_000;
-
-export interface BotTimelineMessage {
- clientId: string;
- createdAt?: string | number | null;
-}
-
-export interface BotReplyTimelineMessage extends BotTimelineMessage {
- role: string;
- systemCardType?: string;
- botPrivateReply?: boolean;
-}
-
-function timestampOf(value: BotTimelineMessage['createdAt']): number | null {
- const timestamp = typeof value === 'number' ? value : Date.parse(value ?? '');
- return Number.isFinite(timestamp) && timestamp > 0 ? timestamp : null;
-}
-
-/**
- * 返回每个时间组第一条可见消息的时间。工具调用与思考块应在调用前被排除,
- * 因为它们不是伙伴对话时间线里的消息,也不能偷偷切开一个五分钟分组。
- */
-export function collectBotMessageTimeGroups(
- messages: readonly BotTimelineMessage[],
- windowMs = BOT_MESSAGE_TIME_GROUP_MS,
-): ReadonlyMap<string, number> {
- const groups = new Map<string, number>();
- let groupStartTimestamp: number | null = null;
- for (const message of messages) {
- const timestamp = timestampOf(message.createdAt);
- if (timestamp === null) continue;
- if (groupStartTimestamp === null || timestamp - groupStartTimestamp >= windowMs) {
- groups.set(message.clientId, timestamp);
- groupStartTimestamp = timestamp;
- }
- }
- return groups;
-}
-
-/**
- * Find the first visible Bot reply after the read position captured on entry.
- * The caller only supplies already-simplified render items, so hidden work rows
- * cannot steal the divider from the first reply the user can actually see.
- */
-export function findFirstUnreadBotReplyClientId(
- messages: readonly BotReplyTimelineMessage[],
- boundaryAt: number | null | undefined,
-): string | null {
- if (boundaryAt === null || boundaryAt === undefined || !Number.isFinite(boundaryAt)) return null;
- for (const message of messages) {
- if (message.role !== 'assistant') continue;
- // Bot-to-Bot stamps are internal conversation traces. The unread divider
- // belongs on the Bot's next real reply/result, not on the message it received.
- if (message.systemCardType === 'bot-direct-message' || message.botPrivateReply) continue;
- const timestamp = timestampOf(message.createdAt);
- if (timestamp !== null && timestamp > boundaryAt) return message.clientId;
- }
- return null;
-}
-
-function isSameLocalDay(left: Date, right: Date): boolean {
- return (
- left.getFullYear() === right.getFullYear() &&
- left.getMonth() === right.getMonth() &&
- left.getDate() === right.getDate()
- );
-}
-
-export function formatBotMessageGroupTime(
- timestamp: number,
- locale: string,
- now = Date.now(),
-): string {
- const value = new Date(timestamp);
- const current = new Date(now);
- const dateFields: Intl.DateTimeFormatOptions = isSameLocalDay(value, current)
- ? {}
- : value.getFullYear() === current.getFullYear()
- ? { month: 'short', day: 'numeric' }
- : { year: 'numeric', month: 'short', day: 'numeric' };
- return new Intl.DateTimeFormat(locale, {
- ...dateFields,
- hour: '2-digit',
- minute: '2-digit',
- }).format(value);
-}
+/** Shared Bot timeline grouping; legacy Desktop import path. */
+export * from '@cindy/maker-shared/botTimeline';
diff --git a/apps/mobile/app/companions/direct/[threadId].tsx b/apps/mobile/app/companions/direct/[threadId].tsx
index 14da102c90..e24e1fe496 100644
--- a/apps/mobile/app/companions/direct/[threadId].tsx
+++ b/apps/mobile/app/companions/direct/[threadId].tsx
@@ -1,44 +1,106 @@
-import { useCallback } from 'react';
+import { useCallback, useEffect, useSyncExternalStore } from 'react';
import { useFocusEffect, useLocalSearchParams, useRouter } from 'expo-router';
-import { ScrollView, StyleSheet } from 'react-native';
+import { ActivityIndicator, ScrollView, StyleSheet, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useTranslation } from 'react-i18next';
+import { resolveRemoteText } from '@cindy/device-link';
import type { BotDirectMessageThreadResult } from '@cindy/maker-shared/botDirectMessage';
+import { formatBotMessageGroupTime } from '@cindy/maker-shared/botTimeline';
import { Text } from '@/components/AppText';
import { MainWindowActionButton } from '@/components/MobilePrimitives';
+import { RemoteCompanionAvatar } from '@/components/RemoteCompanionAvatar';
import { SimpleStackHeader, simpleScreenSafeAreaEdges } from '@/platform/chrome';
+import { useAuth } from '@/auth/AuthContext';
import { useDeviceLink } from '@/device-link/DeviceLinkContext';
import { startFocusedTopicSubscription } from '@/device-link/focusedTopicSubscription';
+import {
+ cachedBotItem,
+ readRemoteResourceSnapshot,
+ remoteResourceCacheRevision,
+ subscribeRemoteResourceCache,
+} from '@/device-link/remoteResourceCache';
import { useRemoteCompanionQuery } from '@/session/useRemoteCompanionQuery';
-import { useThemedStyles, type ThemeColors } from '@/theme';
-import { spacing, typeScale } from '@/theme/tokens';
+import { useTheme, useThemedStyles, type ThemeColors } from '@/theme';
+import { lineHeight, radius, spacing, typeScale } from '@/theme/tokens';
import { goBackGuarded } from '@/utils/backGuard';
+const AVATAR_SIZE = 28;
+
+/** Desktop BotDirectMessageView: a read-only two-sided thread, the viewing teammate on the right. */
export default function CompanionDirectMessages() {
const params = useLocalSearchParams<{ deviceId: string; botId: string; threadId: string }>();
const deviceId = typeof params.deviceId === 'string' ? params.deviceId : '';
const botId = typeof params.botId === 'string' ? params.botId : '';
const threadId = typeof params.threadId === 'string' ? params.threadId : '';
- const { t } = useTranslation();
+ const { t, i18n } = useTranslation();
const router = useRouter();
+ const { colors } = useTheme();
const styles = useThemedStyles(makeStyles);
+ const { user } = useAuth();
+ const userId = user?.id ?? '';
const { subscribe, unsubscribe } = useDeviceLink();
const { value, error, online, refresh } = useRemoteCompanionQuery<BotDirectMessageThreadResult>(deviceId, 'maker:bot-direct-message-thread:get', [threadId, botId]);
useFocusEffect(useCallback(() => startFocusedTopicSubscription({ deviceId, owner: `companion-direct:${threadId}`, topic: 'sessions', subscribe, unsubscribe }), [deviceId, threadId, subscribe, unsubscribe]));
+ useSyncExternalStore(subscribeRemoteResourceCache, remoteResourceCacheRevision);
+ useEffect(() => { if (userId) void readRemoteResourceSnapshot(userId); }, [userId]);
const thread = value?.ok ? value.thread : null;
+ const failed = Boolean(error || value?.ok === false);
+ const participant = (id: string, fallbackName: string) => {
+ const item = cachedBotItem(userId, 'teammates', deviceId, id);
+ return { name: (item ? resolveRemoteText(item.display.title, i18n.language) : '') || fallbackName || id, avatar: item?.display.avatar };
+ };
+ const peerId = thread ? thread.botAId === botId ? thread.botBId : thread.botAId : '';
+ const viewer = thread ? participant(botId, thread.botAId === botId ? thread.botAName : thread.botBName) : null;
+ const peer = thread ? participant(peerId, thread.botAId === peerId ? thread.botAName : thread.botBName) : null;
+ const messages = Array.isArray(thread?.messages) ? thread.messages : [];
return <SafeAreaView edges={simpleScreenSafeAreaEdges()} style={styles.screen}>
- <SimpleStackHeader title={thread ? `${thread.botAName} · ${thread.botBName}` : t('devices.companions.messages')} subtitle={t('devices.companions.readOnly')} onBack={() => goBackGuarded(router)} />
- <ScrollView contentContainerStyle={styles.content}>
+ <SimpleStackHeader title={viewer && peer ? `${viewer.name} ⇄ ${peer.name}` : t('devices.companions.messages')}
+ subtitle={t('devices.companions.readOnly')} onBack={() => goBackGuarded(router)} />
+ <ScrollView contentContainerStyle={styles.content} testID="companion.directThread">
{!online ? <Text style={styles.note}>{t('devices.resources.hostOffline')}</Text> : null}
- {(Array.isArray(thread?.messages) ? thread.messages : []).map((message) => <Text selectable key={message.id} style={styles.message}>{`${message.senderBotName}\n${message.content}`}</Text>)}
- {!thread && online ? <Text style={styles.note}>{error || value?.ok === false ? t('devices.companions.actionFailed') : t('devices.resources.loading')}</Text> : null}
- {error || value?.ok === false ? <MainWindowActionButton action={{ label: t('devices.resources.retry'), onPress: refresh }} /> : null}
+ {messages.map((message) => {
+ const ownSide = message.senderBotId === botId;
+ const sender = participant(message.senderBotId, message.senderBotName);
+ const avatar = <RemoteCompanionAvatar avatar={sender.avatar} deviceId={deviceId} name={sender.name} online={online} size={AVATAR_SIZE} framed />;
+ return <View key={message.id} style={[styles.row, ownSide ? styles.rowOwn : styles.rowPeer]} testID={`companion.directMessage.${ownSide ? 'own' : 'peer'}`}>
+ {!ownSide ? avatar : null}
+ <View style={[styles.column, ownSide ? styles.columnOwn : styles.columnPeer]}>
+ <Text style={styles.meta}>{`${sender.name} · ${formatBotMessageGroupTime(message.createdAt, i18n.language)}`}</Text>
+ <Text selectable style={[styles.bubble, ownSide ? styles.bubbleOwn : styles.bubblePeer]}>{message.content}</Text>
+ </View>
+ {ownSide ? avatar : null}
+ </View>;
+ })}
+ {thread && messages.length === 0 ? <Text style={[styles.note, styles.empty]}>{t('devices.companions.directEmpty')}</Text> : null}
+ {thread?.closeReason === 'message-limit' ? <View style={styles.limit} testID="companion.directLimit">
+ <View style={styles.limitLine} />
+ <Text style={styles.limitText}>{t('devices.companions.directLimitReached')}</Text>
+ <View style={styles.limitLine} />
+ </View> : null}
+ {!thread && online && !failed ? <ActivityIndicator color={colors.textTertiary} /> : null}
+ {!thread && failed ? <Text style={[styles.note, styles.empty]}>{t(value?.ok === false ? 'devices.companions.directUnavailable' : 'devices.companions.actionFailed')}</Text> : null}
+ {failed ? <MainWindowActionButton action={{ label: t('devices.resources.retry'), onPress: refresh }} /> : null}
</ScrollView>
</SafeAreaView>;
}
const makeStyles = (colors: ThemeColors) => StyleSheet.create({
screen: { flex: 1, backgroundColor: colors.surface },
content: { padding: spacing.lg, gap: spacing.lg },
- message: { color: colors.textPrimary, fontSize: typeScale.body, backgroundColor: colors.surfaceElevated, padding: spacing.md },
+ row: { flexDirection: 'row', alignItems: 'flex-start', gap: 10 },
+ rowOwn: { justifyContent: 'flex-end' },
+ rowPeer: { justifyContent: 'flex-start' },
+ column: { maxWidth: '74%', minWidth: 0, gap: spacing.xs },
+ columnOwn: { alignItems: 'flex-end' },
+ columnPeer: { alignItems: 'flex-start' },
+ meta: { color: colors.textTertiary, fontSize: typeScale.caption, lineHeight: lineHeight.caption, paddingHorizontal: spacing.xs },
+ bubble: { color: colors.textPrimary, fontSize: typeScale.body, lineHeight: lineHeight.body, borderRadius: radius.container,
+ borderWidth: StyleSheet.hairlineWidth, paddingHorizontal: 14, paddingVertical: 10, overflow: 'hidden' },
+ // Own side reads like the user's bubble; the peer sits on the chip surface (Desktop msg-user / surface-chip).
+ bubbleOwn: { backgroundColor: colors.surfaceElevated, borderColor: colors.borderStrong },
+ bubblePeer: { backgroundColor: colors.surfaceChip, borderColor: colors.border },
note: { color: colors.textSecondary, fontSize: typeScale.footnote },
+ empty: { color: colors.textTertiary, textAlign: 'center', paddingVertical: spacing.xl },
+ limit: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm },
+ limitLine: { flex: 1, height: StyleSheet.hairlineWidth, backgroundColor: colors.border },
+ limitText: { flexShrink: 1, color: colors.textTertiary, fontSize: typeScale.caption, lineHeight: lineHeight.caption, textAlign: 'center' },
});
diff --git a/apps/mobile/app/resources/[collectionId]/[resourceId].tsx b/apps/mobile/app/resources/[collectionId]/[resourceId].tsx
index 78cda5cabc..85c7787e36 100644
--- a/apps/mobile/app/resources/[collectionId]/[resourceId].tsx
+++ b/apps/mobile/app/resources/[collectionId]/[resourceId].tsx
@@ -54,6 +54,8 @@ export default function RemoteResourceResolverScreen() {
const [error, setError] = useState<string | null>(null);
const [preparation, setPreparation] = useState<{ binding: string; resource: RemoteResource; stage: string } | null>(null);
const [retrying, setRetrying] = useState(false);
+ // Scoped to the resource binding so another teammate never inherits this notice.
+ const [retryFailed, setRetryFailed] = useState<string | null>(null);
const retryLock = useRef(false);
const visiblePreparation = preparation?.binding === binding ? preparation : null;
const [attempt, setAttempt] = useState(0);
@@ -141,12 +143,13 @@ export default function RemoteResourceResolverScreen() {
const retryInvitation = async () => {
const action = visiblePreparation?.resource.actions?.find(item => !item.disabled);
if (!action || retryLock.current) return;
- retryLock.current = true; setRetrying(true);
+ retryLock.current = true; setRetrying(true); setRetryFailed(null);
try {
await invokeRemoteResourceAction(invoke, host, { collectionId, resourceRef: visiblePreparation!.resource.ref, actionId: action.id }, i18n.language);
if (currentBinding.current === binding) setAttempt(value => value + 1);
- } catch (cause) {
- if (currentBinding.current === binding) setError(formatRemoteError(cause));
+ } catch {
+ // Keep the preparation (and its completed work) visible; only this retry failed.
+ if (currentBinding.current === binding) setRetryFailed(binding);
} finally { retryLock.current = false; setRetrying(false); }
};
@@ -178,11 +181,17 @@ export default function RemoteResourceResolverScreen() {
<View style={styles.center} testID="remoteResourceResolver.preparation">
<RemoteCompanionAvatar avatar={visiblePreparation.resource.display.avatar} deviceId={deviceId} name={resolveRemoteText(visiblePreparation.resource.display.title, i18n.language)} online={status === 'online'} size={iconSize.glyph} />
<Text style={styles.preparationTitle}>{t('devices.companions.invitation.waiting', { name: resolveRemoteText(visiblePreparation.resource.display.title, i18n.language) })}</Text>
- {visiblePreparation.stage !== 'failed' && <ActivityIndicator color={colors.textSecondary} />}
- <Text style={styles.muted}>{t(`devices.companions.invitation.${visiblePreparation.stage}`, { name: resolveRemoteText(visiblePreparation.resource.display.title, i18n.language) })}</Text>
- {visiblePreparation.stage === 'failed' && visiblePreparation.resource.actions?.some(action => !action.disabled) && (
+ {/* Desktop BotInvitationWelcome: reassurance (or the failure) first, then the live stage. */}
+ <Text style={styles.muted}>{t(visiblePreparation.stage === 'failed' ? 'devices.companions.invitation.failed' : 'devices.companions.invitation.background')}</Text>
+ {visiblePreparation.stage !== 'failed' ? (
+ <View accessibilityLiveRegion="polite" style={styles.preparationStage} testID="remoteResourceResolver.preparationStage">
+ <ActivityIndicator color={colors.textSecondary} />
+ <Text style={styles.preparationStageText}>{t(`devices.companions.invitation.${visiblePreparation.stage === 'ready' ? 'welcome' : visiblePreparation.stage}`, { name: resolveRemoteText(visiblePreparation.resource.display.title, i18n.language) })}</Text>
+ </View>
+ ) : visiblePreparation.resource.actions?.some(action => !action.disabled) ? (
<MainWindowActionButton action={{ label: retrying ? t('devices.resources.resolving') : t('devices.resources.retry'), onPress: () => { void retryInvitation(); }, testID: 'remoteResourceResolver.retryInvitation' }} />
- )}
+ ) : null}
+ {retryFailed === binding ? <Text accessibilityRole="alert" style={styles.muted} testID="remoteResourceResolver.retryInvitationFailed">{t('devices.companions.invitation.retryFailed')}</Text> : null}
</View>
) : (
<View style={styles.center}>
@@ -200,4 +209,6 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({
content: { flex: 1, gap: spacing.lg, justifyContent: 'center', padding: spacing.xl },
preparationTitle: { color: colors.textPrimary, fontSize: typeScale.title, textAlign: 'center' },
muted: { textAlign: 'center', color: colors.textSecondary, fontSize: typeScale.footnote },
+ preparationStage: { alignItems: 'center', flexDirection: 'row', gap: spacing.sm },
+ preparationStageText: { color: colors.textPrimary, fontSize: typeScale.footnote },
});
diff --git a/apps/mobile/app/sessions/[sessionId].tsx b/apps/mobile/app/sessions/[sessionId].tsx
index 315a6a0bbf..3cdd1fe7dd 100644
--- a/apps/mobile/app/sessions/[sessionId].tsx
+++ b/apps/mobile/app/sessions/[sessionId].tsx
@@ -18,7 +18,8 @@ import { shouldShowFailedScheduleNotice, type FailedScheduleRunSnapshot } from '
import { CompanionHeader } from '@/session/CompanionHeader';
import { CompanionNavigationDrawer } from '@/session/CompanionNavigationDrawer';
import { collectCompanionPluginInvocations } from '@/session/pluginInvocations';
-import { CompanionWorkingStatus, useCompanionWorkingLabel } from '@/session/CompanionWorkingStatus';
+import { COMPANION_STATUS_AVATAR_SIZE, CompanionWorkingStatus, useCompanionDisplayResource, useCompanionWorkingLabel } from '@/session/CompanionWorkingStatus';
+import { RemoteCompanionAvatar } from '@/components/RemoteCompanionAvatar';
import { useRemoteResourceSession } from '@/session/useRemoteResourceSession';
import { SharedTaskEndedState } from '@/session/SharedTaskEndedState';
import { useSessionResourceCards } from '@/session/useSessionResourceCards';
@@ -28,7 +29,7 @@ import { getMobileAuthOwner, isMobileAuthOwnerCurrent, subscribeMobileAuthOwner
import { mobileDurableOutbox, durableOutboxDisplayItem, getCurrentMobileOutboxRecords, reconcileMobileOutboxDrafts } from '@/session/mobileDurableOutbox';
import { retainOutboxFile, durableOutboxUploadUri, removeOutboxFiles, outboxAttachmentNeedsLocalBytes } from '@/session/durableOutboxFiles';
import { isDurableOutboxSettled, isDurableOutboxUnsent, observeDurableOutboxSending, type DurableOutboxRecord } from '@/session/durableOutbox';
-import { isInFlightDeviceLinkError, isSharedTaskPeer } from '@cindy/device-link';
+import { isInFlightDeviceLinkError, isSharedTaskPeer, resolveRemoteText } from '@cindy/device-link';
import { takeRefinementContextTail, truncateRefinementReply } from '@cindy/voice-input-core';
import {
ArrowDown,
@@ -150,6 +151,7 @@ import { createMobileMakerTransport } from '@/device-link/mobileMakerTransport';
import { startFocusedTopicSubscription } from '@/device-link/focusedTopicSubscription';
import { InteractionPanel, type MobilePlanViewerState } from '@/session/InteractionPanel';
import {
+ COMPANION_AVATAR_SIZE,
MessageRenderer,
type MobileMessageActionBusyKind,
type MobileMessageDraft,
@@ -5616,8 +5618,25 @@ export default function SessionScreen() {
() => mergePendingSendItems(companionChat ? companionConversationItems(renderWindow.items) : renderWindow.items, pendingSendItems, optimisticClientIds),
[companionChat, pendingSendItems, renderWindow.items, optimisticClientIds],
);
- const companionWorkingLabel = useCompanionWorkingLabel({ sessionId, deviceId, botId: companionResource?.ref.id ?? '',
+ // Task links and notifications carry no teammate resource; the cached roster row supplies name and avatar.
+ const companionDisplay = useCompanionDisplayResource(deviceId, sessionId, companionResource, companionChat);
+ const companionWorkingLabel = useCompanionWorkingLabel({ sessionId, deviceId, botId: companionDisplay?.ref.id ?? '',
active: companionChat && showComposerActivity, messages, reconnectAttempt: remoteSessionRunStatus.reconnectAttempt });
+ const companionAvatarData = companionDisplay?.display.avatar;
+ const companionName = companionDisplay ? resolveRemoteText(companionDisplay.display.title, i18nInstance.language) : '';
+ const companionOnline = !remoteUnavailableReason;
+ // One portrait for replies and the composer status. Keyed by the avatar's fields, not the
+ // resource object, so unrelated resource refreshes do not re-render every reply row.
+ const companionPortrait = useCallback((size: number) => companionAvatarData
+ ? <RemoteCompanionAvatar avatar={companionAvatarData} deviceId={deviceId} name={companionName}
+ online={companionOnline} size={size} framed /> : undefined,
+ [companionAvatarData?.kind, companionAvatarData?.value, companionAvatarData?.color, companionAvatarData?.fallbackText,
+ companionName, companionOnline, deviceId]);
+ const companionReplyAvatar = useMemo(() => companionChat ? companionPortrait(COMPANION_AVATAR_SIZE) : undefined,
+ [companionChat, companionPortrait]);
+ const companionInteractionIdentity = useMemo(() => companionChat && companionName
+ ? { name: companionName, avatar: companionPortrait(COMPANION_AVATAR_SIZE) } : null,
+ [companionChat, companionName, companionPortrait]);
const companionPluginInvocations = useMemo(() => companionChat ? collectCompanionPluginInvocations(projectedMessages) : undefined,
[companionChat, projectedMessages]);
const companionWorkGroupLabel = companionChat && activePendingKind
@@ -8138,18 +8157,20 @@ export default function SessionScreen() {
// absPath 取件通道,无同目录翻页);workdir 外目录在 chip 层就不点亮,
// 不会走到这里(canOpenChatPathChip)。
const openChatPathTarget = useCallback((target: ChatFilePathTarget) => {
+ // 伙伴结果卡里的文件属于子任务:按 target.scope 打开,缺省为本会话。
+ const ownerSessionId = target.scope?.sessionId ?? sessionId;
if (target.kind === 'directory') {
if (target.relPath === null) return;
router.push({
pathname: '/files/[sessionId]',
- params: { sessionId, deviceId, deviceName, relPath: target.relPath },
+ params: { sessionId: ownerSessionId, deviceId, deviceName, relPath: target.relPath },
});
return;
}
router.push({
pathname: '/files/preview/[sessionId]',
params: {
- sessionId,
+ sessionId: ownerSessionId,
deviceId,
deviceName,
...(target.relPath !== null
@@ -8248,7 +8269,7 @@ export default function SessionScreen() {
* workdir 外文件(relPath 为 null)改走被控端 media:fetch 绝对路径取件
* (xdt-file://open?path=…,与文件浏览器 gallery / 预览页 absPath 模式同一通道)。 */
const shareChipFile = useCallback(async (target: ChatFilePathTarget) => {
- const workdir = currentSession?.workingDir?.trim();
+ const workdir = target.scope?.workdir.trim() || currentSession?.workingDir?.trim();
if (!deviceId || !workdir || chipShareBusy) return;
setChipShareBusy(true);
try {
@@ -8309,7 +8330,7 @@ export default function SessionScreen() {
setChipMenuTarget(null);
router.push({
pathname: '/files/[sessionId]',
- params: { sessionId, deviceId, deviceName, relPath: parentRelPath(target.relPath) ?? '' },
+ params: { sessionId: target.scope?.sessionId ?? sessionId, deviceId, deviceName, relPath: parentRelPath(target.relPath) ?? '' },
});
return;
case 'sendToSession': {
@@ -8317,9 +8338,10 @@ export default function SessionScreen() {
// 持久化),再走统一 draft setter 同步回本屏 state + draftRef——裸 setState
// 会漏更 draftRef,语音输入 readCurrentDraft 读到旧值时会覆盖掉 @ 引用。
// workdir 外文件没有 relPath,@ 引用直接给被控端绝对路径(agent 可消费)。
+ // 子任务的相对路径对本会话无意义,改给被控端绝对路径。
const merged = mergePathIntoComposerDraft(
sessionId,
- target.relPath ?? target.absPath,
+ (target.scope ? null : target.relPath) ?? target.absPath,
target.kind === 'directory' ? 'dir' : 'file',
);
const mergedDocument = readComposerDocumentDraftSync(sessionId);
@@ -9180,6 +9202,7 @@ export default function SessionScreen() {
<ChatFilePathContext.Provider value={chatFilePathContextValue}>
<MessageRenderer companion={companionChat} companionWorkingLabel={companionWorkGroupLabel}
+ companionAvatar={companionReplyAvatar}
companionPluginInvocations={companionPluginInvocations}
remoteDeviceId={deviceId}
showPluginInvocations={!companionChat && Boolean(currentSession && currentSession.source !== 'bot')}
@@ -9234,10 +9257,10 @@ export default function SessionScreen() {
imageAnnotation={collaborationReadOnlyReason ? undefined : composerAnnotations.chatAnnotation}
queueFooter={(
<>
- {companionChat && !companionInlineInteraction ? <CompanionWorkingStatus label={companionWorkingLabel} /> : null}
{companionInlineInteraction && !shareSelectionActive ? <InteractionPanel
embedded
companion={companionChat}
+ companionIdentity={companionInteractionIdentity}
collapse={pendingInteractionCollapse} deviceId={deviceId} sessionId={sessionId}
interactions={pending} activeRequestId={pendingInteractionActiveRequestId}
onActiveRequestIdChange={setPendingInteractionActiveRequestId}
@@ -9398,6 +9421,7 @@ export default function SessionScreen() {
错的语义。 */}
<InteractionPanel
companion={companionChat}
+ companionIdentity={companionInteractionIdentity}
deviceId={deviceId}
sessionId={sessionId}
interactions={pending}
@@ -9434,6 +9458,7 @@ export default function SessionScreen() {
>
<InteractionPanel
companion={companionChat}
+ companionIdentity={companionInteractionIdentity}
safeAreaBottomInset={insets.bottom}
collapse={pendingInteractionCollapse}
deviceId={deviceId}
@@ -9456,6 +9481,7 @@ export default function SessionScreen() {
>
<InteractionPanel
companion={companionChat}
+ companionIdentity={companionInteractionIdentity}
safeAreaBottomInset={insets.bottom}
collapse={pendingInteractionCollapse}
deviceId={deviceId}
@@ -9510,6 +9536,23 @@ export default function SessionScreen() {
/>
</View>
) : null}
+ {/* Desktop BotWorkingStatus: a teammate's paced public status stays above the composer,
+ also while the user reads older messages. Interactions carry their own panel. */}
+ {companionChat && companionWorkingLabel && !companionInlineInteraction
+ && !(syncingWhileEmpty && !hasRenderedMessages) ? (
+ <View
+ style={[
+ styles.composerActivityFrame,
+ { paddingHorizontal: composerTouchLayout.composerPaddingHorizontal },
+ ]}
+ >
+ <CompanionWorkingStatus
+ key={JSON.stringify([auth.accountGeneration, deviceId, sessionId])}
+ label={companionWorkingLabel}
+ avatar={companionPortrait(COMPANION_STATUS_AVATAR_SIZE)}
+ />
+ </View>
+ ) : null}
{queueEditing ? (
<View
style={[
diff --git a/apps/mobile/src/__tests__/CompanionMessageCard.test.tsx b/apps/mobile/src/__tests__/CompanionMessageCard.test.tsx
index bdd93a9f80..a10a47e24f 100644
--- a/apps/mobile/src/__tests__/CompanionMessageCard.test.tsx
+++ b/apps/mobile/src/__tests__/CompanionMessageCard.test.tsx
@@ -45,7 +45,7 @@ vi.mock('expo-router', () => ({
}));
vi.mock('react-i18next', async (importOriginal) => ({
...await importOriginal<typeof import('react-i18next')>(),
- useTranslation: () => ({ t: (key: string) => key }),
+ useTranslation: () => ({ t: (key: string) => key, i18n: { language: 'en' } }),
}));
vi.mock('@/components/AppText', () => ({
Text: ({ children }: any) => createElement('span', {}, children),
@@ -63,9 +63,14 @@ vi.mock('lucide-react-native', () => ({
GitMerge: () => createElement('i', { 'data-testid': 'merged-pr' }),
GitPullRequestClosed: () => null,
GitPullRequestDraft: () => null,
+ Megaphone: () => null,
+ TriangleAlert: () => null,
}));
vi.mock('@/auth/AuthContext', () => ({
- useAuth: () => ({ accountGeneration: h.accountGeneration }),
+ useAuth: () => ({ accountGeneration: h.accountGeneration, user: { id: 'owner' } }),
+}));
+vi.mock('@/components/RemoteCompanionAvatar', () => ({
+ RemoteCompanionAvatar: ({ name }: any) => createElement('i', { 'data-testid': 'peer-avatar' }, name),
}));
vi.mock('@/device-link/DeviceLinkContext', () => ({
useDeviceLink: () => ({
@@ -543,44 +548,71 @@ it('opens a stable completed result inline and routes its artifact to the child
expect(h.invoke).not.toHaveBeenCalledWith('home', 'maker:bot-delegations-list', expect.anything());
});
-it('keeps image-only and linked results available from the mobile receipt', async () => {
- h.invoke.mockImplementation(async (_device, channel) => channel === 'fs:stat-path'
- ? { kind: 'file', resolvedPath: '/child-task/chart.png' } : { ok: true });
+it('renders the frozen result with the conversation Markdown, resolving links in the child task', async () => {
+ h.invoke.mockImplementation(async (_device, channel, args) => channel === 'fs:stat-path'
+ ? { kind: 'file', resolvedPath: args[0].path } : { ok: true });
const { CompanionTaskResultCard } = await import('@/session/CompanionTaskResultCard');
+ const { ChatFilePathContext } = await import('@/session/chatFilePathContext');
+ const seen: any[] = [];
+ function MarkdownProbe({ text }: { text: string }) {
+ const { useContext } = require('react') as typeof import('react');
+ const ctx = useContext(ChatFilePathContext);
+ seen.push(ctx);
+ return createElement('article', { 'data-testid': 'result-markdown' }, text);
+ }
const meta = { ...message.companion!.meta, role: 'delegation-result', childSessionId: 'child',
result: { runSequence: 1, status: 'completed', workingDir: '/child-task',
text: '![chart](./chart.png) [Report](https://example.com/report.pdf)', artifacts: [] } } as any;
- await act(async () => root.render(createElement(CompanionTaskResultCard, { meta, deviceId: 'home' })));
+ // The chat's long-press menu is reused, but every action must target the child task.
+ const onLongPressPath = vi.fn();
+ const parent = { deviceId: 'home', sessionId: 'chat', workdir: '/chat', statPath: vi.fn(), onOpenPath: vi.fn(), onLongPressPath };
+ await act(async () => root.render(createElement(ChatFilePathContext.Provider, { value: parent },
+ createElement(CompanionTaskResultCard, {
+ meta, deviceId: 'home', renderMarkdown: (text: string) => createElement(MarkdownProbe, { text }),
+ }))));
+ // Collapsed: status + view result only; the body is not rendered until opened.
+ expect(node.querySelector('[data-testid="result-markdown"]')).toBeNull();
await act(async () => node.querySelector('button')!.click());
- expect(node.textContent).toContain('![chart](./chart.png)');
- expect(node.textContent).not.toContain('devices.companions.noWrittenResult');
- const chart = [...node.querySelectorAll('button')].find(button => button.textContent === 'chart')!;
- await act(async () => chart.click());
+ expect(node.querySelector('[data-testid="result-markdown"]')?.textContent)
+ .toBe('![chart](./chart.png) [Report](https://example.com/report.pdf)');
+ // No second, duplicated link list below the Markdown (Desktop MarkdownRenderer parity).
+ expect([...node.querySelectorAll('button')].some(button => ['chart', 'Report'].includes(button.textContent ?? ''))).toBe(false);
+ const ctx = seen.at(-1);
+ expect(ctx).toMatchObject({ deviceId: 'home', sessionId: 'child', workdir: '/child-task' });
+ await expect(ctx.statPath('/child-task/chart.png')).resolves.toMatchObject({ kind: 'file' });
+ expect(h.openLink).toHaveBeenCalledWith('home');
+ ctx.onOpenPath({ kind: 'file', relPath: 'chart.png', absPath: '/child-task/chart.png', line: 3 });
expect(h.push).toHaveBeenCalledWith({ pathname: '/files/preview/[sessionId]', params: {
- sessionId: 'child', deviceId: 'home', absPath: '/child-task/./chart.png',
+ sessionId: 'child', deviceId: 'home', relPath: 'chart.png', line: '3',
} });
- const report = [...node.querySelectorAll('button')].find(button => button.textContent === 'Report')!;
- await act(async () => report.click());
- expect(h.openURL).toHaveBeenCalledWith('https://example.com/report.pdf');
+ ctx.onOpenPath({ kind: 'directory', relPath: 'out', absPath: '/child-task/out' });
+ expect(h.push).toHaveBeenCalledWith({ pathname: '/files/[sessionId]', params: {
+ sessionId: 'child', deviceId: 'home', relPath: 'out',
+ } });
+ ctx.onLongPressPath({ kind: 'file', relPath: 'chart.png', absPath: '/child-task/chart.png' });
+ expect(onLongPressPath).toHaveBeenCalledWith({ kind: 'file', relPath: 'chart.png', absPath: '/child-task/chart.png',
+ scope: { sessionId: 'child', workdir: '/child-task' } });
+ expect(parent.onOpenPath).not.toHaveBeenCalled();
});
-it('does not offer a local result link until the child file is verified', async () => {
+it('does not offer an artifact file until the child file is verified', async () => {
let completeStat!: (result: { kind: 'file'; resolvedPath: string }) => void;
h.invoke.mockImplementation(async (_device, channel) => channel === 'fs:stat-path'
? new Promise((resolve) => { completeStat = resolve; }) : { ok: true });
const { CompanionTaskResultCard } = await import('@/session/CompanionTaskResultCard');
const meta = { ...message.companion!.meta, role: 'delegation-result', childSessionId: 'child',
result: { runSequence: 1, status: 'completed', workingDir: '/child-task',
- text: '[Chart](./chart.png)', artifacts: [] } } as any;
+ text: '', artifacts: [{ absolutePath: '/child-task/chart.png' }] } } as any;
await act(async () => root.render(createElement(CompanionTaskResultCard, { meta, deviceId: 'home' })));
await act(async () => node.querySelector('button')!.click());
- expect(node.textContent).toContain('Chart');
- expect([...node.querySelectorAll('button')].some(button => button.textContent === 'Chart')).toBe(false);
+ expect(node.textContent).toContain('devices.companions.noWrittenResult');
+ expect(node.textContent).toContain('chart.png');
+ expect([...node.querySelectorAll('button')].some(button => button.textContent === 'chart.png')).toBe(false);
await act(async () => completeStat({ kind: 'file', resolvedPath: '/child-task/chart.png' }));
- const chart = [...node.querySelectorAll('button')].find(button => button.textContent === 'Chart')!;
+ const chart = [...node.querySelectorAll('button')].find(button => button.textContent === 'chart.png')!;
await act(async () => chart.click());
expect(h.push).toHaveBeenCalledWith({ pathname: '/files/preview/[sessionId]', params: {
- sessionId: 'child', deviceId: 'home', absPath: '/child-task/./chart.png',
+ sessionId: 'child', deviceId: 'home', absPath: '/child-task/chart.png',
} });
});
@@ -612,7 +644,7 @@ it('reveals frozen failure details only after opening the result and its details
expect(node.textContent).not.toContain('TIMEOUT:');
await act(async () => node.querySelector('button')!.click());
expect(node.textContent).not.toContain('TIMEOUT:');
- const details = Array.from(node.querySelectorAll('button')).find(button => button.textContent === 'interaction.companion.details');
+ const details = Array.from(node.querySelectorAll('button')).find(button => button.textContent === 'devices.companions.errorDetails');
await act(async () => details!.click());
expect(node.textContent).toContain('TIMEOUT: upstream did not finish');
});
@@ -630,3 +662,37 @@ it.each(['sent', 'received'] as const)('keeps a compact %s private-message entry
deviceId: 'home', threadId: 'thread', botId: 'viewer',
} });
});
+
+it('shows the starting state until the first read settles, then the background-task title fallback', async () => {
+ let finish!: (value: unknown) => void;
+ h.invoke.mockReturnValue(new Promise((resolve) => { finish = resolve; }));
+ const untitled = { ...message, companion: { kind: 'task', meta: { ...message.companion!.meta, objective: ' ' } } } as NormalizedRemoteMessage;
+ await act(async () => root.render(createElement(CompanionMessageCard, { message: untitled })));
+ expect(node.textContent).toContain('devices.companions.status.queued');
+ expect(node.textContent).not.toContain('devices.companions.status.unknown');
+ expect(node.textContent).toContain('devices.companions.backgroundTask');
+ // A settled read without this task is unverifiable, not still starting.
+ await act(async () => finish({ ok: true, delegations: [] }));
+ expect(node.textContent).toContain('devices.companions.status.unknown');
+});
+
+it('does not claim an unread task is starting while its computer is offline', async () => {
+ h.status = 'offline';
+ await render();
+ expect(h.invoke).not.toHaveBeenCalledWith('home', 'maker:bot-delegations:list', expect.anything());
+ expect(node.textContent).toContain('devices.companions.status.unknown');
+ expect(node.textContent).not.toContain('devices.companions.status.queued');
+});
+
+it('shows the peer portrait and current name from the cached roster in the private-message entry', async () => {
+ const cache = await import('@/device-link/remoteResourceCache');
+ await cache.cacheRemoteResourceItems('owner', 'teammates', [{ key: 'k', host: { deviceId: 'home', deviceName: 'Mac' },
+ item: { ref: { collectionId: 'teammates', kind: 'bot', id: 'peer' }, revision: '1', links: [],
+ display: { title: 'Aster Renamed', avatar: { kind: 'text', value: '', fallbackText: 'A' } } } } as any]);
+ const direct = { ...message, key: 'trace-peer', companion: { kind: 'direct', meta: {
+ direction: 'sent', peerBotName: 'Aster', peerBotId: 'peer', viewerBotId: 'viewer', threadId: 'thread', preview: '',
+ } } } as NormalizedRemoteMessage;
+ await act(async () => root.render(createElement(CompanionMessageCard, { message: direct })));
+ expect(node.querySelector('[data-testid="peer-avatar"]')?.textContent).toBe('Aster Renamed');
+ await cache.clearRemoteResourceCache();
+});
diff --git a/apps/mobile/src/__tests__/CompanionWorkingStatus.test.tsx b/apps/mobile/src/__tests__/CompanionWorkingStatus.test.tsx
index 825ced8c0a..7641d43673 100644
--- a/apps/mobile/src/__tests__/CompanionWorkingStatus.test.tsx
+++ b/apps/mobile/src/__tests__/CompanionWorkingStatus.test.tsx
@@ -4,18 +4,30 @@ import { createRoot } from 'react-dom/client';
import { act } from 'react';
import { expect, it, vi } from 'vitest';
import type { RemoteMessage } from '../session/types';
-const h = vi.hoisted(() => ({ activity: { phase: 'running', workingPhase: 'reading-memory' } as Record<string, string>, invoke: vi.fn(), listener: () => {} }));
+const h = vi.hoisted(() => ({ activity: { phase: 'running', workingPhase: 'reading-memory' } as Record<string, string>, invoke: vi.fn(), listener: () => {},
+ epoch: 1, cachedBotId: '' }));
vi.mock('react-native', () => ({ ActivityIndicator: () => null, View: 'div', StyleSheet: { create: (v: unknown) => v } }));
vi.mock('@/components/AppText', () => ({ Text: 'span' }));
-vi.mock('@/theme', () => ({ spacing: {}, typeScale: {}, useTheme: () => ({ colors: {} }) }));
+vi.mock('@/theme', () => ({ spacing: {}, typeScale: {}, lineHeight: {}, useTheme: () => ({ colors: {} }), useThemedStyles: () => ({}) }));
+vi.mock('../session/WorkingStatusText', () => ({ WorkingStatusText: ({ text }: { text: string }) => text }));
+vi.mock('@/device-link/remoteResourceCache', () => ({
+ cachedBotIdForSession: (_user: string, collection: string, device: string, session: string) =>
+ collection === 'teammates' && device === 'host' && session === 'chat' ? h.cachedBotId : '',
+ cachedBotItem: (_user: string, collection: string, device: string, botId: string) =>
+ collection === 'teammates' && device === 'host' && botId === h.cachedBotId
+ ? { ref: { collectionId: 'teammates', kind: 'bot', id: botId }, display: { title: { fallback: 'Mimi' } }, links: [], revision: 'r' } : null,
+ readRemoteResourceSnapshot: async () => undefined,
+ remoteResourceCacheRevision: () => 0,
+ subscribeRemoteResourceCache: () => () => {},
+}));
vi.mock('react-i18next', () => ({ useTranslation: () => ({ t: (k: string) => k, i18n: { language: 'en' } }) }));
-vi.mock('@/auth/AuthContext', () => ({ useAuth: () => ({ accountGeneration: 1 }) }));
-vi.mock('@/device-link/DeviceLinkContext', () => ({ useDeviceLink: () => ({ invoke: h.invoke }) }));
+vi.mock('@/auth/AuthContext', () => ({ useAuth: () => ({ accountGeneration: 1, user: { id: 'owner' } }) }));
+vi.mock('@/device-link/DeviceLinkContext', () => ({ useDeviceLink: () => ({ invoke: h.invoke, connectionEpoch: h.epoch }) }));
vi.mock('../session/remoteSessionStore', () => ({ remoteSessionStore: {
getSessionLiveActivity: () => h.activity,
subscribe: (listener: () => void) => { h.listener = listener; return () => {}; },
} }));
-import { useCompanionWorkingLabel } from '../session/CompanionWorkingStatus';
+import { useCompanionDisplayResource, useCompanionWorkingLabel } from '../session/CompanionWorkingStatus';
const messages: RemoteMessage[] = [];
function Probe() {
return useCompanionWorkingLabel({ sessionId: 'chat', deviceId: 'host', botId: 'bot', active: true, messages, reconnectAttempt: null });
@@ -62,3 +74,74 @@ it('uses host compaction for an unopened chat, ignores old copy, and clears on r
expect(node.textContent).toBe('devices.companions.working.compacting');
} finally { await act(async () => root.unmount()); }
});
+
+function EntryProbe({ botId }: { botId: string }) {
+ return useCompanionWorkingLabel({ sessionId: 'chat', deviceId: 'host', botId, active: true, messages, reconnectAttempt: null });
+}
+
+it('names the teammate from the cached roster link when an ordinary task route has no resource', async () => {
+ Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });
+ h.invoke.mockReset().mockResolvedValue({ blocks: [{ id: 'working', primitive: 'status', fallbackMarkdown: 'Checking what you told me' }] });
+ h.activity = { phase: 'running', workingPhase: 'reading-memory' };
+ h.cachedBotId = 'mimi';
+ const node = document.createElement('div'); const root = createRoot(node);
+ try {
+ await act(async () => root.render(createElement(EntryProbe, { botId: '' })));
+ expect(h.invoke).toHaveBeenCalledWith('host', expect.any(String), [expect.objectContaining({
+ ref: { collectionId: 'teammates', kind: 'bot', id: 'working:mimi/reading-memory' },
+ })]);
+ expect(node.textContent).toBe('Checking what you told me');
+ // The route's resource stays authoritative whenever it is available.
+ h.invoke.mockClear();
+ await act(async () => root.render(createElement(EntryProbe, { botId: 'resource-bot' })));
+ expect(h.invoke).toHaveBeenCalledWith('host', expect.any(String), [expect.objectContaining({
+ ref: expect.objectContaining({ id: 'working:resource-bot/reading-memory' }),
+ })]);
+ } finally { h.cachedBotId = ''; await act(async () => root.unmount()); }
+});
+
+it('names and pictures a chat opened from a task link from its cached roster row, only for teammate chats', async () => {
+ Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });
+ h.cachedBotId = 'mimi';
+ const seen: unknown[] = [];
+ function DisplayProbe({ resource, enabled }: { resource: any; enabled: boolean }) {
+ seen.push(useCompanionDisplayResource('host', 'chat', resource, enabled));
+ return null;
+ }
+ const node = document.createElement('div'); const root = createRoot(node);
+ try {
+ await act(async () => root.render(createElement(DisplayProbe, { resource: null, enabled: true })));
+ expect(seen.at(-1)).toMatchObject({ ref: { id: 'mimi' }, display: { title: { fallback: 'Mimi' } } });
+ // The route's resource stays authoritative; an ordinary task never borrows a teammate identity.
+ const routed = { ref: { collectionId: 'teammates', kind: 'bot', id: 'resource-bot' }, display: { title: { fallback: 'Sora' } }, links: [], revision: 'r' };
+ await act(async () => root.render(createElement(DisplayProbe, { resource: routed, enabled: true })));
+ expect(seen.at(-1)).toBe(routed);
+ await act(async () => root.render(createElement(DisplayProbe, { resource: null, enabled: false })));
+ expect(seen.at(-1)).toBeNull();
+ } finally { h.cachedBotId = ''; await act(async () => root.unmount()); }
+});
+
+it('retries a lost caption once per reconnect and keeps a delivered caption', async () => {
+ Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });
+ h.activity = { phase: 'running', workingPhase: 'reading-file' };
+ h.epoch = 1;
+ h.invoke.mockReset().mockRejectedValueOnce(new Error('link lost'))
+ .mockResolvedValue({ blocks: [{ id: 'working', primitive: 'status', fallbackMarkdown: 'Opening your notes' }] });
+ const node = document.createElement('div'); const root = createRoot(node);
+ try {
+ await act(async () => root.render(createElement(EntryProbe, { botId: 'mimi' })));
+ expect(node.textContent).toBe('devices.companions.working.reading-file');
+ expect(h.invoke).toHaveBeenCalledTimes(1);
+ // Same turn and phase: nothing re-requests until the link comes back.
+ await act(async () => root.render(createElement(EntryProbe, { botId: 'mimi' })));
+ expect(h.invoke).toHaveBeenCalledTimes(1);
+ h.epoch = 2;
+ await act(async () => root.render(createElement(EntryProbe, { botId: 'mimi' })));
+ expect(h.invoke).toHaveBeenCalledTimes(2);
+ expect(node.textContent).toBe('Opening your notes');
+ h.epoch = 3;
+ await act(async () => root.render(createElement(EntryProbe, { botId: 'mimi' })));
+ expect(h.invoke).toHaveBeenCalledTimes(2);
+ expect(node.textContent).toBe('Opening your notes');
+ } finally { h.epoch = 1; await act(async () => root.unmount()); }
+});
diff --git a/apps/mobile/src/__tests__/TeammateList.test.tsx b/apps/mobile/src/__tests__/TeammateList.test.tsx
index e67087f38e..3778dd747b 100644
--- a/apps/mobile/src/__tests__/TeammateList.test.tsx
+++ b/apps/mobile/src/__tests__/TeammateList.test.tsx
@@ -14,11 +14,12 @@ vi.mock('@/session/remoteSessionStore', () => ({ remoteSessionStore: {} }));
vi.mock('@/components/AppText', () => ({ Text: ({ children }: any) => el('span', null, children), TextInput: () => null }));
vi.mock('@/components/MobilePrimitives', () => ({ MainWindowEmptyState: ({ title, copy }: any) => el('div', null, title, copy) }));
vi.mock('@/components/RemoteCompanionAvatar', () => ({ RemoteCompanionAvatar: () => null }));
-vi.mock('lucide-react-native', () => ({ RefreshCw: () => null }));
+vi.mock('lucide-react-native', () => ({ RefreshCw: () => null, TriangleAlert: ({ testID, accessibilityLabel }: any) => el('i', { 'data-testid': testID, 'aria-label': accessibilityLabel }) }));
vi.mock('react-i18next', () => ({ useTranslation: () => ({ t: (key: string) => key, i18n: { language: 'en' } }) }));
vi.mock('@/i18n', () => ({ i18n: { t: (key: string) => key } }));
vi.mock('@/auth/AuthContext', () => ({ useAuth: () => ({ user: { id: 'owner' } }) }));
-vi.mock('@/theme', () => ({ useThemedStyles: () => ({}), useTheme: () => ({ colors: { statusDone: 'green', statusError: 'red', textTertiary: 'gray' } }), typeScale: { footnote: 12 } }));
+vi.mock('@/theme', () => ({ useThemedStyles: () => ({}), useTheme: () => ({ colors: { statusDone: 'green', statusError: 'red', textTertiary: 'gray' } }), typeScale: { footnote: 12 }, lineHeight: {}, fontWeight: {} }));
+vi.mock('@/session/WorkingStatusText', () => ({ WorkingStatusText: ({ text }: any) => el('span', null, text) }));
vi.mock('@/device-link/remoteResourceCache', () => ({ isRemoteResourceUnread: () => false }));
vi.mock('@/session/sessionList', () => ({ formatRemoteSessionSidebarTime: () => '' }));
vi.mock('@/utils/useMinuteNow', () => ({ useMinuteNow: () => Date.now() }));
@@ -43,7 +44,8 @@ it('uses a concise recovery notice, not device IDs or transport diagnostics', as
expect(node.textContent).not.toMatch(/private-device-id|DEVICE_UNRESPONSIVE|circuit open|Computer identity/);
expect(node.querySelector('[data-testid="teammates.refresh"]')).not.toBeNull();
expect(node.textContent).toContain('devices.resources.hostOffline');
- expect(node.textContent).not.toContain('Last reply');
+ // Desktop parity: the cached reply stays readable while the host is offline.
+ expect(node.textContent).toContain('Last reply');
});
it('shows readable message previews rather than Markdown delimiters or link targets', async () => {
const formatted = { ...item, item: { ...item.item, display: {
@@ -84,3 +86,17 @@ it('keeps the connection green when the list cannot be used, and unknown neutral
}
}
});
+
+it('falls back to the description, then an invitation, and flags a teammate that needs attention', async () => {
+ const described = { ...item, key: 'host:described', item: { ...item.item, ref: { ...item.item.ref, id: 'described' },
+ display: { title: 'Aster', subtitle: 'Weekly reports' } } };
+ const empty = { ...item, key: 'host:empty', item: { ...item.item, ref: { ...item.item.ref, id: 'empty' },
+ display: { title: 'Nova', status: { label: 'Needs attention', tone: 'warning' } } } };
+ await act(async () => root.render(el(TeammateList, { items: [described, empty], error: null, isOnline: () => true,
+ loading: false, refreshing: false, onRefresh: vi.fn(), onSelect: vi.fn(), embedded: true })));
+ expect(node.textContent).toContain('Weekly reports');
+ expect(node.textContent).toContain('devices.companions.startChat');
+ const flags = node.querySelectorAll('[data-testid="teammate.attention"]');
+ expect(flags).toHaveLength(1);
+ expect(flags[0].getAttribute('aria-label')).toBe('Needs attention');
+});
diff --git a/apps/mobile/src/__tests__/WorkingStatusText.test.tsx b/apps/mobile/src/__tests__/WorkingStatusText.test.tsx
new file mode 100644
index 0000000000..f6745e0f2e
--- /dev/null
+++ b/apps/mobile/src/__tests__/WorkingStatusText.test.tsx
@@ -0,0 +1,109 @@
+// @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(() => ({
+ reduceMotion: false as boolean | null,
+ fades: [] as Array<{ toValue: number; duration: number; finish(finished?: boolean): void }>,
+ opacity: [] as number[],
+}));
+vi.mock('react-native', () => {
+ class Value {
+ value: number;
+ constructor(value: number) { this.value = value; }
+ setValue(value: number) { this.value = value; h.opacity.push(value); }
+ stopAnimation() {
+ // Native stop reports an unfinished animation to its completion callback.
+ for (const fade of h.fades.splice(0)) fade.finish(false);
+ }
+ }
+ return {
+ Animated: {
+ Value,
+ View: ({ children }: { children: unknown }) => createElement('div', { 'data-testid': 'fade' }, children as never),
+ timing: (value: Value, config: { toValue: number; duration: number }) => ({
+ start(callback?: (result: { finished: boolean }) => void) {
+ const fade = { toValue: config.toValue, duration: config.duration, finish(finished = true) {
+ if (finished) value.setValue(config.toValue);
+ callback?.({ finished });
+ } };
+ h.fades.push(fade);
+ },
+ }),
+ },
+ Easing: { bezier: () => (t: number) => t },
+ };
+});
+vi.mock('@/components/AppText', () => ({ Text: ({ children }: { children: unknown }) => createElement('span', null, children as never) }));
+vi.mock('@/hooks/useReduceMotion', () => ({ useReduceMotionEnabled: () => h.reduceMotion }));
+vi.mock('@/theme', () => ({ motionDuration: { fast: 150 }, motionEasing: { move: [0.4, 0, 0.2, 1] } }));
+import { WorkingStatusText, WORKING_STATUS_MIN_INTERVAL_MS } from '../session/WorkingStatusText';
+
+let root: Root; let node: HTMLDivElement;
+const render = (text: string) => act(async () => root.render(createElement(WorkingStatusText, { text })));
+const finishFade = () => act(async () => { h.fades.shift()!.finish(); });
+beforeEach(() => {
+ Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });
+ vi.useFakeTimers();
+ h.reduceMotion = false; h.fades.length = 0; h.opacity.length = 0;
+ node = document.createElement('div'); root = createRoot(node);
+});
+afterEach(async () => { await act(async () => root.unmount()); vi.useRealTimers(); });
+
+it('holds each caption for at least one second, then fades out and back in with the latest copy', async () => {
+ expect(WORKING_STATUS_MIN_INTERVAL_MS).toBe(1000);
+ await render('Thinking…');
+ await render('Reading memory…');
+ await render('Reading files…');
+ await act(async () => { vi.advanceTimersByTime(999); });
+ expect(node.textContent).toBe('Thinking…');
+ expect(h.fades).toHaveLength(0);
+ await act(async () => { vi.advanceTimersByTime(1); });
+ // Fade out uses the shared fast motion token; the copy only swaps once invisible.
+ expect(h.fades[0]).toMatchObject({ toValue: 0, duration: 150 });
+ expect(node.textContent).toBe('Thinking…');
+ await finishFade();
+ expect(node.textContent).toBe('Reading files…');
+ expect(h.fades[0]).toMatchObject({ toValue: 1, duration: 150 });
+ await finishFade();
+ expect(h.opacity).toEqual([0, 1]);
+ // The next change waits a full interval from this commit.
+ await render('Checking code…');
+ await act(async () => { vi.advanceTimersByTime(999); });
+ expect(node.textContent).toBe('Reading files…');
+ await act(async () => { vi.advanceTimersByTime(1); });
+ await finishFade();
+ expect(node.textContent).toBe('Checking code…');
+});
+
+it('drops a pending change that returns to the shown copy', async () => {
+ await render('Thinking…');
+ await render('Replying…');
+ await render('Thinking…');
+ await act(async () => { vi.advanceTimersByTime(2000); });
+ expect(h.fades).toHaveLength(0);
+ expect(node.textContent).toBe('Thinking…');
+});
+
+it('commits directly without a fade when reduced motion is on or still unknown', async () => {
+ for (const preference of [true, null]) {
+ h.reduceMotion = preference; h.fades.length = 0;
+ await render('Thinking…');
+ await render('Saving memory…');
+ await act(async () => { vi.advanceTimersByTime(1000); });
+ expect(h.fades).toHaveLength(0);
+ expect(node.textContent).toBe('Saving memory…');
+ await act(async () => root.unmount());
+ root = createRoot(node);
+ }
+});
+
+it('cancels pending copy on unmount', async () => {
+ await render('Thinking…');
+ await render('Reading files…');
+ await act(async () => root.unmount());
+ root = createRoot(node);
+ await act(async () => { vi.advanceTimersByTime(2000); });
+ expect(h.fades).toHaveLength(0);
+});
diff --git a/apps/mobile/src/__tests__/companionConversationPresentation.test.ts b/apps/mobile/src/__tests__/companionConversationPresentation.test.ts
index 24c1ab694f..d04688c8a7 100644
--- a/apps/mobile/src/__tests__/companionConversationPresentation.test.ts
+++ b/apps/mobile/src/__tests__/companionConversationPresentation.test.ts
@@ -91,3 +91,19 @@ it.each([{ turnCompleted: true }, { turnUsageDetails: { totalTokens: 12 } }])('k
expect(items.some(item => item.type === 'work_group' || item.type === 'tool_group')).toBe(false);
}
});
+
+it('drops persisted auto-resume separators like Desktop, keeping only the live reconnect card', () => {
+ const resumed = [...base, row('u4', 'user', 'continue', { autoResume: true, autoResumeInfo: { attempt: 1, maxAttempts: 3 } }),
+ row('a5', 'assistant', 'Answer', { turnCompleted: true })];
+ const isResumeCard = (item: ReturnType<typeof bodies>[number]) => item.type === 'message' && item.message.systemCardType === 'auto-resume';
+ // Ordinary tasks keep the separator; the teammate projection hides the persisted one.
+ expect(buildMobileMessageRenderItems(resumed, { isSessionStreaming: false }).some(isResumeCard)).toBe(true);
+ const items = bodies(resumed, false);
+ expect(items.some(isResumeCard)).toBe(false);
+ // The hidden separator still ends the interrupted turn, whose useful partial prose stays readable.
+ expect(items.filter(item => item.type === 'message').map(item => item.message.body)).toEqual(['Help', 'Public progress', 'Answer']);
+ const live = companionConversationItems(buildMobileMessageRenderItems(base, {
+ isSessionStreaming: true, autoResumePending: { attempt: 2, maxAttempts: 3 },
+ }));
+ expect(live.filter(isResumeCard)).toHaveLength(1);
+});
diff --git a/apps/mobile/src/__tests__/pluginAttachmentBubble.test.tsx b/apps/mobile/src/__tests__/pluginAttachmentBubble.test.tsx
index 1afd219f2e..23b9698eae 100644
--- a/apps/mobile/src/__tests__/pluginAttachmentBubble.test.tsx
+++ b/apps/mobile/src/__tests__/pluginAttachmentBubble.test.tsx
@@ -1,3 +1,4 @@
+// @vitest-environment jsdom
import { createElement, useState } from 'react';
import { renderToStaticMarkup } from 'react-dom/server';
import { describe, expect, it, vi } from 'vitest';
@@ -7,11 +8,12 @@ import { describe, expect, it, vi } from 'vitest';
vi.mock('react-native', async () => {
const React = await import('react');
const view = ({ children, testID, accessibilityLabel }: any) => React.createElement('div', { 'data-testid': testID, 'aria-label': accessibilityLabel }, children);
- class Value { constructor(public value: number) {} interpolate() { return 0; } setValue() {} }
+ class Value { constructor(public value: number) {} interpolate() { return 0; } setValue() {} stopAnimation() {} }
return {
View: view, Text: view, Pressable: view, ScrollView: view, Modal: () => null,
Image: Object.assign(view, { getSize() {} }), ActivityIndicator: view,
- Animated: { Value, View: view, Text: view, createAnimatedComponent: (c: any) => c },
+ Animated: { Value, View: view, Text: view, createAnimatedComponent: (c: any) => c,
+ timing: () => ({ start() {}, stop() {} }), loop: () => ({ start() {}, stop() {} }), sequence: () => ({ start() {}, stop() {} }) },
Platform: { OS: 'ios', select: (s: any) => s.ios ?? s.default },
StyleSheet: { create: (s: any) => s, flatten: (s: any) => s, hairlineWidth: 1 },
Easing: { linear: (n: number) => n, bezier: () => (n: number) => n },
@@ -106,3 +108,35 @@ describe('partner work feedback', () => {
expect(completed).toContain('message.workGroupToggle');
});
});
+
+function renderClient(element: ReturnType<typeof createElement>): string {
+ const { act } = require('react') as typeof import('react');
+ const { createRoot } = require('react-dom/client') as typeof import('react-dom/client');
+ Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });
+ const host = document.createElement('div');
+ const root = createRoot(host);
+ act(() => root.render(element));
+ const html = host.innerHTML;
+ act(() => root.unmount());
+ return html;
+}
+
+describe('partner conversation presentation', () => {
+ it('hangs replies from the partner portrait and stamps five-minute groups like Desktop', () => {
+ const messages = [
+ msg('u1', 'user', 'Hi', { createdAt: '2026-01-01T09:00:00Z' }),
+ msg('a1', 'assistant', 'Hello', { createdAt: '2026-01-01T09:01:00Z' }),
+ msg('u2', 'user', 'Later', { createdAt: '2026-01-01T09:10:00Z' }),
+ ];
+ const items = buildMobileMessageRenderItems(messages, { isSessionStreaming: false });
+ const portrait = <i data-testid="partner-portrait" />;
+ const html = renderClient(<MessageRenderer items={items} companion companionAvatar={portrait} />);
+ // 09:00 opens a group, 09:01 joins it, 09:10 opens the next one.
+ expect(html.match(/companion\.timeGroup/g)).toHaveLength(2);
+ expect(html.match(/companion\.replyRow/g)).toHaveLength(1);
+ expect(html.match(/partner-portrait/g)).toHaveLength(1);
+ const ordinary = renderClient(<MessageRenderer items={items} companionAvatar={portrait} />);
+ expect(ordinary).not.toContain('companion.timeGroup');
+ expect(ordinary).not.toContain('companion.replyRow');
+ });
+});
diff --git a/apps/mobile/src/__tests__/remoteCollectionRead.test.tsx b/apps/mobile/src/__tests__/remoteCollectionRead.test.tsx
index 6ee0f98b6a..e244d1aa2b 100644
--- a/apps/mobile/src/__tests__/remoteCollectionRead.test.tsx
+++ b/apps/mobile/src/__tests__/remoteCollectionRead.test.tsx
@@ -29,7 +29,8 @@ vi.mock('@/session/useHomeMode', () => ({ useHomeMode: () => ({ selectTeammate:
vi.mock('react-i18next', () => ({ useTranslation: () => h.translation }));
vi.mock('@/i18n', () => ({ i18n: { t: (key: string) => key } }));
vi.mock('react-native-safe-area-context', () => ({ SafeAreaView: 'div' }));
-vi.mock('lucide-react-native', () => ({ ChevronRight: () => null, RefreshCw: () => null }));
+vi.mock('lucide-react-native', () => ({ ChevronRight: () => null, RefreshCw: () => null, TriangleAlert: () => null }));
+vi.mock('@/session/WorkingStatusText', () => ({ WorkingStatusText: ({ text }: any) => text }));
vi.mock('@/components/AppText', () => ({ Text: 'span', TextInput: 'input' }));
vi.mock('@/components/RemoteCompanionAvatar', () => ({ RemoteCompanionAvatar: () => null }));
vi.mock('@/components/MobilePrimitives', () => ({ MainWindowEmptyState: () => null, StatusDot: () => null }));
diff --git a/apps/mobile/src/__tests__/remoteResourceInvitation.test.tsx b/apps/mobile/src/__tests__/remoteResourceInvitation.test.tsx
index a2ac0154df..b1299f332e 100644
--- a/apps/mobile/src/__tests__/remoteResourceInvitation.test.tsx
+++ b/apps/mobile/src/__tests__/remoteResourceInvitation.test.tsx
@@ -75,3 +75,20 @@ it('ignores a late ready response from the previous account', async () => {
expect(h.router.replace).not.toHaveBeenCalled();
expect(h.upsert).not.toHaveBeenCalled();
});
+it('keeps a failed preparation on screen with an inline notice when its retry fails', async () => {
+ h.read.mockResolvedValue(resource('failed'));
+ h.action.mockRejectedValue(new Error('[DEVICE_UNRESPONSIVE] mac'));
+ await act(async () => root.render(createElement(Screen)));
+ expect(container.textContent).toContain('devices.companions.invitation.failed');
+ expect(container.textContent).not.toContain('devices.companions.invitation.background');
+ await act(async () => container.querySelector<HTMLButtonElement>('[data-testid="remoteResourceResolver.retryInvitation"]')!.click());
+ expect(container.querySelector('[data-testid="remoteResourceResolver.preparation"]')).not.toBeNull();
+ expect(container.textContent).toContain('devices.companions.invitation.retryFailed');
+ expect(container.textContent).not.toContain('DEVICE_UNRESPONSIVE');
+});
+it('reassures the user while preparing and shows the live stage beside the spinner', async () => {
+ h.read.mockResolvedValue(resource('profile'));
+ await act(async () => root.render(createElement(Screen)));
+ expect(container.textContent).toContain('devices.companions.invitation.background');
+ expect(container.querySelector('[data-testid="remoteResourceResolver.preparationStage"]')?.textContent).toBe('devices.companions.invitation.profile');
+});
diff --git a/apps/mobile/src/__tests__/sendEnqueueRetry.test.ts b/apps/mobile/src/__tests__/sendEnqueueRetry.test.ts
index 3648d4a3ce..1c7fa5de25 100644
--- a/apps/mobile/src/__tests__/sendEnqueueRetry.test.ts
+++ b/apps/mobile/src/__tests__/sendEnqueueRetry.test.ts
@@ -30,7 +30,7 @@ describe('send enqueue weak-network retry ordering', () => {
};
it('重试门槛必须要求可安全重发的传输错误且非 in-flight(兼容直发路径)', () => {
- expect(source).toContain("import { isInFlightDeviceLinkError, isSharedTaskPeer } from '@cindy/device-link';");
+ expect(source).toMatch(/import \{ isInFlightDeviceLinkError, isSharedTaskPeer(?:, \w+)* \} from '@cindy\/device-link';/);
expect(source).toContain("code === 'NOT_CONNECTED' || code === 'BACKPRESSURE'");
expect(source).toContain("formatted.includes('[BACKPRESSURE]')");
const loops = extractRetryLoops();
diff --git a/apps/mobile/src/components/RemoteCompanionAvatar.tsx b/apps/mobile/src/components/RemoteCompanionAvatar.tsx
index 40d94f8557..5f3435575a 100644
--- a/apps/mobile/src/components/RemoteCompanionAvatar.tsx
+++ b/apps/mobile/src/components/RemoteCompanionAvatar.tsx
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react';
-import { Image, StyleSheet } from 'react-native';
+import { Image, StyleSheet, View } from 'react-native';
import type { RemoteResourceAvatar } from '@cindy/device-link';
import { Text } from '@/components/AppText';
import { useAuth } from '@/auth/AuthContext';
@@ -16,7 +16,8 @@ const presets: Record<string, number> = {
'cindy://avatar/preset/lizi': require('../../assets/bot-presets/lizi.png'),
};
-export function RemoteCompanionAvatar({ avatar, deviceId, name, online, size = 40 }: { avatar?: RemoteResourceAvatar; deviceId: string; name: string; online: boolean; size?: number }) {
+/** `framed` draws its own circle for callers without an avatar container (inline rows and status lines). */
+export function RemoteCompanionAvatar({ avatar, deviceId, name, online, size = 40, framed = false }: { avatar?: RemoteResourceAvatar; deviceId: string; name: string; online: boolean; size?: number; framed?: boolean }) {
const { colors } = useTheme();
const auth = useAuth();
const { invoke } = useDeviceLink();
@@ -39,6 +40,13 @@ export function RemoteCompanionAvatar({ avatar, deviceId, name, online, size = 4
}, [auth.apiFetch, avatar?.kind, binding, deviceId, invoke, online, value]);
const source = presets[value] || (image?.binding === binding ? { uri: image.uri } : null);
if (source && !failed) return <Image source={source} onError={() => setFailed(true)} style={[styles.image, { width: size, height: size }]} />;
- return <Text style={{ color: colors.textPrimary, fontSize: typeScale.body }}>{avatar?.kind === 'emoji' ? value : avatar?.fallbackText || Array.from(name)[0]}</Text>;
+ const glyph = avatar?.kind === 'emoji' ? value : avatar?.fallbackText || Array.from(name)[0];
+ if (!framed) return <Text style={{ color: colors.textPrimary, fontSize: typeScale.body }}>{glyph}</Text>;
+ return <View style={[styles.frame, { width: size, height: size, backgroundColor: colors.surfaceChip }]}>
+ <Text style={{ color: colors.textPrimary, fontSize: Math.round(size / 2), lineHeight: Math.round(size * 0.7) }}>{glyph}</Text>
+ </View>;
}
-const styles = StyleSheet.create({ image: { width: 40, height: 40, borderRadius: radius.pill } });
+const styles = StyleSheet.create({
+ image: { width: 40, height: 40, borderRadius: radius.pill },
+ frame: { alignItems: 'center', justifyContent: 'center', borderRadius: radius.pill, overflow: 'hidden' },
+});
diff --git a/apps/mobile/src/device-link/remoteResourceCache.ts b/apps/mobile/src/device-link/remoteResourceCache.ts
index cc652ab38f..397cce3d57 100644
--- a/apps/mobile/src/device-link/remoteResourceCache.ts
+++ b/apps/mobile/src/device-link/remoteResourceCache.ts
@@ -86,6 +86,18 @@ export function isRemoteResourceUnread(userId: string, deviceId: string, resourc
const read = snapshots.get(userId)?.read[remoteResourceReadKey(deviceId, resourceId)];
return at !== undefined && read !== undefined && at > read;
}
+/** Name the cached Bot whose conversation link is this task. Presentation only; access stays live. */
+export function cachedBotIdForSession(userId: string, collectionId: string, deviceId: string, sessionId: string): string {
+ const row = snapshots.get(userId)?.items[collectionId]?.find(({ host, item }) => host.deviceId === deviceId
+ && item.ref.kind === 'bot' && item.links.some(({ rel, target }) => rel === 'conversation'
+ && target.kind === 'session' && target.sessionId === sessionId));
+ return row?.item.ref.id ?? '';
+}
+/** A cached roster row for display (name/avatar) only; never an authorization or availability signal. */
+export function cachedBotItem(userId: string, collectionId: string, deviceId: string, botId: string) {
+ return snapshots.get(userId)?.items[collectionId]?.find(({ host, item }) => host.deviceId === deviceId
+ && item.ref.kind === 'bot' && item.ref.id === botId)?.item ?? null;
+}
export async function clearRemoteResourceCache(): Promise<void> {
epoch += 1; snapshots.clear(); emit();
await Promise.allSettled([...writes.values()]);
diff --git a/apps/mobile/src/i18n/locales/en/devices.json b/apps/mobile/src/i18n/locales/en/devices.json
index c7f12b7ad3..087fad2f59 100644
--- a/apps/mobile/src/i18n/locales/en/devices.json
+++ b/apps/mobile/src/i18n/locales/en/devices.json
@@ -812,7 +812,7 @@
}
},
"companions": {
- "messageSent": "Message sent",
+ "messageSent": "Message sent to background task",
"sentTo": "Sent a message to {{name}}",
"receivedFrom": "Message from {{name}}",
"backgroundTask": "Background task",
@@ -835,16 +835,19 @@
"actionFailed": "Unable to load or complete this action",
"messages": "Messages",
"readOnly": "Read only",
+ "directEmpty": "There are no messages to view yet.",
+ "directLimitReached": "This teammate conversation reached its limit; both teammates returned to their main tasks",
+ "directUnavailable": "This teammate conversation is no longer available.",
"unread": "New reply",
"status": {
- "queued": "Queued",
- "running": "Running",
- "waiting": "Waiting for reply",
- "completed": "Completed",
+ "queued": "Getting started",
+ "running": "Working on it",
+ "waiting": "Waiting for input",
+ "completed": "Done",
"failed": "Failed",
- "cancelled": "Cancelled",
+ "cancelled": "Stopped",
"timed-out": "Timed out",
- "unknown": "Status unavailable"
+ "unknown": "Task status unavailable"
},
"title": "Teammates",
"tasks": "Sessions",
@@ -852,6 +855,7 @@
"emptyTitle": "No Teammates Yet",
"emptyCopy": "Create a teammate in Cindy on your computer.",
"noResults": "No Matching Teammates",
+ "startChat": "Start the conversation",
"preferenceSaveFailed": "Couldn’t save your view preference. Try switching views again.",
"automation": {
"unsupported": "Update Cindy on your computer, then retry to manage automations.",
@@ -982,7 +986,8 @@
"avatarSkipped": "Using the default portrait for now. You can change it anytime."
},
"viewResult": "View Result",
- "noWrittenResult": "No written result."
+ "noWrittenResult": "No written result.",
+ "errorDetails": "Error details"
},
"companionProfile": {
"avatar": "Avatar",
diff --git a/apps/mobile/src/i18n/locales/en/interaction.json b/apps/mobile/src/i18n/locales/en/interaction.json
index 3717050151..2413f86c31 100644
--- a/apps/mobile/src/i18n/locales/en/interaction.json
+++ b/apps/mobile/src/i18n/locales/en/interaction.json
@@ -279,6 +279,7 @@
}
},
"companion": {
+ "permissionRequest": "{{name}} needs your go-ahead",
"operation": "Operation",
"details": "Details",
"fields": {
diff --git a/apps/mobile/src/i18n/locales/ja/devices.json b/apps/mobile/src/i18n/locales/ja/devices.json
index c025a65dbb..7d1c736f51 100644
--- a/apps/mobile/src/i18n/locales/ja/devices.json
+++ b/apps/mobile/src/i18n/locales/ja/devices.json
@@ -812,7 +812,7 @@
}
},
"companions": {
- "messageSent": "追加メッセージを送信しました",
+ "messageSent": "バックグラウンドタスクにメッセージを送信しました",
"sentTo": "{{name}} にメッセージを送信",
"receivedFrom": "{{name}} からのメッセージ",
"backgroundTask": "バックグラウンドタスク",
@@ -835,16 +835,19 @@
"actionFailed": "読み込みまたは操作を完了できません",
"messages": "メッセージ",
"readOnly": "閲覧のみ",
+ "directEmpty": "表示できるメッセージはまだありません。",
+ "directLimitReached": "今回の会話は上限に達し、双方がそれぞれのメインタスクに戻りました",
+ "directUnavailable": "この仲間同士の会話は利用できません。",
"unread": "新しい返信",
"status": {
- "queued": "開始待ち",
- "running": "実行中",
- "waiting": "返信待ち",
+ "queued": "開始しています",
+ "running": "作業中",
+ "waiting": "対応待ち",
"completed": "完了",
"failed": "失敗",
- "cancelled": "キャンセル済み",
+ "cancelled": "停止済み",
"timed-out": "タイムアウト",
- "unknown": "状態を確認できません"
+ "unknown": "タスクの状況を確認できません"
},
"title": "チームメイト",
"tasks": "セッション",
@@ -852,6 +855,7 @@
"emptyTitle": "チームメイトはまだいません",
"emptyCopy": "パソコンの Cindy でチームメイトを作成してください。",
"noResults": "一致するチームメイトがいません",
+ "startChat": "会話を始める",
"preferenceSaveFailed": "表示設定を保存できませんでした。もう一度表示を切り替えてください。",
"automation": {
"unsupported": "自動化を管理するには、パソコンの Cindy を更新して再試行してください。",
@@ -982,7 +986,8 @@
"avatarSkipped": "今は初期アバターを使っています。いつでも変更できます。"
},
"viewResult": "結果を見る",
- "noWrittenResult": "テキストの結果はありません。"
+ "noWrittenResult": "テキストの結果はありません。",
+ "errorDetails": "エラー詳細"
},
"companionProfile": {
"avatar": "アバター",
diff --git a/apps/mobile/src/i18n/locales/ja/interaction.json b/apps/mobile/src/i18n/locales/ja/interaction.json
index 8805c643d9..9f943a465c 100644
--- a/apps/mobile/src/i18n/locales/ja/interaction.json
+++ b/apps/mobile/src/i18n/locales/ja/interaction.json
@@ -279,6 +279,7 @@
}
},
"companion": {
+ "permissionRequest": "{{name}} が確認をお願いしています",
"operation": "操作",
"details": "詳細を表示",
"fields": {
diff --git a/apps/mobile/src/i18n/locales/ko/devices.json b/apps/mobile/src/i18n/locales/ko/devices.json
index d947804a73..6028570762 100644
--- a/apps/mobile/src/i18n/locales/ko/devices.json
+++ b/apps/mobile/src/i18n/locales/ko/devices.json
@@ -812,7 +812,7 @@
}
},
"companions": {
- "messageSent": "추가 메시지를 보냈습니다",
+ "messageSent": "백그라운드 작업에 메시지를 보냈습니다",
"sentTo": "{{name}}에게 메시지를 보냄",
"receivedFrom": "{{name}}의 메시지",
"backgroundTask": "백그라운드 작업",
@@ -835,16 +835,19 @@
"actionFailed": "읽거나 작업을 완료할 수 없습니다",
"messages": "메시지",
"readOnly": "읽기 전용",
+ "directEmpty": "아직 볼 수 있는 메시지가 없습니다.",
+ "directLimitReached": "이번 동료 간 대화가 한도에 도달해 양쪽 모두 각자의 기본 작업으로 돌아갔습니다",
+ "directUnavailable": "이 동료 간 대화를 더 이상 사용할 수 없습니다.",
"unread": "새 답변",
"status": {
- "queued": "시작 대기",
- "running": "실행 중",
- "waiting": "답변 대기",
+ "queued": "시작하는 중",
+ "running": "작업 중",
+ "waiting": "처리 대기 중",
"completed": "완료",
"failed": "실패",
- "cancelled": "취소됨",
+ "cancelled": "중지됨",
"timed-out": "시간 초과",
- "unknown": "상태를 확인할 수 없습니다"
+ "unknown": "작업 상태를 확인할 수 없어요"
},
"title": "팀원",
"tasks": "세션",
@@ -852,6 +855,7 @@
"emptyTitle": "아직 팀원이 없습니다",
"emptyCopy": "컴퓨터의 Cindy에서 팀원을 만드세요.",
"noResults": "일치하는 팀원이 없습니다",
+ "startChat": "대화 시작하기",
"preferenceSaveFailed": "보기 설정을 저장하지 못했습니다. 보기를 다시 전환하세요.",
"automation": {
"unsupported": "자동화를 관리하려면 컴퓨터의 Cindy를 업데이트한 후 다시 시도하세요.",
@@ -982,7 +986,8 @@
"avatarSkipped": "지금은 기본 아바타를 사용해요. 언제든 바꿀 수 있어요."
},
"viewResult": "결과 보기",
- "noWrittenResult": "텍스트 결과가 없습니다."
+ "noWrittenResult": "텍스트 결과가 없습니다.",
+ "errorDetails": "오류 정보"
},
"companionProfile": {
"avatar": "아바타",
diff --git a/apps/mobile/src/i18n/locales/ko/interaction.json b/apps/mobile/src/i18n/locales/ko/interaction.json
index 723c145afd..15a54dbdcd 100644
--- a/apps/mobile/src/i18n/locales/ko/interaction.json
+++ b/apps/mobile/src/i18n/locales/ko/interaction.json
@@ -279,6 +279,7 @@
}
},
"companion": {
+ "permissionRequest": "{{name}} 님이 확인을 기다리고 있어요",
"operation": "작업",
"details": "세부 정보",
"fields": {
diff --git a/apps/mobile/src/i18n/locales/zh-CN/devices.json b/apps/mobile/src/i18n/locales/zh-CN/devices.json
index c98b669bf3..7ccca1853c 100644
--- a/apps/mobile/src/i18n/locales/zh-CN/devices.json
+++ b/apps/mobile/src/i18n/locales/zh-CN/devices.json
@@ -812,7 +812,7 @@
}
},
"companions": {
- "messageSent": "已发送补充消息",
+ "messageSent": "已向后台任务发送消息",
"sentTo": "已发消息给 {{name}}",
"receivedFrom": "消息来自 {{name}}",
"backgroundTask": "后台任务",
@@ -835,16 +835,19 @@
"actionFailed": "暂时无法读取或完成操作",
"messages": "消息往来",
"readOnly": "仅供查看",
+ "directEmpty": "还没有可查看的消息。",
+ "directLimitReached": "本轮伙伴对话已到上限,双方已回到各自的主任务",
+ "directUnavailable": "这条伙伴对话已不可用。",
"unread": "有新回复",
"status": {
- "queued": "等待开始",
- "running": "运行中",
- "waiting": "等待回复",
+ "queued": "正在开始",
+ "running": "正在做",
+ "waiting": "等待处理",
"completed": "已完成",
- "failed": "失败",
- "cancelled": "已取消",
+ "failed": "失败了",
+ "cancelled": "已停止",
"timed-out": "已超时",
- "unknown": "暂时无法确认状态"
+ "unknown": "任务状态查不到了"
},
"title": "伙伴",
"tasks": "任务",
@@ -852,6 +855,7 @@
"emptyTitle": "还没有伙伴",
"emptyCopy": "在电脑上的 Cindy 中创建一个伙伴。",
"noResults": "没有找到匹配的伙伴",
+ "startChat": "开始对话",
"preferenceSaveFailed": "未能保存视图偏好,请重新切换视图。",
"automation": {
"unsupported": "请更新电脑上的 Cindy 后重试,即可管理自动化。",
@@ -982,7 +986,8 @@
"avatarSkipped": "暂时用了默认头像,你随时可以换一张。"
},
"viewResult": "查看结果",
- "noWrittenResult": "没有文字结果。"
+ "noWrittenResult": "没有文字结果。",
+ "errorDetails": "错误详情"
},
"companionProfile": {
"avatar": "头像",
diff --git a/apps/mobile/src/i18n/locales/zh-CN/interaction.json b/apps/mobile/src/i18n/locales/zh-CN/interaction.json
index da57925135..ab485cbf82 100644
--- a/apps/mobile/src/i18n/locales/zh-CN/interaction.json
+++ b/apps/mobile/src/i18n/locales/zh-CN/interaction.json
@@ -279,6 +279,7 @@
}
},
"companion": {
+ "permissionRequest": "{{name}} 想请你确认一下",
"operation": "操作",
"details": "查看详情",
"fields": {
diff --git a/apps/mobile/src/i18n/locales/zh-TW/devices.json b/apps/mobile/src/i18n/locales/zh-TW/devices.json
index f7b55df1ab..6c13215ebf 100644
--- a/apps/mobile/src/i18n/locales/zh-TW/devices.json
+++ b/apps/mobile/src/i18n/locales/zh-TW/devices.json
@@ -812,7 +812,7 @@
}
},
"companions": {
- "messageSent": "已傳送補充訊息",
+ "messageSent": "已向背景任務傳送訊息",
"sentTo": "已傳訊息給 {{name}}",
"receivedFrom": "訊息來自 {{name}}",
"backgroundTask": "背景任務",
@@ -835,16 +835,19 @@
"actionFailed": "暫時無法讀取或完成操作",
"messages": "訊息往來",
"readOnly": "僅供檢視",
+ "directEmpty": "還沒有可查看的訊息。",
+ "directLimitReached": "本輪夥伴對話已達上限,雙方已回到各自的主任務",
+ "directUnavailable": "這則夥伴對話已無法使用。",
"unread": "有新回覆",
"status": {
- "queued": "等待開始",
- "running": "執行中",
- "waiting": "等待回覆",
+ "queued": "正在開始",
+ "running": "正在做",
+ "waiting": "等待處理",
"completed": "已完成",
- "failed": "失敗",
- "cancelled": "已取消",
+ "failed": "失敗了",
+ "cancelled": "已停止",
"timed-out": "已逾時",
- "unknown": "暫時無法確認狀態"
+ "unknown": "任務狀態查不到了"
},
"title": "夥伴",
"tasks": "任務",
@@ -852,6 +855,7 @@
"emptyTitle": "還沒有夥伴",
"emptyCopy": "在電腦上的 Cindy 中建立一個夥伴。",
"noResults": "沒有找到符合的夥伴",
+ "startChat": "開始對話",
"preferenceSaveFailed": "未能儲存檢視偏好,請重新切換檢視。",
"automation": {
"unsupported": "請更新電腦上的 Cindy 後重試,即可管理自動化。",
@@ -982,7 +986,8 @@
"avatarSkipped": "暫時用了預設頭像,你隨時可以換一張。"
},
"viewResult": "查看結果",
- "noWrittenResult": "沒有文字結果。"
+ "noWrittenResult": "沒有文字結果。",
+ "errorDetails": "錯誤詳情"
},
"companionProfile": {
"avatar": "頭像",
diff --git a/apps/mobile/src/i18n/locales/zh-TW/interaction.json b/apps/mobile/src/i18n/locales/zh-TW/interaction.json
index 8afc3eb630..03bd0d811b 100644
--- a/apps/mobile/src/i18n/locales/zh-TW/interaction.json
+++ b/apps/mobile/src/i18n/locales/zh-TW/interaction.json
@@ -279,6 +279,7 @@
}
},
"companion": {
+ "permissionRequest": "{{name}} 想請你確認一下",
"operation": "操作",
"details": "檢視詳情",
"fields": {
diff --git a/apps/mobile/src/session/CompanionMessageCard.tsx b/apps/mobile/src/session/CompanionMessageCard.tsx
index fd400d5f24..1745c458ee 100644
--- a/apps/mobile/src/session/CompanionMessageCard.tsx
+++ b/apps/mobile/src/session/CompanionMessageCard.tsx
@@ -1,5 +1,5 @@
import { CompanionTaskResultCard } from './CompanionTaskResultCard';
-import { Component, useEffect, useState, type ReactNode } from 'react';
+import { Component, useEffect, useState, useSyncExternalStore, type ReactNode } from 'react';
import { useLocalSearchParams, useRouter } from 'expo-router';
import { Linking, Pressable, StyleSheet, View, type LayoutChangeEvent } from 'react-native';
import {
@@ -11,6 +11,8 @@ import {
Square,
ArrowLeftRight,
ChevronRight,
+ Megaphone,
+ TriangleAlert,
} from 'lucide-react-native';
import {
MAX_STATUS_QUERIES,
@@ -27,11 +29,21 @@ import {
type BotDelegationCancelResult,
} from '@cindy/maker-shared/botDelegation';
import type { BotCollaborationMeta } from '@cindy/maker-shared/botCollaboration';
+import type { BotDirectMessageMeta } from '@cindy/maker-shared/botDirectMessage';
+import { resolveRemoteText } from '@cindy/device-link';
import { Text } from '@/components/AppText';
import { mobileInteractionStyles } from '@/components/mobileInteractionStyles';
+import { RemoteCompanionAvatar } from '@/components/RemoteCompanionAvatar';
+import { useAuth } from '@/auth/AuthContext';
import { useDeviceLink } from '@/device-link/DeviceLinkContext';
+import {
+ cachedBotItem,
+ readRemoteResourceSnapshot,
+ remoteResourceCacheRevision,
+ subscribeRemoteResourceCache,
+} from '@/device-link/remoteResourceCache';
import { useTheme, useThemedStyles, type ThemeColors } from '@/theme';
-import { spacing, radius, typeScale, iconSize } from '@/theme/tokens';
+import { spacing, radius, typeScale, iconSize, fontWeight } from '@/theme/tokens';
import type { NormalizedRemoteMessage } from './messageNormalize';
import { useRemoteCompanionQuery } from './useRemoteCompanionQuery';
@@ -54,7 +66,11 @@ class CompanionRenderBoundary extends Component<
}
}
-export function CompanionMessageCard({ message }: { message: NormalizedRemoteMessage }) {
+export function CompanionMessageCard({ message, renderMarkdown }: {
+ message: NormalizedRemoteMessage;
+ /** The conversation's Markdown renderer for frozen task results. */
+ renderMarkdown?: (text: string) => ReactNode;
+}) {
const { t } = useTranslation();
const styles = useThemedStyles(makeStyles);
return (
@@ -62,21 +78,24 @@ export function CompanionMessageCard({ message }: { message: NormalizedRemoteMes
fallback={<Text style={styles.note}>{t('devices.companions.actionFailed')}</Text>}
resetKey={message.key}
>
- <CompanionMessageCardContent message={message} />
+ <CompanionMessageCardContent message={message} renderMarkdown={renderMarkdown} />
</CompanionRenderBoundary>
);
}
-function CompanionMessageCardContent({ message }: { message: NormalizedRemoteMessage }) {
+function CompanionMessageCardContent({ message, renderMarkdown }: {
+ message: NormalizedRemoteMessage;
+ renderMarkdown?: (text: string) => ReactNode;
+}) {
const { t } = useTranslation();
- const router = useRouter();
const params = useLocalSearchParams<{ deviceId?: string }>();
const deviceId = typeof params.deviceId === 'string' ? params.deviceId : '';
const styles = useThemedStyles(makeStyles);
+ const { colors } = useTheme();
const card = message.companion;
if (!card) return null;
if (card.kind === 'task' && card.meta.role === 'delegation-result') {
- return <CompanionTaskResultCard meta={card.meta} deviceId={deviceId} />;
+ return <CompanionTaskResultCard meta={card.meta} deviceId={deviceId} renderMarkdown={renderMarkdown} />;
}
if (card.kind === 'task' && card.meta.role === 'delegation-request') {
return (
@@ -89,11 +108,30 @@ function CompanionMessageCardContent({ message }: { message: NormalizedRemoteMes
}
if (card.kind === 'task')
return (
- <Text style={styles.note}>
- {t('devices.companions.messageSent')}
- </Text>
+ <View style={styles.messageTrace} testID="companion.taskMessageTrace">
+ <Megaphone size={iconSize.xs} color={colors.textTertiary} style={styles.traceIcon} />
+ <Text style={[styles.note, styles.tertiary, styles.traceLabel]}>
+ {t('devices.companions.messageSent')}
+ </Text>
+ </View>
);
- const meta = card.meta;
+ return <CompanionPrivateTrace deviceId={deviceId} meta={card.meta} />;
+}
+
+/** Desktop BotDirectMessageCard: a separator pill with the peer's portrait, opening the read-only thread. */
+function CompanionPrivateTrace({ deviceId, meta }: { deviceId: string; meta: BotDirectMessageMeta }) {
+ const { t, i18n } = useTranslation();
+ const router = useRouter();
+ const { user } = useAuth();
+ const { status, getPresenceAvailability } = useDeviceLink();
+ const styles = useThemedStyles(makeStyles);
+ const { colors } = useTheme();
+ const userId = user?.id ?? '';
+ useSyncExternalStore(subscribeRemoteResourceCache, remoteResourceCacheRevision);
+ useEffect(() => { if (userId) void readRemoteResourceSnapshot(userId); }, [userId]);
+ const peer = cachedBotItem(userId, 'teammates', deviceId, meta.peerBotId);
+ const peerName = (peer ? resolveRemoteText(peer.display.title, i18n.language) : '')
+ || meta.peerBotName || meta.peerBotId;
return (
<View style={styles.privateTrace} testID="companion.privateTrace">
<View style={styles.traceLine} />
@@ -113,11 +151,13 @@ function CompanionMessageCardContent({ message }: { message: NormalizedRemoteMes
>
{({ pressed }) => (
<View style={[styles.traceAction, pressed && mobileInteractionStyles.pressed]}>
- <ArrowLeftRight size={iconSize.sm} color={styles.note.color} />
+ {peer ? <RemoteCompanionAvatar avatar={peer.display.avatar} deviceId={deviceId} name={peerName}
+ online={status === 'online' && getPresenceAvailability(deviceId) !== false} size={iconSize.md} framed /> : null}
+ <ArrowLeftRight size={iconSize.xs} color={colors.textTertiary} />
<Text numberOfLines={2} style={[styles.note, styles.traceLabel]}>
- {t(meta.direction === 'sent' ? 'devices.companions.sentTo' : 'devices.companions.receivedFrom', { name: meta.peerBotName })}
+ {t(meta.direction === 'sent' ? 'devices.companions.sentTo' : 'devices.companions.receivedFrom', { name: peerName })}
</Text>
- <ChevronRight size={iconSize.sm} color={styles.note.color} />
+ <ChevronRight size={iconSize.xs} color={colors.textTertiary} />
</View>
)}
</Pressable>
@@ -149,10 +189,20 @@ function CompanionTaskCard({
value?.ok && Array.isArray(value.delegations)
? (value.delegations.find((item) => item.id === meta.delegationId) ?? null)
: null;
+ // Desktop parity: until the first read settles the task is still starting;
+ // a settled read without this row, or a host that cannot be read, is unverifiable.
+ const resolved = value !== null || error || !online;
const status =
row && (BOT_DELEGATION_STATUSES as readonly string[]).includes(row.status)
? row.status
- : 'unknown';
+ : resolved ? 'unknown' : 'queued';
+ const statusColor =
+ status === 'completed' ? colors.statusDone
+ : status === 'failed' || status === 'timed-out' ? colors.statusError
+ : status === 'running' ? colors.statusAccent
+ : status === 'waiting' ? colors.statusAwaiting
+ : colors.textTertiary;
+ const title = row?.title || meta.objective.trim().split('\n')[0] || t('devices.companions.backgroundTask');
const [pending, setPending] = useState(false);
const [actionFailed, setActionFailed] = useState(false);
const [showPrs, setShowPrs] = useState(false);
@@ -231,7 +281,9 @@ function CompanionTaskCard({
? colors.statusDone
: kind === 'closed'
? colors.statusError
- : colors.textSecondary
+ : kind === 'draft'
+ ? colors.textTertiary
+ : colors.textSecondary
}
/>
);
@@ -269,17 +321,14 @@ function CompanionTaskCard({
<View style={styles.card} testID="companion.taskCard">
<View style={styles.header}>
<Text numberOfLines={2} style={[styles.title, styles.taskTitle]}>
- {row?.title || meta.objective.trim().split('\n')[0]}
- </Text>
- <Text
- style={[
- styles.note,
- row?.status === 'completed' && styles.success,
- (row?.status === 'failed' || row?.status === 'timed-out') && styles.error,
- ]}
- >
- {t(`devices.companions.status.${status}`)}
+ {title}
</Text>
+ <View style={styles.status}>
+ <View style={[styles.statusDot, { backgroundColor: statusColor }]} />
+ <Text style={[styles.note, { color: statusColor }]}>
+ {t(`devices.companions.status.${status}`)}
+ </Text>
+ </View>
</View>
<View style={styles.metadata}>
{duration ? <Text style={styles.note}>{duration}</Text> : null}
@@ -304,7 +353,10 @@ function CompanionTaskCard({
prStatuses.error ||
(Array.isArray(prStatuses.value) && prStatuses.value.some((status) => !status.ok))) &&
row ? (
- <Text style={styles.note}>{t('devices.companions.stale')}</Text>
+ <View style={styles.messageTrace}>
+ <TriangleAlert size={iconSize.xs} color={colors.textTertiary} style={styles.traceIcon} />
+ <Text style={[styles.note, styles.tertiary, styles.traceLabel]}>{t('devices.companions.stale')}</Text>
+ </View>
) : !online ? (
<Text style={styles.note}>{t('devices.resources.hostOffline')}</Text>
) : null}
@@ -435,6 +487,12 @@ const makeStyles = (colors: ThemeColors) =>
traceAction: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs, borderWidth: StyleSheet.hairlineWidth,
borderColor: colors.border, borderRadius: radius.pill, paddingHorizontal: spacing.sm, paddingVertical: spacing.xs },
traceLabel: { flexShrink: 1 },
+ // Quiet persisted traces (Desktop BotSessionTaskMessageTrace): tertiary, icon aligned to the first line.
+ messageTrace: { flexDirection: 'row', alignItems: 'flex-start', gap: spacing.sm, marginVertical: spacing.xs },
+ traceIcon: { marginTop: 3, flexShrink: 0 },
+ tertiary: { color: colors.textTertiary },
+ status: { flexDirection: 'row', alignItems: 'center', gap: 6, flexShrink: 0 },
+ statusDot: { width: 6, height: 6, borderRadius: radius.pill },
card: {
marginVertical: spacing.sm,
padding: spacing.md,
@@ -446,11 +504,11 @@ const makeStyles = (colors: ThemeColors) =>
},
header: { flexDirection: 'row', alignItems: 'flex-start', gap: spacing.sm },
taskTitle: { flex: 1, minWidth: 0 },
- title: { color: colors.textPrimary, fontSize: typeScale.body },
+ title: { color: colors.textPrimary, fontSize: typeScale.body, fontWeight: fontWeight.medium },
note: { color: colors.textSecondary, fontSize: typeScale.footnote },
actionLabel: { color: colors.textPrimary, fontSize: typeScale.footnote },
- error: { color: colors.statusError, fontSize: typeScale.footnote },
- success: { color: colors.statusDone },
+ // Paragraph errors follow errorText; red is reserved for the status dot.
+ error: { color: colors.errorText, fontSize: typeScale.footnote },
metadata: { flexDirection: 'row', flexWrap: 'wrap', gap: spacing.sm },
actions: { flexDirection: 'row', flexWrap: 'wrap', columnGap: spacing.sm },
touchTarget: { minHeight: 44, justifyContent: 'center' },
diff --git a/apps/mobile/src/session/CompanionTaskResultCard.tsx b/apps/mobile/src/session/CompanionTaskResultCard.tsx
index 2286bb934a..ddbf68f685 100644
--- a/apps/mobile/src/session/CompanionTaskResultCard.tsx
+++ b/apps/mobile/src/session/CompanionTaskResultCard.tsx
@@ -1,13 +1,14 @@
-import { useEffect, useState } from 'react';
-import { Linking, Pressable, View, StyleSheet } from 'react-native';
+import { useContext, useEffect, useMemo, useState, type ReactNode } from 'react';
+import { Pressable, View, StyleSheet } from 'react-native';
import { useRouter } from 'expo-router';
import { useTranslation } from 'react-i18next';
+import { FileText } from 'lucide-react-native';
import type { BotCollaborationMeta } from '@cindy/maker-shared/botCollaboration';
import { Text } from '@/components/AppText';
-import { useThemedStyles, type ThemeColors } from '@/theme';
-import { radius, spacing, typeScale } from '@/theme/tokens';
-import { classifyChatPathLinkTarget, isAbsolutePathShape, resolveChatAbsPath } from '@/session/chatPathCandidate';
-import { parseMobileMarkdown } from '@/session/messageMarkdown';
+import { mobileInteractionStyles } from '@/components/mobileInteractionStyles';
+import { useTheme, useThemedStyles, type ThemeColors } from '@/theme';
+import { iconSize, radius, spacing, typeScale } from '@/theme/tokens';
+import { ChatFilePathContext, type ChatFilePathContextValue, type ChatFilePathTarget } from '@/session/chatFilePathContext';
import { useDeviceLink } from '@/device-link/DeviceLinkContext';
import type { RemotePathStatResult } from '@/device-link/mobileMakerTransport';
import {
@@ -18,21 +19,6 @@ import {
verifyRemotePathCached,
} from '@/session/remotePathVerdict';
-function resultLinks(text: string): Array<{ label: string; url: string }> {
- const seen = new Set<string>();
- const links: Array<{ label: string; url: string }> = [];
- for (const block of parseMobileMarkdown(text)) {
- if (!('inlines' in block)) continue;
- for (const inline of block.inlines) {
- if (inline.type !== 'link' && inline.type !== 'image') continue;
- if (seen.has(inline.url)) continue;
- seen.add(inline.url);
- links.push({ label: (inline.type === 'image' ? inline.alt : inline.text) || inline.url, url: inline.url });
- }
- }
- return links;
-}
-
function ResultFileAction({
label, absPath, workdir, childSessionId, deviceId,
}: {
@@ -44,6 +30,7 @@ function ResultFileAction({
}) {
const { openLink, invoke } = useDeviceLink();
const router = useRouter();
+ const { colors } = useTheme();
const styles = useThemedStyles(makeStyles);
const [cacheGen, setCacheGen] = useState(0);
useEffect(() => {
@@ -64,62 +51,109 @@ function ResultFileAction({
// Keep the label readable and selectable until the child file is confirmed.
const verified = !!childSessionId && !!deviceId
&& peekRemotePathVerdictForRender(deviceId, workdir, absPath) === 'file';
- if (!verified || !childSessionId) return <View style={styles.action}>
- <Text selectable style={styles.title}>{label}</Text>
+ const icon = <FileText size={iconSize.sm} color={colors.textSecondary} />;
+ if (!verified || !childSessionId) return <View style={styles.file}>
+ {icon}<Text selectable numberOfLines={1} style={[styles.fileLabel, styles.pending]}>{label}</Text>
</View>;
- return <Pressable accessibilityRole="link" style={styles.action}
+ return <Pressable accessibilityRole="link" style={({ pressed }) => [styles.file, pressed && mobileInteractionStyles.pressed]}
onPress={() => router.push({ pathname: '/files/preview/[sessionId]', params: {
sessionId: childSessionId, deviceId, absPath,
} })}>
- <Text style={[styles.title, styles.link]}>{label}</Text>
+ {icon}<Text numberOfLines={1} style={[styles.fileLabel, styles.link]}>{label}</Text>
</Pressable>;
}
-export function CompanionTaskResultCard({ meta, deviceId }: { meta: BotCollaborationMeta; deviceId: string }) {
+/** The delegated task's own files: chips in the result resolve against its directory, not the chat's. */
+function useResultFileContext(deviceId: string, childSessionId: string | null | undefined, workdir: string | undefined) {
+ const parent = useContext(ChatFilePathContext);
+ const { openLink, invoke } = useDeviceLink();
+ const router = useRouter();
+ return useMemo<ChatFilePathContextValue | null>(() => {
+ if (!deviceId || !childSessionId || !workdir) return null;
+ return {
+ deviceId,
+ sessionId: childSessionId,
+ workdir,
+ statPath: async (absPath: string) => {
+ await openLink(deviceId);
+ return invoke<RemotePathStatResult>(deviceId, 'fs:stat-path', [{ path: absPath }]);
+ },
+ onOpenPath: (target) => {
+ if (target.kind === 'directory') {
+ if (target.relPath === null) return;
+ router.push({ pathname: '/files/[sessionId]', params: { sessionId: childSessionId, deviceId, relPath: target.relPath } });
+ return;
+ }
+ router.push({ pathname: '/files/preview/[sessionId]', params: {
+ sessionId: childSessionId, deviceId,
+ ...(target.relPath !== null ? { relPath: target.relPath } : { absPath: target.absPath }),
+ ...(target.line !== undefined ? { line: String(target.line) } : {}),
+ } });
+ },
+ // The chat's action menu runs against the child task, not the conversation holding the card.
+ ...(parent?.onLongPressPath ? {
+ onLongPressPath: (target: ChatFilePathTarget) => parent.onLongPressPath?.({ ...target, scope: { sessionId: childSessionId, workdir } }),
+ } : {}),
+ };
+ }, [childSessionId, deviceId, invoke, openLink, parent, router, workdir]);
+}
+
+/** A frozen execution receipt (Desktop BotSessionTaskResultCard); expanding never restarts or fetches the task. */
+export function CompanionTaskResultCard({ meta, deviceId, renderMarkdown }: {
+ meta: BotCollaborationMeta;
+ deviceId: string;
+ /** The conversation's own Markdown renderer, so links, code and file chips read like a reply. */
+ renderMarkdown?: (text: string) => ReactNode;
+}) {
const [expanded, setExpanded] = useState(false);
const [showError, setShowError] = useState(false);
const { t } = useTranslation();
+ const { colors } = useTheme();
const styles = useThemedStyles(makeStyles);
const result = meta.result;
+ const fileContext = useResultFileContext(deviceId, meta.childSessionId, result?.workingDir ?? undefined);
if (!result) return null;
- const links = resultLinks(result.text);
- return <View style={styles.card}>
- <Pressable accessibilityRole="button" accessibilityState={{ expanded }} onPress={() => setExpanded(!expanded)} style={styles.action}>
- <Text numberOfLines={2} style={styles.title}>{meta.objective}</Text>
- <Text style={styles.secondary}>{t(`devices.companions.status.${result.status}`)} · {t('devices.companions.viewResult')}</Text>
+ return <View style={styles.card} testID="companion.taskResult">
+ <Pressable accessibilityRole="button" accessibilityState={{ expanded }} onPress={() => setExpanded(!expanded)}
+ style={({ pressed }) => [styles.summary, pressed && mobileInteractionStyles.pressed]}>
+ <FileText size={iconSize.md} color={colors.textSecondary} />
+ <Text numberOfLines={1} style={styles.title}>{meta.objective}</Text>
+ <Text numberOfLines={1} style={styles.secondary}>{t(`devices.companions.status.${result.status}`)}</Text>
+ <Text numberOfLines={1} style={styles.view}>{t('devices.companions.viewResult')}</Text>
</Pressable>
{expanded && <View style={styles.content}>
- <Text selectable style={styles.body}>{result.text || t('devices.companions.noWrittenResult')}</Text>
- {links.map(({ label, url }) => {
- if (/^https?:\/\//i.test(url)) return <Pressable key={url} accessibilityRole="link" style={styles.action}
- onPress={() => { void Linking.openURL(url).catch(() => undefined); }}>
- <Text style={[styles.title, styles.link]}>{label}</Text>
- </Pressable>;
- const path = classifyChatPathLinkTarget(url);
- if (!path || (!result.workingDir && !isAbsolutePathShape(path.href) && !path.href.startsWith('file://'))) return null;
- return <ResultFileAction key={url} label={label} absPath={resolveChatAbsPath(path.href, result.workingDir ?? '')}
- workdir={result.workingDir ?? ''} childSessionId={meta.childSessionId} deviceId={deviceId} />;
- })}
- {result.error && <View>
- <Pressable accessibilityRole="button" accessibilityState={{ expanded: showError }} onPress={() => setShowError(!showError)} style={styles.action}>
- <Text style={styles.secondary}>{t('interaction.companion.details')}</Text>
- </Pressable>
- {showError && <Text selectable style={styles.secondary}>{result.error}</Text>}
- </View>}
+ {result.text ? renderMarkdown
+ ? <ChatFilePathContext.Provider value={fileContext}>{renderMarkdown(result.text)}</ChatFilePathContext.Provider>
+ : <Text selectable style={styles.body}>{result.text}</Text>
+ : <Text selectable style={styles.body}>{t('devices.companions.noWrittenResult')}</Text>}
{result.artifacts.map((artifact) => <ResultFileAction key={artifact.absolutePath}
label={artifact.absolutePath.split(/[\\/]/).pop() ?? artifact.absolutePath}
absPath={artifact.absolutePath} workdir={result.workingDir ?? ''}
childSessionId={meta.childSessionId} deviceId={deviceId} />)}
+ {result.error ? <View>
+ <Pressable accessibilityRole="button" accessibilityState={{ expanded: showError }} onPress={() => setShowError(!showError)}
+ style={({ pressed }) => [styles.errorToggle, pressed && mobileInteractionStyles.pressed]}>
+ <Text style={styles.secondary}>{t('devices.companions.errorDetails')}</Text>
+ </Pressable>
+ {showError ? <Text selectable style={styles.secondary}>{result.error}</Text> : null}
+ </View> : null}
</View>}
</View>;
}
const makeStyles = (colors: ThemeColors) => StyleSheet.create({
- card: { borderWidth: StyleSheet.hairlineWidth, borderColor: colors.border, backgroundColor: colors.surface, borderRadius: radius.container, overflow: 'hidden' },
- action: { minHeight: 44, padding: spacing.md, gap: spacing.xs },
- title: { fontSize: typeScale.body, color: colors.textPrimary },
- link: { textDecorationLine: 'underline' },
- secondary: { fontSize: typeScale.caption, color: colors.textSecondary },
+ card: { marginVertical: spacing.sm, borderWidth: StyleSheet.hairlineWidth, borderColor: colors.border,
+ backgroundColor: colors.surfaceElevated, borderRadius: radius.container, overflow: 'hidden' },
+ summary: { minHeight: 44, flexDirection: 'row', alignItems: 'center', gap: spacing.sm, paddingHorizontal: spacing.md, paddingVertical: spacing.sm },
+ title: { flex: 1, minWidth: 0, fontSize: typeScale.body, color: colors.textPrimary },
+ secondary: { flexShrink: 0, fontSize: typeScale.footnote, color: colors.textSecondary },
+ view: { flexShrink: 0, fontSize: typeScale.footnote, color: colors.textPrimary },
body: { fontSize: typeScale.body, color: colors.textPrimary },
- content: { padding: spacing.md, borderTopWidth: StyleSheet.hairlineWidth, borderColor: colors.border },
+ content: { paddingHorizontal: spacing.md, paddingVertical: spacing.md, gap: spacing.sm,
+ borderTopWidth: StyleSheet.hairlineWidth, borderColor: colors.border },
+ file: { minHeight: 44, flexDirection: 'row', alignItems: 'center', gap: spacing.sm },
+ fileLabel: { flex: 1, minWidth: 0, fontSize: typeScale.body, color: colors.textPrimary },
+ pending: { color: colors.textSecondary },
+ link: { textDecorationLine: 'underline' },
+ errorToggle: { minHeight: 44, justifyContent: 'center' },
});
diff --git a/apps/mobile/src/session/CompanionWorkingStatus.tsx b/apps/mobile/src/session/CompanionWorkingStatus.tsx
index 00d3403e07..2f711dad08 100644
--- a/apps/mobile/src/session/CompanionWorkingStatus.tsx
+++ b/apps/mobile/src/session/CompanionWorkingStatus.tsx
@@ -1,14 +1,56 @@
import { useCompanionGenerationCopy } from './useCompanionGenerationCopy';
-import { useMemo, useSyncExternalStore } from 'react';
+import { useEffect, useMemo, useState, useSyncExternalStore, type ReactNode } from 'react';
import { ActivityIndicator, StyleSheet, View } from 'react-native';
import { useTranslation } from 'react-i18next';
import { isCompactingWorkingStatus, readWorkingPhase } from '@cindy/maker-shared';
-import { Text } from '@/components/AppText';
-import { spacing, typeScale, useTheme } from '@/theme';
+import { useAuth } from '@/auth/AuthContext';
+import type { RemoteCollectionItem } from '@cindy/device-link';
+import {
+ cachedBotIdForSession,
+ cachedBotItem,
+ readRemoteResourceSnapshot,
+ remoteResourceCacheRevision,
+ subscribeRemoteResourceCache,
+} from '@/device-link/remoteResourceCache';
+import { spacing, typeScale, lineHeight, useTheme, useThemedStyles, type ThemeColors } from '@/theme';
import { remoteSessionStore, type RemoteSessionRunStatus } from './remoteSessionStore';
import { companionWorkingPhase } from './companionWorkingPhase';
+import { WorkingStatusText } from './WorkingStatusText';
import type { RemoteMessage } from './types';
+const TEAMMATE_COLLECTION_ID = 'teammates';
+
+/** Loads the account's cached roster when the route does not already name the Bot. */
+function useCompanionRosterCache(needed: boolean): string {
+ const { user } = useAuth();
+ const userId = user?.id ?? '';
+ useSyncExternalStore(subscribeRemoteResourceCache, remoteResourceCacheRevision);
+ const [, setLoaded] = useState(0);
+ useEffect(() => {
+ if (!needed || !userId) return;
+ let current = true;
+ void readRemoteResourceSnapshot(userId).then(() => { if (current) setLoaded(value => value + 1); });
+ return () => { current = false; };
+ }, [needed, userId]);
+ return userId;
+}
+
+/** The route's resource names the Bot; a cached roster link covers ordinary task entries. */
+function useCompanionBotId(deviceId: string, sessionId: string, resourceBotId: string): string {
+ const userId = useCompanionRosterCache(!resourceBotId);
+ return resourceBotId || cachedBotIdForSession(userId, TEAMMATE_COLLECTION_ID, deviceId, sessionId);
+}
+
+/** Name and avatar for a chat opened from a task link or notification: the cached roster row, display only. */
+export function useCompanionDisplayResource(deviceId: string, sessionId: string, resource: RemoteCollectionItem | null,
+ enabled: boolean): RemoteCollectionItem | null {
+ const userId = useCompanionRosterCache(enabled && !resource);
+ if (!enabled) return null;
+ if (resource) return resource;
+ const botId = cachedBotIdForSession(userId, TEAMMATE_COLLECTION_ID, deviceId, sessionId);
+ return botId ? cachedBotItem(userId, TEAMMATE_COLLECTION_ID, deviceId, botId) : null;
+}
+
/** One live reply position; optional host copy enriches the same factual phase. */
export function useCompanionWorkingLabel({ sessionId, deviceId, botId, active, messages, reconnectAttempt }: {
sessionId: string; deviceId: string; botId: string; active: boolean;
@@ -19,18 +61,31 @@ export function useCompanionWorkingLabel({ sessionId, deviceId, botId, active, m
const { phase: fallbackPhase, turnId } = useMemo(() => companionWorkingPhase(messages), [messages]);
const phase = readWorkingPhase(activity?.workingPhase) ?? (isCompactingWorkingStatus(activity?.compactDetail) ? 'compacting' : fallbackPhase);
const shown = active && activity?.phase !== 'needs-interaction' && activity?.phase !== 'error' && activity?.phase !== 'completed' && (!!reconnectAttempt || phase !== null);
- const copy = useCompanionGenerationCopy({ deviceId, botId, phase, active: shown && !reconnectAttempt, turnId });
+ const companionBotId = useCompanionBotId(deviceId, sessionId, botId);
+ const copy = useCompanionGenerationCopy({ deviceId, botId: companionBotId, phase, active: shown && !reconnectAttempt, turnId });
if (!shown) return null;
return reconnectAttempt ? t(reconnectAttempt.kind === 'overload' ? 'session.screen.modelBusyRetrying'
: reconnectAttempt.kind === 'rate-limit' ? 'session.screen.rateLimitRetrying' : 'session.screen.networkReconnecting') : copy;
}
-export function CompanionWorkingStatus({ label }: { label: string | null }) {
+/** Desktop BotAvatar `xs`: the composer status line stays compact on a phone. */
+export const COMPANION_STATUS_AVATAR_SIZE = 20;
+
+/** Composer-owned live status (Desktop BotWorkingStatus): avatar, spinner and paced copy. */
+export function CompanionWorkingStatus({ label, avatar }: { label: string | null; avatar?: ReactNode }) {
const { colors } = useTheme();
+ const styles = useThemedStyles(makeStyles);
+ // Terminal events unmount immediately; cadence only applies while the lifecycle is active.
if (!label) return null;
return <View style={styles.row} accessibilityLiveRegion="polite" testID="companion.workingStatus">
- <ActivityIndicator size="small" color={colors.textSecondary} />
- <Text style={{ color: colors.textSecondary, fontSize: typeScale.body, flexShrink: 1 }}>{label}</Text>
+ {avatar ? <View style={styles.avatar}>{avatar}</View> : null}
+ <ActivityIndicator size="small" color={colors.textTertiary} />
+ <WorkingStatusText text={label} style={styles.text} />
</View>;
}
-const styles = StyleSheet.create({ row: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm, paddingVertical: spacing.lg, paddingHorizontal: spacing.md } });
+
+const makeStyles = (colors: ThemeColors) => StyleSheet.create({
+ row: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm, minHeight: 32, paddingHorizontal: spacing.xs },
+ avatar: { flexShrink: 0 },
+ text: { color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },
+});
diff --git a/apps/mobile/src/session/InteractionPanel.tsx b/apps/mobile/src/session/InteractionPanel.tsx
index bc621aef17..e23d7cafc5 100644
--- a/apps/mobile/src/session/InteractionPanel.tsx
+++ b/apps/mobile/src/session/InteractionPanel.tsx
@@ -112,10 +112,18 @@ export type MobilePlanViewerState = 'half' | 'expanded' | 'minimized' | 'edit';
type RestorablePlanViewerState = Exclude<MobilePlanViewerState, 'minimized'>;
const CompanionInteractionContext = createContext(false);
+/** Who is asking in a teammate chat (Desktop PermissionPrompt `companion`). */
+export interface CompanionInteractionIdentity { name: string; avatar?: ReactNode }
+const CompanionIdentityContext = createContext<CompanionInteractionIdentity | null>(null);
-export function InteractionPanel(props: Parameters<typeof InteractionPanelContent>[0] & { companion?: boolean }) {
+export function InteractionPanel({ companionIdentity, ...props }: Parameters<typeof InteractionPanelContent>[0] & {
+ companion?: boolean;
+ companionIdentity?: CompanionInteractionIdentity | null;
+}) {
return <CompanionInteractionContext.Provider value={props.companion === true}>
- <InteractionPanelContent {...props} />
+ <CompanionIdentityContext.Provider value={props.companion === true && companionIdentity?.name ? companionIdentity : null}>
+ <InteractionPanelContent {...props} />
+ </CompanionIdentityContext.Provider>
</CompanionInteractionContext.Provider>;
}
@@ -628,6 +636,7 @@ function PermissionCard({
[i18nInstance.language, item.request],
);
const companion = useContext(CompanionInteractionContext);
+ const companionIdentity = useContext(CompanionIdentityContext);
const { colors } = useTheme();
const suggestions = sessionScopedPermissionSuggestions(item.request.suggestions);
const requestId = readRequestId(item);
@@ -646,7 +655,16 @@ function PermissionCard({
return (
<View style={cardStyle(styles, touchLayout)} testID="interaction.permission.card">
- {companion ? <>
+ {companion && companionIdentity ? (
+ // The request stays in the conversation voice: who asks, then the exact operation.
+ <View style={styles.companionRequester} testID="interaction.permission.requester">
+ {companionIdentity.avatar ? <View style={styles.companionRequesterAvatar}>{companionIdentity.avatar}</View> : null}
+ <View style={styles.companionRequesterText}>
+ <Text style={styles.cardTitle}>{t('interaction.companion.permissionRequest', { name: companionIdentity.name })}</Text>
+ <Text style={styles.kind}>{permissionState.title}</Text>
+ </View>
+ </View>
+ ) : companion ? <>
<View style={styles.companionCaption}>
<ShieldCheck size={iconSize.sm} color={colors.textSecondary} strokeWidth={iconStroke.regular} />
<Text style={styles.kind}>{t('interaction.kinds.permission.label')}</Text>
@@ -1784,6 +1802,9 @@ function InteractionTouchButton({
const makeStyles = (colors: ThemeColors) => StyleSheet.create({
companionCaption: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm },
+ companionRequester: { flexDirection: 'row', alignItems: 'center', gap: 10 },
+ companionRequesterAvatar: { flexShrink: 0 },
+ companionRequesterText: { flex: 1, minWidth: 0, gap: 2 },
companionEvidence: { gap: spacing.sm },
companionFact: { flexDirection: 'row', gap: spacing.md, alignItems: 'flex-start' },
companionFactLabel: { width: 64, color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.body },
diff --git a/apps/mobile/src/session/MessageRenderer.tsx b/apps/mobile/src/session/MessageRenderer.tsx
index d51cefb440..a2540774f5 100644
--- a/apps/mobile/src/session/MessageRenderer.tsx
+++ b/apps/mobile/src/session/MessageRenderer.tsx
@@ -12,6 +12,7 @@ import { usePluginResultCard } from './usePluginResultCard';
import { extractPayloadToolResultMedia, managedToolMediaKind } from '@cindy/maker-shared/payload-summary';
import { AuthorizationMessageCard } from './AuthorizationMessageCard';
import { sharedTaskAuthorName } from '@cindy/maker-shared';
+import { collectBotMessageTimeGroups, formatBotMessageGroupTime } from '@cindy/maker-shared/botTimeline';
import { CompanionMessageCard } from '@/session/CompanionMessageCard';
import { mobileDebugEnabled, mobileDebugLog } from '@/debug/mobileDebugLog';
import { errorText, resolvedUrlKind } from '@/debug/fileDiagnostics';
@@ -617,9 +618,17 @@ export interface ShareableMessageViewport {
visibleTop: number;
}
+/** Desktop BotAvatar `sm` beside teammate replies; exported so the host renders a matching portrait. */
+export const COMPANION_AVATAR_SIZE = 28;
+const COMPANION_AVATAR_GAP = 10;
+
interface MessageActions {
companion?: boolean;
companionWorkingLabel?: string | null;
+ /** Teammate portrait beside its replies (Desktop withAssistantAvatar). */
+ companionAvatar?: ReactNode;
+ /** First visible message of each five-minute teammate time group → its timestamp. */
+ companionTimeGroups?: ReadonlyMap<string, number>;
companionPluginWork?: ReturnType<typeof companionPluginWorkEntries>;
/** Partner chats keep the user's bubble plain; result and authorization cards remain independent. */
showPluginInvocations?: boolean;
@@ -676,6 +685,7 @@ interface MessageActions {
export function MessageRenderer({
companion = false,
companionWorkingLabel,
+ companionAvatar,
companionPluginInvocations,
showPluginInvocations = true,
remoteDeviceId,
@@ -729,6 +739,7 @@ export function MessageRenderer({
}: {
companion?: boolean;
companionWorkingLabel?: string | null;
+ companionAvatar?: ReactNode;
companionPluginInvocations?: ReadonlyMap<string, PluginInvocation[]>;
/** Offscreen preload and disappearing native screens must not replace the user's bookmark. */
isReadingPositionActive?: () => boolean;
@@ -1636,9 +1647,15 @@ export function MessageRenderer({
if (shareSelectionActiveRef.current) scheduleStickyShareCheckRef.current?.(true);
}, []);
const companionPluginWork = useMemo(() => companion ? companionPluginWorkEntries(items, companionPluginInvocations) : undefined, [companion, items, companionPluginInvocations]);
+ // Desktop MessageStream groups the visible teammate conversation (not hidden work) into five-minute stamps.
+ const companionTimeGroups = useMemo(() => companion ? collectBotMessageTimeGroups(items.flatMap((item) =>
+ item.type === 'message' && (item.message.kind === 'user' || item.message.kind === 'assistant' || item.message.companion)
+ ? [{ clientId: item.key, createdAt: item.message.createdAt }] : [])) : undefined, [companion, items]);
const actions: MessageActions & { firstUserMessageClientId?: string } = useMemo(() => ({
companion,
companionWorkingLabel,
+ companionAvatar,
+ companionTimeGroups,
companionPluginWork,
showPluginInvocations,
remoteDeviceId,
@@ -1673,6 +1690,8 @@ export function MessageRenderer({
}), [
companion,
companionWorkingLabel,
+ companionAvatar,
+ companionTimeGroups,
companionPluginWork,
showPluginInvocations,
remoteDeviceId,
@@ -2859,7 +2878,8 @@ const RenderItemView = memo(function RenderItemView({
node = item.message.authorization
? <AuthorizationMessageCard message={item.message} />
: item.message.companion
- ? <CompanionMessageCard message={item.message} />
+ ? <CompanionMessageCard message={item.message}
+ renderMarkdown={(text) => <CompanionCardMarkdown text={text} actions={actions} />} />
: item.message.orcaCard
? <OrcaCollabCard card={item.message.orcaCard} screenWidth={actions.screenWidth}
blockKey={JSON.stringify([actions.remoteDeviceId, item.key])} />
@@ -2944,9 +2964,15 @@ const RenderItemView = memo(function RenderItemView({
logUnhandledRenderItem(item);
break;
}
+ const groupTimestamp = actions.companion && item.type === 'message'
+ ? actions.companionTimeGroups?.get(item.key) : undefined;
+ // Desktop keeps the persistent task card on the replies' column with an invisible avatar.
+ const alignWithReplies = !!actions.companionAvatar && actions.companion && item.type === 'message'
+ && item.message.companion?.kind === 'task' && item.message.companion.meta.role === 'delegation-request';
return (
<View style={focused ? styles.focusedItem : undefined} testID={focused ? 'message.focusedItem' : undefined}>
- {node}
+ {groupTimestamp !== undefined ? <CompanionTimeGroupStamp timestamp={groupTimestamp} /> : null}
+ {alignWithReplies ? <View style={styles.companionAvatarInset}>{node}</View> : node}
</View>
);
});
@@ -3681,13 +3707,12 @@ function MessageBubble({
actions={[
...(canCopy ? [{ id: 'copy', title: copyActionLabel(copyState), image: 'doc.on.doc', disabled: copyState === 'copying' }] : []),
...(canShare ? [{ id: 'share', title: t('session.shareImage.shareMessage'), image: 'square.and.arrow.up' }] : []),
- ...(canFork ? [{ id: 'fork', title: messageControlActionLabel('fork', copyState), image: 'arrow.triangle.branch', disabled: actionBusy }] : []),
+ // Desktop's teammate action bar omits fork and per-turn cost/tokens: the Bot owns its one timeline.
...messageMenu.map(item => ({ id: item.id, title: item.label, image: item.image, destructive: item.destructive, disabled: actionBusy })),
...(absoluteTime ? [{ id: 'time', title: t('message.renderer.sentTime', { time: absoluteTime }), disabled: true }] : []),
- ...(turnCost || turnTokens ? [{ id: 'usage', title: turnCost ? t('message.renderer.turnCost', { cost: turnCost }) : t('message.renderer.turnTokens', { tokens: turnTokens }), disabled: true }] : []),
]}
onAction={id => {
- if (id === 'copy' || id === 'fork') selectControlAction(id);
+ if (id === 'copy') selectControlAction(id);
else if (id === 'share') actions.onEnterShareSelection?.(clientId);
else if (messageMenu.some(item => item.id === id)) selectMenuAction(id as MobileMessageMenuActionId);
}} /> : hasActions ? (
@@ -3770,7 +3795,16 @@ function MessageBubble({
</View>
);
- if (!shareSelectionActive) return messageNode;
+ // Desktop withAssistantAvatar: a teammate's reply hangs from its portrait (IM shape).
+ const companionAvatar = actions.companion && !isUser && item.message.kind === 'assistant'
+ && !item.message.systemCardType ? actions.companionAvatar : undefined;
+ const rowNode = companionAvatar ? (
+ <View style={styles.companionAvatarRow} testID="companion.replyRow">
+ <View style={styles.companionAvatarSlot}>{companionAvatar}</View>
+ <View style={styles.companionAvatarContent}>{messageNode}</View>
+ </View>
+ ) : messageNode;
+ if (!shareSelectionActive) return rowNode;
return (
<ShareMessageCheckbox
clientId={clientId}
@@ -3778,12 +3812,23 @@ function MessageBubble({
fill
>
<View style={styles.shareSelectionContent}>
- {messageNode}
+ {rowNode}
</View>
</ShareMessageCheckbox>
);
}
+/** Centered five-minute stamp above the first visible message of a teammate time group. */
+function CompanionTimeGroupStamp({ timestamp }: { timestamp: number }) {
+ const { i18n } = useTranslation();
+ const styles = useThemedStyles(makeStyles);
+ return (
+ <Text style={styles.companionTimeGroup} testID="companion.timeGroup">
+ {formatBotMessageGroupTime(timestamp, i18n.language)}
+ </Text>
+ );
+}
+
function copyActionLabel(state: CopyMessageStatus | 'idle' | 'copying'): string {
if (state === 'copying') return i18n.t('message.renderer.copyStateCopying');
if (state === 'copied') return i18n.t('message.renderer.copyStateCopied');
@@ -5176,6 +5221,13 @@ const ViewabilityGatedMathFormula = memo(function ViewabilityGatedMathFormula({
);
});
+/** A frozen task result reads like a reply: same Markdown, links and file chips (Desktop MarkdownRenderer). */
+function CompanionCardMarkdown({ text, actions }: { text: string; actions: MessageActions }) {
+ const layout = useMemo(() => buildMessageContentLayout({ screenWidth: actions.screenWidth }), [actions.screenWidth]);
+ return <MarkdownBody layout={layout} text={text} selectable
+ onOpenPayload={actions.onOpenPayload} onOpenSessionLink={actions.onOpenSessionLink} />;
+}
+
// 消息正文统一走原生 markdown 渲染(流式与完成态同一条路径,完成时无"原生→WebView"的切换跳变)。
// 文本选择 = 完成态消息的各块 Text 原生 selectable:长按文字就地弹系统选择手柄/Copy 菜单,
// 不跳转界面;整条复制走操作条按钮。选择按块进行(原生 Text 能力边界,跨段选择做不到)。
@@ -8214,6 +8266,19 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({
gap: spacing.sm,
},
companionAnswer: { backgroundColor: colors.surface, borderWidth: 0, paddingHorizontal: 0 },
+ // Desktop BotAvatar sm (28) + gap-2.5; the task card reuses the same inset.
+ companionAvatarRow: { flexDirection: 'row', alignItems: 'flex-start', gap: COMPANION_AVATAR_GAP },
+ companionAvatarSlot: { flexShrink: 0, marginTop: 2 },
+ companionAvatarContent: { flex: 1, minWidth: 0 },
+ companionAvatarInset: { paddingLeft: COMPANION_AVATAR_SIZE + COMPANION_AVATAR_GAP },
+ companionTimeGroup: {
+ color: colors.textTertiary,
+ fontSize: typeScale.caption,
+ lineHeight: lineHeight.caption,
+ marginBottom: spacing.md,
+ marginTop: spacing.sm,
+ textAlign: 'center',
+ },
companionUserBubble: { borderColor: colors.border },
userBubble: {
alignSelf: 'flex-end',
diff --git a/apps/mobile/src/session/TeammateGenerationLabel.tsx b/apps/mobile/src/session/TeammateGenerationLabel.tsx
index df120503de..a0d8f1eac7 100644
--- a/apps/mobile/src/session/TeammateGenerationLabel.tsx
+++ b/apps/mobile/src/session/TeammateGenerationLabel.tsx
@@ -1,14 +1,17 @@
import { readWorkingPhase } from '@cindy/maker-shared';
import type { RemoteResourceDisplay } from '@cindy/device-link';
-import { Text } from '@/components/AppText';
-import { useTheme, typeScale } from '@/theme';
+import { useTheme, typeScale, lineHeight, fontWeight } from '@/theme';
import { useCompanionGenerationCopy } from './useCompanionGenerationCopy';
+import { WorkingStatusText } from './WorkingStatusText';
+/** Lists consume the composer's public phase and host copy cache, in the preview line's rhythm. */
export function TeammateGenerationLabel({ deviceId, botId, generation }: {
deviceId: string; botId: string; generation: NonNullable<RemoteResourceDisplay['generation']>;
}) {
const { colors } = useTheme();
const label = useCompanionGenerationCopy({ deviceId, botId, phase: readWorkingPhase(generation.phase) ?? 'processing',
active: true, turnId: String(generation.startedAt) });
- return <Text numberOfLines={1} style={{ color: colors.textSecondary, fontSize: typeScale.footnote }}>{label}</Text>;
+ // A transient process note stays tertiary and italic so it never outranks a real new reply.
+ return <WorkingStatusText key={generation.startedAt} text={label ?? ''} style={{ color: colors.textTertiary,
+ fontSize: typeScale.code, fontStyle: 'italic', fontWeight: fontWeight.regular, lineHeight: lineHeight.subtitle }} />;
}
diff --git a/apps/mobile/src/session/TeammateList.tsx b/apps/mobile/src/session/TeammateList.tsx
index d8838bd00c..146f85bf62 100644
--- a/apps/mobile/src/session/TeammateList.tsx
+++ b/apps/mobile/src/session/TeammateList.tsx
@@ -3,7 +3,7 @@ import { TeammateGenerationLabel } from './TeammateGenerationLabel';
import { useMemo, useState } from 'react';
import { ActivityIndicator, FlatList, Pressable, RefreshControl, StyleSheet, View } from 'react-native';
import { useTranslation } from 'react-i18next';
-import { RefreshCw } from 'lucide-react-native';
+import { RefreshCw, TriangleAlert } from 'lucide-react-native';
import { resolveRemoteText } from '@cindy/device-link';
import { Text, TextInput } from '@/components/AppText';
import { MainWindowEmptyState } from '@/components/MobilePrimitives';
@@ -76,8 +76,14 @@ export function TeammateList({ items, loading, refreshing, error, isOnline, conn
.map(inline => inline.type === 'image' ? inline.alt : inline.text).join('').replace(/\s+/g, ' ').trim() : '';
const online = isOnline(row.host);
const connected = connectionState ? connectionState(row.host) : online;
- const accessiblePreview = online && display.generation
- ? t(`devices.companions.working.${readWorkingPhase(display.generation.phase) ?? 'processing'}`) : online ? preview : '';
+ // Desktop BotsSidebar: the cached reply stays readable offline; then the description, then an invitation.
+ const subtitle = display.subtitle ? resolveRemoteText(display.subtitle, i18n.language).replace(/\s+/g, ' ').trim() : '';
+ const summary = preview || subtitle || t('devices.companions.startChat');
+ const generating = online && !!display.generation;
+ const accessiblePreview = generating
+ ? t(`devices.companions.working.${readWorkingPhase(display.generation!.phase) ?? 'processing'}`) : summary;
+ const attention = display.status?.tone === 'warning' || display.status?.tone === 'critical'
+ ? resolveRemoteText(display.status.label, i18n.language) : '';
const ambiguous = (duplicateNames.get(title.normalize('NFKC').toLocaleLowerCase(i18n.language)) ?? 0) > 1;
const source = ambiguous ? row.host.deviceName : '';
const unread = isRemoteResourceUnread(user?.id ?? '', row.host.deviceId, row.item.ref.id, display.lastReplyAt);
@@ -87,16 +93,18 @@ export function TeammateList({ items, loading, refreshing, error, isOnline, conn
const selected = sameTeammate(current, teammateIdentity(row));
const meta = [connected === false ? t('devices.resources.hostOffline') : connected === null ? t('devices.resources.connectionUnknown') : '', source].filter(Boolean).join(' · ');
return <Pressable key={row.key} accessibilityRole="button" accessibilityState={{ selected, disabled: !online }}
- accessibilityLabel={[title, accessiblePreview, time, unread ? t('devices.companions.unread') : '', meta].filter(Boolean).join(', ')}
+ accessibilityLabel={[title, attention, accessiblePreview, time, unread ? t('devices.companions.unread') : '', meta].filter(Boolean).join(', ')}
disabled={!online} onPress={() => onSelect(row)} style={({ pressed }) => [styles.row, selected && styles.selected, pressed && styles.pressed]}
testID={`teammates.item.${row.host.deviceId}.${row.item.ref.id}`}>
<View style={styles.avatar}><RemoteCompanionAvatar avatar={display.avatar} deviceId={row.host.deviceId} name={title} online={online} /><View testID="teammate.connection" style={[styles.connection, { backgroundColor: connected === null ? colors.textTertiary : connected ? colors.statusDone : colors.statusError }]} /></View>
<View style={styles.body}>
<View style={styles.titleRow}><Text numberOfLines={1} style={styles.title}>{title}</Text>
+ {attention ? <TriangleAlert accessibilityLabel={attention} size={iconSize.sm} color={colors.warningFg} testID="teammate.attention" /> : null}
{time ? <Text numberOfLines={1} style={styles.time}>{time}</Text> : null}
{unread ? <View style={styles.unread} accessibilityLabel={t('devices.companions.unread')} /> : null}
</View>
- {online && display.generation ? <TeammateGenerationLabel deviceId={row.host.deviceId} botId={row.item.ref.id} generation={display.generation} /> : preview && online ? <Text numberOfLines={1} style={styles.preview}>{preview}</Text> : null}
+ {generating ? <TeammateGenerationLabel deviceId={row.host.deviceId} botId={row.item.ref.id} generation={display.generation!} />
+ : <Text numberOfLines={1} style={styles.preview}>{summary}</Text>}
{meta ? <Text numberOfLines={1} style={styles.meta}>{meta}</Text> : null}
</View>
</Pressable>;
diff --git a/apps/mobile/src/session/WorkingStatusText.tsx b/apps/mobile/src/session/WorkingStatusText.tsx
new file mode 100644
index 0000000000..80e373e091
--- /dev/null
+++ b/apps/mobile/src/session/WorkingStatusText.tsx
@@ -0,0 +1,95 @@
+import { useLayoutEffect, useRef, useState } from 'react';
+import { Animated, Easing, type StyleProp, type TextStyle } from 'react-native';
+import { Text } from '@/components/AppText';
+import { useReduceMotionEnabled } from '@/hooks/useReduceMotion';
+import { motionDuration, motionEasing } from '@/theme';
+
+/** Product cadence shared with Desktop `WorkingStatusText`. */
+export const WORKING_STATUS_MIN_INTERVAL_MS = 1000;
+
+/** Mount only for an active lifecycle (key it by turn). Unmounting cancels all pending copy. */
+export function WorkingStatusText({ text, style }: { text: string; style?: StyleProp<TextStyle> }) {
+ // Only an explicit `false` animates; an unknown preference commits directly.
+ const animate = useReduceMotionEnabled() === false;
+ const [displayed, setDisplayed] = useState(text);
+ const opacity = useRef(new Animated.Value(1)).current;
+ const state = useRef({
+ displayed: text,
+ latest: text,
+ changedAt: Date.now(),
+ fading: false,
+ animate,
+ timer: undefined as ReturnType<typeof setTimeout> | undefined,
+ unmounted: false,
+ });
+
+ useLayoutEffect(() => {
+ const current = state.current;
+ current.latest = text;
+ current.animate = animate;
+ const fade = (toValue: number, done?: () => void) => {
+ Animated.timing(opacity, {
+ toValue,
+ duration: motionDuration.fast,
+ easing: Easing.bezier(...motionEasing.move),
+ useNativeDriver: true,
+ }).start(({ finished }) => { if (finished && !current.unmounted) done?.(); });
+ };
+ const commitLatest = () => {
+ current.timer = undefined;
+ current.displayed = current.latest;
+ current.changedAt = Date.now();
+ current.fading = false;
+ setDisplayed(current.displayed);
+ if (current.animate) fade(1);
+ else { opacity.stopAnimation(); opacity.setValue(1); }
+ };
+ const beginTransition = () => {
+ current.timer = undefined;
+ if (current.latest === current.displayed) return;
+ if (!current.animate) {
+ commitLatest();
+ return;
+ }
+ current.fading = true;
+ // The fade callback consumes whichever copy is latest when it completes.
+ fade(0, commitLatest);
+ };
+
+ if (text === current.displayed) {
+ clearTimeout(current.timer);
+ current.timer = undefined;
+ if (current.fading) {
+ current.fading = false;
+ opacity.stopAnimation();
+ if (animate) fade(1);
+ else opacity.setValue(1);
+ }
+ } else if (current.fading) {
+ if (!animate) {
+ opacity.stopAnimation();
+ commitLatest();
+ }
+ } else if (current.timer === undefined) {
+ const remaining = Math.max(0, current.changedAt + WORKING_STATUS_MIN_INTERVAL_MS - Date.now());
+ current.timer = setTimeout(beginTransition, remaining);
+ }
+ }, [animate, opacity, text]);
+
+ useLayoutEffect(() => {
+ const current = state.current;
+ current.unmounted = false;
+ return () => {
+ current.unmounted = true;
+ clearTimeout(current.timer);
+ current.timer = undefined;
+ opacity.stopAnimation();
+ };
+ }, [opacity]);
+
+ return (
+ <Animated.View style={{ opacity, flexShrink: 1, minWidth: 0 }}>
+ <Text numberOfLines={1} style={style}>{displayed}</Text>
+ </Animated.View>
+ );
+}
diff --git a/apps/mobile/src/session/chatFilePathContext.ts b/apps/mobile/src/session/chatFilePathContext.ts
index 9d407b9307..1fe7833c91 100644
--- a/apps/mobile/src/session/chatFilePathContext.ts
+++ b/apps/mobile/src/session/chatFilePathContext.ts
@@ -24,6 +24,11 @@ export interface ChatFilePathTarget {
absPath: string;
/** `foo.ts:42` 形态拆出的行号(仅文件预览用)。 */
line?: number;
+ /**
+ * 路径所属的另一个任务(伙伴后台任务结果卡里的文件属于子任务);长按菜单的
+ * 打开 / 定位 / 分享按它执行,缺省为当前会话。
+ */
+ scope?: { sessionId: string; workdir: string };
}
export interface ChatFilePathContextValue {
diff --git a/apps/mobile/src/session/companionConversationPresentation.ts b/apps/mobile/src/session/companionConversationPresentation.ts
index 56733d6ce0..acf51a555e 100644
--- a/apps/mobile/src/session/companionConversationPresentation.ts
+++ b/apps/mobile/src/session/companionConversationPresentation.ts
@@ -51,6 +51,11 @@ export function companionConversationItems(items: readonly MobileMessageRenderIt
|| item.type === 'subagent_group' || item.type === 'todo') return false;
if (item.type !== 'message') return true;
const message = item.message;
+ // Desktop drops persisted synthetic resume separators from teammate chats; only the live
+ // reconnect card (still in progress) remains. The composer status carries recovery copy.
+ if (message.isSyntheticTrigger && message.systemCardType === 'auto-resume') {
+ return message.systemCardData?.live === true;
+ }
if (message.systemCardType) return true;
if (message.kind === 'thinking' || message.kind === 'tool') return false;
return message.kind !== 'assistant' || message.turnCompleted || sealed.has(item.key) || isDelivery(item)
diff --git a/apps/mobile/src/session/useCompanionGenerationCopy.ts b/apps/mobile/src/session/useCompanionGenerationCopy.ts
index 79bf2dc251..709a54f3b6 100644
--- a/apps/mobile/src/session/useCompanionGenerationCopy.ts
+++ b/apps/mobile/src/session/useCompanionGenerationCopy.ts
@@ -1,4 +1,4 @@
-import { useEffect, useState } from 'react';
+import { useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { REMOTE_RESOURCE_GET_CHANNEL, REMOTE_RESOURCE_PROTOCOL_VERSION } from '@cindy/device-link';
import { hasPublicWorkingSubject, type WorkingPhase } from '@cindy/maker-shared';
@@ -10,13 +10,15 @@ export function useCompanionGenerationCopy({ deviceId, botId, phase, active, tur
deviceId: string; botId: string; phase: WorkingPhase | null; active: boolean; turnId: string;
}) {
const { t, i18n } = useTranslation();
- const { invoke } = useDeviceLink();
+ const { invoke, connectionEpoch } = useDeviceLink();
const { accountGeneration } = useAuth();
const scope = JSON.stringify([accountGeneration, deviceId, botId, turnId, phase, i18n.language, active]);
const [caption, setCaption] = useState<{ scope: string; text: string } | null>(null);
+ const captionRef = useRef(caption); captionRef.current = caption;
useEffect(() => {
let cancelled = false;
- if (active && botId && phase && hasPublicWorkingSubject(phase)) {
+ // A reconnect may retry a request lost with the old link; one read per link epoch.
+ if (active && botId && phase && hasPublicWorkingSubject(phase) && captionRef.current?.scope !== scope) {
void invoke<unknown>(deviceId, REMOTE_RESOURCE_GET_CHANNEL, [{ client: {
protocolVersion: REMOTE_RESOURCE_PROTOCOL_VERSION, primitives: ['status'], locale: i18n.language,
}, ref: { collectionId: 'teammates', kind: 'bot', id: `working:${botId}/${phase}` } }]).then(value => {
@@ -28,6 +30,6 @@ export function useCompanionGenerationCopy({ deviceId, botId, phase, active, tur
}).catch(() => { /* Older hosts retain the local factual caption. */ });
}
return () => { cancelled = true; };
- }, [scope, invoke]);
+ }, [scope, invoke, connectionEpoch]);
return active ? caption?.scope === scope ? caption.text : t(`devices.companions.working.${phase ?? 'processing'}`) : null;
}
diff --git a/docs/design-previews/teammate-generation/README.md b/docs/design-previews/teammate-generation/README.md
index b38c8b3453..65cc168d77 100644
--- a/docs/design-previews/teammate-generation/README.md
+++ b/docs/design-previews/teammate-generation/README.md
@@ -71,3 +71,25 @@ PNG 位于忽略的 `tmp/teammate-generation-evidence/`:`mobile-chat-before/af
通用消息封口由宿主为 Claude Code、Codex 和 Pi 写入,手机不按引擎另造过滤规则;回归覆盖完成标记、无价格用量封口、
实时/历史、附件、问题、错误和结果回执。桌面对应投影、私聊路由、结果卡与润色状态测试作为语义参照。
原有一秒文案节奏与 alpha 实现未修改;公开阶段沿既有 `workingPhase`/压缩状态传递,旧端保持本地化阶段兜底。
+
+## 手机状态节奏、位置与对话卡片补齐
+
+以 `f5d296df49015be48e117ed689e5b2c3095cbf58` 为基线核对时,手机生成状态仍直接替换文字、放在消息列表尾部,
+并在普通任务入口缺少伙伴 ID 时只能显示默认阶段词;上文“保留一秒 / alpha”只描述了 Desktop。本次补齐:
+
+- 手机新增与 Desktop `WorkingStatusText` 同节奏的文字组件:至少停留 1 秒,按 `motionDuration.fast` 淡出再淡入,
+ 期间多次变化只呈现最新文案;系统“减弱动态效果”开启或尚未读到偏好时直接切换。输入框上方状态与列表行共用它。
+- 状态移到输入框上方的固定状态位(Desktop `BotWorkingStatus` 位置),阅读历史时仍可见;带伙伴头像、转圈与文案。
+ 交互面板出现时让位给面板,终态立即撤下。
+- 路由没有伙伴资源(普通任务链接、通知等入口)时,从账号隔离的名册缓存按对话链接找回伙伴 ID,只用于读取
+ `working:<botId>/<phase>` 公开文案,不作为权限或可用性依据。连接恢复后对尚未拿到润色的同一轮次、同一阶段
+ 有界重读一次;已拿到的文案不重复请求。
+- 对话呈现对齐 Desktop:伙伴回复带头像、五分钟时间分组(纯函数移至 `@cindy/maker-shared/botTimeline`,
+ Desktop 原路径继续再导出)、持久“已自动继续”分隔卡在伙伴视图隐藏(运行中的重连卡保留)、消息菜单去掉分叉与用量、
+ 权限卡以“{名字} 想请你确认一下”和伙伴头像呈现;后台任务卡的状态文案、状态色点、首次读取前的“正在开始”、
+ 标题兜底、补充消息与过期提示图标与 Desktop 一致;执行结果展开后用对话的 Markdown 渲染,文件与图片按子任务
+ 目录解析;伙伴私聊只读页改为左右气泡、头像与时间,含空态和上限提示;入口私聊痕迹显示对方头像与当前名字。
+- 伙伴列表:离线时继续显示已缓存的最近回复,预览为空时依次回落到简介和“开始对话”,需要处理时显示警示图标。
+
+证据边界:均为离线真实组件与生产函数测试(jsdom / React Native 平台壳注入),未启动 iOS / Android 实机、未做
+Light / Dark 实机目检;视觉颜色全部使用既有语义 token。发布到手机仍取决于对应 runtime 的 OTA 或整包。
diff --git a/docs/design-rules/design-inventory.md b/docs/design-rules/design-inventory.md
index 08f880af03..a3ad9977da 100644
--- a/docs/design-rules/design-inventory.md
+++ b/docs/design-rules/design-inventory.md
@@ -9,7 +9,7 @@
本区块由 `scripts/design-inventory.mjs` 生成,请勿手改。
重新生成:`pnpm design:inventory`;校验:`pnpm check:design-inventory`。
-计数快照日期:2026-09-24。生成命令:`pnpm design:inventory`。裸颜色匹配与 `scripts/hardcoded-color-audit.mjs` 共用 `scripts/shared/hardcoded-color-match.mjs`(HEX / RGB / HSL / OKLCH 等字面通道),两者在共享 matcher 内统一排除纯语义包装、注释及 PR 编号;数值颜色函数还需位于样式属性、CSS 声明/函数或任意值语境,普通文案字符串里的颜色函数文本不计入;字面 fallback 仍计入——语义 token 消费与注释引用不是迁移债务;裸圆角为粗粒度(`rounded*` class、`border-radius:` 与 React style 对象的 `borderRadius:`)。Token 计数为样式源里 `var(--token)` / `hsl(var(--token)` 的去重 ID 数;Mobile 的 ThemeColors / typeScale 等 RN 属性不计入此列,不能将 0 解释为未使用 Token。
+计数快照日期:2026-09-25。生成命令:`pnpm design:inventory`。裸颜色匹配与 `scripts/hardcoded-color-audit.mjs` 共用 `scripts/shared/hardcoded-color-match.mjs`(HEX / RGB / HSL / OKLCH 等字面通道),两者在共享 matcher 内统一排除纯语义包装、注释及 PR 编号;数值颜色函数还需位于样式属性、CSS 声明/函数或任意值语境,普通文案字符串里的颜色函数文本不计入;字面 fallback 仍计入——语义 token 消费与注释引用不是迁移债务;裸圆角为粗粒度(`rounded*` class、`border-radius:` 与 React style 对象的 `borderRadius:`)。Token 计数为样式源里 `var(--token)` / `hsl(var(--token)` 的去重 ID 数;Mobile 的 ThemeColors / typeScale 等 RN 属性不计入此列,不能将 0 解释为未使用 Token。
登记 surface 数:51。平台包含 Desktop 与 Mobile;静态入口发现不表示已迁移或已实机验证。
@@ -55,16 +55,16 @@
| `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, 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/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 | 211 | 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, 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/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 | 204 | 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, 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/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 | 236 | 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, 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, 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, [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/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/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/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 | 237 | 304 |
+| `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, 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, 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/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/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 | 237 | 306 |
| `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, 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/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 | 204 | 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, 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, [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/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/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 | 204 | 53 |
+| `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, 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/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 | 204 | 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, 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/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 | 204 | 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, 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/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 | 204 | 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, 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/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 | 236 | 79 |
-| `mobile.home` | mobile | 主机与资源首页 | app/index.tsx / app/devices/index.tsx | AccountSwitcherSheet, AdaptiveWindow, AndroidUpdateSheet, AppText, AuthContext, AutomationTimerIcon, BlurBackdrop, CenteredScreen, CompanionCreateNativeView, CompanionCreateNativeView.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, 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, _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/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/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/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 204 | 135 |
+| `mobile.home` | mobile | 主机与资源首页 | app/index.tsx / app/devices/index.tsx | AccountSwitcherSheet, AdaptiveWindow, AndroidUpdateSheet, AppText, AuthContext, AutomationTimerIcon, BlurBackdrop, CenteredScreen, CompanionCreateNativeView, CompanionCreateNativeView.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, 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/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/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 | 204 | 136 |
| `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, 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/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 | 204 | 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, 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/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 | 204 | 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, 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, [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/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/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 204 | 62 |
+| `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, 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/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 | 204 | 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, 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/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 | 204 | 59 |
### 生产路由覆盖
diff --git a/packages/maker-shared/package.json b/packages/maker-shared/package.json
index 14013c2c56..261a3dfaf7 100644
--- a/packages/maker-shared/package.json
+++ b/packages/maker-shared/package.json
@@ -78,6 +78,7 @@
"./botCollaboration": "./src/botCollaboration.ts",
"./botDirectMessage": "./src/botDirectMessage.ts",
"./botDelegation": "./src/botDelegation.ts",
+ "./botTimeline": "./src/botTimeline.ts",
"./remote-desktop-viewer": "./src/remote-desktop/viewerRuntime.js",
"./remote-desktop-mobile": "./src/remote-desktop/mobileHtml.ts",
"./remote-desktop-scripts": "./src/remote-desktop/viewerScripts.ts"
diff --git a/packages/maker-shared/src/botTimeline.ts b/packages/maker-shared/src/botTimeline.ts
new file mode 100644
index 0000000000..16ecf114e2
--- /dev/null
+++ b/packages/maker-shared/src/botTimeline.ts
@@ -0,0 +1,86 @@
+export const BOT_MESSAGE_TIME_GROUP_MS = 5 * 60 * 1_000;
+
+export interface BotTimelineMessage {
+ clientId: string;
+ createdAt?: string | number | null;
+}
+
+export interface BotReplyTimelineMessage extends BotTimelineMessage {
+ role: string;
+ systemCardType?: string;
+ botPrivateReply?: boolean;
+}
+
+function timestampOf(value: BotTimelineMessage['createdAt']): number | null {
+ const timestamp = typeof value === 'number' ? value : Date.parse(value ?? '');
+ return Number.isFinite(timestamp) && timestamp > 0 ? timestamp : null;
+}
+
+/**
+ * 返回每个时间组第一条可见消息的时间。工具调用与思考块应在调用前被排除,
+ * 因为它们不是伙伴对话时间线里的消息,也不能偷偷切开一个五分钟分组。
+ */
+export function collectBotMessageTimeGroups(
+ messages: readonly BotTimelineMessage[],
+ windowMs = BOT_MESSAGE_TIME_GROUP_MS,
+): ReadonlyMap<string, number> {
+ const groups = new Map<string, number>();
+ let groupStartTimestamp: number | null = null;
+ for (const message of messages) {
+ const timestamp = timestampOf(message.createdAt);
+ if (timestamp === null) continue;
+ if (groupStartTimestamp === null || timestamp - groupStartTimestamp >= windowMs) {
+ groups.set(message.clientId, timestamp);
+ groupStartTimestamp = timestamp;
+ }
+ }
+ return groups;
+}
+
+/**
+ * Find the first visible Bot reply after the read position captured on entry.
+ * The caller only supplies already-simplified render items, so hidden work rows
+ * cannot steal the divider from the first reply the user can actually see.
+ */
+export function findFirstUnreadBotReplyClientId(
+ messages: readonly BotReplyTimelineMessage[],
+ boundaryAt: number | null | undefined,
+): string | null {
+ if (boundaryAt === null || boundaryAt === undefined || !Number.isFinite(boundaryAt)) return null;
+ for (const message of messages) {
+ if (message.role !== 'assistant') continue;
+ // Bot-to-Bot stamps are internal conversation traces. The unread divider
+ // belongs on the Bot's next real reply/result, not on the message it received.
+ if (message.systemCardType === 'bot-direct-message' || message.botPrivateReply) continue;
+ const timestamp = timestampOf(message.createdAt);
+ if (timestamp !== null && timestamp > boundaryAt) return message.clientId;
+ }
+ return null;
+}
+
+function isSameLocalDay(left: Date, right: Date): boolean {
+ return (
+ left.getFullYear() === right.getFullYear() &&
+ left.getMonth() === right.getMonth() &&
+ left.getDate() === right.getDate()
+ );
+}
+
+export function formatBotMessageGroupTime(
+ timestamp: number,
+ locale: string,
+ now = Date.now(),
+): string {
+ const value = new Date(timestamp);
+ const current = new Date(now);
+ const dateFields: Intl.DateTimeFormatOptions = isSameLocalDay(value, current)
+ ? {}
+ : value.getFullYear() === current.getFullYear()
+ ? { month: 'short', day: 'numeric' }
+ : { year: 'numeric', month: 'short', day: 'numeric' };
+ return new Intl.DateTimeFormat(locale, {
+ ...dateFields,
+ hour: '2-digit',
+ minute: '2-digit',
+ }).format(value);
+}