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。

feat(mobile): 伙伴界面校准——列表、聊天、卡片、动效与启动导航 (#5257)

Chris Zhangcd22c161821f
diff --git a/apps/mobile/app/sessions/[sessionId].tsx b/apps/mobile/app/sessions/[sessionId].tsx
index 57a0bcf300..8a5fd2724e 100644
--- a/apps/mobile/app/sessions/[sessionId].tsx
+++ b/apps/mobile/app/sessions/[sessionId].tsx
@@ -16,7 +16,7 @@ import { getActiveMobileSessionRealm } from '@/config/env';
import { FailedScheduleNotice } from '@/session/FailedScheduleNotice';
import { shouldShowFailedScheduleNotice, type FailedScheduleRunSnapshot } from '@cindy/maker-shared/schedule-model';
import { CompanionHeader } from '@/session/CompanionHeader';
-import { CompanionNavigationDrawer } from '@/session/CompanionNavigationDrawer';
+import { useHiddenHistoryChase } from '@/session/hiddenHistoryChase';
import { collectCompanionPluginInvocations } from '@/session/pluginInvocations';
import { COMPANION_STATUS_AVATAR_SIZE, CompanionWorkingStatus, useCompanionDisplayResource, useCompanionWorkingLabel } from '@/session/CompanionWorkingStatus';
import { RemoteCompanionAvatar } from '@/components/RemoteCompanionAvatar';
@@ -696,6 +696,13 @@ const SESSION_ACTION_TEST_IDS = {
usage: 'session.usageButton',
} satisfies Record<SessionActionStripActionId, string>;
const COMPOSER_CONTROL_HIT_SLOP = { bottom: 8, left: 8, right: 8, top: 8 };
+/**
+ * The companion chat draws its own header row (back, identity, settings). Hide the native bar the
+ * task header may have configured while the entry was still resolving, so its title and sync
+ * spinner never sit on top of the companion identity. Stable object: expo-router applies screen
+ * options in a layout effect.
+ */
+const COMPANION_NATIVE_HEADER_OPTIONS = { headerShown: false, headerTitle: '' } as const;
const COMPOSER_INPUT_SINGLE_LINE_CONTENT_HEIGHT = MOBILE_COMPOSER_INPUT_SINGLE_LINE_HEIGHT;
const COMPOSER_INPUT_MULTILINE_CONTENT_THRESHOLD = 34;
const COMPOSER_INPUT_LINE_HEIGHT = MOBILE_COMPOSER_INPUT_LINE_HEIGHT;
@@ -2269,12 +2276,6 @@ export default function SessionScreen() {
companionResource?.ref.kind === 'bot' ? { source: 'bot' } : currentSession,
false,
);
- const companionNavigationScope = JSON.stringify([auth.accountGeneration, deviceId, sessionId, companionResource?.ref.id, shareSelectionActive]);
- const [companionNavigation, setCompanionNavigation] = useState({ scope: companionNavigationScope, open: false });
- // Reused routes must not carry an open drawer (or a queued action) into another companion.
- if (companionNavigation.scope !== companionNavigationScope) {
- setCompanionNavigation({ scope: companionNavigationScope, open: false });
- }
const lastAckKeyRef = useRef<string | null>(null);
const sessionResourceCards = useSessionResourceCards(
deviceId, deviceName, sessionId, currentSession?.source, remoteSessionRunning,
@@ -5702,6 +5703,18 @@ export default function SessionScreen() {
() => mergePendingSendItems(companionChat ? companionConversationItems(renderWindow.items) : renderWindow.items, pendingSendItems, optimisticClientIds),
[companionChat, pendingSendItems, renderWindow.items, optimisticClientIds],
);
+ const canLoadEarlierHistory = (historyView.snapshot.ready ? historyView.snapshot.hasMore : hasOlderMessages && messages.length > 0)
+ && !isScheduleDetail;
+ // A window of only hidden rows (a teammate's scheduled prompts) renders nothing and cannot scroll back:
+ // page older history until something shows. See hiddenHistoryChase.ts.
+ const chasingHiddenHistory = useHiddenHistoryChase({
+ scope: `${auth.accountGeneration}:${deviceId}:${sessionId}`,
+ enabled: appStateActive && remoteHistoryAvailable && !isScheduleDetail,
+ visibleCount: messageListItems.length,
+ canLoadEarlier: canLoadEarlierHistory,
+ loading: historyView.snapshot.ready ? historyView.snapshot.loading : loading || loadingEarlier,
+ cursor: historyView.snapshot.ready ? historyView.snapshot.nextCursor : oldestLoadedMessageCursor,
+ }, () => { void loadEarlierMessages(); });
// 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 ?? '',
@@ -8881,12 +8894,12 @@ export default function SessionScreen() {
<>
<Stack.Screen options={{ gestureEnabled: !sessionListDrawerOverlayMounted }} />
{companionChat && companionResource && !shareSelectionActive ? <>
- <SystemNavigationBack label={t('shared.back')} onPress={goBackToHome} />
+ <Stack.Screen options={COMPANION_NATIVE_HEADER_OPTIONS} />
<CompanionHeader key={`${auth.accountGeneration}:${deviceId}:${companionResource.ref.id}`}
resource={companionResource} deviceId={deviceId} deviceName={deviceName} online={!remoteUnavailableReason} controlsReady={companionEntry.ready}
+ working={!!companionWorkingLabel}
onSearch={() => setSearchOpen(true)}
- onBack={goBackToHome}
- onOpenNavigation={() => setCompanionNavigation({ scope: companionNavigationScope, open: true })} />
+ onBack={goBackToHome} />
</> : <SessionHeaderBar
horizontalSystemHeader={horizontalSystemHeader}
currentSession={currentSession}
@@ -9447,7 +9460,7 @@ export default function SessionScreen() {
topOverlayHeight={topOverlayHeight}
busyAction={messageActionBusy?.kind ?? null}
busyClientId={messageActionBusy?.clientId ?? null}
- canLoadEarlier={(historyView.snapshot.ready ? historyView.snapshot.hasMore : hasOlderMessages && messages.length > 0) && !isScheduleDetail}
+ canLoadEarlier={canLoadEarlierHistory}
emptyTestID="session.messageList.empty"
focusedItemKey={focusedMessageItemKey ?? null}
focusedRequestKey={focusedMessageRequestKey}
@@ -9494,6 +9507,7 @@ export default function SessionScreen() {
embedded
companion={companionChat}
companionIdentity={companionInteractionIdentity}
+ hangFromAvatar
collapse={pendingInteractionCollapse} deviceId={deviceId} sessionId={sessionId}
interactions={pending} activeRequestId={pendingInteractionActiveRequestId}
onActiveRequestIdChange={setPendingInteractionActiveRequestId}
@@ -9537,7 +9551,7 @@ export default function SessionScreen() {
)}
scrollResetKey={sessionId}
isReadingPositionActive={() => messageScreenFocusedRef.current && messageAppActiveRef.current}
- syncingWhileEmpty={syncingWhileEmpty}
+ syncingWhileEmpty={syncingWhileEmpty || chasingHiddenHistory}
testID="session.messageList"
/>
</ChatFilePathContext.Provider>
@@ -9974,12 +9988,6 @@ export default function SessionScreen() {
open={(paneLayout.persistent && !sessionListDrawerOverlayMounted) || sessionListDrawerOpen}
width={paneLayout.persistent && !sessionListDrawerOverlayMounted ? paneLayout.sidebarWidth : sessionListDrawerWidthRef.current}
/>
- {companionChat && companionResource && !shareSelectionActive ? (
- <CompanionNavigationDrawer key={companionNavigationScope}
- open={companionNavigation.scope === companionNavigationScope && companionNavigation.open}
- onClose={() => setCompanionNavigation({ scope: companionNavigationScope, open: false })}
- onSearch={() => setSearchOpen(true)} />
- ) : null}
</MessageHistoryOverlay>
</View>
);
diff --git a/apps/mobile/docs/mobile-design-guide.md b/apps/mobile/docs/mobile-design-guide.md
index 6d0f0e2063..49ae26a98f 100644
--- a/apps/mobile/docs/mobile-design-guide.md
+++ b/apps/mobile/docs/mobile-design-guide.md
@@ -49,12 +49,13 @@
| `betaChannelBadgeBackground` | `#DF0C27` | `#DF0C27` | Beta 渠道开关已打开时,当前版本旁的状态徽标底色 |
| `betaChannelBadgeForeground` | `#FFFFFF` | `#FFFFFF` | Beta 渠道状态徽标文字,与底色对比度 4.98:1 |
| `permAutoAccent` | `#417CDD` | `#417CDD` | 自动审批权限模式强调 |
+| `botUnread` | `#417CDD` | `#417CDD` | **仅限**伙伴列表的未读点(桌面 `--bot-unread-bg` 的移动端镜像,见 `DESIGN.md` Bot Unread Badge) |
| `errorText` | `#0F0F0F` | `#EDEDED` | 错误说明文字(跟随 textPrimary) |
| `errorBorder` | `#858581` | `#8A8A8A` | 错误边框(跟随 borderStrong) |
| `overlay` | rgba(38,38,38,.35) | rgba(0,0,0,.45) | modal / lightbox 背板 |
**规则:**
-- **语义不变色**(`statusReady` / `statusAccent` / `betaChannelBadgeBackground` / `betaChannelBadgeForeground`)跨 light / dark 一致——它们是状态语义,不随主题漂移。Beta 红色只用于设置页当前版本旁的渠道徽标,不得扩展为装饰色、错误色或 CTA。
+- **语义不变色**(`statusReady` / `statusAccent` / `betaChannelBadgeBackground` / `betaChannelBadgeForeground` / `botUnread`)跨 light / dark 一致——它们是状态语义,不随主题漂移。Beta 红色只用于设置页当前版本旁的渠道徽标,不得扩展为装饰色、错误色或 CTA。
- **浅色卡片主要靠描边分层**:页面提亮到 `#F9F9F6` 后,近白卡片相对页面只剩 1.05 的色差(桌面 1.12)。新增浮起面(卡片 / 列表行 / 浮层 / 输入容器)**必须带 1px `border`**,不要只靠 `surfaceElevated` 的填充色差;需要“沉下去”的块(选中底、展开块、代码卡)用比页面更暗的档。
- **文字三档由深到浅**:正文 → 二级 → 三级,在所在底色上都 ≥ 4.5:1(`themeTokens.test.ts` 守护)。占位字单独用 `textPlaceholder`,比三级更淡但 ≥ 3:1,只给输入框占位字用。新增文字不要拿 `textTertiary` 当“更弱的二级”以外的用途,也不要为了“更淡”自行调低透明度。
- **CTA 在 dark 反相为近白**:`cta` 近白底 + `ctaText` 深字。注意别让近白 pill 看起来像 disabled——新增主操作 / 选中态后在 dark 下目检。
@@ -233,6 +234,24 @@ iOS 新增与改造界面遵循 [iOS 原生界面规范](../../../docs/design-ru
---
+### 伙伴列表行与伙伴卡片(2026-09-29 定稿)
+
+伙伴页的行与聊天里的卡片各有一个共享组件,新入口直接复用,不要另画一套:
+
+- **列表行 `CompanionListRow`**:私聊与群聊同一种行。行高 78,头像 44(群为双人叠放 `BotGroupDuoAvatar`),
+ 分隔线只画在文字列下方(从 72 到屏幕右缘)、最后一行不画;右上时间位只放一样东西:时间,或工作中的中性
+ 转圈;第二行是预览,等你确认 / 需要关注 / 离线时在预览前加前缀词(正文色 500),不用彩色点。未读只用
+ `botUnread` 蓝点(主机只给「有没有未读」,没有条数);在线状态用头像右下的 `CompanionPresenceDot`,离线头像
+ 降透明度;两个伙伴同名时名字后加「· 电脑名」。首次读取慢时显示同几何的骨架行。
+- **聊天顶栏 `ChatIdentityHeader`**:私聊与群聊共用。返回 + 32 标记 + 标题 16/22 600 + 副标题 12/18
+ 三级色 + 设置;点身份区与设置打开同一份资料 / 设置。私聊副标题保留设备名,离线时前面加「离线 ·」。
+- **卡片外壳**:`surfaceElevated` 底 + 1px `border` + `radius.container` + 内边距 16。眉题 13/18 medium 二级色,
+ 标题 16/22 medium,状态行 13/18 二级色;只有运行中(`statusAccent` 呼吸)与失败(`statusError`)带颜色。
+- **卡片按钮 `CompanionCardButton`**:高 38(hitSlop 补到 44)、pill、15/20 medium,**文字始终居中**;一行里等宽
+ 平分,次要在左、主操作在右;次要按钮用 `surfaceChip` 填充不加描边。不要在卡片里写 `textAlign: 'left'` 的按钮。
+- **动效**:新消息与卡片用 `CompanionEntering` / `CompanionFadeIn`(RN `Animated`,原生驱动,只动 opacity /
+ transform,系统减弱动效时静止);工作中用 `CompanionPresenceRing` + `ThinkingDots`,不另写循环动画。
+
## 5. 间距 / 圆角 / 触控 / 安全区
- **间距 `spacing`**:`xs 4 · sm 8 · md 12 · lg 16 · xl 24 · xxl 32`(基数 4)。避免 `2 / 6 / 13 / 17` 这类裸数字;1-2pt 的微调若实在需要,集中、少量、写注释。
diff --git a/apps/mobile/src/__tests__/BotGroupChatScreen.test.tsx b/apps/mobile/src/__tests__/BotGroupChatScreen.test.tsx
index 4785293223..f88d64be7b 100644
--- a/apps/mobile/src/__tests__/BotGroupChatScreen.test.tsx
+++ b/apps/mobile/src/__tests__/BotGroupChatScreen.test.tsx
@@ -40,6 +40,10 @@ vi.mock('react-native', () => {
Alert: { alert: h.alert },
useWindowDimensions: () => ({ width: 390, height: 844 }),
AppState: { currentState: 'active', addEventListener: () => ({ remove() {} }) },
+ Keyboard: { dismiss: () => {} },
+ Animated: { View: box('div'), Value: class { setValue() {} interpolate() { return this; } }, timing: () => ({ start() {}, stop() {} }),
+ loop: () => ({ start() {}, stop() {} }), sequence: () => ({}) },
+ Easing: { inOut: () => undefined, ease: undefined, bezier: () => undefined },
};
});
vi.mock('expo-router', () => ({
@@ -60,11 +64,12 @@ vi.mock('react-i18next', async (importOriginal) => ({
}));
vi.mock('expo-crypto', () => ({ randomUUID: () => `uuid-${++h.uuid}` }));
vi.mock('lucide-react-native', () => Object.fromEntries(
- ['ChevronLeft', 'Settings2', 'Plus', 'Square', 'Users', 'X', 'Check', 'CircleAlert', 'CircleCheck', 'CircleDashed', 'FileText', 'Sparkles', 'Folder', 'Camera', 'Image']
+ ['ChevronLeft', 'Settings2', 'Plus', 'Square', 'Users', 'X', 'Check', 'CircleAlert', 'CircleCheck', 'CircleDashed', 'FileText', 'Sparkles', 'Folder', 'Camera', 'Image',
+ 'Layers', 'ListChecks', 'Ellipsis', 'ChevronRight', 'ChevronDown']
.map((name) => [name, () => null]),
));
-vi.mock('@/theme', () => ({
- useThemedStyles: () => ({}), useTheme: () => ({ colors: {} }), fontWeight: {}, iconStroke: {}, monoFont: 'mono',
+vi.mock('@/theme', async () => ({
+ ...await import('@/theme/tokens'), useThemedStyles: () => ({}), useTheme: () => ({ colors: {} }), monoFont: 'mono',
}));
vi.mock('@/auth/AuthContext', () => ({ useAuth: () => ({
user: { id: 'owner' }, accountGeneration: 1, getAccessToken: async () => 'token', apiFetch: async () => ({}),
@@ -110,7 +115,7 @@ vi.mock('@/session/CompanionSheet', () => ({
}));
vi.mock('@/session/BotGroupAvatars', () => ({
BOT_GROUP_MESSAGE_AVATAR_SIZE: 28, BOT_GROUP_STEP_AVATAR_SIZE: 24, BOT_GROUP_INLINE_AVATAR_SIZE: 20, BOT_GROUP_ROW_AVATAR_SIZE: 32,
- BotGroupAvatar: () => null, BotGroupAvatarStack: () => null,
+ BotGroupAvatar: () => null, BotGroupDuoAvatar: () => null,
useBotGroupIdentities: () => (botId: string, fallbackName = '', member?: { name: string }) => ({ botId, name: fallbackName || member?.name || botId }),
}));
vi.mock('@/session/BotGroupSpeakerRow', () => ({
@@ -180,6 +185,9 @@ vi.mock('@/session/useBotGroupRemoteMedia', () => ({ useBotGroupRemoteMedia: ()
vi.mock('@/session/useHostTeammates', () => ({ useHostTeammates: () => h.teammates }));
vi.mock('@/session/useBotGroupChat', () => ({ useBotGroupChat: () => h.chat }));
+vi.mock('@/hooks/useReduceMotion', () => ({ useReduceMotionEnabled: () => true }));
+vi.mock('@/session/CompanionPresenceRing', () => ({ CompanionPresenceRing: () => null }));
+vi.mock('@/session/ThinkingDots', () => ({ ThinkingDots: () => null }));
import { BotGroupChatScreen } from '@/session/BotGroupChatScreen';
Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });
@@ -381,7 +389,7 @@ describe('group timeline', () => {
steps: [{ ...data.plans[0]!.steps[0]!, status: 'done' }, { ...data.plans[0]!.steps[1]!, status: 'failed' }] };
await render(data);
expect(byId('botGroup.followUp.retry')?.textContent).toContain('groupChat.timeline.retryStep');
- expect(node.textContent).toContain('groupChat.timeline.stepFailed(name=阿布)');
+ expect(node.textContent).toContain('groupChat.followUp.failedStep(step=2)');
await click('botGroup.followUp.retry');
expect(h.chat.act).toHaveBeenLastCalledWith('plan-retry', { planId: 'p1' });
});
@@ -665,10 +673,11 @@ describe('group settings', () => {
await act(async () => { h.inputs['botGroup.settings.name'].onChangeText('新名字'); });
await act(async () => { h.inputs['botGroup.settings.name'].onBlur(); });
expect(h.chat.act).toHaveBeenLastCalledWith('update', { name: '新名字' });
- expect(byId('botGroup.settings.organizer.mimi')).toBeNull();
- await click('botGroup.settings.organizer.abu');
+ // The organizer is not offered again; each member row opens its own menu.
+ expect(byId('botGroup.settings.memberMenu.mimi.action.organizer:mimi')).toBeNull();
+ await click('botGroup.settings.memberMenu.abu.action.organizer:abu');
expect(h.chat.act).toHaveBeenLastCalledWith('update', { organizerBotId: 'abu' });
- await click('botGroup.settings.remove.xiaoman');
+ await click('botGroup.settings.memberMenu.xiaoman.action.remove:xiaoman');
expect(h.chat.act).toHaveBeenLastCalledWith('set-members', { botIds: ['mimi', 'abu'] });
await click('botGroup.settings.add');
// Current members are not offered again.
@@ -695,7 +704,7 @@ describe('group settings', () => {
const data = group();
data.members = data.members.slice(0, 2);
await openSettings(data);
- expect(byId('botGroup.settings.remove.abu')?.disabled).toBe(true);
+ expect(byId('botGroup.settings.memberMenu.abu.action.remove:abu')?.disabled).toBe(true);
});
it('deletes after the system confirmation, then leaves once the sheet has closed', async () => {
diff --git a/apps/mobile/src/__tests__/BotGroupList.test.tsx b/apps/mobile/src/__tests__/BotGroupList.test.tsx
index b0d33164e5..fa3f5c9d14 100644
--- a/apps/mobile/src/__tests__/BotGroupList.test.tsx
+++ b/apps/mobile/src/__tests__/BotGroupList.test.tsx
@@ -33,16 +33,22 @@ vi.mock('react-i18next', async (importOriginal) => ({
i18n: { language: 'zh-CN' },
}),
}));
-vi.mock('lucide-react-native', () => ({ Plus: () => null, Sparkles: ({ testID }: any) => el('i', { 'data-testid': testID }), Check: () => null, Users: () => null }));
-vi.mock('@/theme', () => ({ useThemedStyles: () => ({}), useTheme: () => ({ colors: {} }), fontWeight: {}, iconStroke: {} }));
+vi.mock('lucide-react-native', () => ({ Plus: () => null, Check: () => null, Users: () => null }));
+vi.mock('@/theme', async () => {
+ const tokens = await import('@/theme/tokens');
+ return { ...tokens, useThemedStyles: () => ({}), useTheme: () => ({ colors: {} }) };
+});
+vi.mock('@/hooks/useReduceMotion', () => ({ useReduceMotionEnabled: () => true }));
vi.mock('@/auth/AuthContext', () => ({ useAuth: () => ({ user: { id: 'owner' }, accountGeneration: 1 }) }));
vi.mock('@/device-link/DeviceLinkContext', () => ({ useDeviceLink: () => ({ invoke: h.invoke, openLink: h.openLink }) }));
vi.mock('@/utils/useMinuteNow', () => ({ useMinuteNow: () => 0 }));
vi.mock('@/session/sessionList', () => ({ formatRemoteSessionSidebarTime: () => '9:41' }));
+vi.mock('@/session/SessionRightSpinner', () => ({ SessionRightSpinner: ({ testID }: any) => el('i', { 'data-testid': testID }) }));
vi.mock('@/components/AppText', () => ({
Text: ({ children, testID }: any) => el('span', { 'data-testid': testID }, children),
TextInput: ({ testID, ...props }: any) => { h.inputs[testID] = props; return el('input', { 'data-testid': testID, value: props.value ?? '', readOnly: true }); },
}));
+vi.mock('@/session/CompanionSettingsRow', () => ({ CompanionSettingsRow: (props: any) => el('button', { 'data-testid': props.testID, onClick: props.onPress }, props.label) }));
vi.mock('@/components/MobilePrimitives', () => ({
MainWindowActionButton: ({ action }: any) => el('button', { 'data-testid': action.testID, disabled: action.disabled || action.busy, onClick: action.onPress }, action.label),
MainWindowRowButton: ({ children, onPress, testID }: any) => el('button', { 'data-testid': testID, onClick: onPress }, children),
@@ -63,15 +69,21 @@ vi.mock('@/session/CompanionSheet', () => ({
return visible ? el('div', { 'data-testid': testID }, children) : null;
},
}));
+vi.mock('@/session/HomeHeaderGlassButton', () => ({
+ HomeHeaderGlassButton: ({ onPress, testID, accessibilityLabel }: any) => el('button', { 'data-testid': testID, 'aria-label': accessibilityLabel, onClick: onPress }),
+}));
+vi.mock('@/session/CompanionProfileSheet', () => ({ CompanionCreateSheet: () => null }));
vi.mock('@/session/BotGroupAvatars', () => ({
BOT_GROUP_ROW_AVATAR_SIZE: 32,
BotGroupAvatar: () => null,
- BotGroupDuoAvatar: ({ members }: any) => el('span', { 'data-testid': 'duo' }, members.map((member: any) => member.name).join('+')),
+ BotGroupDuoAvatar: ({ members, working }: any) => el('span', { 'data-testid': 'duo', 'data-working': String(!!working) }, members.map((member: any) => member.name).join('+')),
useBotGroupIdentities: () => (botId: string, fallbackName = '') => ({ botId, name: fallbackName || botId }),
}));
vi.mock('@/session/useHostTeammates', () => ({ useHostTeammates: () => h.teammates }));
+vi.mock('@/session/useTeammateRoster', () => ({ TEAMMATE_COLLECTION_ID: 'teammates' }));
-import { BotGroupSection } from '@/session/BotGroupList';
+import { BotGroupListRow } from '@/session/BotGroupList';
+import { TeammateCreateButton } from '@/session/TeammateCreateButton';
Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });
@@ -84,6 +96,8 @@ const row = (deviceId: string, id: string, display: Record<string, unknown>): Ho
});
const teammate = (id: string, title: string) => ({ key: `mac:${id}`, host: { deviceId: 'mac', deviceName: 'Mac' },
item: { ref: { collectionId: 'teammates', kind: 'bot', id }, revision: '1', display: { title }, links: [] } });
+const mac = { deviceId: 'mac', deviceName: 'Mac' };
+const pc = { deviceId: 'pc', deviceName: 'PC' };
let root: Root;
let node: HTMLDivElement;
@@ -93,18 +107,6 @@ async function click(id: string) {
if (!target) throw new Error(`missing ${id}`);
await act(async () => { target.click(); });
}
-const props = (overrides: Record<string, unknown> = {}) => ({
- items: [row('mac', 'g-old', { timestamp: 1, preview: '**阿布**:写好了' }), row('pc', 'g-new', { timestamp: 5, generation: { phase: 'processing', startedAt: null }, preview: { fallback: 'Mimi is splitting the work…', translations: { 'zh-CN': '咪咪正在安排…' } } })],
- query: '',
- isOnline: () => true,
- createTargets: [{ deviceId: 'mac', deviceName: 'Mac' }],
- onOpen: vi.fn(), onOpenCreated: vi.fn(),
- ...overrides,
-});
-async function render(value = props()) {
- await act(async () => root.render(el(BotGroupSection, value as any)));
- return value;
-}
beforeEach(() => {
vi.clearAllMocks(); h.inputs = {}; h.nativeMenu = true;
@@ -113,42 +115,59 @@ beforeEach(() => {
});
afterEach(async () => { await act(async () => root.unmount()); });
-describe('group section', () => {
- it('lists groups newest first with member avatars, localized previews and a running mark', async () => {
- const value = await render();
- const rows = [...node.querySelectorAll('[data-testid^="botGroups.item."]')];
- expect(rows.map((entry) => entry.getAttribute('data-testid'))).toEqual(['botGroups.item.pc.g-new', 'botGroups.item.mac.g-old']);
- expect(rows[0]!.textContent).toContain('咪咪正在安排…');
- expect(rows[1]!.textContent).toContain('阿布:写好了');
- expect(rows[1]!.textContent).not.toContain('**');
- expect(rows[0]!.querySelector('[data-testid="botGroups.running"]')).not.toBeNull();
- expect(rows[1]!.querySelector('[data-testid="botGroups.running"]')).toBeNull();
- expect(byId('duo')?.textContent).toBe('咪咪+阿布');
- await click('botGroups.item.mac.g-old');
- expect(value.onOpen).toHaveBeenCalledWith(value.items[0]);
- });
+describe('group row', () => {
+ const groups = [
+ row('pc', 'g-new', { timestamp: 5, generation: { phase: 'processing', startedAt: null }, preview: { fallback: 'Mimi is splitting the work…', translations: { 'zh-CN': '咪咪正在安排…' } } }),
+ row('mac', 'g-old', { timestamp: 1, preview: '**阿布**:写好了' }),
+ ];
+ async function render(isOnline: (host: { deviceId: string }) => boolean = () => true) {
+ const onPress = vi.fn();
+ await act(async () => root.render(el('div', null, groups.map((group, index) =>
+ el(BotGroupListRow, { key: group.key, row: group, online: isOnline(group.host), last: index === groups.length - 1, onPress: () => onPress(group) })))));
+ return onPress;
+ }
- it('disables groups whose computer is offline and hides the running mark there', async () => {
- await render(props({ isOnline: (host: { deviceId: string }) => host.deviceId === 'mac' }));
- expect(byId('botGroups.item.pc.g-new')?.disabled).toBe(true);
- expect(byId('botGroups.item.pc.g-new')?.textContent).toContain('devices.resources.hostOffline');
- expect(byId('botGroups.running')).toBeNull();
+ it('shows member avatars, the host’s localized preview without Markdown, and a working state in the time slot', async () => {
+ const onPress = await render();
+ const fresh = byId('botGroups.item.pc.g-new')!;
+ const done = byId('botGroups.item.mac.g-old')!;
+ expect(fresh.textContent).toContain('咪咪正在安排…');
+ expect(done.textContent).toContain('阿布:写好了');
+ expect(done.textContent).not.toContain('**');
+ expect(fresh.querySelector('[data-testid="companion.row.working"]')).not.toBeNull();
+ expect(fresh.querySelector('[data-testid="duo"]')?.getAttribute('data-working')).toBe('true');
+ expect(done.querySelector('[data-testid="companion.row.working"]')).toBeNull();
+ expect(done.textContent).toContain('9:41');
+ expect(done.querySelector('[data-testid="duo"]')?.textContent).toBe('咪咪+阿布');
+ await click('botGroups.item.mac.g-old');
+ expect(onPress).toHaveBeenCalledWith(groups[1]);
});
- it('filters by the teammate search and shows an empty hint', async () => {
- await render(props({ query: '阿布' }));
- expect(node.querySelectorAll('[data-testid^="botGroups.item."]')).toHaveLength(2);
- await render(props({ query: '没有的' }));
- expect(byId('botGroups.section')).toBeNull();
- await render(props({ items: [] }));
- expect(byId('botGroups.empty')?.textContent).toBe('groupChat.list.empty');
+ it('disables a group whose computer is offline, says so in the preview, and stops the working state', async () => {
+ await render((host) => host.deviceId === 'mac');
+ const offline = byId('botGroups.item.pc.g-new')!;
+ expect(offline.disabled).toBe(true);
+ expect(offline.textContent).toContain('devices.resources.hostOffline');
+ expect(offline.querySelector('[data-testid="companion.row.working"]')).toBeNull();
+ expect(offline.querySelector('[data-testid="duo"]')?.getAttribute('data-working')).toBe('false');
});
});
-describe('create a group', () => {
- it('creates on the only computer with 2–6 teammates in list order, then opens it after the sheet closes', async () => {
- const value = await render();
- await click('botGroups.create');
+describe('create from the teammate page + menu', () => {
+ async function render(groupTargets = [mac], nativeMenu = true) {
+ h.nativeMenu = nativeMenu;
+ const onGroupCreated = vi.fn();
+ await act(async () => root.render(el(TeammateCreateButton, {
+ targets: [mac], groupTargets, preferredDeviceId: 'pc', onCreated: vi.fn(), onGroupCreated,
+ })));
+ return onGroupCreated;
+ }
+
+ it('offers 新建伙伴 and 新建群聊, creates with 2–6 teammates in list order, then opens it after the sheet closes', async () => {
+ const onGroupCreated = await render();
+ const titles = [...node.querySelectorAll('[data-testid^="teammates.createMenu.action."]')].map((entry) => entry.textContent);
+ expect(titles).toEqual(['devices.companions.createTeammate', 'groupChat.create.title']);
+ await click('teammates.createMenu.action.group:mac');
expect(byId('botGroup.create')).not.toBeNull();
await click('botGroup.create.submit');
expect(node.textContent).toContain('groupChat.create.nameRequired');
@@ -167,12 +186,12 @@ describe('create a group', () => {
expect(request[1]).toBe('maker:remote-resources:invoke');
expect(request[2][0]).toMatchObject({ collectionId: 'bot-groups', actionId: 'create', input: { name: '官网', botIds: ['mimi', 'abu'] } });
expect(byId('botGroup.create')).toBeNull();
- expect(value.onOpenCreated).toHaveBeenCalledWith({ deviceId: 'mac', deviceName: 'Mac' }, 'g9');
+ expect(onGroupCreated).toHaveBeenCalledWith(mac, 'g9');
});
it('shows the host’s reason when it refuses', async () => {
await render();
- await click('botGroups.create');
+ await click('teammates.createMenu.action.group:mac');
await act(async () => { h.inputs['botGroup.create.name'].onChangeText('官网'); });
await click('botGroup.create.member.abu');
await click('botGroup.create.member.mimi');
@@ -181,29 +200,29 @@ describe('create a group', () => {
expect(byId('botGroup.create.error')?.textContent).toBe('groupChat.errors.memberUnavailable');
});
- it('asks which computer hosts the group when several support it', async () => {
- const value = await render(props({ createTargets: [{ deviceId: 'mac', deviceName: 'Mac' }, { deviceId: 'pc', deviceName: 'PC' }], preferredDeviceId: 'pc' }));
- const options = [...node.querySelectorAll('[data-testid^="botGroups.createMenu.action."]')].map((entry) => entry.textContent);
- expect(options).toEqual(['PC', 'Mac']);
- await click('botGroups.createMenu.action.pc');
+ it('asks which computer hosts the group when several support it, remembered computer first', async () => {
+ const onGroupCreated = await render([mac, pc]);
+ const hosts = [...node.querySelectorAll('[data-testid^="teammates.createMenu.action.group:"]')].map((entry) => entry.textContent);
+ expect(hosts).toEqual(['PC', 'Mac']);
+ await click('teammates.createMenu.action.group:pc');
expect(node.textContent).toContain('groupChat.create.computerNote(deviceName=PC)');
- expect(value.onOpenCreated).not.toHaveBeenCalled();
+ expect(onGroupCreated).not.toHaveBeenCalled();
});
it('falls back to a sheet of the same choices where the platform has no anchored menu', async () => {
- h.nativeMenu = false;
- await render(props({ createTargets: [{ deviceId: 'mac', deviceName: 'Mac' }, { deviceId: 'pc', deviceName: 'PC' }] }));
- expect(byId('botGroups.createMenu.sheet')).toBeNull();
- await click('botGroups.create');
- expect(byId('botGroups.createMenu.sheet')).not.toBeNull();
- await click('botGroups.createMenu.option.pc');
+ await render([mac, pc], false);
+ expect(byId('teammates.createChooser')).toBeNull();
+ await click('teammates.create');
+ expect(byId('teammates.createChooser')).not.toBeNull();
+ await click('teammates.createChooser.group.pc');
// The create sheet opens only after the chooser has closed.
- expect(byId('botGroups.createMenu.sheet')).toBeNull();
+ expect(byId('teammates.createChooser')).toBeNull();
expect(node.textContent).toContain('groupChat.create.computerNote(deviceName=PC)');
});
- it('cannot create while no computer that supports groups is online', async () => {
- await render(props({ createTargets: [] }));
- expect(byId('botGroups.create')?.disabled).toBe(true);
+ it('keeps the single-purpose teammate button when no computer supports group chats', async () => {
+ await render([]);
+ expect(byId('teammates.createMenu')).toBeNull();
+ expect(byId('teammates.create')).not.toBeNull();
});
});
diff --git a/apps/mobile/src/__tests__/BotGroupSpeakerRow.test.tsx b/apps/mobile/src/__tests__/BotGroupSpeakerRow.test.tsx
index ba5a8ca9f4..8cfba884d7 100644
--- a/apps/mobile/src/__tests__/BotGroupSpeakerRow.test.tsx
+++ b/apps/mobile/src/__tests__/BotGroupSpeakerRow.test.tsx
@@ -39,6 +39,9 @@ vi.mock('@/session/useCompanionGenerationCopy', () => ({
}));
vi.mock('@/session/WorkingStatusText', () => ({ WorkingStatusText: ({ text }: any) => el('span', { 'data-testid': 'status' }, text) }));
+vi.mock('@/hooks/useReduceMotion', () => ({ useReduceMotionEnabled: () => true }));
+vi.mock('@/session/CompanionPresenceRing', () => ({ CompanionPresenceRing: () => null }));
+vi.mock('@/session/ThinkingDots', () => ({ ThinkingDots: () => null }));
import { BotGroupSpeakerRow } from '@/session/BotGroupSpeakerRow';
Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });
diff --git a/apps/mobile/src/__tests__/CompanionCardButton.test.tsx b/apps/mobile/src/__tests__/CompanionCardButton.test.tsx
new file mode 100644
index 0000000000..256db28433
--- /dev/null
+++ b/apps/mobile/src/__tests__/CompanionCardButton.test.tsx
@@ -0,0 +1,45 @@
+// @vitest-environment jsdom
+import { act, type ReactNode } from 'react';
+import { createRoot, type Root } from 'react-dom/client';
+import { afterEach, beforeEach, expect, it, vi } from 'vitest';
+
+const { textLayouts } = vi.hoisted(() => ({ textLayouts: new Map<string, (event: { nativeEvent: { lines: unknown[] } }) => void>() }));
+vi.mock('react-native', async () => {
+ const { createElement } = await import('react');
+ const view = (tag: string) => ({ children, testID }: { children?: ReactNode | ((state: { pressed: boolean }) => ReactNode); testID?: string }) =>
+ createElement(tag, { 'data-testid': testID }, typeof children === 'function' ? children({ pressed: false }) : children);
+ return { View: view('div'), Pressable: view('button'), ActivityIndicator: () => null,
+ StyleSheet: { create: (s: unknown) => s } };
+});
+vi.mock('@/components/AppText', async () => {
+ const { createElement } = await import('react');
+ // Text keeps its onTextLayout so a test can report how many lines a label took.
+ return { Text: ({ children, onTextLayout }: { children?: ReactNode; onTextLayout?: (event: { nativeEvent: { lines: unknown[] } }) => void }) => {
+ if (onTextLayout) textLayouts.set(String(children), onTextLayout);
+ return createElement('span', null, children);
+ } };
+});
+vi.mock('@/theme', async () => {
+ const tokens = await import('@/theme/tokens');
+ return { ...tokens, useTheme: () => ({ colors: tokens.lightColors }), useThemedStyles: (make: (c: unknown) => unknown) => make(tokens.lightColors) };
+});
+
+import { CompanionCardActions, CompanionCardButton } from '@/session/CompanionCardButton';
+
+Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });
+let root: Root;
+let host: HTMLDivElement;
+beforeEach(() => { textLayouts.clear(); host = document.createElement('div'); root = createRoot(host); });
+afterEach(() => act(() => root.unmount()));
+
+it('stacks the work-split card buttons one per row once any label would wrap at equal width', async () => {
+ await act(async () => root.render(<CompanionCardActions>
+ <CompanionCardButton label="End Work Split" onPress={() => {}} />
+ <CompanionCardButton primary label="Start Next Step" onPress={() => {}} />
+ </CompanionCardActions>));
+ const stacked = () => host.querySelector('[data-testid="companion.cardActions.stacked"]');
+ await act(async () => textLayouts.get('End Work Split')!({ nativeEvent: { lines: [{}] } }));
+ expect(stacked()).toBeNull();
+ await act(async () => textLayouts.get('Start Next Step')!({ nativeEvent: { lines: [{}, {}] } }));
+ expect(stacked()).not.toBeNull();
+});
diff --git a/apps/mobile/src/__tests__/CompanionHeaderNavigation.test.tsx b/apps/mobile/src/__tests__/CompanionHeaderNavigation.test.tsx
index f26f63e0ea..95444b03ed 100644
--- a/apps/mobile/src/__tests__/CompanionHeaderNavigation.test.tsx
+++ b/apps/mobile/src/__tests__/CompanionHeaderNavigation.test.tsx
@@ -2,140 +2,84 @@
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import ts from 'typescript';
-import { act, createContext, createElement, Fragment, useState } from 'react';
+import { act, createElement, Fragment, useState } from 'react';
import { createRoot, type Root } from 'react-dom/client';
import { afterEach, beforeEach, expect, it, vi } from 'vitest';
import { useHostManagedSession } from '@/session/hostManagedSession';
import type { RemoteResource } from '@cindy/device-link';
const h = vi.hoisted(() => ({
- focused: true, drawer: {} as any, accounts: {} as any, profile: {} as any, systemBack: true,
- dismiss: vi.fn(), push: vi.fn(), chooseMode: vi.fn(), replace: vi.fn(),
- auth: { accountGeneration: 1, user: null, logout: vi.fn(), beginAddAccount: vi.fn() },
+ profile: {} as any, dismiss: vi.fn(), chooseMode: vi.fn(), screenOptions: [] as Array<Record<string, unknown>>,
+ auth: { accountGeneration: 1, user: null },
}));
vi.mock('react-native', () => ({
- Keyboard: { dismiss: h.dismiss }, Alert: { alert: vi.fn() },
+ Keyboard: { dismiss: h.dismiss },
View: ({ children, testID }: any) => createElement('div', { 'data-testid': testID }, children),
- Pressable: ({ children, onPress, testID }: any) => createElement('button', { onClick: onPress, 'data-testid': testID }, children),
+ Pressable: ({ children, onPress, testID, disabled }: any) => createElement('button', { onClick: onPress, disabled, 'data-testid': testID },
+ typeof children === 'function' ? children({ pressed: false }) : children),
StyleSheet: { create: (s: unknown) => s },
}));
vi.mock('react-i18next', () => ({ useTranslation: () => ({ t: (s: string) => s, i18n: { language: 'en' } }) }));
-vi.mock('expo-router', () => ({ useSegments: () => ['sessions', '[sessionId]'], useRouter: () => ({ replace: h.replace }) }));
-vi.mock('expo-router/react-navigation', () => ({
- useIsFocused: () => h.focused, NavigationContext: createContext(null), NavigationRouteContext: createContext(null),
-}));
-vi.mock('@/session/NativeResidentHistory', () => ({ NativeHistoryHost: null, NativeHistorySlot: null, needsResidentHistoryUpgrade: false }));
-vi.mock('@/platform/AdaptiveWindowContext', () => ({
- usePaneViewport: () => ({ width: 390, height: 844 }), PaneViewportProvider: ({ children }: any) => children,
-}));
vi.mock('@/auth/AuthContext', () => ({ useAuth: () => h.auth }));
-vi.mock('@/components/AppText', () => ({ Text: 'span' }));
+vi.mock('@/components/AppText', () => ({ Text: ({ children }: any) => createElement('span', null, children) }));
vi.mock('@/components/RemoteCompanionAvatar', () => ({ RemoteCompanionAvatar: () => null }));
vi.mock('@/theme', async () => {
const tokens = await import('@/theme/tokens');
return { ...tokens, useTheme: () => ({ colors: tokens.lightColors }), useThemedStyles: (fn: any) => fn(tokens.lightColors) };
});
-vi.mock('lucide-react-native', () => ({ ChevronDown: () => null, PanelLeft: () => null, Settings2: () => null }));
+vi.mock('lucide-react-native', () => ({ ChevronLeft: () => null, Settings2: () => null }));
vi.mock('@/session/HomeHeaderGlassButton', () => ({ HomeHeaderGlassButton: ({ onPress, testID, children, disabled }: any) =>
createElement('button', { onClick: onPress, disabled, 'data-testid': testID }, children) }));
-vi.mock('@/session/CompanionBackButton', () => ({ CompanionBackButton: ({ onPress }: any) =>
- createElement('button', { onClick: onPress, 'data-testid': 'companion.back' }) }));
-// Page-level drawer cases run as Duo (system bar owns Back, header keeps the sidebar button).
-vi.mock('@/platform/chrome/SystemNavigationBack', () => ({ useSystemNavigationBack: () => h.systemBack, SystemNavigationBack: () => null }));
-vi.mock('@/session/TeammatePicker', () => ({ TeammatePicker: () => null }));
-vi.mock('@/session/CompanionProfileSheet', () => ({ CompanionCreateSheet: () => null,
- CompanionProfileSheet: (props: unknown) => { h.profile = props; return null; } }));
+vi.mock('@/session/CompanionPresenceRing', () => ({ CompanionPresenceRing: ({ active }: any) => active ? createElement('i', { 'data-testid': 'ring' }) : null }));
+vi.mock('@/session/CompanionProfileSheet', () => ({ CompanionProfileSheet: (props: unknown) => { h.profile = props; return null; } }));
vi.mock('@/session/useTeammateNavigation', () => ({ useTeammateNavigation: () => ({ chooseMode: h.chooseMode }) }));
-vi.mock('@/utils/useGuardedPush', () => ({ useGuardedPush: () => h.push }));
-vi.mock('@/device-link/remoteStatus', () => ({ formatRemoteError: String }));
-vi.mock('@/session/remoteSessionStore', () => ({ remoteSessionStore: {
- subscribe: () => () => {}, getSessions: () => [], isSessionRunning: () => false,
-} }));
-vi.mock('@/session/AccountSwitcherSheet', () => ({ AccountSwitcherSheet: (props: unknown) => { h.accounts = props; return null; } }));
-vi.mock('@/session/HomeChromeDrawer', () => ({ HomeChromeDrawer: (props: any) => {
- h.drawer = props;
- return createElement('div', { 'data-drawer': true, 'data-open': props.open });
-} }));
-import { MessageHistoryOverlay, RecentMessageHistoriesProvider } from '@/session/RecentMessageHistories';
import { CompanionHeader } from '@/session/CompanionHeader';
-import { CompanionNavigationDrawer } from '@/session/CompanionNavigationDrawer';
Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });
let root: Root; let host: HTMLDivElement;
+const resource = { ref: { kind: 'bot', collectionId: 'bots', id: 'bot' }, display: { title: 'Cindy' } } as RemoteResource;
+const button = (id: string) => host.querySelector<HTMLButtonElement>(`[data-testid="${id}"]`)!;
beforeEach(() => {
- vi.clearAllMocks(); h.auth.accountGeneration = 1; h.focused = true;
- h.drawer = {}; h.accounts = {}; h.profile = {};
+ vi.clearAllMocks(); h.auth.accountGeneration = 1; h.profile = {}; h.screenOptions = [];
host = document.createElement('div'); root = createRoot(host);
});
afterEach(() => act(() => root.unmount()));
-it('opens navigation through the page owner without mounting an overlay inside the clipped header', async () => {
- const onOpenNavigation = vi.fn(), onSearch = vi.fn();
- const resource = { ref: { kind: 'bot', collectionId: 'bots', id: 'bot' }, display: { title: 'Cindy' } } as RemoteResource;
- await act(async () => root.render(<CompanionHeader resource={resource} deviceId="pc" deviceName="PC" online
- onOpenNavigation={onOpenNavigation} onSearch={onSearch} />));
- await act(async () => host.querySelector<HTMLButtonElement>('[data-testid="companion.navigation"]')!.click());
+it('goes back from the chat instead of opening a drawer, and opens the profile from the name or the settings button', async () => {
+ const onBack = vi.fn(), onSearch = vi.fn();
+ await act(async () => root.render(<CompanionHeader resource={resource} deviceId="pc" deviceName="PC" online onBack={onBack} onSearch={onSearch} />));
+ await act(async () => button('companion.back').click());
expect(h.dismiss).toHaveBeenCalledOnce();
- expect(onOpenNavigation).toHaveBeenCalledOnce();
- expect(host.querySelector('[data-drawer]')).toBeNull();
- // Profile/search remain the existing sheet flow, independent of drawer ownership.
- await act(async () => host.querySelector<HTMLButtonElement>('[data-testid="companion.settings"]')!.click());
+ expect(onBack).toHaveBeenCalledOnce();
+ await act(async () => button('companion.identity').click());
+ expect(h.profile.visible).toBe(true);
+ await act(async () => h.profile.onClose());
+ await act(async () => button('companion.settings').click());
expect(h.profile.visible).toBe(true);
+ // Search from the profile waits until the sheet has closed.
await act(async () => h.profile.onOpenSearch());
expect(onSearch).not.toHaveBeenCalled();
await act(async () => h.profile.onClosed());
expect(onSearch).toHaveBeenCalledOnce();
});
-it.each([
- ['onOpenSettings', '/settings'], ['onOpenDevices', '/devices/manage'],
-])('preserves %s navigation after the full-screen drawer finishes closing', async (action, route) => {
- const onClose = vi.fn();
- await act(async () => root.render(<CompanionNavigationDrawer open onClose={onClose} onSearch={() => {}} />));
- await act(async () => h.drawer[action]());
- expect(onClose).toHaveBeenCalledOnce(); expect(h.push).not.toHaveBeenCalled();
- await act(async () => h.drawer.onClosed());
- expect(h.push).toHaveBeenCalledExactlyOnceWith(route);
- await act(async () => h.drawer.onClosed());
- expect(h.push).toHaveBeenCalledTimes(1);
-});
-
-it('preserves search, mode switching, account switching and logout actions', async () => {
- const onSearch = vi.fn();
- await act(async () => root.render(<CompanionNavigationDrawer open onClose={() => {}} onSearch={onSearch} />));
- await act(async () => h.drawer.onOpenSearch()); expect(onSearch).not.toHaveBeenCalled();
- await act(async () => h.drawer.onClosed()); expect(onSearch).toHaveBeenCalledOnce();
- await act(async () => h.drawer.onModeChange('tasks')); expect(h.chooseMode).not.toHaveBeenCalled();
- await act(async () => h.drawer.onClosed()); expect(h.chooseMode).toHaveBeenCalledWith('tasks');
- await act(async () => { h.drawer.onOpenAccounts(); h.drawer.onClosed(); }); expect(h.accounts.visible).toBe(true);
- h.auth.logout.mockResolvedValue(undefined);
- await act(async () => h.drawer.onLogout()); expect(h.auth.logout).toHaveBeenCalledOnce();
- expect(h.replace).toHaveBeenCalledWith('/login');
+it('shows the computer and whether it is online, and breathes while the companion works', async () => {
+ await act(async () => root.render(<CompanionHeader resource={resource} deviceId="pc" deviceName="Office iMac" online={false} working onBack={() => {}} onSearch={() => {}} />));
+ expect(host.textContent).toContain('devices.resources.hostOffline · Office iMac');
+ expect(host.querySelector('[data-testid="ring"]')).not.toBeNull();
+ await act(async () => root.render(<CompanionHeader resource={resource} deviceId="pc" deviceName="Office iMac" online onBack={() => {}} onSearch={() => {}} />));
+ expect(host.textContent).toContain('Office iMac');
+ expect(host.textContent).not.toContain('devices.resources.hostOffline');
+ expect(host.querySelector('[data-testid="ring"]')).toBeNull();
});
-it('returns to the roster when the already-active companion mode is selected', async () => {
- const onClose = vi.fn();
- await act(async () => root.render(<CompanionNavigationDrawer open onClose={onClose} onSearch={() => {}} />));
- await act(async () => h.drawer.onModeChange('teammates'));
- expect(onClose).toHaveBeenCalledOnce(); expect(h.chooseMode).not.toHaveBeenCalled();
- await act(async () => h.drawer.onClosed());
- expect(h.chooseMode).toHaveBeenCalledExactlyOnceWith('teammates');
+it('keeps profile controls closed until the chat entry is validated', async () => {
+ await act(async () => root.render(<CompanionHeader resource={resource} deviceId="pc" deviceName="PC" online controlsReady={false} onBack={() => {}} onSearch={() => {}} />));
+ expect(button('companion.settings').disabled).toBe(true);
+ expect(button('companion.identity').disabled).toBe(true);
+ expect(h.profile.visible).toBe(false);
});
-it.each(['account', 'companion'])('drops a queued navigation action when the %s scope changes', async (change) => {
- const render = (scope: string) => act(async () => root.render(<CompanionNavigationDrawer key={scope} open onClose={() => {}} onSearch={() => {}} />));
- await render('old');
- await act(async () => h.drawer.onOpenSettings());
- const staleFinish = h.drawer.onClosed;
- if (change === 'account') h.auth.accountGeneration++;
- await render('new');
- await act(async () => staleFinish());
- expect(h.push).not.toHaveBeenCalled();
-});
-
-// Execute production page state, callbacks and conditional JSX, following the
-// existing page-hook tests. Do not reconstruct the navigation wiring in a fixture.
-// Only unrelated chrome/sidebar components are omitted; the Android overlay
-// provider and both companion components below are the production implementations.
+// Execute the production page header state and JSX, following the existing page-hook tests.
const source = ts.createSourceFile('screen.tsx', readFileSync(
resolve(process.cwd(), 'app/sessions/[sessionId].tsx'), 'utf8',
), ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX);
@@ -148,18 +92,14 @@ const stateStart = declaration('companionChat');
const stateEnd = declaration('lastAckKeyRef');
if (stateStart < 0 || stateEnd <= stateStart) throw new Error('Missing companion page state');
const header = statements[declaration('headerNode')];
-const returned = statements.find(ts.isReturnStatement)!.expression as ts.ParenthesizedExpression;
-const screenRoot = returned.expression as ts.JsxElement;
-// Select from the screen root, never from a descendant under session.chrome.
-const overlay = screenRoot.children.find(n => ts.isJsxElement(n)
- && n.openingElement.tagName.getText(source) === 'MessageHistoryOverlay');
-if (!overlay) throw new Error('Missing page-root MessageHistoryOverlay');
const printer = ts.createPrinter();
function relevantJsx(node: ts.Node): string {
const result = ts.transform(node, [context => root => {
const visit: ts.Visitor = child => {
- if (ts.isJsxSelfClosingElement(child)
- && ['Stack.Screen', 'SystemNavigationBack', 'SessionHeaderBar', 'SessionListDrawer'].includes(child.tagName.getText(source))) {
+ if (ts.isJsxSelfClosingElement(child) && child.tagName.getText(source) === 'Stack.Screen') {
+ return ts.factory.createJsxSelfClosingElement(ts.factory.createIdentifier('StackScreen'), undefined, child.attributes);
+ }
+ if (ts.isJsxSelfClosingElement(child) && child.tagName.getText(source) === 'SessionHeaderBar') {
return ts.factory.createJsxSelfClosingElement(ts.factory.createIdentifier('span'), undefined, ts.factory.createJsxAttributes([]));
}
return ts.visitEachChild(child, visit, context);
@@ -169,95 +109,50 @@ function relevantJsx(node: ts.Node): string {
const text = printer.printNode(ts.EmitHint.Unspecified, result.transformed[0], source);
result.dispose(); return text;
}
-const compiled = ts.transpileModule(`function PageHost({ bindings }) {
- const { auth, deviceId, sessionId, companionResource, companionEntry, shareSelectionActive, setSearchOpen } = bindings;
+const moduleConstant = (name: string) => source.statements.find(n => ts.isVariableStatement(n)
+ && n.declarationList.declarations.some(d => d.name.getText(source) === name))!.getText(source);
+const compiled = ts.transpileModule(`${moduleConstant('COMPANION_NATIVE_HEADER_OPTIONS')}
+function PageHost({ bindings }) {
+ const { auth, deviceId, sessionId, companionResource, companionEntry, shareSelectionActive, setSearchOpen, goBackToHome, companionWorkingLabel } = bindings;
const currentSession = null;
const deviceName = 'PC', remoteUnavailableReason = null, sessionListDrawerOverlayMounted = false;
- const goBackToHome = bindings.goBackToHome;
${statements.slice(stateStart, stateEnd).map(n => n.getText(source)).join('\n')}
${relevantJsx(header)}
- return <div data-testid="page-route"><div data-testid="clipped-chrome">{headerNode}</div>${relevantJsx(overlay)}</div>;
+ return <div data-testid="page-route">{headerNode}</div>;
}`, { compilerOptions: { target: ts.ScriptTarget.ES2022, jsx: ts.JsxEmit.React } }).outputText;
-const PageHost = new Function('React', 'useState', 'useHostManagedSession', 'CompanionHeader', 'CompanionNavigationDrawer', 'MessageHistoryOverlay',
- `${compiled}; return PageHost;`)({ createElement, Fragment }, useState, useHostManagedSession, CompanionHeader, CompanionNavigationDrawer, MessageHistoryOverlay);
+function StackScreen({ options }: { options: Record<string, unknown> }) { h.screenOptions.push(options); return null; }
+const PageHost = new Function('React', 'useState', 'useHostManagedSession', 'CompanionHeader', 'StackScreen',
+ `${compiled}; return PageHost;`)({ createElement, Fragment }, useState, useHostManagedSession, CompanionHeader, StackScreen);
const pageBindings = () => ({ auth: h.auth, deviceId: 'pc', sessionId: 'session-a', shareSelectionActive: false,
companionEntry: { ready: true },
companionResource: { ref: { kind: 'bot', collectionId: 'bots', id: 'bot-a' }, display: { title: 'Cindy' } } as RemoteResource | null,
- setSearchOpen: vi.fn(), goBackToHome: vi.fn() });
-const showPage = (bindings: ReturnType<typeof pageBindings>) => act(async () => {
- root.render(<RecentMessageHistoriesProvider><PageHost bindings={bindings} /></RecentMessageHistoriesProvider>);
-});
-const openPageDrawer = () => act(async () => host.querySelector<HTMLButtonElement>('[data-testid="companion.navigation"]')!.click());
-
-it('shows Back instead of the sidebar button on a phone, and returns to the partner list', async () => {
- h.systemBack = false;
- try {
- const bindings = pageBindings();
- await showPage(bindings);
- expect(host.querySelector('[data-testid="companion.navigation"]')).toBeNull();
- await act(async () => host.querySelector<HTMLButtonElement>('[data-testid="companion.back"]')!.click());
- expect(h.dismiss).toHaveBeenCalled();
- expect(bindings.goBackToHome).toHaveBeenCalledTimes(1);
- } finally { h.systemBack = true; }
-});
-
-it('keeps the sidebar button where the system bar already shows Back (Duo)', async () => {
- await showPage(pageBindings());
- expect(host.querySelector('[data-testid="companion.back"]')).toBeNull();
- expect(host.querySelector('[data-testid="companion.navigation"]')).not.toBeNull();
-});
+ setSearchOpen: vi.fn(), goBackToHome: vi.fn(), companionWorkingLabel: null as string | null });
+const showPage = (bindings: ReturnType<typeof pageBindings>) => act(async () => { root.render(<PageHost bindings={bindings} />); });
-it('shows the companion title while profile controls wait for entry validation', async () => {
+it('wires the page: title while entry validation runs, Back to the roster, and the working breath', async () => {
const bindings = pageBindings(); bindings.companionEntry.ready = false;
await showPage(bindings);
expect(host.textContent).toContain('Cindy');
- expect(host.querySelector<HTMLButtonElement>('[data-testid="companion.settings"]')!.disabled).toBe(true);
+ expect(button('companion.settings').disabled).toBe(true);
expect(h.profile.online).toBe(true); // Synchronizing is not an offline connection.
- bindings.companionEntry.ready = true;
- await showPage(bindings);
- expect(host.querySelector<HTMLButtonElement>('[data-testid="companion.settings"]')!.disabled).toBe(false);
-});
-
-it('opens the page-owned drawer in the real Android history overlay and closes before searching', async () => {
- const bindings = pageBindings();
- await showPage(bindings); await openPageDrawer();
- const drawer = host.querySelector('[data-drawer]')!;
- expect(drawer.getAttribute('data-open')).toBe('true');
- expect(host.querySelector('[data-testid="page-route"]')!.contains(drawer)).toBe(false);
- expect(host.querySelector('[data-testid="clipped-chrome"]')!.contains(drawer)).toBe(false);
- await act(async () => h.drawer.onOpenSearch());
- expect(host.querySelector('[data-drawer]')!.getAttribute('data-open')).toBe('false');
- expect(bindings.setSearchOpen).not.toHaveBeenCalled();
- await act(async () => h.drawer.onClosed());
- expect(bindings.setSearchOpen).toHaveBeenCalledExactlyOnceWith(true);
-});
-
-it.each(['account', 'device', 'session', 'companion', 'share'] as const)('resets the page drawer across the %s boundary', async change => {
- const bindings = pageBindings();
- await showPage(bindings); await openPageDrawer();
- await act(async () => h.drawer.onOpenSettings());
- const staleFinish = h.drawer.onClosed;
- await openPageDrawer();
- if (change === 'account') h.auth.accountGeneration++;
- if (change === 'device') bindings.deviceId = 'pc-b';
- if (change === 'session') bindings.sessionId = 'session-b';
- if (change === 'companion') bindings.companionResource = { ...bindings.companionResource!, ref: { kind: 'bot', collectionId: 'bots', id: 'bot-b' } };
- if (change === 'share') bindings.shareSelectionActive = true;
+ bindings.companionEntry.ready = true; bindings.companionWorkingLabel = 'Thinking…';
await showPage(bindings);
- expect(host.querySelector('[data-open="true"]')).toBeNull();
- await act(async () => staleFinish()); expect(h.push).not.toHaveBeenCalled();
- if (change === 'share') {
- expect(host.querySelector('[data-drawer]')).toBeNull();
- bindings.shareSelectionActive = false; await showPage(bindings);
- expect(host.querySelector('[data-open="true"]')).toBeNull();
- }
+ expect(button('companion.settings').disabled).toBe(false);
+ expect(host.querySelector('[data-testid="ring"]')).not.toBeNull();
+ await act(async () => button('companion.back').click());
+ expect(bindings.goBackToHome).toHaveBeenCalledOnce();
+ // The companion row is the only header: the native bar the task header configured while the
+ // entry resolved must not keep its title and sync spinner on top of the identity.
+ expect(h.screenOptions).toContainEqual(expect.objectContaining({ headerShown: false, headerTitle: '' }));
});
-it('does not mount a companion drawer on an ordinary task or unfocused route', async () => {
+it('shows the ordinary task header on non-companion pages and while sharing', async () => {
const bindings = pageBindings(); bindings.companionResource = null;
- await showPage(bindings); expect(host.querySelector('[data-drawer]')).toBeNull();
- bindings.companionResource = pageBindings().companionResource;
- await showPage(bindings); await openPageDrawer();
- h.focused = false; await showPage(bindings);
- expect(host.querySelector('[data-drawer]')).toBeNull();
+ await showPage(bindings);
+ expect(host.querySelector('[data-testid="companion.header"]')).toBeNull();
+ bindings.companionResource = pageBindings().companionResource; bindings.shareSelectionActive = true;
+ await showPage(bindings);
+ expect(host.querySelector('[data-testid="companion.header"]')).toBeNull();
+ // The task header keeps its native bar.
+ expect(h.screenOptions.some((options) => options.headerShown === false)).toBe(false);
});
diff --git a/apps/mobile/src/__tests__/CompanionMessageCard.test.tsx b/apps/mobile/src/__tests__/CompanionMessageCard.test.tsx
index 7cda8bcef6..24ab5247a1 100644
--- a/apps/mobile/src/__tests__/CompanionMessageCard.test.tsx
+++ b/apps/mobile/src/__tests__/CompanionMessageCard.test.tsx
@@ -30,13 +30,22 @@ vi.mock('react-native', () => ({
});
return createElement('div', {}, children);
},
- Pressable: ({ children, onPress, disabled }: any) =>
+ Pressable: ({ children, onPress, disabled, testID }: any) =>
createElement(
'button',
- { onClick: onPress, disabled },
+ { onClick: onPress, disabled, 'data-testid': testID },
typeof children === 'function' ? children({ pressed: false }) : children,
),
StyleSheet: { create: (v: any) => v, hairlineWidth: 1 },
+ ActivityIndicator: () => createElement('i', { 'data-testid': 'spinner' }),
+ Animated: {
+ Value: class { setValue() {} stopAnimation() {} interpolate() { return 0; } },
+ View: ({ children, testID }: any) => createElement('div', { 'data-testid': testID }, children),
+ timing: () => ({ start() {}, stop() {} }),
+ sequence: () => ({ start() {}, stop() {} }),
+ loop: () => ({ start() {}, stop() {} }),
+ },
+ Easing: { inOut: () => () => 0, ease: () => 0, bezier: () => () => 0 },
}));
vi.mock('@/utils/useGuardedPush', () => ({ useGuardedPush: () => h.push }));
vi.mock('expo-router', () => ({
@@ -51,7 +60,8 @@ vi.mock('react-i18next', async (importOriginal) => ({
vi.mock('@/components/AppText', () => ({
Text: ({ children }: any) => createElement('span', {}, children),
}));
-vi.mock('@/theme', () => ({
+vi.mock('@/theme', async () => ({
+ ...await vi.importActual<typeof import('@/theme/tokens')>('@/theme/tokens'),
useThemedStyles: () => ({ note: {} }),
useTheme: () => ({ colors: {} }),
}));
@@ -66,6 +76,10 @@ vi.mock('lucide-react-native', () => ({
GitPullRequestDraft: () => null,
Megaphone: () => null,
TriangleAlert: () => null,
+ Layers: () => null,
+ CircleAlert: () => null,
+ CircleCheck: () => null,
+ ChevronDown: () => null,
}));
vi.mock('@/auth/AuthContext', () => ({
useAuth: () => ({ accountGeneration: h.accountGeneration, user: { id: 'owner' } }),
@@ -91,6 +105,7 @@ vi.mock('@/device-link/DeviceLinkContext', () => ({
};
},
}));
+vi.mock('@/hooks/useReduceMotion', () => ({ useReduceMotionEnabled: () => true }));
import { CompanionMessageCard } from '@/session/CompanionMessageCard';
import { _clearRemotePathVerdictCache } from '@/session/remotePathVerdict';
import type { NormalizedRemoteMessage } from '@/session/messageNormalize';
@@ -142,9 +157,11 @@ afterEach(async () => {
node.remove();
vi.useRealTimers();
});
-it('survives recycled layout events when measuring equal-width task actions', async () => {
+const openEntry = () => node.querySelector<HTMLButtonElement>('[data-testid="companion.taskCard.open"]');
+it('opens the task from the whole card and keeps stop as a small action while it runs', async () => {
await render();
- expect(node.textContent).toContain('devices.companions.openTask');
+ expect(openEntry()?.disabled).toBe(false);
+ expect(node.textContent).not.toContain('devices.companions.openTask');
expect(node.textContent).toContain('devices.companions.stopTask');
});
@@ -159,7 +176,7 @@ it('keeps the task card when the host omits delegations or sends a broken status
});
await render();
expect(node.textContent).toContain('devices.companions.status.unknown');
- expect(node.textContent).toContain('devices.companions.openTask');
+ expect(openEntry()?.disabled).toBe(false);
});
it('isolates a broken private-chat card so the session can keep rendering', async () => {
@@ -179,7 +196,7 @@ it('reads, opens and stops the task on its source computer, then disables stop o
expect(h.invoke).toHaveBeenCalledWith('home', 'maker:bot-delegations:list', ['parent']);
const button = (label: string) =>
[...node.querySelectorAll('button')].find((b) => b.textContent === label)!;
- await act(async () => button('devices.companions.openTask').click());
+ await act(async () => openEntry()!.click());
expect(h.push).toHaveBeenCalledWith({
pathname: '/sessions/[sessionId]',
params: { deviceId: 'home', sessionId: 'child' },
@@ -540,9 +557,12 @@ it('opens a stable completed result inline and routes its artifact to the child
} },
} as NormalizedRemoteMessage;
await act(async () => root.render(createElement(CompanionMessageCard, { message: resultMessage })));
- expect(node.textContent).not.toContain('Second execution result');
- await act(async () => node.querySelector('button')!.click());
+ // Collapsed: a short preview only; the files come with the full result.
+ const fileButton = () => [...node.querySelectorAll('button')].find(button => button.textContent === 'result.pdf');
expect(node.textContent).toContain('Second execution result');
+ expect(fileButton()).toBeUndefined();
+ await act(async () => node.querySelector<HTMLButtonElement>('[data-testid="companion.taskResult.toggle"]')!.click());
+ expect(fileButton()).toBeDefined();
const file = [...node.querySelectorAll('button')].find(button => button.textContent === 'result.pdf')!;
await act(async () => file.click());
expect(h.push).toHaveBeenCalledWith({ pathname: '/files/preview/[sessionId]', params: { sessionId: 'child', deviceId: 'home', absPath: '/reports/result.pdf' } });
diff --git a/apps/mobile/src/__tests__/CompanionWorkingStatus.test.tsx b/apps/mobile/src/__tests__/CompanionWorkingStatus.test.tsx
index 7641d43673..8b0e97b685 100644
--- a/apps/mobile/src/__tests__/CompanionWorkingStatus.test.tsx
+++ b/apps/mobile/src/__tests__/CompanionWorkingStatus.test.tsx
@@ -27,6 +27,9 @@ vi.mock('../session/remoteSessionStore', () => ({ remoteSessionStore: {
getSessionLiveActivity: () => h.activity,
subscribe: (listener: () => void) => { h.listener = listener; return () => {}; },
} }));
+vi.mock('@/hooks/useReduceMotion', () => ({ useReduceMotionEnabled: () => true }));
+vi.mock('@/session/CompanionPresenceRing', () => ({ CompanionPresenceRing: () => null }));
+vi.mock('@/session/ThinkingDots', () => ({ ThinkingDots: () => null }));
import { useCompanionDisplayResource, useCompanionWorkingLabel } from '../session/CompanionWorkingStatus';
const messages: RemoteMessage[] = [];
function Probe() {
diff --git a/apps/mobile/src/__tests__/InteractionPanelReceipt.test.tsx b/apps/mobile/src/__tests__/InteractionPanelReceipt.test.tsx
index a874b6ff2b..79175fc67e 100644
--- a/apps/mobile/src/__tests__/InteractionPanelReceipt.test.tsx
+++ b/apps/mobile/src/__tests__/InteractionPanelReceipt.test.tsx
@@ -12,6 +12,7 @@ import { forwardNavigationLock } from '@/utils/navigationLock';
const { resolveInteraction, invoke, push } = vi.hoisted(() => ({ resolveInteraction: vi.fn(), invoke: vi.fn(), push: vi.fn() }));
const { routeParams } = vi.hoisted(() => ({ routeParams: {} as { deviceId?: string; sessionId?: string } }));
+const { textLayouts } = vi.hoisted(() => ({ textLayouts: new Map<string, (event: { nativeEvent: { lines: unknown[] } }) => void>() }));
vi.mock('expo-router', async () => {
const { useEffect } = await import('react');
return { useLocalSearchParams: () => routeParams, useRouter: () => ({ push }),
@@ -28,7 +29,12 @@ vi.mock('react-native', async () => {
const view = (tag: string) => ({ children, onPress, disabled, testID }: {
children?: ReactNode; onPress?: () => void; disabled?: boolean; testID?: string;
}) => createElement(tag, { onClick: onPress, disabled, 'data-testid': testID }, children);
- return { View: view('div'), Text: view('span'), Pressable: view('button'),
+ // Text keeps its onTextLayout so a test can report how many lines a label took.
+ const Text = ({ children, onTextLayout }: { children?: ReactNode; onTextLayout?: (event: { nativeEvent: { lines: unknown[] } }) => void }) => {
+ if (onTextLayout) textLayouts.set(String(children), onTextLayout);
+ return createElement('span', null, children);
+ };
+ return { View: view('div'), Text, Pressable: view('button'),
ScrollView: view('div'), Image: () => null,
useWindowDimensions: () => ({ width: 390, height: 844 }),
StyleSheet: { create: (s: unknown) => s, hairlineWidth: 1 } };
@@ -270,6 +276,35 @@ it.each(['allowOnce', 'deny'])('companion permission preserves complete evidence
expect(host.querySelector('[data-testid="interaction.permission.card"]')).toBeNull();
});
+it('companion permission shows the whole input when no single field leads, never the 500-character preview', async () => {
+ const tail = 'unique-tail-' + 'y'.repeat(40);
+ remoteSessionStore.setPendingInteractions('s1', [{ request: {
+ kind: 'permission', requestId: 'permission-mcp', toolName: 'mcp__notes__append',
+ input: { body: 'z'.repeat(600), target: tail },
+ } }]);
+ await act(async () => root.render(<Harness companion />));
+ expect(host.textContent).toContain(tail);
+});
+
+it('stacks teammate card buttons one per row once any label would wrap at equal width', async () => {
+ textLayouts.clear();
+ remoteSessionStore.setPendingInteractions('s1', [{ request: {
+ kind: 'permission', requestId: 'p-wrap', toolName: 'Read', input: { path: '/tmp/qa.txt' },
+ suggestions: [{ destination: 'session', rules: [{ toolName: 'Read' }] }],
+ } }]);
+ await act(async () => root.render(<Harness companion />));
+ const stacked = () => host.querySelector('[data-testid="interaction.actions.stacked"]');
+ await act(async () => textLayouts.get('interaction.permission.deny')!({ nativeEvent: { lines: [{}] } }));
+ expect(stacked()).toBeNull();
+ // A long label (English 「Always allow this session」 on a narrow card) takes two lines.
+ await act(async () => textLayouts.get('interaction.permission.alwaysAllow')!({ nativeEvent: { lines: [{}, {}] } }));
+ expect(stacked()).not.toBeNull();
+ // Ordinary task cards keep their own layout.
+ textLayouts.clear();
+ await act(async () => root.render(<Harness />));
+ expect(textLayouts.size).toBe(0);
+});
+
it('preserves session-only persistent permission and the high-risk confirmation step', async () => {
const sessionRule = { destination: 'session', rules: [{ toolName: 'Read' }] };
remoteSessionStore.setPendingInteractions('s1', [{ request: {
diff --git a/apps/mobile/src/__tests__/TeammateCreateButton.test.tsx b/apps/mobile/src/__tests__/TeammateCreateButton.test.tsx
index 500df2707e..822b7c7f56 100644
--- a/apps/mobile/src/__tests__/TeammateCreateButton.test.tsx
+++ b/apps/mobile/src/__tests__/TeammateCreateButton.test.tsx
@@ -2,7 +2,7 @@
import { act, createElement } from 'react';
import { createRoot, type Root } from 'react-dom/client';
import { afterEach, beforeEach, expect, it, vi } from 'vitest';
-const h = vi.hoisted(() => ({ account: 1, button: {} as any, menu: {} as any, sheet: null as any, interact: vi.fn(), created: vi.fn(), alert: vi.fn() }));
+const h = vi.hoisted(() => ({ account: 1, button: {} as any, menu: {} as any, sheet: null as any, created: vi.fn(), alert: vi.fn() }));
vi.mock('react-native', () => ({ Alert: { alert: h.alert } }));
vi.mock('react-i18next', () => ({ useTranslation: () => ({ t: (key: string) => key }) }));
vi.mock('lucide-react-native', () => ({ Plus: () => null }));
@@ -14,12 +14,15 @@ vi.mock('@/session/HomeHeaderGlassButton', () => ({ HomeHeaderGlassButton: (prop
vi.mock('@/session/CompanionSheet', () => ({ CompanionSheet: () => null }));
vi.mock('@/session/CompanionProfileSheet', () => ({ CompanionCreateSheet: (props: any) => { h.sheet = props; return null; } }));
vi.mock('@/session/useTeammateRoster', () => ({ TEAMMATE_COLLECTION_ID: 'teammates' }));
+vi.mock('@/hooks/useReduceMotion', () => ({ useReduceMotionEnabled: () => true }));
+vi.mock('@/components/MobilePrimitives', () => ({ MainWindowActionButton: () => null }));
+vi.mock('@/session/BotGroupCreateSheet', () => ({ BotGroupCreateSheet: () => null }));
import { TeammateCreateButton } from '@/session/TeammateCreateButton';
Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });
const hosts = [{ deviceId: 'mac', deviceName: 'Mac' }, { deviceId: 'pc', deviceName: 'PC' }];
const ref = { collectionId: 'teammates', kind: 'bot', id: 'confirmed' };
let root: Root | undefined;
-async function render(targets = hosts) { root ??= createRoot(document.createElement('div')); await act(async () => root!.render(createElement(TeammateCreateButton, { targets, preferredDeviceId: 'pc', onInteract: h.interact, onCreated: h.created }))); }
+async function render(targets = hosts) { root ??= createRoot(document.createElement('div')); await act(async () => root!.render(createElement(TeammateCreateButton, { targets, preferredDeviceId: 'pc', onCreated: h.created }))); }
beforeEach(() => { vi.clearAllMocks(); h.account = 1; h.sheet = null; });
afterEach(() => { act(() => root?.unmount()); root = undefined; });
it('uses real menu hosts, prefers the remembered host, and dispatches receipts after form dismissal', async () => {
diff --git a/apps/mobile/src/__tests__/TeammateHomeScreen.test.tsx b/apps/mobile/src/__tests__/TeammateHomeScreen.test.tsx
index 2b4f20ef47..5f1be1e259 100644
--- a/apps/mobile/src/__tests__/TeammateHomeScreen.test.tsx
+++ b/apps/mobile/src/__tests__/TeammateHomeScreen.test.tsx
@@ -9,12 +9,12 @@ const h = vi.hoisted(() => ({
focused: true, drawer: {} as any, list: {} as any, accounts: {} as any, push: vi.fn(),
auth: { user: { id: 'owner' }, accountGeneration: 1, logout: vi.fn(), beginAddAccount: vi.fn() },
nav: { hydrated: true, lastTeammate: null as LastTeammateIdentity | null, mode: 'teammates' as HomeMode,
- restoreLastTeammate: true, saveFailed: false, openTeammate: vi.fn(), rememberTeammate: vi.fn(), setMode: vi.fn() },
+ saveFailed: false, openTeammate: vi.fn(), setMode: vi.fn() },
roster: { createTargets: [], authoritative: true, items: [] as HostedRemoteCollectionItem[], loading: false, refreshing: false, error: null as string | null,
isOnline: vi.fn(() => true), refresh: vi.fn(), groupTargets: [] as { deviceId: string; deviceName: string }[] },
groups: { items: [] as HostedRemoteCollectionItem[], supported: false, isOnline: () => true, refresh: vi.fn() },
groupTargetsSeen: [] as unknown[],
- section: {} as any,
+ create: {} as any,
}));
vi.mock('react-native', async () => {
const { createElement: el } = await import('react');
@@ -30,14 +30,13 @@ vi.mock('@/auth/AuthContext', () => ({ useAuth: () => h.auth }));
vi.mock('@/theme', () => ({ useThemedStyles: () => ({}), useTheme: () => ({ colors: {} }) }));
vi.mock('@/utils/useGuardedPush', () => ({ useGuardedPush: () => h.push }));
vi.mock('@/device-link/remoteStatus', () => ({ formatRemoteError: String }));
-vi.mock('@/session/TeammateCreateButton', () => ({ TeammateCreateButton: () => null }));
+vi.mock('@/session/TeammateCreateButton', () => ({ TeammateCreateButton: (props: any) => { if (props.appearance !== 'cta') h.create = props; return null; } }));
vi.mock('@/session/HomeChromeDrawer', () => ({ HomeChromeDrawer: (props: unknown) => { h.drawer = props; return null; } }));
vi.mock('@/session/AccountSwitcherSheet', () => ({ AccountSwitcherSheet: (props: unknown) => { h.accounts = props; return null; } }));
vi.mock('@/session/HomeHeaderGlassButton', () => ({ HomeHeaderGlassButton: () => null }));
vi.mock('@/session/TeammateList', () => ({ TeammateList: (props: unknown) => { h.list = props; return null; } }));
vi.mock('@/session/useTeammateRoster', () => ({ useTeammateRoster: () => ({ ...h.roster }) }));
vi.mock('@/session/useBotGroupRoster', () => ({ useBotGroupRoster: (targets: unknown) => { h.groupTargetsSeen.push(targets); return h.groups; } }));
-vi.mock('@/session/BotGroupList', () => ({ BotGroupSection: (props: unknown) => { h.section = props; return null; } }));
vi.mock('@/session/useTeammateNavigation', async original => {
const actual = await original<typeof import('@/session/useTeammateNavigation')>();
return { useTeammateNavigation: () => h.realNavigation ? actual.useTeammateNavigation() : { ...h.nav } };
@@ -57,7 +56,7 @@ let root: Root | undefined;
async function render() { root ??= createRoot(document.createElement('div')); await act(async () => root!.render(createElement(TeammateHomeScreen))); }
let serial = 0;
beforeEach(() => {
- h.realNavigation = false; h.stored = null; h.nav.restoreLastTeammate = true;
+ h.realNavigation = false; h.stored = null;
h.auth.user = { id: `owner-${++serial}` }; h.auth.accountGeneration = serial;
vi.clearAllMocks(); h.focused = true; h.nav.lastTeammate = teammateIdentity(teammate); h.roster.items = [teammate];
h.nav.mode = 'teammates'; h.roster.authoritative = true;
@@ -65,37 +64,18 @@ beforeEach(() => {
});
afterEach(() => { act(() => root?.unmount()); root = undefined; });
describe('teammate home entry', () => {
- it('reopens a verified last teammate once, without bouncing on Back or refresh', async () => {
- await render(); expect(h.nav.openTeammate).toHaveBeenCalledExactlyOnceWith(teammate);
+ it('lands on the roster and never opens the remembered teammate on its own', async () => {
+ // A remembered, online teammate on a settled roster used to be reopened at launch (#4912); the
+ // roster is the destination now, in every focus, refresh and remount.
+ await render(); expect(h.nav.openTeammate).not.toHaveBeenCalled();
h.focused = false; await render(); h.focused = true; await render();
await act(async () => h.list.onRefresh()); await render();
- expect(h.nav.openTeammate).toHaveBeenCalledTimes(1); expect(h.roster.refresh).toHaveBeenCalledTimes(1);
- });
- it('waits for the initial route to become focused', async () => {
- h.focused = false; await render(); expect(h.nav.openTeammate).not.toHaveBeenCalled();
- h.focused = true; await render(); expect(h.nav.openTeammate).toHaveBeenCalledExactlyOnceWith(teammate);
- });
- it('does not resurrect a deleted teammate or substitute another existing roster member', async () => {
- h.roster.items = [{ ...teammate, item: { ...teammate.item, ref: { ...teammate.item.ref, id: 'different-bot' }, display: { title: 'Cindy' } } }];
- await render(); expect(h.nav.openTeammate).not.toHaveBeenCalled(); expect(h.nav.rememberTeammate).toHaveBeenCalledWith(null);
- });
- it('waits through transient offline startup and restores after reconnect without interaction', async () => {
- h.roster.authoritative = false; h.roster.error = 'offline'; h.roster.isOnline.mockReturnValue(false);
- await render(); expect(h.nav.openTeammate).not.toHaveBeenCalled(); expect(h.nav.rememberTeammate).not.toHaveBeenCalled();
- h.roster.error = null; h.roster.authoritative = true; h.roster.isOnline.mockReturnValue(true); await render(); expect(h.nav.openTeammate).toHaveBeenCalledExactlyOnceWith(teammate);
- });
- it('does not hijack a roster the user started searching while initial synchronization was pending', async () => {
- h.roster.loading = true; await render();
- await act(async () => h.list.onInteract()); h.roster.loading = false; await render();
- expect(h.nav.openTeammate).not.toHaveBeenCalled();
- });
- it.each(['refresh', 'back', 'mode'])('does not hijack reconnect after %s', async (action) => {
- h.roster.authoritative = false; h.roster.isOnline.mockReturnValue(false); await render();
- if (action === 'refresh') await act(async () => h.list.onRefresh());
- if (action === 'back') { h.focused = false; await render(); h.focused = true; }
- if (action === 'mode') { h.nav.mode = 'tasks'; await render(); }
- h.roster.authoritative = true; h.roster.isOnline.mockReturnValue(true); await render();
+ act(() => root!.unmount()); root = undefined; await render();
expect(h.nav.openTeammate).not.toHaveBeenCalled();
+ expect(h.roster.refresh).toHaveBeenCalledTimes(1);
+ // Choosing a row still opens it.
+ await act(async () => h.list.onSelect(teammate));
+ expect(h.nav.openTeammate).toHaveBeenCalledExactlyOnceWith(teammate);
});
it('preserves every utility/account action and waits for the drawer to close before switching mode', async () => {
h.nav.lastTeammate = null; await render();
@@ -138,41 +118,36 @@ describe('explicit sidebar entry through the home page', () => {
expect(h.push).toHaveBeenCalledOnce();
expect(h.push.mock.calls[0][0].params.resourceId).toBe(items.at(-1)!.item.ref.id);
});
- it('still restores the last companion on an untouched cold startup', async () => {
+ it('keeps an untouched cold startup on the roster instead of reopening the last companion', async () => {
h.realNavigation = true;
h.stored = JSON.stringify({ mode: 'teammates', lastTeammate: teammateIdentity(teammate) });
await renderHome();
- expect(h.push).toHaveBeenCalledOnce();
- expect(h.push.mock.calls[0][0].params.resourceId).toBe('writer');
+ expect(h.push).not.toHaveBeenCalled();
});
});
-describe('group chats section', () => {
+describe('group chats in the teammate list', () => {
const group: HostedRemoteCollectionItem = { key: 'mac:g1', host: { deviceId: 'mac', deviceName: 'Mac' },
item: { ref: { collectionId: 'bot-groups', kind: 'bot-group', id: 'g1' }, revision: '1', display: { title: '官网' }, links: [] } };
- afterEach(() => { h.roster.groupTargets = []; h.groups = { items: [], supported: false, isOnline: () => true, refresh: vi.fn() }; h.section = {}; });
+ afterEach(() => { h.roster.groupTargets = []; h.groups = { items: [], supported: false, isOnline: () => true, refresh: vi.fn() }; h.create = {}; });
- it('hides the section when no computer supports group chats (older desktops)', async () => {
+ it('leaves group chats out when no computer supports them (older desktops)', async () => {
h.nav.lastTeammate = null; await render();
- expect(h.list.renderFooter('')).toBeNull();
+ expect(h.list.groups).toBeUndefined();
});
- it('lists the discovered computers’ groups and opens a group on its computer', async () => {
+ it('mixes the discovered computers’ groups into the list, opens one on its computer and creates from the + menu', async () => {
h.nav.lastTeammate = null;
h.roster.groupTargets = [{ deviceId: 'mac', deviceName: 'Mac' }, { deviceId: 'pc', deviceName: 'PC' }];
h.groups = { items: [group], supported: true, isOnline: (host: { deviceId: string }) => host.deviceId === 'mac', refresh: vi.fn() } as any;
await render();
expect(h.groupTargetsSeen.at(-1)).toBe(h.roster.groupTargets);
- const footer = h.list.renderFooter('官');
- expect(footer).not.toBeNull();
- await act(async () => { root!.render(footer); });
- expect(h.section.items).toEqual([group]);
- expect(h.section.query).toBe('官');
+ expect(h.list.groups.items).toEqual([group]);
// Only online computers can host a new group.
- expect(h.section.createTargets).toEqual([{ deviceId: 'mac', deviceName: 'Mac' }]);
- await act(async () => h.section.onOpen(group));
+ expect(h.create.groupTargets).toEqual([{ deviceId: 'mac', deviceName: 'Mac' }]);
+ await act(async () => h.list.groups.onSelect(group));
expect(h.push).toHaveBeenLastCalledWith({ pathname: '/companions/groups/[groupId]', params: { groupId: 'g1', deviceId: 'mac', deviceName: 'Mac' } });
- await act(async () => h.section.onOpenCreated({ deviceId: 'pc', deviceName: 'PC' }, 'g2'));
+ await act(async () => h.create.onGroupCreated({ deviceId: 'pc', deviceName: 'PC' }, 'g2'));
expect(h.push).toHaveBeenLastCalledWith({ pathname: '/companions/groups/[groupId]', params: { groupId: 'g2', deviceId: 'pc', deviceName: 'PC' } });
expect(h.nav.openTeammate).not.toHaveBeenCalled();
});
diff --git a/apps/mobile/src/__tests__/TeammateList.test.tsx b/apps/mobile/src/__tests__/TeammateList.test.tsx
index 33070ef22b..b742e7a927 100644
--- a/apps/mobile/src/__tests__/TeammateList.test.tsx
+++ b/apps/mobile/src/__tests__/TeammateList.test.tsx
@@ -2,25 +2,42 @@
import { act, createElement as el } from 'react';
import { createRoot, type Root } from 'react-dom/client';
import { afterEach, beforeEach, expect, it, vi } from 'vitest';
+const h = vi.hoisted(() => ({ awaiting: new Set<string>() }));
vi.mock('react-native', () => ({
View: ({ children, testID, style }: any) => el('div', { 'data-testid': testID, style: Object.assign({}, ...[style].flat().filter(Boolean)) }, children),
- Pressable: ({ children, testID, accessibilityLabel, accessibilityState, disabled, onPress }: any) => el('button', { 'data-testid': testID, 'aria-label': accessibilityLabel, 'aria-selected': accessibilityState?.selected, disabled, onClick: onPress }, children),
- ActivityIndicator: () => null, RefreshControl: () => null,
+ Pressable: ({ children, testID, accessibilityLabel, disabled, onPress, style }: any) => el('button', { 'data-testid': testID, 'aria-label': accessibilityLabel, disabled, onClick: onPress,
+ style: Object.assign({}, ...[typeof style === 'function' ? style({ pressed: false }) : style].flat().filter(Boolean)) }, children),
+ ActivityIndicator: () => null, RefreshControl: () => null, Image: () => null,
+ Animated: { View: ({ children, testID }: any) => el('div', { 'data-testid': testID }, children), Value: class { setValue() {} }, timing: () => ({ start() {}, stop() {} }), loop: () => ({ start() {}, stop() {} }), sequence: () => ({}) },
+ Easing: { inOut: () => undefined, ease: undefined },
StyleSheet: { create: (v: unknown) => v, hairlineWidth: 1 },
FlatList: ({ ListHeaderComponent, ListEmptyComponent, data, renderItem }: any) => el('div', null, ListHeaderComponent, data.length ? data.map((item: any) => renderItem({ item })) : ListEmptyComponent),
}));
vi.mock('@/device-link/DeviceLinkContext', () => ({ useDeviceLink: () => ({ invoke: async () => ({ blocks: [] }) }) }));
-vi.mock('@/session/remoteSessionStore', () => ({ remoteSessionStore: {} }));
-vi.mock('@/components/AppText', () => ({ Text: ({ children }: any) => el('span', null, children), TextInput: ({ testID, autoFocus }: any) => el('input', { 'data-testid': testID, 'data-autofocus': String(autoFocus) }) }));
+vi.mock('@/session/remoteSessionStore', () => ({ remoteSessionStore: {
+ subscribe: () => () => {},
+ getSessionLiveActivity: (id: string) => h.awaiting.has(id) ? { phase: 'needs-interaction' } : null,
+ getPendingInteractions: () => [],
+} }));
+vi.mock('@/hooks/useReduceMotion', () => ({ useReduceMotionEnabled: () => true }));
+vi.mock('@/session/CompanionPresenceRing', () => ({ CompanionPresenceRing: ({ active }: any) => active ? el('i', { 'data-testid': 'ring' }) : null }));
+vi.mock('@/session/SessionRightSpinner', () => ({ SessionRightSpinner: ({ testID }: any) => el('i', { 'data-testid': testID }) }));
+vi.mock('@/session/BotGroupList', () => ({ OFFLINE_AVATAR_OPACITY: 0.45,
+ BotGroupListRow: ({ row, onPress }: any) => el('button', { 'data-testid': `group.${row.item.ref.id}`, onClick: onPress }, row.item.display.title) }));
+vi.mock('@/components/AppText', () => ({ Text: ({ children, testID }: any) => el('span', { 'data-testid': testID }, children), TextInput: ({ testID, autoFocus }: any) => el('input', { 'data-testid': testID, 'data-autofocus': String(autoFocus) }) }));
vi.mock('@/components/MobilePrimitives', () => ({ MainWindowEmptyState: ({ title, copy }: any) => el('div', null, title, copy),
RemoteListSyncingPlaceholder: ({ testID }: any) => el('div', { 'data-testid': testID }),
StatusDot: ({ tone }: any) => el('i', { 'data-testid': 'status-dot', 'data-tone': tone }) }));
vi.mock('@/components/RemoteCompanionAvatar', () => ({ RemoteCompanionAvatar: () => null }));
-vi.mock('lucide-react-native', () => ({ RefreshCw: () => null, Search: () => null, X: () => null, TriangleAlert: ({ testID, accessibilityLabel }: any) => el('i', { 'data-testid': testID, 'aria-label': accessibilityLabel }) }));
+vi.mock('lucide-react-native', () => ({ RefreshCw: () => null, Search: () => null, X: () => null }));
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 }, lineHeight: {}, fontWeight: {} }));
+vi.mock('@/theme', async () => {
+ const tokens = await import('@/theme/tokens');
+ const colors = { ...tokens.lightColors, statusDone: 'green', statusError: 'red', textTertiary: 'gray' };
+ return { ...tokens, useThemedStyles: (factory: (value: typeof colors) => unknown) => factory(colors), useTheme: () => ({ colors }) };
+});
vi.mock('@/session/WorkingStatusText', () => ({ WorkingStatusText: ({ text }: any) => el('span', null, text) }));
vi.mock('@/device-link/remoteResourceCache', () => ({ isRemoteResourceUnread: () => false }));
vi.mock('@/session/sessionList', () => ({ formatRemoteSessionSidebarTime: () => '' }));
@@ -32,15 +49,6 @@ const item = { key: 'host:bot', host: { deviceId: 'host', deviceName: 'Computer
let root: Root; let node: HTMLDivElement;
beforeEach(() => { Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true }); node = document.createElement('div'); root = createRoot(node); });
afterEach(async () => { await act(async () => root.unmount()); });
-it('highlights the current identity only in the picker, not on the single-column home list', async () => {
- const current = { deviceId: 'host', collectionId: 'teammates', resourceKind: 'bot' as const, resourceId: 'bot' };
- const selected = () => node.querySelector('[data-testid="teammates.item.host.bot"]')?.getAttribute('aria-selected');
- const props = { items: [item], error: null, isOnline: () => true, loading: false, refreshing: false, onRefresh: vi.fn(), onSelect: vi.fn(), current };
- await act(async () => root.render(el(TeammateList, props)));
- expect(selected()).toBe('false');
- await act(async () => root.render(el(TeammateList, { ...props, embedded: true })));
- expect(selected()).toBe('true');
-});
async function render(error: string | null, online = true) {
await act(async () => root.render(el(TeammateList, { items: [item], error, isOnline: () => online, loading: false, refreshing: false, onRefresh: vi.fn(), onSelect: vi.fn(), embedded: true })));
}
@@ -107,7 +115,50 @@ it('falls back to the description, then an invitation, and flags a teammate that
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');
+ // Attention reads as words before the preview (no colored flag in the time slot).
const flags = node.querySelectorAll('[data-testid="teammate.attention"]');
expect(flags).toHaveLength(1);
- expect(flags[0].getAttribute('aria-label')).toBe('Needs attention');
+ expect(flags[0].textContent).toBe('Needs attention · ');
+});
+
+it('keeps every row 78pt with the divider on the text column, none under the last row', async () => {
+ const second = { ...item, key: 'host:second', item: { ...item.item, ref: { ...item.item.ref, id: 'second' }, display: { title: 'Aster', preview: 'Hi' } } };
+ await act(async () => root.render(el(TeammateList, { items: [item, second], error: null, isOnline: () => true,
+ loading: false, refreshing: false, onRefresh: vi.fn(), onSelect: vi.fn(), embedded: true })));
+ const rows = [...node.querySelectorAll('[data-testid^="teammates.item."]')] as HTMLElement[];
+ expect(rows.map((row) => row.style.height)).toEqual(['78px', '78px']);
+ const bodies = rows.map((row) => row.children[1] as HTMLElement);
+ expect(bodies[0].style.borderBottomWidth).toBe('1px');
+ expect(bodies[1].style.borderBottomWidth).toBe('');
+});
+
+it('shows the computer name only when two teammates share a name, on the title line', async () => {
+ const twin = { ...item, key: 'other:bot', host: { deviceId: 'other', deviceName: 'Office iMac' } };
+ await act(async () => root.render(el(TeammateList, { items: [item, twin], error: null, isOnline: () => true,
+ loading: false, refreshing: false, onRefresh: vi.fn(), onSelect: vi.fn(), embedded: true })));
+ expect(node.textContent).toContain('· Computer identity');
+ expect(node.textContent).toContain('· Office iMac');
+});
+
+it('prefixes a teammate stopped on a question or permission with 「等你确认」', async () => {
+ const waiting = { ...item, item: { ...item.item, links: [{ rel: 'conversation', target: { kind: 'session' as const, sessionId: 's1' } }] } };
+ h.awaiting = new Set(['s1']);
+ await act(async () => root.render(el(TeammateList, { items: [waiting], error: null, isOnline: () => true,
+ loading: false, refreshing: false, onRefresh: vi.fn(), onSelect: vi.fn(), embedded: true })));
+ expect(node.textContent).toContain('devices.companions.awaiting · Last reply');
+ h.awaiting = new Set();
+});
+
+it('mixes group chats into the list by latest activity', async () => {
+ const older = { ...item, item: { ...item.item, display: { title: 'Mimi', preview: 'Old', timestamp: 1 } } };
+ const group = { key: 'host:g1', host: item.host, item: { ref: { collectionId: 'bot-groups', kind: 'bot-group', id: 'g1' }, revision: '1', links: [],
+ display: { title: 'Launch', timestamp: 5 } } };
+ const onGroup = vi.fn();
+ await act(async () => root.render(el(TeammateList, { items: [older], error: null, isOnline: () => true,
+ loading: false, refreshing: false, onRefresh: vi.fn(), onSelect: vi.fn(), embedded: true,
+ groups: { items: [group], isOnline: () => true, onSelect: onGroup } })));
+ const order = [...node.querySelectorAll('[data-testid^="teammates.item."], [data-testid^="group."]')].map((entry) => entry.getAttribute('data-testid'));
+ expect(order).toEqual(['group.g1', 'teammates.item.host.bot']);
+ await act(async () => (node.querySelector('[data-testid="group.g1"]') as HTMLButtonElement).click());
+ expect(onGroup).toHaveBeenCalledWith(group);
});
diff --git a/apps/mobile/src/__tests__/WorkingStatusText.test.tsx b/apps/mobile/src/__tests__/WorkingStatusText.test.tsx
index f6745e0f2e..158bc39cb5 100644
--- a/apps/mobile/src/__tests__/WorkingStatusText.test.tsx
+++ b/apps/mobile/src/__tests__/WorkingStatusText.test.tsx
@@ -13,6 +13,7 @@ vi.mock('react-native', () => {
value: number;
constructor(value: number) { this.value = value; }
setValue(value: number) { this.value = value; h.opacity.push(value); }
+ interpolate() { return this; }
stopAnimation() {
// Native stop reports an unfinished animation to its completion callback.
for (const fade of h.fades.splice(0)) fade.finish(false);
diff --git a/apps/mobile/src/__tests__/fixtures/theme-colors-snapshot.json b/apps/mobile/src/__tests__/fixtures/theme-colors-snapshot.json
index 729916f019..037d7bf36a 100644
--- a/apps/mobile/src/__tests__/fixtures/theme-colors-snapshot.json
+++ b/apps/mobile/src/__tests__/fixtures/theme-colors-snapshot.json
@@ -49,6 +49,7 @@
"statusError": "#D91F37",
"statusDone": "#2AAE5B",
"permAutoAccent": "#417CDD",
+ "botUnread": "#417CDD",
"errorText": "#0F0F0F",
"sharedTaskConfirmBackground": "#ac3535",
"sharedTaskConfirmForeground": "#FFFFFF",
@@ -169,6 +170,7 @@
"statusError": "#D91F37",
"statusDone": "#2AAE5B",
"permAutoAccent": "#417CDD",
+ "botUnread": "#417CDD",
"errorText": "#EDEDED",
"sharedTaskConfirmBackground": "#ec9898",
"sharedTaskConfirmForeground": "#121212",
diff --git a/apps/mobile/src/__tests__/hiddenHistoryChase.test.tsx b/apps/mobile/src/__tests__/hiddenHistoryChase.test.tsx
new file mode 100644
index 0000000000..62d678fea8
--- /dev/null
+++ b/apps/mobile/src/__tests__/hiddenHistoryChase.test.tsx
@@ -0,0 +1,79 @@
+// @vitest-environment jsdom
+import { act } from 'react';
+import { createRoot, type Root } from 'react-dom/client';
+import { afterEach, beforeEach, expect, it, vi } from 'vitest';
+import {
+ MAX_HIDDEN_HISTORY_CHASE_PAGES,
+ initialHiddenHistoryChase,
+ planHiddenHistoryChase,
+ useHiddenHistoryChase,
+ type HiddenHistoryChaseInput,
+} from '@/session/hiddenHistoryChase';
+
+Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });
+const base: HiddenHistoryChaseInput = { scope: 'a:mac:s1', enabled: true, visibleCount: 0, canLoadEarlier: true, loading: false, cursor: 'c20' };
+
+it('pages back while the loaded window shows nothing, and stops once a row shows or history ends', () => {
+ let plan = planHiddenHistoryChase(initialHiddenHistoryChase(base.scope), base);
+ expect(plan.load).toBe(true);
+ // Waiting for the page: nothing new.
+ plan = planHiddenHistoryChase(plan.state, { ...base, loading: true });
+ expect(plan.load).toBe(false);
+ // The page moved the cursor but still only hidden prompts: read the next one.
+ plan = planHiddenHistoryChase(plan.state, { ...base, cursor: 'c40' });
+ expect(plan.load).toBe(true);
+ expect(planHiddenHistoryChase(plan.state, { ...base, cursor: 'c60', visibleCount: 1 }).load).toBe(false);
+ expect(planHiddenHistoryChase(plan.state, { ...base, cursor: 'c60', canLoadEarlier: false }).load).toBe(false);
+});
+
+it('stops when a page makes no progress or the cap is reached, and restarts for another chat', () => {
+ let plan = planHiddenHistoryChase(initialHiddenHistoryChase(base.scope), base);
+ // A failed page leaves the cursor where it was: give up instead of retrying forever.
+ plan = planHiddenHistoryChase(plan.state, base);
+ expect(plan).toMatchObject({ load: false, state: { exhausted: true } });
+ expect(planHiddenHistoryChase(plan.state, { ...base, cursor: 'c40' }).load).toBe(false);
+ expect(planHiddenHistoryChase(plan.state, { ...base, scope: 'a:mac:s2' }).load).toBe(true);
+
+ let state = initialHiddenHistoryChase(base.scope);
+ let loads = 0;
+ for (let page = 0; page < MAX_HIDDEN_HISTORY_CHASE_PAGES + 5; page += 1) {
+ const next = planHiddenHistoryChase(state, { ...base, cursor: `c${page}` });
+ state = next.state;
+ if (next.load) loads += 1;
+ }
+ expect(loads).toBe(MAX_HIDDEN_HISTORY_CHASE_PAGES);
+ expect(state.exhausted).toBe(true);
+});
+
+it('does nothing offline, in the background, or while the window already shows rows', () => {
+ const idle = initialHiddenHistoryChase(base.scope);
+ expect(planHiddenHistoryChase(idle, { ...base, enabled: false }).load).toBe(false);
+ expect(planHiddenHistoryChase(idle, { ...base, visibleCount: 3 }).load).toBe(false);
+ expect(planHiddenHistoryChase(idle, { ...base, canLoadEarlier: false }).load).toBe(false);
+});
+
+let root: Root;
+let host: HTMLDivElement;
+let chasing: boolean | null = null;
+function Probe({ input, onLoad }: { input: HiddenHistoryChaseInput; onLoad(): void }) {
+ chasing = useHiddenHistoryChase(input, onLoad);
+ return null;
+}
+beforeEach(() => { host = document.createElement('div'); root = createRoot(host); chasing = null; });
+afterEach(() => act(() => root.unmount()));
+
+it('reports chasing for the syncing placeholder, then lets the empty state show once it gives up', async () => {
+ const onLoad = vi.fn();
+ await act(async () => root.render(<Probe input={base} onLoad={onLoad} />));
+ expect(onLoad).toHaveBeenCalledTimes(1);
+ expect(chasing).toBe(true);
+ await act(async () => root.render(<Probe input={{ ...base, loading: true }} onLoad={onLoad} />));
+ // The page came back without moving the cursor.
+ await act(async () => root.render(<Probe input={base} onLoad={onLoad} />));
+ expect(onLoad).toHaveBeenCalledTimes(1);
+ expect(chasing).toBe(false);
+ // A visible row ends the chase for good.
+ await act(async () => root.render(<Probe input={{ ...base, scope: 'a:mac:s2', visibleCount: 2 }} onLoad={onLoad} />));
+ expect(onLoad).toHaveBeenCalledTimes(1);
+ expect(chasing).toBe(false);
+});
diff --git a/apps/mobile/src/__tests__/homeChromeDrawer.test.tsx b/apps/mobile/src/__tests__/homeChromeDrawer.test.tsx
index 9fec1b7986..19d6976004 100644
--- a/apps/mobile/src/__tests__/homeChromeDrawer.test.tsx
+++ b/apps/mobile/src/__tests__/homeChromeDrawer.test.tsx
@@ -3,7 +3,6 @@ import { act, type ReactNode } from 'react';
import { createRoot, type Root } from 'react-dom/client';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { HomeChromeDrawer } from '@/session/HomeChromeDrawer';
-import { CompanionNavigationDrawer } from '@/session/CompanionNavigationDrawer';
/**
* HomeChromeDrawer 行为测试:Android 独立窗口(Modal)的挂载、返回键接管、
@@ -215,27 +214,4 @@ describe('Android home drawer window and close lifecycle', () => {
// onClosed 只在窗口真正卸载后触发一次:调用方的延后动作以此为信号执行。
expect(props.onClosed).toHaveBeenCalledOnce();
});
-
- it('opens search through the deferred action and survives a back press during the exit animation', async () => {
- const onSearch = vi.fn();
- const onClose = vi.fn();
- const host = (open: boolean) => (
- <CompanionNavigationDrawer open={open} onClose={onClose} onSearch={onSearch} />
- );
- await act(async () => root.render(host(true)));
- await act(async () => {
- (container.querySelector('[data-testid="home.chromeDrawer.search"]') as HTMLElement).click();
- });
- // 动作延后到抽屉完全关闭后执行,关闭请求先回到调用方。
- expect(onSearch).not.toHaveBeenCalled();
- expect(onClose).toHaveBeenCalledOnce();
- await act(async () => root.render(host(false)));
- // 退场期间的返回键不得清掉待执行动作。
- await act(async () => h.modal!.onRequestClose());
- expect(h.emit).toHaveBeenCalledExactlyOnceWith('hardwareBackPress');
- expect(onSearch).not.toHaveBeenCalled();
- await finishTiming();
- expect(onSearch).toHaveBeenCalledOnce();
- expect(container.querySelector('[data-testid="home.chromeDrawer"]')).toBeNull();
- });
});
diff --git a/apps/mobile/src/__tests__/homeEntryStartup.test.tsx b/apps/mobile/src/__tests__/homeEntryStartup.test.tsx
index b8e116f6bc..86a3118bf8 100644
--- a/apps/mobile/src/__tests__/homeEntryStartup.test.tsx
+++ b/apps/mobile/src/__tests__/homeEntryStartup.test.tsx
@@ -30,6 +30,7 @@ import { HomeEntryProvider, useHomeEntry, useHomeEntrySplashRelease } from '@/se
import { readHomeEntry, saveHomeEntry } from '@/session/homeEntryPreference';
import { getMobileAuthOwner, setMobileAuthOwner, __testing as ownerTesting } from '@/auth/authOwnerGeneration';
import IndexScreen from '../../app/index';
+import { homeNavigationOwner } from '@/session/useHomeMode';
let root: Root;
let host: HTMLDivElement;
@@ -88,6 +89,33 @@ describe('mobile startup entry', () => {
await restart();
expect(host.querySelector('[data-target]')).toBeNull();
});
+ it('lands on the teammate home instead of stacking the old partner list when teammate mode is stored', async () => {
+ const user = { id: 'u1', passportId: 'p1', membershipKind: 'personal', orgId: null };
+ h.auth = { initialized: true, isAuthenticated: true, user } as typeof h.auth;
+ await saveHomeEntry(getMobileAuthOwner().accountKey, 'bots');
+ h.storage.set(`cindy.mobile.home.navigation.v1.${encodeURIComponent(homeNavigationOwner(user as never))}`, JSON.stringify({ mode: 'teammates' }));
+ await render();
+ // The home route itself shows the teammate roster in this mode; no second list on top of it.
+ expect(host.querySelector('[data-target]')).toBeNull();
+ expect(host.textContent).toContain('tasks');
+ expect(h.releaseSplash).toHaveBeenCalled();
+ });
+ it('does not hold the overlay behind a stalled teammate-mode read', async () => {
+ vi.useFakeTimers();
+ try {
+ const user = { id: 'u1', passportId: 'p1', membershipKind: 'personal', orgId: null };
+ h.auth = { initialized: true, isAuthenticated: true, user } as typeof h.auth;
+ h.get.mockImplementation(async (key: string) => key.startsWith('cindy.mobile.home.navigation.v1.')
+ ? new Promise<never>(() => {}) : h.storage.get(key) ?? null);
+ await render();
+ expect(h.releaseSplash).not.toHaveBeenCalled();
+ await act(async () => { await vi.advanceTimersByTimeAsync(2_000); });
+ expect(host.textContent).toContain('tasks');
+ expect(h.releaseSplash).toHaveBeenCalled();
+ } finally {
+ vi.useRealTimers();
+ }
+ });
it.each([null, 'tasks', 'invalid'])('keeps the existing home for stored value %s', async (value) => {
if (value) h.storage.set('cindy.homeEntry.v1.' + getMobileAuthOwner().accountKey, value);
await render();
diff --git a/apps/mobile/src/__tests__/remoteCollectionRead.test.tsx b/apps/mobile/src/__tests__/remoteCollectionRead.test.tsx
index 64780de4dc..905d2d9211 100644
--- a/apps/mobile/src/__tests__/remoteCollectionRead.test.tsx
+++ b/apps/mobile/src/__tests__/remoteCollectionRead.test.tsx
@@ -19,6 +19,9 @@ vi.mock('react-native', async () => {
FlatList: ({ data, renderItem, ListEmptyComponent }: any) => el('div', { 'data-list': true }, data.length ? data.map((item: any) => el(Fragment, { key: item.key }, renderItem({ item }))) : ListEmptyComponent),
StyleSheet: { create: (styles: unknown) => styles },
AppState: { currentState: 'active', addEventListener: () => ({ remove() {} }) },
+ Animated: { Value: class { setValue() {} stopAnimation() {} interpolate() { return 0; } }, View: view,
+ timing: () => ({ start() {}, stop() {} }), loop: () => ({ start() {}, stop() {} }), sequence: () => ({ start() {}, stop() {} }) },
+ Easing: { bezier: () => () => 0, inOut: () => () => 0, ease: () => 0 },
};
});
vi.mock('expo-router', async () => {
@@ -30,8 +33,12 @@ 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, Search: () => null, TriangleAlert: () => null, X: () => null }));
+vi.mock('@/hooks/useReduceMotion', () => ({ useReduceMotionEnabled: () => true }));
vi.mock('@/session/WorkingStatusText', () => ({ WorkingStatusText: ({ text }: any) => text }));
-vi.mock('@/components/AppText', () => ({ Text: 'span', TextInput: 'input' }));
+vi.mock('@/components/AppText', async () => {
+ const { createElement: el } = await import('react');
+ return { Text: ({ children }: any) => el('span', null, children), TextInput: ({ testID }: any) => el('input', { 'data-testid': testID }) };
+});
vi.mock('@/components/RemoteCompanionAvatar', () => ({ RemoteCompanionAvatar: () => null }));
vi.mock('@/components/MobilePrimitives', () => ({ MainWindowEmptyState: () => null, StatusDot: () => null, RemoteListSyncingPlaceholder: () => null }));
vi.mock('@/platform/chrome', () => ({ SimpleStackHeader: () => null, simpleScreenSafeAreaEdges: () => [], simpleScrollInsetProps: {}, simpleScrollScreenSafeAreaEdges: () => [] }));
diff --git a/apps/mobile/src/__tests__/sessionMainLayerDesktopFirst.test.ts b/apps/mobile/src/__tests__/sessionMainLayerDesktopFirst.test.ts
index 960346acc6..cc8557e402 100644
--- a/apps/mobile/src/__tests__/sessionMainLayerDesktopFirst.test.ts
+++ b/apps/mobile/src/__tests__/sessionMainLayerDesktopFirst.test.ts
@@ -30,7 +30,8 @@ describe('mobile session main layer desktop-first noise budget', () => {
expect(syncingSource).not.toContain('setTimeout');
expect(rendererSource).toContain('ListEmptyComponent={syncingWhileEmpty');
expect(rendererSource).toContain('<SyncingMessages />');
- expect(routeSource).toContain('syncingWhileEmpty={syncingWhileEmpty}');
+ // Also syncing while a window of only hidden rows pages back (hiddenHistoryChase).
+ expect(routeSource).toContain('syncingWhileEmpty={syncingWhileEmpty || chasingHiddenHistory}');
});
it('keeps the unsynced session state focused on the current action', () => {
diff --git a/apps/mobile/src/__tests__/sessionMessageMemoryWiring.test.ts b/apps/mobile/src/__tests__/sessionMessageMemoryWiring.test.ts
index de5214f496..76909702ff 100644
--- a/apps/mobile/src/__tests__/sessionMessageMemoryWiring.test.ts
+++ b/apps/mobile/src/__tests__/sessionMessageMemoryWiring.test.ts
@@ -84,7 +84,9 @@ describe('任务消息内存治理页面接线', () => {
it('schedule 关闭翻历史入口,页面工作租约覆盖发送与附件状态', () => {
expect(screen).toContain('if (isScheduleDetail) return;');
expect(screen).toContain('hasOlderMessages && !isScheduleDetail');
- expect(screen).toContain('canLoadEarlier={(historyView.snapshot.ready ? historyView.snapshot.hasMore : hasOlderMessages && messages.length > 0) && !isScheduleDetail}');
+ expect(screen).toMatch(/const canLoadEarlierHistory = \(historyView\.snapshot\.ready \? historyView\.snapshot\.hasMore : hasOlderMessages && messages\.length > 0\)\s*&& !isScheduleDetail;/);
+ expect(screen).toContain('canLoadEarlier={canLoadEarlierHistory}');
+ expect(screen).toContain('enabled: appStateActive && remoteHistoryAvailable && !isScheduleDetail,');
expect(screen).toContain('remoteSessionStore.acquireSessionMessageWork(sessionId, pageHasMessageWork)');
const bridge = source('src/session/MobileOutboxBridge.tsx');
expect(bridge).toMatch(/remoteSessionStore\.acquireSessionMessageWork\(\s*record\.item\.sessionId,\s*true,?\s*\)/);
diff --git a/apps/mobile/src/__tests__/teammateNavigation.test.ts b/apps/mobile/src/__tests__/teammateNavigation.test.ts
index dcca065aaf..b91a66d2f0 100644
--- a/apps/mobile/src/__tests__/teammateNavigation.test.ts
+++ b/apps/mobile/src/__tests__/teammateNavigation.test.ts
@@ -8,7 +8,7 @@ vi.mock('@react-native-async-storage/async-storage', () => ({ default: {
} }));
import AsyncStorage from '@react-native-async-storage/async-storage';
import { __testing, normalizeHomeNavigationPreferences, readHomeNavigationPreferences, saveHomeNavigationPreferences } from '@/session/homeViewPreferenceStore';
-import { findLastTeammate, homeDismissCount, orderedTeammates, teammateIdentity, teammateResourceRoute } from '@/session/teammateNavigation';
+import { homeDismissCount, orderedTeammates, teammateIdentity, teammateResourceRoute } from '@/session/teammateNavigation';
import { StackRouter, StackActions } from 'expo-router/build/react-navigation/routers/StackRouter';
const row = (deviceId = 'mac', id = 'writer', title = 'Writer', timestamp = 100): HostedRemoteCollectionItem => ({
key: `${deviceId}:${id}`, host: { deviceId, deviceName: deviceId },
@@ -71,12 +71,6 @@ describe('teammate identity navigation', () => {
resourceCollectionId: 'teammates', resourceId: 'writer', resourceKind: 'bot', deviceId: 'mac', deviceName: 'mac', sessionId: 'obsolete-session',
} });
});
- it('never substitutes Cindy or another same-named host for a deleted or missing remembered teammate', () => {
- const last = teammateIdentity(row());
- expect(findLastTeammate(last, [row('other'), row('mac', 'cindy', 'Cindy')])).toBeNull();
- expect(findLastTeammate(null, [row('mac', 'cindy', 'Cindy')])).toBeNull();
- expect(findLastTeammate(last, [row()])).toEqual(row());
- });
it('keeps equal names from separate hosts, filters names, and sorts by real activity', () => {
const first = row('mac', 'writer', 'Writer', 100);
const second = row('pc', 'writer', 'Writer', 200);
diff --git a/apps/mobile/src/__tests__/useTeammateNavigation.test.tsx b/apps/mobile/src/__tests__/useTeammateNavigation.test.tsx
index 4762deb2c8..b194f10961 100644
--- a/apps/mobile/src/__tests__/useTeammateNavigation.test.tsx
+++ b/apps/mobile/src/__tests__/useTeammateNavigation.test.tsx
@@ -39,9 +39,7 @@ describe('header/home shared navigation', () => {
const owner = homeNavigationOwner(h.user);
await saveHomeNavigationPreferences(owner, { mode: 'teammates', lastTeammate: teammateIdentity(teammate) });
await render(); expect(result.mode).toBe('teammates'); expect(result.lastTeammate?.resourceId).toBe('writer');
- expect(result.restoreLastTeammate).toBe(true);
await act(async () => result.chooseMode('tasks'));
- expect(result.restoreLastTeammate).toBe(false);
expect(h.dismissTo).toHaveBeenCalledWith('/devices');
expect(await readHomeNavigationPreferences(owner)).toEqual({ mode: 'tasks', lastTeammate: teammateIdentity(teammate) });
});
@@ -107,10 +105,8 @@ describe('header/home shared navigation', () => {
let change!: Promise<void>;
await act(async () => { change = result.setMode('teammates'); });
expect(result.hydrated).toBe(false);
- expect(result.restoreLastTeammate).toBe(false);
await act(async () => { finish(JSON.stringify({ mode: 'tasks', lastTeammate: teammateIdentity(teammate) })); await change; });
expect(result.mode).toBe('teammates'); expect(result.lastTeammate).toEqual(teammateIdentity(teammate));
- expect(result.restoreLastTeammate).toBe(false);
});
it('does not let a hung preference read blank home forever or a late mode hijack the fallback task list', async () => {
vi.useFakeTimers();
diff --git a/apps/mobile/src/components/MobilePrimitives.tsx b/apps/mobile/src/components/MobilePrimitives.tsx
index 1aa328d31d..7f7ed1ec37 100644
--- a/apps/mobile/src/components/MobilePrimitives.tsx
+++ b/apps/mobile/src/components/MobilePrimitives.tsx
@@ -59,6 +59,7 @@ export function MainWindowOptionButton({
accessibilityLabel,
accessibilityRole = 'button',
accessibilityState,
+ badge,
density = 'compact',
disabled = false,
label,
@@ -71,6 +72,8 @@ export function MainWindowOptionButton({
accessibilityLabel?: string;
accessibilityRole?: AccessibilityRole;
accessibilityState?: AccessibilityState;
+ /** Neutral count after the label (e.g. the drawer's 「任务 3」); keep the full number in accessibilityLabel. */
+ badge?: string;
density?: MainWindowActionDensity;
disabled?: boolean;
label: string;
@@ -95,6 +98,7 @@ export function MainWindowOptionButton({
styles.mainOptionButton,
compact && styles.mainOptionButtonCompact,
variant === 'segmented' && styles.mainOptionButtonSegmented,
+ badge ? styles.mainOptionButtonWithBadge : null,
selected && styles.mainOptionButtonSelected,
pressed && styles.pressed,
interactionDisabled && styles.disabled,
@@ -112,6 +116,11 @@ export function MainWindowOptionButton({
>
{label}
</Text>
+ {badge ? (
+ <View style={[styles.mainOptionBadge, selected && styles.mainOptionBadgeSelected]} testID={testID ? `${testID}.badge` : undefined}>
+ <Text numberOfLines={1} style={[styles.mainOptionBadgeText, selected && styles.mainOptionBadgeTextSelected]}>{badge}</Text>
+ </View>
+ ) : null}
</Pressable>
);
}
@@ -870,6 +879,36 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({
backgroundColor: colors.cta,
borderColor: colors.cta,
},
+ mainOptionButtonWithBadge: {
+ flexDirection: 'row',
+ gap: spacing.xs + 2,
+ },
+ // Neutral count chip (desktop NavigationCountBadge): raised on the unselected segment, inverse on the selected one.
+ mainOptionBadge: {
+ alignItems: 'center',
+ backgroundColor: colors.surfaceElevated,
+ borderColor: colors.border,
+ borderRadius: radius.pill,
+ borderWidth: StyleSheet.hairlineWidth,
+ justifyContent: 'center',
+ minWidth: 18,
+ height: 18,
+ paddingHorizontal: spacing.xs + 1,
+ },
+ mainOptionBadgeSelected: {
+ backgroundColor: colors.ctaText,
+ borderColor: colors.ctaText,
+ },
+ mainOptionBadgeText: {
+ color: colors.textPrimary,
+ fontSize: typeScale.micro,
+ lineHeight: lineHeight.micro,
+ fontWeight: fontWeight.semibold,
+ fontVariant: ['tabular-nums'],
+ },
+ mainOptionBadgeTextSelected: {
+ color: colors.cta,
+ },
// 选项文字按 §3「行标题、选项、按钮」16/22 500;紧凑档取「面板操作项」15/20 500。选中只换色。
mainOptionButtonText: {
color: colors.textSecondary,
diff --git a/apps/mobile/src/i18n/locales/en/devices.json b/apps/mobile/src/i18n/locales/en/devices.json
index 98c7c58ba9..1cb85aaac9 100644
--- a/apps/mobile/src/i18n/locales/en/devices.json
+++ b/apps/mobile/src/i18n/locales/en/devices.json
@@ -628,7 +628,14 @@
},
"viewResult": "View Result",
"noWrittenResult": "No written result.",
- "errorDetails": "Error details"
+ "errorDetails": "Error details",
+ "createTeammate": "New teammate",
+ "createMenu": "New",
+ "searchWithGroups": "Search teammates and groups",
+ "awaiting": "Needs your OK",
+ "emptyCopyCreate": "Teammates remember what you talked about and can get things done on your computer.",
+ "taskResult": "Task result",
+ "collapseResult": "Hide result"
},
"companionProfile": {
"avatar": "Avatar",
diff --git a/apps/mobile/src/i18n/locales/en/groupChat.json b/apps/mobile/src/i18n/locales/en/groupChat.json
index 774d4d041b..7444ffc9e8 100644
--- a/apps/mobile/src/i18n/locales/en/groupChat.json
+++ b/apps/mobile/src/i18n/locales/en/groupChat.json
@@ -110,7 +110,13 @@
"dismissFailed": "Couldn’t end this plan. Try again.",
"editFailed": "Couldn’t change this step. Try again.",
"editStepHint": "Reassign or remove this step",
- "reassignStepHint": "Reassign this step"
+ "reassignStepHint": "Reassign this step",
+ "eyebrow_one": "Plan · {{count}} step",
+ "eyebrow_other": "Plan · {{count}} steps",
+ "awaitingStart": "Waiting for you",
+ "progressRunning": "Working {{current}} / {{total}}",
+ "progressDone": "Done {{done}} / {{total}}",
+ "allDone": "All done"
},
"speaking": {
"planning": "Splitting the work…",
@@ -153,7 +159,8 @@
"projectDirNone": "None selected",
"projectDirNote": "Teammates work here when they split the work. You can leave it empty and they’ll use this group chat’s own folder. If you choose a git project, each work split gets a new worktree and branch, so your own code stays untouched.",
"add": "Add teammate",
- "projectDirOnComputer": "Choose or change it on your computer"
+ "projectDirOnComputer": "Choose or change it on your computer",
+ "memberActions": "Actions for {{name}}"
},
"errors": {
"memberLimit": "A group chat needs 2–6 teammates",
@@ -162,5 +169,9 @@
"hostNotReady": "Cindy is still getting ready. Try again in a moment.",
"planOpen": "A work split is underway. Finish or stop it before starting another.",
"planClosed": "This plan has already ended or been updated."
+ },
+ "followUp": {
+ "next": "Plan · Next step",
+ "failedStep": "Step {{step}} didn't finish"
}
}
diff --git a/apps/mobile/src/i18n/locales/ja/devices.json b/apps/mobile/src/i18n/locales/ja/devices.json
index 63076aa742..6a3644b604 100644
--- a/apps/mobile/src/i18n/locales/ja/devices.json
+++ b/apps/mobile/src/i18n/locales/ja/devices.json
@@ -628,7 +628,14 @@
},
"viewResult": "結果を見る",
"noWrittenResult": "テキストの結果はありません。",
- "errorDetails": "エラー詳細"
+ "errorDetails": "エラー詳細",
+ "createTeammate": "新しい仲間",
+ "createMenu": "新規作成",
+ "searchWithGroups": "仲間とグループを検索",
+ "awaiting": "確認待ち",
+ "emptyCopyCreate": "仲間は話した内容を覚えていて、パソコンで作業も手伝えます。",
+ "taskResult": "タスクの結果",
+ "collapseResult": "結果を閉じる"
},
"companionProfile": {
"avatar": "アバター",
diff --git a/apps/mobile/src/i18n/locales/ja/groupChat.json b/apps/mobile/src/i18n/locales/ja/groupChat.json
index 818d891598..cfd16f92a1 100644
--- a/apps/mobile/src/i18n/locales/ja/groupChat.json
+++ b/apps/mobile/src/i18n/locales/ja/groupChat.json
@@ -110,7 +110,13 @@
"dismissFailed": "この計画を終了できませんでした。もう一度お試しください",
"editFailed": "このステップを変更できませんでした。もう一度お試しください",
"editStepHint": "担当を変えるか、このステップを削除します",
- "reassignStepHint": "このステップの担当を変えます"
+ "reassignStepHint": "このステップの担当を変えます",
+ "eyebrow_one": "分担 · {{count}} ステップ",
+ "eyebrow_other": "分担 · {{count}} ステップ",
+ "awaitingStart": "開始待ち",
+ "progressRunning": "作業中 {{current}} / {{total}}",
+ "progressDone": "完了 {{done}} / {{total}}",
+ "allDone": "すべて完了"
},
"speaking": {
"planning": "役割分担を考えています…",
@@ -153,7 +159,8 @@
"projectDirNone": "未選択",
"projectDirNote": "役割分担で作業するとき、仲間はここで作業します。選ばなくてもかまいません。その場合はこのグループチャット専用のフォルダを使います。git プロジェクトを選ぶと、役割分担のたびに新しい worktree とブランチを作るので、手元のコードには触れません。",
"add": "仲間を追加",
- "projectDirOnComputer": "パソコンで選択・変更できます"
+ "projectDirOnComputer": "パソコンで選択・変更できます",
+ "memberActions": "{{name}} の操作"
},
"errors": {
"memberLimit": "グループチャットには仲間が 2〜6 人必要です",
@@ -162,5 +169,9 @@
"hostNotReady": "Cindy の準備がまだ終わっていません。しばらくしてから再試行してください",
"planOpen": "役割分担の途中です。終わるか停止してから新しく始めてください",
"planClosed": "この計画はすでに終了したか、更新されています"
+ },
+ "followUp": {
+ "next": "分担 · 次のステップ",
+ "failedStep": "ステップ {{step}} は完了できませんでした"
}
}
diff --git a/apps/mobile/src/i18n/locales/ko/devices.json b/apps/mobile/src/i18n/locales/ko/devices.json
index 4b4e7260d8..10e90388f7 100644
--- a/apps/mobile/src/i18n/locales/ko/devices.json
+++ b/apps/mobile/src/i18n/locales/ko/devices.json
@@ -628,7 +628,14 @@
},
"viewResult": "결과 보기",
"noWrittenResult": "텍스트 결과가 없습니다.",
- "errorDetails": "오류 정보"
+ "errorDetails": "오류 정보",
+ "createTeammate": "새 동료",
+ "createMenu": "새로 만들기",
+ "searchWithGroups": "동료와 그룹 검색",
+ "awaiting": "확인 필요",
+ "emptyCopyCreate": "동료는 나눈 이야기를 기억하고 컴퓨터에서 일도 도와줘요.",
+ "taskResult": "작업 결과",
+ "collapseResult": "결과 접기"
},
"companionProfile": {
"avatar": "아바타",
diff --git a/apps/mobile/src/i18n/locales/ko/groupChat.json b/apps/mobile/src/i18n/locales/ko/groupChat.json
index cf67372d2c..67eca285ec 100644
--- a/apps/mobile/src/i18n/locales/ko/groupChat.json
+++ b/apps/mobile/src/i18n/locales/ko/groupChat.json
@@ -110,7 +110,13 @@
"dismissFailed": "이 계획을 끝내지 못했습니다. 다시 시도하세요",
"editFailed": "이 단계를 바꾸지 못했습니다. 다시 시도하세요",
"editStepHint": "담당을 바꾸거나 이 단계를 삭제합니다",
- "reassignStepHint": "이 단계의 담당을 바꿉니다"
+ "reassignStepHint": "이 단계의 담당을 바꿉니다",
+ "eyebrow_one": "분담 · {{count}}단계",
+ "eyebrow_other": "분담 · {{count}}단계",
+ "awaitingStart": "시작 대기",
+ "progressRunning": "진행 중 {{current}} / {{total}}",
+ "progressDone": "완료 {{done}} / {{total}}",
+ "allDone": "모두 완료"
},
"speaking": {
"planning": "역할을 나누는 중…",
@@ -153,7 +159,8 @@
"projectDirNone": "선택 안 함",
"projectDirNote": "역할 분담으로 일할 때 동료들이 여기서 작업합니다. 선택하지 않아도 되며, 그러면 이 그룹 채팅 전용 폴더를 사용합니다. git 프로젝트를 선택하면 역할 분담마다 새 worktree와 브랜치를 만들어, 지금 작업 중인 코드는 건드리지 않습니다.",
"add": "동료 추가",
- "projectDirOnComputer": "컴퓨터에서 선택하거나 바꿀 수 있습니다"
+ "projectDirOnComputer": "컴퓨터에서 선택하거나 바꿀 수 있습니다",
+ "memberActions": "{{name}} 작업"
},
"errors": {
"memberLimit": "그룹 채팅에는 동료가 2~6명 필요합니다",
@@ -162,5 +169,9 @@
"hostNotReady": "Cindy가 아직 준비 중입니다. 잠시 후 다시 시도하세요",
"planOpen": "역할 분담이 진행 중입니다. 끝내거나 중지한 뒤 새로 시작하세요",
"planClosed": "이 계획은 이미 끝났거나 업데이트되었습니다"
+ },
+ "followUp": {
+ "next": "분담 · 다음 단계",
+ "failedStep": "{{step}}단계를 끝내지 못했어요"
}
}
diff --git a/apps/mobile/src/i18n/locales/zh-CN/devices.json b/apps/mobile/src/i18n/locales/zh-CN/devices.json
index 1e475e2242..fa37078d2d 100644
--- a/apps/mobile/src/i18n/locales/zh-CN/devices.json
+++ b/apps/mobile/src/i18n/locales/zh-CN/devices.json
@@ -628,7 +628,14 @@
},
"viewResult": "查看结果",
"noWrittenResult": "没有文字结果。",
- "errorDetails": "错误详情"
+ "errorDetails": "错误详情",
+ "createTeammate": "新建伙伴",
+ "createMenu": "新建",
+ "searchWithGroups": "搜索伙伴和群聊",
+ "awaiting": "等你确认",
+ "emptyCopyCreate": "伙伴会记得你们聊过的事,也能帮你在电脑上做事。",
+ "taskResult": "任务结果",
+ "collapseResult": "收起结果"
},
"companionProfile": {
"avatar": "头像",
diff --git a/apps/mobile/src/i18n/locales/zh-CN/groupChat.json b/apps/mobile/src/i18n/locales/zh-CN/groupChat.json
index d1c103a943..a343f2fa99 100644
--- a/apps/mobile/src/i18n/locales/zh-CN/groupChat.json
+++ b/apps/mobile/src/i18n/locales/zh-CN/groupChat.json
@@ -110,7 +110,13 @@
"dismissFailed": "没能结束这个安排,请再试一次",
"editFailed": "这一步没改成,请再试一次",
"editStepHint": "换人或删掉这一步",
- "reassignStepHint": "换人做这一步"
+ "reassignStepHint": "换人做这一步",
+ "eyebrow_one": "分工 · {{count}} 步",
+ "eyebrow_other": "分工 · {{count}} 步",
+ "awaitingStart": "等你开始",
+ "progressRunning": "正在做 {{current}} / {{total}}",
+ "progressDone": "做完 {{done}} / {{total}}",
+ "allDone": "都做完了"
},
"speaking": {
"planning": "正在安排…",
@@ -153,7 +159,8 @@
"projectDirNone": "没选",
"projectDirNote": "分工做事时,伙伴们在这里干活。不选也行,会用这个群自己的文件夹;选了 git 项目,每次分工会新开一个 worktree 和分支,不动你手上的代码。",
"add": "添加伙伴",
- "projectDirOnComputer": "在电脑上选择或更换"
+ "projectDirOnComputer": "在电脑上选择或更换",
+ "memberActions": "{{name}} 的操作"
},
"errors": {
"memberLimit": "一个群需要 2–6 位伙伴",
@@ -162,5 +169,9 @@
"hostNotReady": "Cindy 还在准备中,请稍后重试",
"planOpen": "正在分工,做完或停止后才能安排新的",
"planClosed": "这个安排已经结束或更新了"
+ },
+ "followUp": {
+ "next": "分工 · 下一步",
+ "failedStep": "第 {{step}} 步没做完"
}
}
diff --git a/apps/mobile/src/i18n/locales/zh-TW/devices.json b/apps/mobile/src/i18n/locales/zh-TW/devices.json
index 82ec04da55..9122f8f040 100644
--- a/apps/mobile/src/i18n/locales/zh-TW/devices.json
+++ b/apps/mobile/src/i18n/locales/zh-TW/devices.json
@@ -628,7 +628,14 @@
},
"viewResult": "查看結果",
"noWrittenResult": "沒有文字結果。",
- "errorDetails": "錯誤詳情"
+ "errorDetails": "錯誤詳情",
+ "createTeammate": "新增夥伴",
+ "createMenu": "新增",
+ "searchWithGroups": "搜尋夥伴和群聊",
+ "awaiting": "等你確認",
+ "emptyCopyCreate": "夥伴會記得你們聊過的事,也能幫你在電腦上做事。",
+ "taskResult": "任務結果",
+ "collapseResult": "收起結果"
},
"companionProfile": {
"avatar": "頭像",
diff --git a/apps/mobile/src/i18n/locales/zh-TW/groupChat.json b/apps/mobile/src/i18n/locales/zh-TW/groupChat.json
index f1499cd81c..f5c6986697 100644
--- a/apps/mobile/src/i18n/locales/zh-TW/groupChat.json
+++ b/apps/mobile/src/i18n/locales/zh-TW/groupChat.json
@@ -110,7 +110,13 @@
"dismissFailed": "沒能結束這個安排,請再試一次",
"editFailed": "這一步沒改成,請再試一次",
"editStepHint": "換人或刪掉這一步",
- "reassignStepHint": "換人做這一步"
+ "reassignStepHint": "換人做這一步",
+ "eyebrow_one": "分工 · {{count}} 步",
+ "eyebrow_other": "分工 · {{count}} 步",
+ "awaitingStart": "等你開始",
+ "progressRunning": "正在做 {{current}} / {{total}}",
+ "progressDone": "做完 {{done}} / {{total}}",
+ "allDone": "都做完了"
},
"speaking": {
"planning": "正在安排…",
@@ -153,7 +159,8 @@
"projectDirNone": "沒選",
"projectDirNote": "分工做事時,夥伴們在這裡工作。不選也行,會用這個群聊自己的資料夾;選了 git 專案,每次分工會新開一個 worktree 和分支,不動你手上的程式碼。",
"add": "新增夥伴",
- "projectDirOnComputer": "在電腦上選擇或更換"
+ "projectDirOnComputer": "在電腦上選擇或更換",
+ "memberActions": "{{name}} 的操作"
},
"errors": {
"memberLimit": "一個群聊需要 2–6 位夥伴",
@@ -162,5 +169,9 @@
"hostNotReady": "Cindy 還在準備中,請稍後重試",
"planOpen": "正在分工,做完或停止後才能安排新的",
"planClosed": "這個安排已經結束或更新了"
+ },
+ "followUp": {
+ "next": "分工 · 下一步",
+ "failedStep": "第 {{step}} 步沒做完"
}
}
diff --git a/apps/mobile/src/session/BotGroupAvatars.tsx b/apps/mobile/src/session/BotGroupAvatars.tsx
index 1f0d10dfc5..e5fbec40a3 100644
--- a/apps/mobile/src/session/BotGroupAvatars.tsx
+++ b/apps/mobile/src/session/BotGroupAvatars.tsx
@@ -1,8 +1,8 @@
/**
- * 群的身份标记(对照桌面 BotGroupAvatars.tsx):列表行用两位成员斜向叠放,顶栏用一排
- * 叠放头像。每个头像仍是 RemoteCompanionAvatar;叠放处用与底色同色的 2pt 描边隔开,
- * 不引入阴影或新 token。头像与名字取伙伴列表缓存(只用于显示),缓存里没有时退回群里
- * 带来的名字与头像字段。
+ * 群的身份标记(对照桌面 BotGroupAvatars.tsx):列表行与聊天顶栏都用两位成员斜向叠放
+ * (行 44 框、顶栏 32 框,两个头像都收在框内)。每个头像仍是 RemoteCompanionAvatar;叠放处用与
+ * 底色同色的 2pt 描边隔开,不引入阴影或新 token。头像与名字取伙伴列表缓存(只用于显示),
+ * 缓存里没有时退回群里带来的名字与头像字段。
*/
import { useCallback, useEffect, useState, useSyncExternalStore } from 'react';
import { StyleSheet, View } from 'react-native';
@@ -21,6 +21,7 @@ import {
import { useTheme, useThemedStyles, type ThemeColors } from '@/theme';
import { iconSize, radius } from '@/theme/tokens';
import { BOT_GROUP_TEAMMATES_COLLECTION_ID, botGroupMemberAvatar } from './botGroupRemote';
+import { CompanionPresenceRing } from './CompanionPresenceRing';
export interface BotGroupIdentity {
botId: string;
@@ -33,9 +34,8 @@ export const BOT_GROUP_MESSAGE_AVATAR_SIZE = 28;
export const BOT_GROUP_STEP_AVATAR_SIZE = 24;
export const BOT_GROUP_INLINE_AVATAR_SIZE = 20;
export const BOT_GROUP_ROW_AVATAR_SIZE = 32;
-const STACK_AVATAR_SIZE = 24;
-const DUO_AVATAR_SIZE = 28;
-const DUO_BOX_SIZE = 44;
+/** List rows (44 box, two 30 avatars) and chat headers (32 box, two 22 avatars). */
+const DUO_SIZES = { row: { box: 44, avatar: 30 }, header: { box: 32, avatar: 22 } } as const;
/** Separates overlapped avatars; the same 2pt ring as the teammate connection dot. */
const STACK_RING = 2;
@@ -72,45 +72,36 @@ export function BotGroupAvatar({ deviceId, identity, size, online }: {
return <RemoteCompanionAvatar avatar={identity.avatar} deviceId={deviceId} name={identity.name} online={online} size={size} framed />;
}
-/** A row of overlapped member avatars (screen header). */
-export function BotGroupAvatarStack({ deviceId, members, online, max = 3 }: {
- deviceId: string; members: readonly BotGroupIdentity[]; online: boolean; max?: number;
-}) {
- const styles = useThemedStyles(makeStyles);
- return <View style={styles.stack} accessibilityElementsHidden importantForAccessibility="no-hide-descendants">
- {members.slice(0, max).map((member, index) => <View key={member.botId || index} style={[styles.ring, index > 0 && styles.stacked]}>
- <BotGroupAvatar deviceId={deviceId} identity={member} size={STACK_AVATAR_SIZE} online={online} />
- </View>)}
- </View>;
-}
-
-/** 44pt list mark: the first two members, offset diagonally (Desktop BotGroupDuoAvatar). */
-export function BotGroupDuoAvatar({ deviceId, members, online }: {
- deviceId: string; members: readonly BotGroupIdentity[]; online: boolean;
+/**
+ * Group mark (Desktop BotGroupDuoAvatar): two members offset diagonally, both kept inside the box.
+ * The front avatar carries a 2pt page-colored ring; while someone in the group works, that ring
+ * breathes in Heart Orange (CompanionPresenceRing).
+ */
+export function BotGroupDuoAvatar({ deviceId, members, online, variant = 'row', working = false }: {
+ deviceId: string; members: readonly BotGroupIdentity[]; online: boolean; variant?: keyof typeof DUO_SIZES; working?: boolean;
}) {
const styles = useThemedStyles(makeStyles);
const { colors } = useTheme();
+ const { box, avatar } = DUO_SIZES[variant];
const [first, second] = members;
+ const frame = { width: box, height: box };
if (!first) {
- return <View style={[styles.duo, styles.duoEmpty]} accessibilityElementsHidden importantForAccessibility="no-hide-descendants">
+ return <View style={[frame, styles.duoEmpty]} accessibilityElementsHidden importantForAccessibility="no-hide-descendants">
<Users size={iconSize.md} color={colors.textTertiary} />
</View>;
}
- return <View style={styles.duo} accessibilityElementsHidden importantForAccessibility="no-hide-descendants">
- <View style={styles.duoFirst}><BotGroupAvatar deviceId={deviceId} identity={first} size={DUO_AVATAR_SIZE} online={online} /></View>
- {second ? <View style={[styles.ring, styles.duoSecond]}>
- <BotGroupAvatar deviceId={deviceId} identity={second} size={DUO_AVATAR_SIZE} online={online} />
- </View> : null}
+ const front = avatar + STACK_RING * 2;
+ return <View style={frame} accessibilityElementsHidden importantForAccessibility="no-hide-descendants">
+ <View style={styles.duoBack}><BotGroupAvatar deviceId={deviceId} identity={first} size={second ? avatar : box} online={online} /></View>
+ {second ? <View style={[styles.ring, { position: 'absolute', left: box - front, top: box - front }]}>
+ <BotGroupAvatar deviceId={deviceId} identity={second} size={avatar} online={online} />
+ <CompanionPresenceRing active={working} gap={0} width={STACK_RING} />
+ </View> : <CompanionPresenceRing active={working} />}
</View>;
}
const makeStyles = (colors: ThemeColors) => StyleSheet.create({
- stack: { flexDirection: 'row', alignItems: 'center', flexShrink: 0 },
ring: { borderRadius: radius.pill, borderWidth: STACK_RING, borderColor: colors.surface, overflow: 'hidden' },
- // Overlap by a third of the avatar, the same rhythm as the desktop header lockup.
- stacked: { marginLeft: -(STACK_AVATAR_SIZE / 3) },
- duo: { width: DUO_BOX_SIZE, height: DUO_BOX_SIZE, flexShrink: 0 },
duoEmpty: { alignItems: 'center', justifyContent: 'center', borderRadius: radius.pill, backgroundColor: colors.surfaceChip },
- duoFirst: { position: 'absolute', left: 0, top: 0 },
- duoSecond: { position: 'absolute', right: -STACK_RING, bottom: -STACK_RING },
+ duoBack: { position: 'absolute', left: 0, top: 0 },
});
diff --git a/apps/mobile/src/session/BotGroupChatScreen.tsx b/apps/mobile/src/session/BotGroupChatScreen.tsx
index 91f4444623..f8cd1e3bca 100644
--- a/apps/mobile/src/session/BotGroupChatScreen.tsx
+++ b/apps/mobile/src/session/BotGroupChatScreen.tsx
@@ -13,7 +13,6 @@ import {
Alert,
KeyboardAvoidingView,
Platform,
- Pressable,
ScrollView,
StyleSheet,
View,
@@ -21,7 +20,6 @@ import {
type NativeSyntheticEvent,
} from 'react-native';
import { Stack, useRouter } from 'expo-router';
-import { ChevronLeft, Settings2 } from 'lucide-react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useTranslation } from 'react-i18next';
import { resolveRemoteText } from '@cindy/device-link';
@@ -49,18 +47,19 @@ import { AppState } from 'react-native';
import { useAuth } from '@/auth/AuthContext';
import { Text } from '@/components/AppText';
import { MainWindowActionButton, MainWindowEmptyState } from '@/components/MobilePrimitives';
-import { mobileInteractionStyles } from '@/components/mobileInteractionStyles';
import { readRemoteCollectionCache } from '@/device-link/remoteResourceAvailability';
import type { RemoteResourceHostTarget } from '@/device-link/remoteResources';
import { useTheme, useThemedStyles, type ThemeColors } from '@/theme';
-import { fontWeight, iconSize, iconStroke, lineHeight, radius, spacing, typeScale } from '@/theme/tokens';
+import { fontWeight, lineHeight, radius, spacing, typeScale } from '@/theme/tokens';
import { goBackGuarded } from '@/utils/backGuard';
import {
BOT_GROUP_MESSAGE_AVATAR_SIZE,
BotGroupAvatar,
- BotGroupAvatarStack,
+ BotGroupDuoAvatar,
useBotGroupIdentities,
} from './BotGroupAvatars';
+import { ChatIdentityHeader } from './ChatIdentityHeader';
+import { CompanionEntering } from './CompanionEntering';
import { BotGroupComposer, type BotGroupSendInput } from './BotGroupComposer';
import { BotGroupMessageAttachments } from './BotGroupMessageAttachments';
import { BotGroupMarkdownText, BotGroupUserText } from './BotGroupMessageText';
@@ -79,7 +78,6 @@ import {
import { BotGroupSettingsSheet } from './BotGroupSettingsSheet';
import { BotGroupSpeakerRow } from './BotGroupSpeakerRow';
import { botGroupActionErrorText } from './botGroupCopy';
-import { HomeHeaderGlassButton } from './HomeHeaderGlassButton';
import type { ResolveRemoteMediaFn } from './remoteMedia';
import { useBotGroupChat } from './useBotGroupChat';
import { useBotGroupRemoteMedia } from './useBotGroupRemoteMedia';
@@ -95,6 +93,10 @@ const PLAN_ACTION_FAILED: Record<BotGroupPlanAction, string> = {
type PlanPending = { planId: string; action: BotGroupPlanAction | 'edit' };
/** Follow new messages while the reader is within this distance of the bottom. */
const STICK_TO_BOTTOM_PX = 48;
+/** Teammate replies hang 10pt right of the 28pt portrait, as in the 1:1 chat. */
+const REPLY_AVATAR_GAP = 10;
+/** One short line gets the compact bubble, as in the 1:1 chat. */
+const COMPACT_BUBBLE_MAX_CHARS = 140;
export function BotGroupChatScreen({ deviceId, deviceName, groupId }: { deviceId: string; deviceName: string; groupId: string }) {
const { t, i18n } = useTranslation();
@@ -240,24 +242,17 @@ export function BotGroupChatScreen({ deviceId, deviceName, groupId }: { deviceId
: cachedRow?.item.display.subtitle ? resolveRemoteText(cachedRow.item.display.subtitle, i18n.language) : '';
const headerMembers = group ? group.members.map((member) => identityFor(member.botId, member.name)) : [];
- const header = <View style={styles.header} testID="botGroup.header">
- <HomeHeaderGlassButton accessibilityLabel={t('shared.back')} onPress={leave} testID="botGroup.back">
- <ChevronLeft size={iconSize.xl} color={colors.textPrimary} strokeWidth={iconStroke.regular} />
- </HomeHeaderGlassButton>
- <Pressable accessibilityRole="button" accessibilityLabel={[title, memberLine].filter(Boolean).join(', ')}
- accessibilityHint={t('groupChat.settings.open')} disabled={!group} onPress={() => setSettings(true)}
- style={({ pressed }) => [styles.identity, pressed && mobileInteractionStyles.pressed]} testID="botGroup.identity">
- {headerMembers.length ? <BotGroupAvatarStack deviceId={deviceId} members={headerMembers} online={chat.online} /> : null}
- <View style={styles.identityText}>
- <Text numberOfLines={1} style={styles.headerTitle}>{title}</Text>
- {memberLine ? <Text numberOfLines={1} style={styles.headerSubtitle}>{memberLine}</Text> : null}
- </View>
- </Pressable>
- <HomeHeaderGlassButton accessibilityLabel={t('groupChat.settings.open')} disabled={!group} onPress={() => setSettings(true)}
- testID="botGroup.settingsButton">
- <Settings2 size={iconSize.lg} color={colors.textPrimary} strokeWidth={iconStroke.regular} />
- </HomeHeaderGlassButton>
- </View>;
+ const header = <ChatIdentityHeader testIDPrefix="botGroup" settingsTestID="botGroup.settingsButton"
+ mark={<BotGroupDuoAvatar deviceId={deviceId} members={headerMembers} online={chat.online} variant="header"
+ working={group?.round.status === 'running'} />}
+ title={title}
+ subtitle={memberLine}
+ identityLabel={[title, memberLine].filter(Boolean).join(', ')}
+ identityHint={t('groupChat.settings.open')}
+ controlsReady={!!group}
+ onBack={leave}
+ onOpenSettings={() => setSettings(true)}
+ settingsLabel={t('groupChat.settings.open')} />;
let body;
if (chat.state.kind === 'loading' && !chat.online) {
@@ -364,11 +359,16 @@ export function BotGroupTimeline({
{group.hasMoreBefore ? <Text style={styles.olderNote} testID="botGroup.olderOnComputer">{t('groupChat.timeline.olderOnComputer')}</Text> : null}
{messages.length === 0 && !running ? <MainWindowEmptyState centered testID="botGroup.empty"
title={t('groupChat.timeline.emptyTitle')} copy={t('groupChat.timeline.emptyDescription')} /> : null}
- {messages.map((message) => {
+ {messages.map((message, index) => {
const groupTime = timeGroups.get(message.id);
+ const previous = index > 0 ? messages[index - 1] : undefined;
+ // G2: the same teammate speaking again inside one time group keeps its avatar and name once.
+ const continued = groupTime === undefined && message.kind === 'message' && message.authorKind === 'bot'
+ && previous?.kind === 'message' && previous.authorKind === 'bot' && previous.authorBotId === message.authorBotId;
return <View key={message.id} style={styles.item}>
{groupTime !== undefined ? <Text style={styles.time}>{formatBotMessageGroupTime(groupTime, i18n.language)}</Text> : null}
- <BotGroupTimelineItem message={message} member={message.authorBotId ? memberById.get(message.authorBotId) : undefined}
+ <CompanionEntering id={message.id} createdAt={message.createdAt} kind={message.authorKind === 'user' ? 'send' : 'reply'}>
+ <BotGroupTimelineItem message={message} continued={continued} member={message.authorBotId ? memberById.get(message.authorBotId) : undefined}
members={group.members} deviceId={deviceId} online={online} identityFor={identityFor} mentionLabels={mentionLabels}
resolveMedia={resolveMedia}
canContinue={message.id === continueId} continuing={continuing} onContinue={onContinue}
@@ -378,10 +378,12 @@ export function BotGroupTimeline({
planPending={planCardPending(pendingFor(message.planId))}
onPlanAction={(action) => { if (message.planId) onPlanAction(action, message.planId); }}
onEditStep={(step, action, botId) => { if (message.planId) onEditStep(message.planId, step, action, botId); }} />
+ </CompanionEntering>
</View>;
})}
{openPlan && followUp ? <View style={styles.indented}>
<BotGroupPlanFollowUpRow followUp={followUp} identityFor={identityFor} deviceId={deviceId} online={online}
+ stepNumber={openPlan.steps.indexOf(followUp.kind === 'continue' ? followUp.next : followUp.failed) + 1} stepTotal={openPlan.steps.length}
pending={followUpPending(pendingFor(openPlan.id))}
onContinue={() => onPlanAction('continue', openPlan.id)}
onRetry={() => onPlanAction('retry', openPlan.id)}
@@ -397,10 +399,12 @@ export function BotGroupTimeline({
}
function BotGroupTimelineItem({
- message, member, members, deviceId, online, identityFor, mentionLabels, resolveMedia, canContinue, continuing, onContinue,
+ message, continued = false, member, members, deviceId, online, identityFor, mentionLabels, resolveMedia, canContinue, continuing, onContinue,
plan, planActionable, planReassignable, planPending, onPlanAction, onEditStep,
}: {
message: BotGroupMessageView;
+ /** Same teammate as the message just above: no second avatar or name. */
+ continued?: boolean;
member: BotGroupMemberView | undefined;
members: readonly BotGroupMemberView[];
deviceId: string;
@@ -438,12 +442,14 @@ function BotGroupTimelineItem({
// Older computers send no attachments; a message with only attachments has no bubble.
const attachments = message.attachments ?? [];
const bubble = message.content.trim().length > 0 || attachments.length === 0;
+ // G3: the 1:1 user bubble, including its compact density for one short line.
+ const compact = message.content.length <= COMPACT_BUBBLE_MAX_CHARS && !message.content.includes('\n');
return <View style={styles.userRow} testID="botGroup.message.user">
<View style={styles.userColumn}>
{attachments.length > 0
? <BotGroupMessageAttachments messageId={message.id} attachments={attachments} onResolveRemoteMedia={resolveMedia} />
: null}
- {bubble ? <View style={styles.userBubble} testID="botGroup.message.userBubble">
+ {bubble ? <View style={[styles.userBubble, compact && styles.userBubbleCompact]} testID="botGroup.message.userBubble">
<BotGroupUserText content={message.content} mentionLabels={mentionLabels} />
</View> : null}
</View>
@@ -452,13 +458,15 @@ function BotGroupTimelineItem({
// Name snapshot from when it was said; the avatar follows the live profile.
const author = identityFor(message.authorBotId ?? '', message.authorName || member?.name || '');
const isPlanCard = message.kind === 'plan';
- return <View style={styles.botRow} testID={isPlanCard ? 'botGroup.message.plan' : 'botGroup.message.bot'}>
- <BotGroupAvatar deviceId={deviceId} identity={author} size={BOT_GROUP_MESSAGE_AVATAR_SIZE} online={online} />
+ return <View style={[styles.botRow, continued && styles.botRowContinued]} testID={isPlanCard ? 'botGroup.message.plan' : 'botGroup.message.bot'}>
+ {continued ? <View style={styles.avatarSpacer} /> : <View style={styles.avatarSlot}>
+ <BotGroupAvatar deviceId={deviceId} identity={author} size={BOT_GROUP_MESSAGE_AVATAR_SIZE} online={online} />
+ </View>}
<View style={styles.botColumn}>
- <View style={styles.authorRow}>
+ {continued ? null : <View style={styles.authorRow}>
<Text numberOfLines={1} style={styles.authorName}>{author.name}</Text>
{isPlanCard ? <BotGroupOrganizerTag /> : null}
- </View>
+ </View>}
{isPlanCard
? <BotGroupPlanCard plan={plan} members={members} identityFor={identityFor} deviceId={deviceId} online={online}
actionable={planActionable} reassignable={planReassignable} pending={planPending}
@@ -474,18 +482,12 @@ function BotGroupTimelineItem({
const makeStyles = (colors: ThemeColors) => StyleSheet.create({
screen: { flex: 1, backgroundColor: colors.surface },
flex: { flex: 1 },
- header: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm, minHeight: 52, paddingHorizontal: spacing.md,
- borderBottomColor: colors.border, borderBottomWidth: StyleSheet.hairlineWidth },
- identity: { flex: 1, minWidth: 0, minHeight: 44, flexDirection: 'row', alignItems: 'center', gap: spacing.sm },
- identityText: { flex: 1, minWidth: 0 },
- headerTitle: { color: colors.textPrimary, fontSize: typeScale.body, lineHeight: lineHeight.body, fontWeight: fontWeight.semibold },
- headerSubtitle: { color: colors.textTertiary, fontSize: typeScale.caption, lineHeight: lineHeight.caption },
center: { flex: 1, alignItems: 'center', justifyContent: 'center', padding: spacing.xl },
emptyActions: { flexDirection: 'row', justifyContent: 'center', gap: spacing.sm, marginTop: spacing.lg },
timeline: { flexGrow: 1, justifyContent: 'flex-end', gap: spacing.lg, paddingHorizontal: spacing.lg, paddingVertical: spacing.md },
item: { gap: spacing.lg },
- // Aligns the follow-up row with message text, past the 28pt avatar and its gap.
- indented: { paddingLeft: BOT_GROUP_MESSAGE_AVATAR_SIZE + spacing.sm },
+ // Aligns the follow-up card with message text, past the 28pt avatar and its gap (1:1 reply geometry).
+ indented: { paddingLeft: BOT_GROUP_MESSAGE_AVATAR_SIZE + REPLY_AVATAR_GAP },
offline: { color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, textAlign: 'center',
paddingHorizontal: spacing.lg, paddingTop: spacing.sm },
olderNote: { color: colors.textTertiary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, textAlign: 'center' },
@@ -493,11 +495,17 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({
notice: { color: colors.textTertiary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, textAlign: 'center' },
dividerText: { flexShrink: 1, color: colors.textTertiary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, textAlign: 'center' },
userRow: { flexDirection: 'row', justifyContent: 'flex-end' },
- // Full width so the bubble keeps its 82% cap and attachments their own size limits.
+ // Full width so the bubble keeps its 86% cap and attachments their own size limits.
userColumn: { flex: 1, minWidth: 0, alignItems: 'flex-end', gap: spacing.xs },
- userBubble: { maxWidth: '82%', backgroundColor: colors.surfaceElevated, borderColor: colors.border, borderWidth: StyleSheet.hairlineWidth,
- borderRadius: radius.container, paddingHorizontal: spacing.md, paddingVertical: spacing.sm },
- botRow: { flexDirection: 'row', alignItems: 'flex-start', gap: spacing.sm },
+ // The 1:1 user bubble (MessageRenderer userBubble + companion border): 86% wide, padding 12, compact 8/12.
+ userBubble: { maxWidth: '86%', backgroundColor: colors.surfaceElevated, borderColor: colors.border, borderWidth: StyleSheet.hairlineWidth,
+ borderRadius: radius.container, padding: spacing.md },
+ userBubbleCompact: { paddingVertical: spacing.sm },
+ // The 1:1 reply geometry: avatar 28, 2pt down, 10 to the text.
+ botRow: { flexDirection: 'row', alignItems: 'flex-start', gap: REPLY_AVATAR_GAP },
+ botRowContinued: { marginTop: -spacing.sm },
+ avatarSlot: { marginTop: 2 },
+ avatarSpacer: { width: BOT_GROUP_MESSAGE_AVATAR_SIZE },
botColumn: { flex: 1, minWidth: 0, gap: spacing.xs },
authorRow: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm, minHeight: BOT_GROUP_MESSAGE_AVATAR_SIZE },
authorName: { flexShrink: 1, color: colors.textPrimary, fontSize: typeScale.bodySmall, lineHeight: lineHeight.bodySmall, fontWeight: fontWeight.medium },
diff --git a/apps/mobile/src/session/BotGroupComposer.tsx b/apps/mobile/src/session/BotGroupComposer.tsx
index 283d7d7dab..c923e8d62c 100644
--- a/apps/mobile/src/session/BotGroupComposer.tsx
+++ b/apps/mobile/src/session/BotGroupComposer.tsx
@@ -36,7 +36,7 @@ import {
import { Text } from '@/components/AppText';
import { PaperPlaneIcon } from '@/components/PaperPlaneIcon';
import { mobileInteractionStyles } from '@/components/mobileInteractionStyles';
-import { iconStroke, useTheme, useThemedStyles, type ThemeColors } from '@/theme';
+import { iconStroke, motionDuration, useTheme, useThemedStyles, type ThemeColors } from '@/theme';
import { fontWeight, iconSize, lineHeight, radius, spacing, typeScale } from '@/theme/tokens';
import { BOT_GROUP_STEP_AVATAR_SIZE, BotGroupAvatar } from './BotGroupAvatars';
import { BotGroupMenu } from './BotGroupMenu';
@@ -46,6 +46,7 @@ import { ContextSheet, ContextSheetGroup, ContextSheetRow } from './ContextSheet
import { RecentPhotosStrip } from './ContextSheetMediaViews';
import { ImageLightbox } from './ImageLightbox';
import { ComposerToolbarLeftGroup, ComposerToolbarSpacer, MobileComposerInputRow } from './MobileComposerInputRow';
+import { CompanionFadeIn } from './CompanionEntering';
import { nextBotGroupSendAttempt, type BotGroupSendAttempt } from './botGroupRemote';
import { canBrowsePhotoLibraryDirectly } from './photoLibraryPolicy';
import type { RemoteSerializedAttachment } from './types';
@@ -275,7 +276,10 @@ export function BotGroupComposer({
return <View style={styles.wrap} testID="botGroup.composer">
{pickerOpen && query ? <View style={styles.picker} accessibilityLabel={t('groupChat.mention.label')} testID="botGroup.mentionPicker">
<ScrollView keyboardShouldPersistTaps="always" style={styles.pickerScroll}>
- {options.map((option) => <Pressable key={option.kind === 'all' ? 'all' : option.member.botId} accessibilityRole="button"
+ {/* M9: candidates ease in one after another, 30ms apart, fast 150ms from 4pt below. */}
+ {options.map((option, index) => <CompanionFadeIn key={option.kind === 'all' ? 'all' : option.member.botId} play distance={4}
+ duration={motionDuration.fast} delay={index * 30}>
+ <Pressable accessibilityRole="button"
accessibilityLabel={option.label} onPress={() => choose(option)}
style={({ pressed }) => [styles.pickerRow, pressed && mobileInteractionStyles.pressed]}
testID={`botGroup.mention.${option.kind === 'all' ? 'all' : option.member.botId}`}>
@@ -284,7 +288,8 @@ export function BotGroupComposer({
: <BotGroupAvatar deviceId={deviceId} identity={identityFor(option.member.botId, option.member.name)} size={BOT_GROUP_STEP_AVATAR_SIZE} online={online} />}
<Text numberOfLines={1} style={styles.pickerName}>{option.label}</Text>
{option.kind === 'all' ? <Text numberOfLines={1} style={styles.pickerHint}>{t('groupChat.mention.allHint')}</Text> : null}
- </Pressable>)}
+ </Pressable>
+ </CompanionFadeIn>)}
</ScrollView>
</View> : null}
{hint ? <Text accessibilityLiveRegion="polite" style={styles.hint}>{hint}</Text> : null}
diff --git a/apps/mobile/src/session/BotGroupList.tsx b/apps/mobile/src/session/BotGroupList.tsx
index 02e5c14d62..aa6d96371d 100644
--- a/apps/mobile/src/session/BotGroupList.tsx
+++ b/apps/mobile/src/session/BotGroupList.tsx
@@ -1,59 +1,30 @@
/**
- * 伙伴页里的「群聊」分组(对照桌面 BotGroupSidebarSection.tsx):小节头带新建按钮,下面是
- * 群行。群行与伙伴行同一套行几何:两位成员斜向叠放的头像,第一行群名与时间,第二行是电脑
- * 给的预览(安排状态或最近一条消息,已按语言给好);有伙伴正在说话、安排或做事时,预览前
- * 加运行中标记。只在至少一台电脑支持群聊时出现(旧版桌面没有这个集合)。
+ * 伙伴页里的群聊行(对照桌面 BotGroupSidebarSection.tsx):与伙伴行同一个 CompanionListRow,
+ * 按最近活动和伙伴混排。双头像收在 44 框内;第二行是电脑给的预览(安排状态或最近一条消息,
+ * 已按语言给好,手机不改写);有伙伴正在说话、安排或做事时,时间位换成转圈、前面的头像呼吸。
+ * 只在至少一台电脑支持群聊时出现(旧版桌面没有这个集合)。新建群聊在伙伴页顶栏的「+」菜单里。
*/
-import { useRef, useState, useSyncExternalStore } from 'react';
-import { Pressable, StyleSheet, View } from 'react-native';
-import { Plus, Sparkles } from 'lucide-react-native';
+import { useSyncExternalStore } from 'react';
+import { View } from 'react-native';
import { useTranslation } from 'react-i18next';
import { resolveRemoteText } from '@cindy/device-link';
-import { Text } from '@/components/AppText';
import { useAuth } from '@/auth/AuthContext';
import { isRemoteResourceUnread, subscribeRemoteResourceCache, remoteResourceCacheRevision } from '@/device-link/remoteResourceCache';
-import type { HostedRemoteCollectionItem, RemoteResourceHostTarget } from '@/device-link/remoteResources';
-import { useTheme, useThemedStyles, type ThemeColors } from '@/theme';
-import { fontWeight, iconSize, iconStroke, lineHeight, radius, spacing, typeScale } from '@/theme/tokens';
+import type { HostedRemoteCollectionItem } from '@/device-link/remoteResources';
import { useMinuteNow } from '@/utils/useMinuteNow';
import { BotGroupDuoAvatar, useBotGroupIdentities } from './BotGroupAvatars';
-import { BotGroupCreateSheet } from './BotGroupCreateSheet';
-import { BotGroupMenu } from './BotGroupMenu';
-import { botGroupMemberLinks, orderedBotGroups } from './botGroupRemote';
+import { botGroupMemberLinks } from './botGroupRemote';
+import { CompanionListRow } from './CompanionListRow';
import { parseMobileMarkdownInlines } from './messageMarkdown';
import { formatRemoteSessionSidebarTime } from './sessionList';
-const CREATE_HIT_SLOP = { top: 8, bottom: 8, left: 8, right: 8 } as const;
+/** Offline rows keep the avatar readable but visibly unavailable. */
+export const OFFLINE_AVATAR_OPACITY = 0.45;
-export function BotGroupSection({ items, query, isOnline, createTargets, preferredDeviceId, onOpen, onOpenCreated, onInteract }: {
- items: readonly HostedRemoteCollectionItem[];
- query: string;
- isOnline(host: RemoteResourceHostTarget): boolean;
- /** Online computers that support group chats. */
- createTargets: readonly RemoteResourceHostTarget[];
- preferredDeviceId?: string;
- onOpen(row: HostedRemoteCollectionItem): void;
- onOpenCreated(host: RemoteResourceHostTarget, groupId: string): void;
- onInteract?(): void;
+export function BotGroupListRow({ row, online, last = false, onPress }: {
+ row: HostedRemoteCollectionItem; online: boolean; last?: boolean; onPress(): void;
}) {
const { t, i18n } = useTranslation();
- const styles = useThemedStyles(makeStyles);
- const rows = orderedBotGroups(items, query, i18n.language);
- if (query.trim() && rows.length === 0) return null;
- return <View style={styles.section} testID="botGroups.section">
- <View style={styles.header}>
- <Text accessibilityRole="header" style={styles.sectionTitle}>{t('groupChat.title')}</Text>
- <BotGroupCreateButton targets={createTargets} preferredDeviceId={preferredDeviceId} onInteract={onInteract} onCreated={onOpenCreated} />
- </View>
- {rows.length === 0 ? <Text style={styles.empty} testID="botGroups.empty">{t('groupChat.list.empty')}</Text> : null}
- {rows.map((row) => <BotGroupRow key={row.key} row={row} online={isOnline(row.host)} onPress={() => onOpen(row)} />)}
- </View>;
-}
-
-function BotGroupRow({ row, online, onPress }: { row: HostedRemoteCollectionItem; online: boolean; onPress(): void }) {
- const { t, i18n } = useTranslation();
- const { colors } = useTheme();
- const styles = useThemedStyles(makeStyles);
const now = useMinuteNow();
const identityFor = useBotGroupIdentities(row.host.deviceId);
const { user } = useAuth();
@@ -69,91 +40,20 @@ function BotGroupRow({ row, online, onPress }: { row: HostedRemoteCollectionItem
const time = display.timestamp !== undefined && Number.isFinite(new Date(display.timestamp).getTime())
? formatRemoteSessionSidebarTime(new Date(display.timestamp).toISOString(), now) : '';
const offline = online ? '' : t('devices.resources.hostOffline');
- return <Pressable accessibilityRole="button" accessibilityState={{ disabled: !online }}
- accessibilityLabel={[title, unread ? t('devices.companions.unread') : '', running ? t('groupChat.list.running') : '', summary, time, offline].filter(Boolean).join(', ')}
- disabled={!online} onPress={onPress} style={({ pressed }) => [styles.row, pressed && styles.pressed]}
- testID={`botGroups.item.${row.host.deviceId}.${row.item.ref.id}`}>
- <BotGroupDuoAvatar deviceId={row.host.deviceId} members={members} online={online} />
- <View style={styles.body}>
- <View style={styles.titleRow}>
- <Text numberOfLines={1} style={styles.title}>{title}</Text>
- {time ? <Text numberOfLines={1} style={styles.time}>{time}</Text> : null}
- {unread ? <View style={styles.unread} accessibilityLabel={t('devices.companions.unread')} /> : null}
- </View>
- <View style={styles.previewRow}>
- {running ? <Sparkles size={iconSize.xs} color={colors.statusAccent} testID="botGroups.running" /> : null}
- <Text numberOfLines={1} style={styles.preview}>{summary}</Text>
- </View>
- {offline ? <Text numberOfLines={1} style={styles.meta}>{offline}</Text> : null}
- </View>
- </Pressable>;
+ return <CompanionListRow
+ testID={`botGroups.item.${row.host.deviceId}.${row.item.ref.id}`}
+ accessibilityLabel={[title, unread ? t('devices.companions.unread') : '', running ? t('groupChat.list.running') : '', offline, summary, time]
+ .filter(Boolean).join(', ')}
+ avatar={<View style={offline ? { opacity: OFFLINE_AVATAR_OPACITY } : undefined}>
+ <BotGroupDuoAvatar deviceId={row.host.deviceId} members={members} online={online} working={running} />
+ </View>}
+ title={title}
+ trailing={running ? { kind: 'working' } : { kind: 'time', text: time }}
+ preview={offline ? `${offline} · ${summary}` : summary}
+ previewTone={offline ? 'tertiary' : 'secondary'}
+ unread={unread}
+ unreadLabel={t('devices.companions.unread')}
+ disabled={!online}
+ last={last}
+ onPress={onPress} />;
}
-
-/** 「+」 in the section header; with several computers it first asks which one hosts the group. */
-function BotGroupCreateButton({ targets, preferredDeviceId, onInteract, onCreated }: {
- targets: readonly RemoteResourceHostTarget[];
- preferredDeviceId?: string;
- onInteract?(): void;
- onCreated(host: RemoteResourceHostTarget, groupId: string): void;
-}) {
- const { t } = useTranslation();
- const { colors } = useTheme();
- const styles = useThemedStyles(makeStyles);
- const { accountGeneration } = useAuth();
- const [host, setHost] = useState<RemoteResourceHostTarget | null>(null);
- const [visible, setVisible] = useState(false);
- const receipt = useRef<{ host: RemoteResourceHostTarget; groupId: string; account: number } | null>(null);
- const ordered = [...targets].sort((a, b) => Number(b.deviceId === preferredDeviceId) - Number(a.deviceId === preferredDeviceId));
- const open = (deviceId: string) => {
- onInteract?.();
- const target = targets.find((candidate) => candidate.deviceId === deviceId);
- if (!target) return;
- setHost(target);
- setVisible(true);
- };
- const label = t('groupChat.create.title');
- const button = (onPress: (() => void) | undefined) => <Pressable accessibilityRole="button" accessibilityLabel={label}
- disabled={targets.length === 0} hitSlop={CREATE_HIT_SLOP} onPress={onPress}
- style={({ pressed }) => [styles.create, pressed && styles.pressed, targets.length === 0 && styles.disabled]}
- testID="botGroups.create">
- <Plus size={iconSize.md} color={colors.textSecondary} strokeWidth={iconStroke.regular} />
- </Pressable>;
- return <>
- {targets.length > 1
- ? <BotGroupMenu title={t('groupChat.create.chooseComputer')} accessibilityLabel={label} testID="botGroups.createMenu"
- sections={[{ id: 'computers', title: t('groupChat.create.chooseComputer'), options: ordered.map((target) => ({ id: target.deviceId, title: target.deviceName })) }]}
- onSelect={open}>
- {button}
- </BotGroupMenu>
- : button(targets[0] ? () => open(targets[0]!.deviceId) : undefined)}
- <BotGroupCreateSheet visible={visible} host={host} online={!!host && targets.some((target) => target.deviceId === host.deviceId)}
- onClose={() => setVisible(false)}
- onCreated={(groupId) => { if (host) receipt.current = { host, groupId, account: accountGeneration }; }}
- onClosed={() => {
- const created = receipt.current;
- receipt.current = null;
- if (created && created.account === accountGeneration) onCreated(created.host, created.groupId);
- }} />
- </>;
-}
-
-const makeStyles = (colors: ThemeColors) => StyleSheet.create({
- section: { paddingTop: spacing.lg },
- header: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', paddingHorizontal: spacing.lg, minHeight: 44 },
- sectionTitle: { color: colors.textTertiary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, fontWeight: fontWeight.semibold },
- create: { width: 32, height: 32, borderRadius: radius.pill, alignItems: 'center', justifyContent: 'center' },
- disabled: { opacity: 0.46 },
- empty: { color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, paddingHorizontal: spacing.lg, paddingBottom: spacing.md },
- // Teammate row geometry (TeammateList): the divider sits on the text column's bottom edge.
- row: { flexDirection: 'row', alignItems: 'center', gap: spacing.md, paddingHorizontal: spacing.lg, minHeight: 78 },
- pressed: { opacity: 0.72 },
- body: { flex: 1, minWidth: 0, alignSelf: 'stretch', justifyContent: 'center', gap: spacing.xs,
- borderBottomColor: colors.border, borderBottomWidth: StyleSheet.hairlineWidth, paddingVertical: 18 },
- unread: { width: 7, height: 7, borderRadius: radius.pill, backgroundColor: colors.textPrimary },
- titleRow: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm },
- title: { flex: 1, color: colors.textPrimary, fontSize: typeScale.subtitle, fontWeight: fontWeight.medium, lineHeight: lineHeight.listTitle },
- previewRow: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs },
- preview: { flex: 1, color: colors.textSecondary, fontSize: typeScale.bodySmall, fontWeight: fontWeight.regular, lineHeight: lineHeight.subtitle },
- time: { color: colors.textTertiary, fontSize: typeScale.footnote, fontWeight: fontWeight.regular, lineHeight: lineHeight.body },
- meta: { color: colors.textTertiary, fontSize: typeScale.footnote, fontWeight: fontWeight.regular, lineHeight: lineHeight.body },
-});
diff --git a/apps/mobile/src/session/BotGroupPlan.tsx b/apps/mobile/src/session/BotGroupPlan.tsx
index b8ccc15e94..793ec9e7ed 100644
--- a/apps/mobile/src/session/BotGroupPlan.tsx
+++ b/apps/mobile/src/session/BotGroupPlan.tsx
@@ -1,24 +1,27 @@
/**
* 群聊里的分工(docs/product-rules/bot-group-chat.md §7,对照桌面 BotGroupPlan.tsx):
- * 负责人的安排卡、交接消息下的文件、时间线末尾的「下一步 · 继续」「没做完 · 重试」与
- * 「N 步都做完了」。
+ * 负责人的安排卡、交接消息下的文件、时间线末尾的「下一步」「没做完」卡与「N 步都做完了」。
*
- * 安排卡一步一行(编号或状态、头像、名字 + 做什么),行间不画分隔线。只有群里未结束的
- * 那张卡能操作:待开始时点某一步换人或删掉,下面是小号「开始」「不用了」;做完一步停下时,
- * 还没做或没做完的步骤仍可换人。按钮是可见 38pt 的紧凑档,hitSlop 补到 44pt 热区。
+ * 安排卡、下一步、没做完都用伙伴卡片的统一外壳(K1 / K9):眉题写「分工」和进度,标题写要做的事,
+ * 步骤一行一个(编号或状态、头像、名字 + 做什么),行间不画分隔线,底部是等宽的两个按钮
+ * (CompanionCardButton,可见 38pt,hitSlop 补到 44pt)。只有群里未结束的那张卡能操作:待开始时
+ * 点某一步换人或删掉;做完一步停下时,还没做或没做完的步骤仍可换人。
*
* 交接文件在电脑的工作目录里,手机不打开,点一下说明去电脑上看。
*/
import type { ReactNode } from 'react';
-import { Alert, Pressable, StyleSheet, View } from 'react-native';
-import { CircleAlert, CircleCheck, CircleDashed, FileText, Sparkles } from 'lucide-react-native';
+import { Alert, Animated as RNAnimated, Easing, Pressable, StyleSheet, View } from 'react-native';
+import { useEffect, useRef } from 'react';
+import { CircleAlert, CircleCheck, CircleDashed, FileText, ListChecks } from 'lucide-react-native';
import { useTranslation } from 'react-i18next';
import { botGroupPathBasename, isActiveBotGroupMember, type BotGroupPlanFollowUp } from '@cindy/maker-shared/botGroupPresentation';
import type { BotGroupMemberView, BotGroupPlanStepView, BotGroupPlanView } from '@cindy/maker-shared/botGroupChat';
import { Text } from '@/components/AppText';
-import { MainWindowActionButton } from '@/components/MobilePrimitives';
import { mobileInteractionStyles } from '@/components/mobileInteractionStyles';
-import { useTheme, useThemedStyles, type ThemeColors } from '@/theme';
+import { motionDuration, useTheme, useThemedStyles, type ThemeColors } from '@/theme';
+import { useReduceMotionEnabled } from '@/hooks/useReduceMotion';
+import { CompanionFadeIn } from './CompanionEntering';
+import { CompanionCardActions, CompanionCardButton } from './CompanionCardButton';
import { fontWeight, iconSize, lineHeight, radius, spacing, typeScale } from '@/theme/tokens';
import {
BOT_GROUP_INLINE_AVATAR_SIZE,
@@ -50,14 +53,32 @@ function started(plan: BotGroupPlanView): boolean {
return plan.status !== 'proposed' && plan.status !== 'superseded' && plan.status !== 'dismissed';
}
+/** The running step: an 8pt Heart Orange dot breathing like every running mark. */
+function RunningDot() {
+ const styles = useThemedStyles(makeStyles);
+ const animate = useReduceMotionEnabled() === false;
+ const opacity = useRef(new RNAnimated.Value(1)).current;
+ useEffect(() => {
+ if (!animate) { opacity.setValue(1); return; }
+ const step = (toValue: number) => RNAnimated.timing(opacity, { toValue, duration: 750, easing: Easing.inOut(Easing.ease), useNativeDriver: true });
+ const loop = RNAnimated.loop(RNAnimated.sequence([step(0.3), step(1)]));
+ loop.start();
+ return () => loop.stop();
+ }, [animate, opacity]);
+ return <RNAnimated.View style={[styles.runningDot, { opacity }]} testID="botGroup.plan.running" />;
+}
+
/** 16pt leading mark: the step number before 开始, its live status afterwards. */
function StepLead({ plan, step, index }: { plan: BotGroupPlanView; step: BotGroupPlanStepView; index: number }) {
const styles = useThemedStyles(makeStyles);
const { colors } = useTheme();
if (!started(plan)) return <Text style={styles.stepNumber}>{index + 1}</Text>;
- if (step.status === 'done') return <CircleCheck size={iconSize.md} color={colors.textSecondary} />;
- // Same running mark as the speaking row (Heart Orange).
- if (step.status === 'running') return <Sparkles size={iconSize.sm} color={colors.statusAccent} />;
+ // M8: a finished step's check eases in (fast 150ms, from 0.6) when it changes while on screen.
+ if (step.status === 'done') return <CompanionFadeIn play={started(plan) && plan.status !== 'done'} distance={0} scaleFrom={0.6} duration={motionDuration.fast}>
+ <CircleCheck size={iconSize.md} color={colors.textSecondary} />
+ </CompanionFadeIn>;
+ // K7: running breathes in Heart Orange, the list's running language.
+ if (step.status === 'running') return <RunningDot />;
if (step.status === 'failed') return <CircleAlert size={iconSize.md} color={colors.errorText} />;
return <CircleDashed size={iconSize.md} color={colors.textTertiary} />;
}
@@ -116,8 +137,9 @@ export function BotGroupPlanCard({
onDismiss(): void;
onEditStep(step: BotGroupPlanStepView, action: 'reassign' | 'remove', botId?: string): void;
}) {
- const { t } = useTranslation();
+ const { t, i18n } = useTranslation();
const styles = useThemedStyles(makeStyles);
+ const { colors } = useTheme();
if (!plan) return <Text style={styles.note}>{t('groupChat.plan.missing')}</Text>;
const muted = plan.status === 'superseded' || plan.status === 'dismissed';
const finalNote = plan.status === 'superseded' ? 'groupChat.plan.superseded'
@@ -125,9 +147,22 @@ export function BotGroupPlanCard({
: plan.status === 'stopped' ? 'groupChat.plan.stopped' : null;
const busy = pending !== null;
const candidates = members.filter(isActiveBotGroupMember);
- return <View testID="botGroup.plan" style={styles.planColumn}>
- <Text selectable style={styles.planIntro}>{t('groupChat.plan.intro', { count: plan.steps.length })}</Text>
- <View style={styles.card} testID={`botGroup.plan.${plan.status}`}>
+ const steps = plan.steps.length;
+ const done = plan.steps.filter((step) => step.status === 'done').length;
+ const progress = plan.status === 'proposed' ? t('groupChat.plan.awaitingStart')
+ : plan.status === 'running' ? t('groupChat.plan.progressRunning', { current: Math.min(done + 1, steps), total: steps })
+ : plan.status === 'waiting' ? t('groupChat.plan.progressDone', { done, total: steps })
+ : plan.status === 'done' ? t('groupChat.plan.allDone')
+ : finalNote ? t(finalNote) : '';
+ // K9: one card — eyebrow with progress, the plan as its title, steps, then the decision.
+ return <View testID="botGroup.plan" style={[styles.card, muted && styles.cardMuted]}>
+ <View style={styles.eyebrow}>
+ <ListChecks size={iconSize.sm} color={colors.textSecondary} />
+ <Text style={styles.eyebrowText}>{t('groupChat.plan.eyebrow', { count: steps })}</Text>
+ {progress ? <Text style={styles.eyebrowStatus} testID={finalNote ? 'botGroup.plan.finalNote' : `botGroup.plan.${plan.status}`}>{progress}</Text> : null}
+ </View>
+ <Text selectable style={styles.planTitle}>{t('groupChat.plan.intro', { count: steps })}</Text>
+ <View style={styles.steps}>
{plan.steps.map((step, index) => {
const identity = identityFor(step.botId, step.botName);
const editable = online && (actionable || (reassignable && (step.status === 'pending' || step.status === 'failed')));
@@ -173,15 +208,17 @@ export function BotGroupPlanCard({
</Pressable>}
</BotGroupMenu>;
})}
- {actionable ? <View style={styles.actions}>
- <MainWindowActionButton density="compact" hitSlop={BOT_GROUP_COMPACT_HIT_SLOP}
- action={{ label: t('groupChat.plan.start'), tone: 'primary', busy: pending === 'start', disabled: busy || !online, onPress: onStart, testID: 'botGroup.plan.start' }} />
- <MainWindowActionButton density="compact" hitSlop={BOT_GROUP_COMPACT_HIT_SLOP}
- action={{ label: t('groupChat.plan.dismiss'), busy: pending === 'dismiss', disabled: busy || !online, onPress: onDismiss, testID: 'botGroup.plan.dismiss' }} />
- </View> : null}
</View>
- {actionable ? <Text style={styles.note}>{t('groupChat.plan.pauseNote')}</Text>
- : finalNote ? <Text style={styles.note} testID="botGroup.plan.finalNote">{t(finalNote)}</Text> : null}
+ {actionable ? <>
+ {/* Two sentences: Chinese and Japanese run them together, other languages need a space. */}
+ <Text style={styles.note}>{[t('groupChat.plan.pauseNote'), t('groupChat.plan.editHint')].join(/^(zh|ja)/.test(i18n.language) ? '' : ' ')}</Text>
+ <CompanionCardActions>
+ <CompanionCardButton label={t('groupChat.plan.dismiss')} busy={pending === 'dismiss'} disabled={busy || !online}
+ onPress={onDismiss} testID="botGroup.plan.dismiss" />
+ <CompanionCardButton primary label={t('groupChat.plan.start')} busy={pending === 'start'} disabled={busy || !online}
+ onPress={onStart} testID="botGroup.plan.start" />
+ </CompanionCardActions>
+ </> : null}
</View>;
}
@@ -225,57 +262,72 @@ export function BotGroupPlanEndDivider({ stepCount }: { stepCount: number | null
</BotGroupDivider>;
}
-/** Under an open plan that stopped after a step: continue with the next one, or retry. */
-export function BotGroupPlanFollowUpRow({ followUp, identityFor, deviceId, online, pending, onContinue, onRetry, onEnd }: {
+/**
+ * Under an open plan that stopped after a step (K9): the same card shell as every companion card —
+ * what comes next (or what did not finish), then 「结束分工」 and the primary 「继续 / 重试」.
+ */
+export function BotGroupPlanFollowUpRow({ followUp, identityFor, deviceId, online, pending, stepNumber, stepTotal, onContinue, onRetry, onEnd }: {
followUp: BotGroupPlanFollowUp;
identityFor: BotGroupIdentityLookup;
deviceId: string;
online: boolean;
pending: BotGroupFollowUpAction | null;
+ /** 1-based position of the step shown, and how many steps the plan has. */
+ stepNumber: number;
+ stepTotal: number;
onContinue(): void;
onRetry(): void;
onEnd(): void;
}) {
const { t } = useTranslation();
const styles = useThemedStyles(makeStyles);
+ const { colors } = useTheme();
const step = followUp.kind === 'continue' ? followUp.next : followUp.failed;
const identity = identityFor(step.botId, step.botName);
const busy = pending !== null;
const primary = followUp.kind === 'continue' ? 'continue' : 'retry';
- const label = followUp.kind === 'continue'
- ? `${t('groupChat.timeline.nextStep')}${identity.name} ${step.task}`
- : t('groupChat.timeline.stepFailed', { name: identity.name });
- return <View style={styles.followUp} testID={`botGroup.followUpRow.${followUp.kind}`}>
- <View style={styles.followUpText} accessible accessibilityLabel={label}>
- {followUp.kind === 'continue' ? <>
- <Text style={styles.followUpLead}>{t('groupChat.timeline.nextStep')}</Text>
- <BotGroupAvatar deviceId={deviceId} identity={identity} size={BOT_GROUP_INLINE_AVATAR_SIZE} online={online} />
- <Text numberOfLines={1} style={styles.followUpLabel}>
- <Text style={styles.followUpName}>{identity.name}</Text>{' '}{step.task}
- </Text>
- </> : <Text numberOfLines={1} style={styles.followUpLabel}>{label}</Text>}
+ const failed = followUp.kind === 'retry';
+ const label = failed
+ ? t('groupChat.timeline.stepFailed', { name: identity.name })
+ : `${t('groupChat.timeline.nextStep')}${identity.name} ${step.task}`;
+ return <View style={styles.card} testID={`botGroup.followUpRow.${followUp.kind}`}>
+ <View style={styles.eyebrow} accessible accessibilityLabel={label}>
+ {failed ? <CircleAlert size={iconSize.sm} color={colors.statusError} /> : <ListChecks size={iconSize.sm} color={colors.textSecondary} />}
+ <Text style={styles.eyebrowText}>{failed ? t('groupChat.followUp.failedStep', { step: stepNumber }) : t('groupChat.followUp.next')}</Text>
+ <Text style={styles.eyebrowStatus}>{`${stepNumber} / ${stepTotal}`}</Text>
+ </View>
+ <View style={styles.who}>
+ <View style={styles.whoAvatar}><BotGroupAvatar deviceId={deviceId} identity={identity} size={BOT_GROUP_INLINE_AVATAR_SIZE} online={online} /></View>
+ <Text numberOfLines={2} style={styles.whoText}><Text style={styles.whoName}>{identity.name}</Text>{` ${step.task}`}</Text>
</View>
- <MainWindowActionButton density="compact" hitSlop={BOT_GROUP_COMPACT_HIT_SLOP} action={{
- label: t(followUp.kind === 'continue' ? 'groupChat.timeline.continuePlan' : 'groupChat.timeline.retryStep'),
- tone: 'primary', busy: pending === primary, disabled: busy || !online,
- onPress: followUp.kind === 'continue' ? onContinue : onRetry, testID: `botGroup.followUp.${primary}`,
- }} />
- <MainWindowActionButton density="compact" hitSlop={BOT_GROUP_COMPACT_HIT_SLOP} action={{
- label: t('groupChat.timeline.endPlan'), busy: pending === 'dismiss', disabled: busy || !online,
- onPress: onEnd, testID: 'botGroup.followUp.end',
- }} />
+ <CompanionCardActions>
+ <CompanionCardButton label={t('groupChat.timeline.endPlan')} busy={pending === 'dismiss'} disabled={busy || !online}
+ onPress={onEnd} testID="botGroup.followUp.end" />
+ <CompanionCardButton primary label={t(failed ? 'groupChat.timeline.retryStep' : 'groupChat.timeline.continuePlan')}
+ busy={pending === primary} disabled={busy || !online}
+ onPress={failed ? onRetry : onContinue} testID={`botGroup.followUp.${primary}`} />
+ </CompanionCardActions>
</View>;
}
const makeStyles = (colors: ThemeColors) => StyleSheet.create({
organizerBadge: { borderRadius: radius.pill, backgroundColor: colors.surfaceChip, paddingHorizontal: spacing.sm, flexShrink: 0 },
organizerBadgeText: { color: colors.textSecondary, fontSize: typeScale.micro, lineHeight: lineHeight.micro, fontWeight: fontWeight.semibold },
- planColumn: { gap: spacing.sm, minWidth: 0 },
- planIntro: { color: colors.textPrimary, fontSize: typeScale.bodyLarge, lineHeight: lineHeight.bodyLarge },
- // Floating card: 1px border on the elevated surface (mobile guide §2), no row dividers.
+ // K1 card shell: raised surface, hairline border, radius 12, padding 16; steps have no row dividers.
card: { backgroundColor: colors.surfaceElevated, borderColor: colors.border, borderWidth: StyleSheet.hairlineWidth,
- borderRadius: radius.container, paddingVertical: spacing.xs, overflow: 'hidden' },
- stepRow: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm, minHeight: 44, paddingHorizontal: spacing.md },
+ borderRadius: radius.container, padding: spacing.lg, gap: spacing.xs, overflow: 'hidden' },
+ cardMuted: { opacity: 0.6 },
+ eyebrow: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs + 2, minHeight: lineHeight.caption },
+ eyebrowText: { flex: 1, minWidth: 0, color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, fontWeight: fontWeight.medium },
+ eyebrowStatus: { flexShrink: 0, color: colors.textTertiary, fontSize: typeScale.caption, lineHeight: lineHeight.caption, fontVariant: ['tabular-nums'] },
+ planTitle: { marginTop: 2, color: colors.textPrimary, fontSize: typeScale.body, lineHeight: lineHeight.body, fontWeight: fontWeight.medium },
+ steps: { marginTop: spacing.xs },
+ stepRow: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm, minHeight: 40 },
+ runningDot: { width: 8, height: 8, borderRadius: radius.pill, backgroundColor: colors.statusAccent },
+ who: { flexDirection: 'row', alignItems: 'flex-start', gap: spacing.sm, marginTop: 2 },
+ whoAvatar: { marginTop: 1 },
+ whoText: { flex: 1, minWidth: 0, color: colors.textPrimary, fontSize: typeScale.body, lineHeight: lineHeight.body },
+ whoName: { color: colors.textPrimary, fontSize: typeScale.body, lineHeight: lineHeight.body, fontWeight: fontWeight.medium },
stepLead: { width: iconSize.md, alignItems: 'center', justifyContent: 'center' },
stepNumber: { color: colors.textTertiary, fontSize: typeScale.caption, lineHeight: lineHeight.caption, fontVariant: ['tabular-nums'] },
stepText: { flex: 1, minWidth: 0, color: colors.textSecondary, fontSize: typeScale.bodySmall, lineHeight: lineHeight.bodySmall },
@@ -283,8 +335,7 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({
stepTextMuted: { color: colors.textTertiary, fontWeight: fontWeight.regular },
stepStatus: { color: colors.textTertiary, fontSize: typeScale.caption, lineHeight: lineHeight.caption, flexShrink: 0 },
muted: { opacity: 0.6 },
- actions: { flexDirection: 'row', gap: spacing.sm, paddingHorizontal: spacing.md, paddingTop: spacing.xs, paddingBottom: spacing.sm },
- note: { color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },
+ note: { marginTop: spacing.xs, color: colors.textTertiary, fontSize: typeScale.caption, lineHeight: lineHeight.caption },
files: { flexDirection: 'row', flexWrap: 'wrap', gap: spacing.sm },
fileChip: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs, minHeight: 32, maxWidth: '100%',
paddingHorizontal: spacing.md, borderRadius: radius.pill, borderWidth: StyleSheet.hairlineWidth,
@@ -293,9 +344,4 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({
divider: { flexDirection: 'row', alignItems: 'center', gap: spacing.md, minHeight: 44 },
dividerLine: { flex: 1, minWidth: spacing.xl, height: StyleSheet.hairlineWidth, backgroundColor: colors.border },
dividerText: { flexShrink: 1, color: colors.textTertiary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, textAlign: 'center' },
- followUp: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm, minHeight: 44 },
- followUpText: { flex: 1, minWidth: 0, flexDirection: 'row', alignItems: 'center', gap: spacing.xs },
- followUpLead: { flexShrink: 0, color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },
- followUpLabel: { flexShrink: 1, color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },
- followUpName: { color: colors.textPrimary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, fontWeight: fontWeight.medium },
});
diff --git a/apps/mobile/src/session/BotGroupSettingsSheet.tsx b/apps/mobile/src/session/BotGroupSettingsSheet.tsx
index 676ed3dd4a..4522b8efe5 100644
--- a/apps/mobile/src/session/BotGroupSettingsSheet.tsx
+++ b/apps/mobile/src/session/BotGroupSettingsSheet.tsx
@@ -1,5 +1,5 @@
/**
- * 群设置(对照桌面 BotGroupSettingsDrawer.tsx):群名称、成员(移出 / 添加伙伴 / 设为负责人)、
+ * 群设置(对照桌面 BotGroupSettingsDrawer.tsx):群名称、成员(点成员行弹菜单:设为负责人 / 移出;添加伙伴)、
* 项目文件夹(只读:手机不能指定电脑上的文件夹,在电脑上选择或更换)、没有 @ 人时的回复方式、
* 发言方式、删除群聊(系统确认框二次确认)。
*
@@ -8,7 +8,7 @@
*/
import { useEffect, useRef, useState } from 'react';
import { ActivityIndicator, Pressable, StyleSheet, View } from 'react-native';
-import { Folder, Plus } from 'lucide-react-native';
+import { Ellipsis, Folder, Plus } from 'lucide-react-native';
import { useTranslation } from 'react-i18next';
import { resolveRemoteText } from '@cindy/device-link';
import {
@@ -22,17 +22,18 @@ import {
} from '@cindy/maker-shared/botGroupChat';
import { isActiveBotGroupMember } from '@cindy/maker-shared/botGroupPresentation';
import { Text, TextInput } from '@/components/AppText';
-import { MainWindowActionButton, MainWindowOptionButton } from '@/components/MobilePrimitives';
+import { MainWindowOptionButton } from '@/components/MobilePrimitives';
import { mobileInteractionStyles } from '@/components/mobileInteractionStyles';
import type { RemoteResourceHostTarget } from '@/device-link/remoteResources';
import { showConfirm } from '@/platform/chrome';
import { useTheme, useThemedStyles, type ThemeColors } from '@/theme';
import { fontWeight, iconSize, lineHeight, radius, spacing, typeScale } from '@/theme/tokens';
import { BOT_GROUP_ROW_AVATAR_SIZE, BotGroupAvatar } from './BotGroupAvatars';
-import { BOT_GROUP_COMPACT_HIT_SLOP, BotGroupOrganizerTag, type BotGroupIdentityLookup } from './BotGroupPlan';
+import { BotGroupOrganizerTag, type BotGroupIdentityLookup } from './BotGroupPlan';
import { botGroupActionErrorText } from './botGroupCopy';
import { CompanionSheet } from './CompanionSheet';
import { useHostTeammates } from './useHostTeammates';
+import { BotGroupMenu } from './BotGroupMenu';
type Busy = 'name' | 'members' | 'organizer' | 'replyMode' | 'speakingMode' | 'delete' | null;
type Act = (actionId: BotGroupRemoteActionId, input?: Record<string, unknown>) => Promise<unknown>;
@@ -148,50 +149,58 @@ export function BotGroupSettingsSheet({ visible, group, host, identityFor, onlin
const identity = identityFor(member.botId, member.name);
const active = isActiveBotGroupMember(member);
const organizer = member.botId === group.organizerBotId;
- return <View key={member.botId} style={styles.memberRow} testID={`botGroup.settings.member.${member.botId}`}>
- <View style={!active ? styles.inactive : undefined}>
- <BotGroupAvatar deviceId={host.deviceId} identity={identity} size={BOT_GROUP_ROW_AVATAR_SIZE} online={online} />
- </View>
- <View style={styles.memberName}>
- <Text numberOfLines={1} style={styles.rowTitle}>{identity.name}</Text>
- {organizer ? <BotGroupOrganizerTag /> : null}
- {!active ? <Text numberOfLines={1} style={styles.rowMeta}>
- {t(member.status === 'paused' ? 'groupChat.memberStatus.paused' : 'groupChat.memberStatus.unavailable')}
- </Text> : null}
- </View>
- {!organizer && active ? <MainWindowActionButton density="compact" hitSlop={BOT_GROUP_COMPACT_HIT_SLOP} action={{
- label: t('groupChat.settings.setOrganizer'),
- accessibilityLabel: t('groupChat.settings.setOrganizerNamed', { name: identity.name }),
- busy: busy === 'organizer', disabled: locked,
- onPress: () => void run('organizer', 'update', { organizerBotId: member.botId }, 'groupChat.settings.organizerSaveFailed'),
- testID: `botGroup.settings.organizer.${member.botId}`,
- }} /> : null}
- <MainWindowActionButton density="compact" hitSlop={BOT_GROUP_COMPACT_HIT_SLOP} action={{
- label: t('groupChat.settings.remove'),
- accessibilityLabel: canRemove
- ? t('groupChat.settings.removeNamed', { name: identity.name })
- : t('groupChat.settings.minMembers', { min: BOT_GROUP_MIN_MEMBERS }),
- disabled: locked || !canRemove,
- onPress: () => void setMembers(memberIds.filter((botId) => botId !== member.botId)),
- testID: `botGroup.settings.remove.${member.botId}`,
- }} />
- </View>;
+ // G12: one row per member; a tap opens its menu (设为负责人 / 移出群聊) instead of two inline buttons.
+ const options = [
+ ...(!organizer && active ? [{ id: `organizer:${member.botId}`, title: t('groupChat.settings.setOrganizer') }] : []),
+ {
+ id: `remove:${member.botId}`, title: t('groupChat.settings.remove'), destructive: true, disabled: !canRemove,
+ ...(canRemove ? {} : { subtitle: t('groupChat.settings.minMembers', { min: BOT_GROUP_MIN_MEMBERS }) }),
+ },
+ ];
+ const rowBusy = busy === 'organizer' || busy === 'members';
+ return <BotGroupMenu key={member.botId} title={identity.name} disabled={locked}
+ accessibilityLabel={t('groupChat.settings.memberActions', { name: identity.name })}
+ testID={`botGroup.settings.memberMenu.${member.botId}`}
+ sections={[{ id: 'member', options }]}
+ onSelect={(id) => {
+ if (id.startsWith('organizer:')) void run('organizer', 'update', { organizerBotId: member.botId }, 'groupChat.settings.organizerSaveFailed');
+ else if (id.startsWith('remove:')) void setMembers(memberIds.filter((botId) => botId !== member.botId));
+ }}>
+ {(open) => <Pressable accessibilityRole="button" accessibilityLabel={t('groupChat.settings.memberActions', { name: identity.name })}
+ disabled={locked} onPress={open}
+ style={({ pressed }) => [styles.memberRow, pressed && mobileInteractionStyles.pressed]}
+ testID={`botGroup.settings.member.${member.botId}`}>
+ <View style={!active ? styles.inactive : undefined}>
+ <BotGroupAvatar deviceId={host.deviceId} identity={identity} size={BOT_GROUP_ROW_AVATAR_SIZE} online={online} />
+ </View>
+ <View style={styles.memberName}>
+ <Text numberOfLines={1} style={styles.rowTitle}>{identity.name}</Text>
+ {organizer ? <BotGroupOrganizerTag /> : null}
+ {!active ? <Text numberOfLines={1} style={styles.rowMeta}>
+ {t(member.status === 'paused' ? 'groupChat.memberStatus.paused' : 'groupChat.memberStatus.unavailable')}
+ </Text> : null}
+ </View>
+ {rowBusy ? <ActivityIndicator color={colors.textSecondary} /> : <Ellipsis size={iconSize.lg} color={colors.textTertiary} />}
+ <View style={styles.rowDivider} />
+ </Pressable>}
+ </BotGroupMenu>;
})}
<Pressable accessibilityRole="button" accessibilityState={{ expanded: picking, disabled: locked || !canAdd }}
accessibilityLabel={canAdd ? t('groupChat.settings.add') : t('groupChat.settings.maxMembers', { max: BOT_GROUP_MAX_MEMBERS })}
disabled={locked || !canAdd} onPress={() => setPicking((value) => !value)}
- style={({ pressed }) => [styles.memberRow, styles.lastRow, pressed && mobileInteractionStyles.pressed, (locked || !canAdd) && styles.inactive]}
+ style={({ pressed }) => [styles.memberRow, pressed && mobileInteractionStyles.pressed, (locked || !canAdd) && styles.inactive]}
testID="botGroup.settings.add">
<View style={styles.addMark}><Plus size={iconSize.sm} color={colors.textSecondary} /></View>
<Text numberOfLines={1} style={[styles.rowTitle, styles.flex]}>{t('groupChat.settings.add')}</Text>
{!canAdd ? <Text style={styles.rowMeta}>{t('groupChat.settings.maxMembers', { max: BOT_GROUP_MAX_MEMBERS })}</Text> : null}
+ {picking && canAdd ? <View style={styles.rowDivider} /> : null}
</Pressable>
- {picking && canAdd ? <View style={styles.picker} testID="botGroup.settings.addable">
+ {picking && canAdd ? <View testID="botGroup.settings.addable">
{teammates.loading && addable.length === 0 ? <ActivityIndicator color={colors.textSecondary} style={styles.spinner} /> : null}
{!teammates.loading && addable.length === 0
? <Text style={styles.note}>{t(teammates.failed ? 'devices.resources.loadFailed' : 'groupChat.settings.noMoreBots')}</Text>
: null}
- {addable.map((row) => {
+ {addable.map((row, index) => {
const title = resolveRemoteText(row.item.display.title, i18n.language);
return <Pressable key={row.key} accessibilityRole="button" accessibilityLabel={title} disabled={locked}
onPress={() => void setMembers([...memberIds, row.item.ref.id])}
@@ -201,6 +210,7 @@ export function BotGroupSettingsSheet({ visible, group, host, identityFor, onlin
size={BOT_GROUP_ROW_AVATAR_SIZE} online={online} />
<Text numberOfLines={1} style={[styles.rowTitle, styles.flex]}>{title}</Text>
<Plus size={iconSize.sm} color={colors.textTertiary} />
+ {index < addable.length - 1 ? <View style={styles.rowDivider} /> : null}
</Pressable>;
})}
</View> : null}
@@ -266,8 +276,10 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({
group: { backgroundColor: colors.surfaceElevated, borderColor: colors.border, borderWidth: StyleSheet.hairlineWidth,
borderRadius: radius.container, overflow: 'hidden' },
memberRow: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm, minHeight: 52, paddingHorizontal: spacing.md,
- paddingVertical: spacing.sm, borderBottomColor: colors.border, borderBottomWidth: StyleSheet.hairlineWidth },
- lastRow: { borderBottomWidth: 0 },
+ paddingVertical: spacing.sm },
+ // Dividers start at the name column (after the avatar), like the companion list rows; the add row is last and has none.
+ rowDivider: { position: 'absolute', left: spacing.md + BOT_GROUP_ROW_AVATAR_SIZE + spacing.sm, right: 0, bottom: 0,
+ height: StyleSheet.hairlineWidth, backgroundColor: colors.border },
memberName: { flex: 1, minWidth: 0, flexDirection: 'row', alignItems: 'center', gap: spacing.sm },
rowTitle: { flexShrink: 1, color: colors.textPrimary, fontSize: typeScale.body, lineHeight: lineHeight.body, fontWeight: fontWeight.medium },
rowValue: { color: colors.textSecondary, fontSize: typeScale.body, lineHeight: lineHeight.body },
@@ -276,7 +288,6 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({
inactive: { opacity: 0.6 },
addMark: { width: BOT_GROUP_ROW_AVATAR_SIZE, height: BOT_GROUP_ROW_AVATAR_SIZE, borderRadius: radius.pill, borderWidth: 1,
borderStyle: 'dashed', borderColor: colors.borderStrong, alignItems: 'center', justifyContent: 'center' },
- picker: { borderTopColor: colors.border, borderTopWidth: StyleSheet.hairlineWidth },
spinner: { paddingVertical: spacing.md },
segments: { flexDirection: 'row', backgroundColor: colors.surfaceChip, borderRadius: radius.pill, padding: spacing.xs },
segment: { flex: 1, minHeight: 44 },
diff --git a/apps/mobile/src/session/BotGroupSpeakerRow.tsx b/apps/mobile/src/session/BotGroupSpeakerRow.tsx
index 5ac81104a2..b07b6613e4 100644
--- a/apps/mobile/src/session/BotGroupSpeakerRow.tsx
+++ b/apps/mobile/src/session/BotGroupSpeakerRow.tsx
@@ -9,15 +9,14 @@
import { useCallback, useSyncExternalStore } from 'react';
import { StyleSheet, View } from 'react-native';
import { useFocusEffect } from 'expo-router';
-import { CircleAlert, Sparkles } from 'lucide-react-native';
import { useTranslation } from 'react-i18next';
import { readWorkingPhase } from '@cindy/maker-shared';
import type { BotGroupSpeakerActivity } from '@cindy/maker-shared/botGroupChat';
import { Text } from '@/components/AppText';
import { useDeviceLink } from '@/device-link/DeviceLinkContext';
import { startFocusedTopicSubscription } from '@/device-link/focusedTopicSubscription';
-import { useTheme, useThemedStyles, type ThemeColors } from '@/theme';
-import { fontWeight, iconSize, lineHeight, spacing, typeScale } from '@/theme/tokens';
+import { useThemedStyles, type ThemeColors } from '@/theme';
+import { fontWeight, lineHeight, spacing, typeScale } from '@/theme/tokens';
import {
BOT_GROUP_INLINE_AVATAR_SIZE,
BOT_GROUP_MESSAGE_AVATAR_SIZE,
@@ -28,6 +27,8 @@ import { InteractionPanel } from './InteractionPanel';
import { remoteSessionStore, useSessionPendingInteractions } from './remoteSessionStore';
import type { PendingInteraction } from './types';
import { useCompanionGenerationCopy } from './useCompanionGenerationCopy';
+import { CompanionPresenceRing } from './CompanionPresenceRing';
+import { ThinkingDots } from './ThinkingDots';
import { WorkingStatusText } from './WorkingStatusText';
export function BotGroupSpeakerRow({ deviceId, identity, sessionId, activity, online, onError }: {
@@ -39,7 +40,6 @@ export function BotGroupSpeakerRow({ deviceId, identity, sessionId, activity, on
onError(message: string | null): void;
}) {
const { t } = useTranslation();
- const { colors } = useTheme();
const styles = useThemedStyles(makeStyles);
const { invoke, subscribe, unsubscribe } = useDeviceLink();
const lane = sessionId ?? '';
@@ -68,19 +68,22 @@ export function BotGroupSpeakerRow({ deviceId, identity, sessionId, activity, on
const label = activity === 'planning'
? t('groupChat.speaking.planning')
: copy ?? (activity === 'step' ? t('groupChat.speaking.step') : t('devices.companions.working.thinking'));
+ // G4: the same working vocabulary as the 1:1 chat — breathing portrait, three dots, paced copy.
return <View style={styles.row} testID="botGroup.speaking" accessibilityLabel={`${identity.name}, ${waiting ? t('groupChat.waitingConfirm', { name: identity.name }) : label}`}>
- <BotGroupAvatar deviceId={deviceId} identity={identity} size={BOT_GROUP_MESSAGE_AVATAR_SIZE} online={online} />
+ <View style={styles.avatar}>
+ <BotGroupAvatar deviceId={deviceId} identity={identity} size={BOT_GROUP_MESSAGE_AVATAR_SIZE} online={online} />
+ <CompanionPresenceRing active={!waiting} width={1.5} />
+ </View>
<View style={styles.column}>
- <Text numberOfLines={1} style={styles.name}>{identity.name}</Text>
+ <View style={styles.nameRow}><Text numberOfLines={1} style={styles.name}>{identity.name}</Text></View>
{!waiting ? <View style={styles.status} accessibilityLiveRegion="polite" testID={`botGroup.speaking.${activity}`}>
- <Sparkles size={iconSize.sm} color={colors.statusAccent} />
+ <ThinkingDots />
<WorkingStatusText key={`${lane}:${activity}`} text={label} style={styles.statusText} />
</View> : null}
{pending.length > 0 && lane ? <InteractionPanel embedded companion
companionIdentity={{ name: identity.name, avatar: <BotGroupAvatar deviceId={deviceId} identity={identity} size={BOT_GROUP_INLINE_AVATAR_SIZE} online={online} /> }}
deviceId={deviceId} sessionId={lane} interactions={pending} onError={onError} />
: waiting ? <View style={styles.status} testID="botGroup.speaking.waiting">
- <CircleAlert size={iconSize.sm} color={colors.warningFg} />
<Text style={styles.waitingText}>{t('groupChat.waitingConfirm', { name: identity.name })}</Text>
</View> : null}
</View>
@@ -88,10 +91,14 @@ export function BotGroupSpeakerRow({ deviceId, identity, sessionId, activity, on
}
const makeStyles = (colors: ThemeColors) => StyleSheet.create({
- row: { flexDirection: 'row', alignItems: 'flex-start', gap: spacing.sm },
+ // The group message row: 28 portrait 2pt down, 10 to the text, name row as tall as the portrait.
+ row: { flexDirection: 'row', alignItems: 'flex-start', gap: 10 },
+ avatar: { marginTop: 2, width: BOT_GROUP_MESSAGE_AVATAR_SIZE, height: BOT_GROUP_MESSAGE_AVATAR_SIZE },
column: { flex: 1, minWidth: 0, gap: spacing.xs },
+ nameRow: { minHeight: BOT_GROUP_MESSAGE_AVATAR_SIZE, justifyContent: 'center' },
name: { color: colors.textPrimary, fontSize: typeScale.bodySmall, lineHeight: lineHeight.bodySmall, fontWeight: fontWeight.medium },
- status: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs },
+ status: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm },
statusText: { flexShrink: 1, color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },
- waitingText: { flexShrink: 1, color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },
+ // Waiting on you reads like the list's 「等你确认」 prefix: body color, medium — no warning icon.
+ waitingText: { flexShrink: 1, color: colors.textPrimary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, fontWeight: fontWeight.medium },
});
diff --git a/apps/mobile/src/session/ChatIdentityHeader.tsx b/apps/mobile/src/session/ChatIdentityHeader.tsx
new file mode 100644
index 0000000000..6cf5892968
--- /dev/null
+++ b/apps/mobile/src/session/ChatIdentityHeader.tsx
@@ -0,0 +1,71 @@
+import type { ReactNode } from 'react';
+import { Keyboard, Pressable, StyleSheet, View } from 'react-native';
+import { ChevronLeft, Settings2 } from 'lucide-react-native';
+import { useTranslation } from 'react-i18next';
+import { Text } from '@/components/AppText';
+import { fontWeight, iconSize, iconStroke, lineHeight, spacing, typeScale, useTheme, useThemedStyles, type ThemeColors } from '@/theme';
+import { HomeHeaderGlassButton } from './HomeHeaderGlassButton';
+
+/** Identity mark size in chat headers: a 32pt avatar (1:1) or a 32pt two-member group mark. */
+export const CHAT_HEADER_MARK_SIZE = 32;
+
+/**
+ * 私聊与群聊共用的顶栏(C1 / G1):返回 + 身份区(32 标记、标题 16/22 600、副标题 12/18 三级色)+
+ * 设置。点身份区和设置按钮打开同一份资料 / 设置。
+ */
+export function ChatIdentityHeader({
+ mark, title, subtitle, identityLabel, identityHint, controlsReady = true, onBack, onOpenSettings, settingsLabel, testIDPrefix, settingsTestID,
+}: {
+ mark: ReactNode;
+ title: string;
+ /** A short line under the title: presence + computer name, or member names. */
+ subtitle: ReactNode;
+ identityLabel: string;
+ identityHint?: string;
+ controlsReady?: boolean;
+ onBack(): void;
+ onOpenSettings(): void;
+ settingsLabel: string;
+ testIDPrefix: string;
+ /** Defaults to `${testIDPrefix}.settings`. */
+ settingsTestID?: string;
+}) {
+ const { t } = useTranslation();
+ const { colors } = useTheme();
+ const styles = useThemedStyles(makeStyles);
+ const open = () => { if (controlsReady) { Keyboard.dismiss(); onOpenSettings(); } };
+ return <View style={styles.header} testID={`${testIDPrefix}.header`}>
+ <HomeHeaderGlassButton testID={`${testIDPrefix}.back`} accessibilityLabel={t('shared.back')} onPress={() => { Keyboard.dismiss(); onBack(); }}>
+ <ChevronLeft size={iconSize.action} strokeWidth={iconStroke.regular} color={colors.textPrimary} />
+ </HomeHeaderGlassButton>
+ <Pressable style={({ pressed }) => [styles.identity, pressed && styles.pressed]} accessibilityRole="button"
+ accessibilityLabel={identityLabel} accessibilityHint={identityHint} accessibilityState={{ disabled: !controlsReady }}
+ disabled={!controlsReady} onPress={open} testID={`${testIDPrefix}.identity`}>
+ <View style={styles.mark}>{mark}</View>
+ <View style={styles.identityText}>
+ <Text numberOfLines={1} style={styles.title}>{title}</Text>
+ {typeof subtitle === 'string' ? <Text numberOfLines={1} style={styles.subtitle}>{subtitle}</Text> : subtitle}
+ </View>
+ </Pressable>
+ <HomeHeaderGlassButton testID={settingsTestID ?? `${testIDPrefix}.settings`} disabled={!controlsReady} accessibilityLabel={settingsLabel} onPress={open}>
+ <Settings2 size={iconSize.lg} strokeWidth={iconStroke.regular} color={colors.textPrimary} />
+ </HomeHeaderGlassButton>
+ </View>;
+}
+
+/** Subtitle text in the header's style, for callers that compose it with a leading mark. */
+export function ChatIdentitySubtitle({ children }: { children: string }) {
+ const styles = useThemedStyles(makeStyles);
+ return <Text numberOfLines={1} style={[styles.subtitle, styles.subtitleFlexible]}>{children}</Text>;
+}
+
+const makeStyles = (colors: ThemeColors) => StyleSheet.create({
+ header: { flexDirection: 'row', alignItems: 'center', minHeight: 52, gap: spacing.md, paddingHorizontal: spacing.lg },
+ identity: { flex: 1, minWidth: 0, flexDirection: 'row', alignItems: 'center', minHeight: 44, gap: spacing.sm + 2 },
+ pressed: { opacity: 0.72 },
+ mark: { width: CHAT_HEADER_MARK_SIZE, height: CHAT_HEADER_MARK_SIZE },
+ identityText: { flex: 1, minWidth: 0 },
+ title: { color: colors.textPrimary, fontSize: typeScale.body, lineHeight: lineHeight.body, fontWeight: fontWeight.semibold },
+ subtitle: { color: colors.textTertiary, fontSize: typeScale.caption, lineHeight: lineHeight.caption },
+ subtitleFlexible: { flexShrink: 1 },
+});
diff --git a/apps/mobile/src/session/CompanionCardButton.tsx b/apps/mobile/src/session/CompanionCardButton.tsx
new file mode 100644
index 0000000000..5026f7417a
--- /dev/null
+++ b/apps/mobile/src/session/CompanionCardButton.tsx
@@ -0,0 +1,65 @@
+import { createContext, useContext, useMemo, useState, type ReactNode } from 'react';
+import { ActivityIndicator, Pressable, StyleSheet, View, type StyleProp, type ViewStyle } from 'react-native';
+import { Text } from '@/components/AppText';
+import { fontWeight, lineHeight, radius, spacing, typeScale, useTheme, useThemedStyles, type ThemeColors } from '@/theme';
+
+/** Visible height of card buttons; hitSlop brings the touch target to 44 (K5). */
+const HEIGHT = 38;
+const HIT_SLOP = { top: 3, bottom: 3 } as const;
+// A width, not a percentage flexBasis: Fabric does not re-lay out a basis that changes from 0 to '100%'.
+const STACKED = { flexBasis: 'auto', width: '100%' } as const;
+const StackContext = createContext<{ stacked: boolean; onWrap(): void } | null>(null);
+
+/**
+ * Companion card button (K5): 38pt pill, 15/20 medium label centered. Primary is the inverse CTA fill;
+ * secondary is a quiet chip fill without a border. Rows of these share the width equally.
+ */
+export function CompanionCardButton({ label, onPress, primary = false, busy = false, disabled = false, accessibilityLabel, testID, style }: {
+ label: string;
+ onPress(): void;
+ primary?: boolean;
+ busy?: boolean;
+ disabled?: boolean;
+ accessibilityLabel?: string;
+ testID?: string;
+ style?: StyleProp<ViewStyle>;
+}) {
+ const styles = useThemedStyles(makeStyles);
+ const { colors } = useTheme();
+ const stack = useContext(StackContext);
+ const inactive = disabled || busy;
+ return <Pressable accessibilityRole="button" accessibilityLabel={accessibilityLabel ?? label}
+ accessibilityState={{ disabled: inactive, busy: busy || undefined }} disabled={inactive} hitSlop={HIT_SLOP} onPress={onPress}
+ style={({ pressed }) => [styles.button, primary ? styles.primary : styles.secondary, pressed && styles.pressed, disabled && styles.disabled, stack?.stacked && STACKED, style]}
+ testID={testID}>
+ {busy
+ ? <ActivityIndicator size="small" color={primary ? colors.ctaText : colors.textSecondary} />
+ : <Text onTextLayout={stack && !stack.stacked ? (event) => { if (event.nativeEvent.lines.length > 1) stack.onWrap(); } : undefined}
+ style={[styles.label, primary && styles.labelPrimary]}>{label}</Text>}
+ </Pressable>;
+}
+
+/**
+ * Equal-width row of card buttons, secondary first and primary last. If any label would wrap at that
+ * width (long English / Japanese copy on a narrow card), the whole group switches once to one
+ * full-width button per row, like the teammate permission card.
+ */
+export function CompanionCardActions({ children }: { children: ReactNode }) {
+ const styles = useThemedStyles(makeStyles);
+ const [stacked, setStacked] = useState(false);
+ const stack = useMemo(() => ({ stacked, onWrap: () => setStacked(true) }), [stacked]);
+ return <StackContext.Provider value={stack}>
+ <View style={styles.actions} testID={stacked ? 'companion.cardActions.stacked' : undefined}>{children}</View>
+ </StackContext.Provider>;
+}
+
+const makeStyles = (colors: ThemeColors) => StyleSheet.create({
+ actions: { flexDirection: 'row', flexWrap: 'wrap', gap: spacing.sm, marginTop: spacing.md },
+ button: { flex: 1, minHeight: HEIGHT, borderRadius: radius.pill, alignItems: 'center', justifyContent: 'center', paddingHorizontal: spacing.md },
+ primary: { backgroundColor: colors.cta },
+ secondary: { backgroundColor: colors.surfaceChip },
+ pressed: { opacity: 0.72 },
+ disabled: { opacity: 0.45 },
+ label: { color: colors.textPrimary, fontSize: typeScale.bodySmall, lineHeight: lineHeight.bodySmall, fontWeight: fontWeight.medium, textAlign: 'center' },
+ labelPrimary: { color: colors.ctaText },
+});
diff --git a/apps/mobile/src/session/CompanionEntering.tsx b/apps/mobile/src/session/CompanionEntering.tsx
new file mode 100644
index 0000000000..71d5d9d412
--- /dev/null
+++ b/apps/mobile/src/session/CompanionEntering.tsx
@@ -0,0 +1,61 @@
+import { useEffect, useRef, type ReactNode } from 'react';
+import { Animated, Easing } from 'react-native';
+import { useReduceMotionEnabled } from '@/hooks/useReduceMotion';
+import { motionDuration, motionEasing } from '@/theme';
+
+/** Only messages this recent animate: history loads, remounts and recycled cells stay still. */
+const FRESH_MS = 15_000;
+/** Fresh ids already played, so a remount inside FRESH_MS stays still. Old rows never need an entry. */
+const MAX_REMEMBERED = 200;
+const animated = new Set<string>();
+
+/**
+ * One-shot entrance: fades in while rising `distance` pt (and growing from `scaleFrom`), ease-out.
+ * Transform and opacity only, native driver; renders children as-is when `play` is false or the
+ * system asks for reduced motion.
+ */
+export function CompanionFadeIn({ play, distance, scaleFrom, duration = motionDuration.base, delay = 0, children }: {
+ play: boolean; distance: number; scaleFrom?: number; duration?: number; delay?: number; children: ReactNode;
+}) {
+ const reduceMotion = useReduceMotionEnabled();
+ const run = useRef<boolean | null>(null);
+ if (run.current === null) run.current = play && reduceMotion === false;
+ const progress = useRef(new Animated.Value(run.current ? 0 : 1)).current;
+ useEffect(() => {
+ if (!run.current) return;
+ const timing = Animated.timing(progress, {
+ toValue: 1, duration, delay, easing: Easing.bezier(...motionEasing.out), useNativeDriver: true,
+ });
+ timing.start();
+ return () => timing.stop();
+ }, [delay, duration, progress]);
+ if (!run.current) return <>{children}</>;
+ const transform = [
+ { translateY: progress.interpolate({ inputRange: [0, 1], outputRange: [distance, 0] }) },
+ ...(scaleFrom !== undefined ? [{ scale: progress.interpolate({ inputRange: [0, 1], outputRange: [scaleFrom, 1] }) }] : []),
+ ];
+ return <Animated.View style={{ opacity: progress, transform }}>{children}</Animated.View>;
+}
+
+/**
+ * Entering motion for a companion conversation row (M4 / M5). Keyed by message: a row animates at
+ * most once and only while it is new (created within FRESH_MS). Your message rises 8pt from 0.96;
+ * a teammate's finished reply rises 6pt (replies never stream).
+ */
+export function CompanionEntering({ id, createdAt, kind, children }: {
+ id: string; createdAt: string | number | undefined; kind: 'send' | 'reply'; children: ReactNode;
+}) {
+ const fresh = useRef<boolean | null>(null);
+ if (fresh.current === null) {
+ const at = typeof createdAt === 'number' ? createdAt : createdAt ? Date.parse(createdAt) : Number.NaN;
+ fresh.current = !animated.has(id) && Number.isFinite(at) && Date.now() - at < FRESH_MS;
+ if (fresh.current) {
+ animated.add(id);
+ // Insertion order: the oldest id is almost always past FRESH_MS; at worst a remount replays it once.
+ if (animated.size > MAX_REMEMBERED) animated.delete(animated.values().next().value!);
+ }
+ }
+ return <CompanionFadeIn play={fresh.current} distance={kind === 'send' ? 8 : 6} scaleFrom={kind === 'send' ? 0.96 : undefined}>
+ {children}
+ </CompanionFadeIn>;
+}
diff --git a/apps/mobile/src/session/CompanionHeader.tsx b/apps/mobile/src/session/CompanionHeader.tsx
index 36a4deaafc..d37282fff4 100644
--- a/apps/mobile/src/session/CompanionHeader.tsx
+++ b/apps/mobile/src/session/CompanionHeader.tsx
@@ -1,74 +1,69 @@
import { useRef, useState } from 'react';
-import { Keyboard, Pressable, StyleSheet, View } from 'react-native';
-import { ChevronDown, PanelLeft, Settings2 } from 'lucide-react-native';
+import { StyleSheet, View } from 'react-native';
import { useTranslation } from 'react-i18next';
-import { resolveRemoteText, type RemoteResource, type RemoteResourceRef } from '@cindy/device-link';
+import { resolveRemoteText, type RemoteResource } from '@cindy/device-link';
import { useAuth } from '@/auth/AuthContext';
-import { Text } from '@/components/AppText';
import { RemoteCompanionAvatar } from '@/components/RemoteCompanionAvatar';
-import { fontWeight, iconSize, iconStroke, lineHeight, spacing, typeScale, useTheme, useThemedStyles, type ThemeColors } from '@/theme';
-import { HomeHeaderGlassButton } from './HomeHeaderGlassButton';
-import { CompanionBackButton } from './CompanionBackButton';
-import { useSystemNavigationBack } from '@/platform/chrome/SystemNavigationBack';
-import { TeammatePicker } from './TeammatePicker';
-import { CompanionCreateSheet, CompanionProfileSheet } from './CompanionProfileSheet';
+import { radius, spacing, useThemedStyles, type ThemeColors } from '@/theme';
+import { CHAT_HEADER_MARK_SIZE, ChatIdentityHeader, ChatIdentitySubtitle } from './ChatIdentityHeader';
+import { CompanionPresenceRing } from './CompanionPresenceRing';
+import { CompanionProfileSheet } from './CompanionProfileSheet';
import { useTeammateNavigation } from './useTeammateNavigation';
-const AVATAR_SIZE = 32;
+/** Presence dot before the computer name (the list's dot, sized for a 12pt line). */
+const PRESENCE_DOT = 6;
+/**
+ * 伙伴私聊顶栏(C1,与群聊顶栏同一个 ChatIdentityHeader):返回 + 身份(32 头像、名字、在线点与
+ * 电脑名)+ 伙伴设置。点身份区与设置按钮都打开伙伴资料;切换伙伴回到列表里做。
+ */
export function CompanionHeader(props: {
- resource: RemoteResource; deviceId: string; deviceName: string; online: boolean; controlsReady?: boolean; onSearch(): void; onOpenNavigation(): void;
- /** Back to where the chat was opened from (the partner list). */
- onBack?(): void;
+ resource: RemoteResource; deviceId: string; deviceName: string; online: boolean; controlsReady?: boolean;
+ /** The companion is working on a reply (the avatar breathes). */
+ working?: boolean;
+ onSearch(): void; onBack(): void;
}) {
const { accountGeneration } = useAuth();
return <CompanionHeaderContent key={accountGeneration} {...props} />;
}
-function CompanionHeaderContent({ resource, deviceId, deviceName, online, controlsReady = true, onSearch, onOpenNavigation, onBack }: Parameters<typeof CompanionHeader>[0]) {
+
+function CompanionHeaderContent({ resource, deviceId, deviceName, online, controlsReady = true, working = false, onSearch, onBack }: Parameters<typeof CompanionHeader>[0]) {
const { t, i18n } = useTranslation();
- const { colors } = useTheme();
const styles = useThemedStyles(makeStyles);
const navigation = useTeammateNavigation();
- // Duo's vertical system bar already carries a back item: keep the sidebar
- // button there instead of showing two backs.
- const systemBack = useSystemNavigationBack();
- const [picker, setPicker] = useState(false);
const [profile, setProfile] = useState(false);
- const [creating, setCreating] = useState(false);
- const created = useRef<RemoteResourceRef | null>(null);
const pending = useRef<(() => void) | null>(null);
const name = resolveRemoteText(resource.display.title, i18n.language);
const afterProfile = (action: () => void) => { pending.current = action; setProfile(false); };
+ const connection = online ? '' : t('devices.resources.hostOffline');
return <>
- <View style={styles.header} testID="companion.header">
- {onBack && !systemBack
- ? <CompanionBackButton label={t('shared.back')} onPress={() => { Keyboard.dismiss(); onBack(); }} />
- : <HomeHeaderGlassButton testID="companion.navigation" accessibilityLabel={t('devices.companions.openNavigation')} onPress={() => { Keyboard.dismiss(); onOpenNavigation(); }}>
- <PanelLeft size={iconSize.lg} strokeWidth={iconStroke.regular} color={colors.textPrimary} />
- </HomeHeaderGlassButton>}
- <Pressable style={styles.identity} accessibilityRole="button" accessibilityLabel={name} accessibilityHint={t('devices.companions.title')} onPress={() => setPicker(true)} testID="companion.picker">
- <RemoteCompanionAvatar avatar={resource.display.avatar} name={name} deviceId={deviceId} online={online} size={AVATAR_SIZE} />
- <Text numberOfLines={1} style={styles.name}>{name}</Text>
- <ChevronDown size={iconSize.sm} color={colors.textSecondary} />
- </Pressable>
- <HomeHeaderGlassButton testID="companion.settings" disabled={!controlsReady} accessibilityLabel={t('devices.companionProfile.settingsTitle')} onPress={() => setProfile(true)}>
- <Settings2 size={iconSize.lg} strokeWidth={iconStroke.regular} color={colors.textPrimary} />
- </HomeHeaderGlassButton>
- </View>
- <TeammatePicker visible={picker} onClose={() => setPicker(false)} onSelect={item => void navigation.openTeammate(item)}
- onCreate={() => { created.current = null; setCreating(true); }}
- current={{ deviceId, collectionId: resource.ref.collectionId, resourceKind: 'bot', resourceId: resource.ref.id }} />
- <CompanionCreateSheet visible={creating} onClose={() => setCreating(false)} deviceId={deviceId} deviceName={deviceName}
- collectionId={resource.ref.collectionId} online={online} onCreated={ref => { created.current = ref; }}
- onClosed={() => { const ref = created.current; created.current = null; if (ref) void navigation.openCreatedTeammate({ deviceId, deviceName }, ref); }} />
+ <ChatIdentityHeader testIDPrefix="companion"
+ mark={<>
+ <RemoteCompanionAvatar avatar={resource.display.avatar} name={name} deviceId={deviceId} online={online} size={CHAT_HEADER_MARK_SIZE} framed />
+ <CompanionPresenceRing active={working} width={1.5} />
+ </>}
+ title={name}
+ subtitle={<View style={styles.subtitleRow}>
+ <View style={[styles.presence, online ? styles.presenceOn : styles.presenceOff]} testID="companion.header.presence" />
+ <ChatIdentitySubtitle>{connection ? `${connection} · ${deviceName}` : deviceName}</ChatIdentitySubtitle>
+ </View>}
+ identityLabel={[name, deviceName, connection].filter(Boolean).join(', ')}
+ identityHint={t('devices.companions.openProfile', { name })}
+ controlsReady={controlsReady}
+ onBack={onBack}
+ onOpenSettings={() => setProfile(true)}
+ settingsLabel={t('devices.companionProfile.settingsTitle')} />
<CompanionProfileSheet visible={profile} onClose={() => setProfile(false)} onClosed={() => { const action = pending.current; pending.current = null; action?.(); }}
resource={resource} collectionId={resource.ref.collectionId} deviceId={deviceId} deviceName={deviceName} online={online}
onDeleted={() => void navigation.chooseMode('teammates')}
onOpenSearch={() => afterProfile(onSearch)} />
</>;
}
+
const makeStyles = (colors: ThemeColors) => StyleSheet.create({
- header: { flexDirection: 'row', alignItems: 'center', minHeight: 52, gap: spacing.md, paddingHorizontal: spacing.lg },
- identity: { flex: 1, flexDirection: 'row', alignItems: 'center', minHeight: 44, gap: spacing.sm },
- name: { flexShrink: 1, fontSize: typeScale.subtitle, lineHeight: lineHeight.subtitle, fontWeight: fontWeight.medium, color: colors.textPrimary },
+ subtitleRow: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs },
+ presence: { width: PRESENCE_DOT, height: PRESENCE_DOT, borderRadius: radius.pill },
+ // Same tones as the list's StatusDot: ready when connected, the quiet border tone when not.
+ presenceOn: { backgroundColor: colors.statusReady },
+ presenceOff: { backgroundColor: colors.borderStrong },
});
diff --git a/apps/mobile/src/session/CompanionListRow.tsx b/apps/mobile/src/session/CompanionListRow.tsx
new file mode 100644
index 0000000000..1d0406cb6c
--- /dev/null
+++ b/apps/mobile/src/session/CompanionListRow.tsx
@@ -0,0 +1,106 @@
+/**
+ * 伙伴页的一行(伙伴与群聊共用,对齐任务行的几何):固定 78 高;44 头像距左 16,文字列从 72 开始,
+ * 右内边距 16;分割线画在文字列底边,从 72 一直到屏幕右缘,最后一行不画。
+ *
+ * 第一行:名字(18/28 500)+ 同名时的「· 电脑名」+ 右侧时间位。时间位只放一样东西:时间,或工作中
+ * 的中性转圈。第二行:预览(15/26)+ 右侧未读蓝点。需要你处理的事写成预览开头的前缀(正文色
+ * 500),不再用彩色点。见 apps/mobile/docs/mobile-design-guide.md §3 的列表节奏例外。
+ */
+import type { ReactElement, ReactNode } from 'react';
+import { Pressable, StyleSheet, View } from 'react-native';
+import { Text } from '@/components/AppText';
+import { StatusDot } from '@/components/MobilePrimitives';
+import { fontWeight, lineHeight, radius, spacing, typeScale, useThemedStyles, type ThemeColors } from '@/theme';
+import { SessionRightSpinner } from './SessionRightSpinner';
+
+export const COMPANION_ROW_HEIGHT = 78;
+export const COMPANION_ROW_AVATAR_SIZE = 44;
+/** Unread / presence dots: the task row's 10pt status dot. */
+export const COMPANION_ROW_DOT_SIZE = 10;
+const LEFT_INSET = spacing.lg;
+
+export type CompanionRowTrailing = { kind: 'time'; text: string } | { kind: 'working' };
+
+export function CompanionListRow({
+ avatar, title, device, trailing, preview, previewTone = 'secondary', previewPrefix, previewPrefixTestID,
+ unread = false, unreadLabel, disabled = false, last = false, accessibilityLabel, onPress, testID,
+}: {
+ /** Content of the 44pt avatar box (the caller draws presence dot and ring inside it). */
+ avatar: ReactNode;
+ title: string;
+ /** Computer name, only when two rows share a name. */
+ device?: string;
+ trailing: CompanionRowTrailing;
+ /** Plain text, or a live element (the working copy) that renders outside the text node. */
+ preview: string | ReactElement;
+ previewTone?: 'secondary' | 'tertiary';
+ /** 「等你确认」「需要关注」「离线」 — what needs the user, before the preview. */
+ previewPrefix?: string;
+ previewPrefixTestID?: string;
+ unread?: boolean;
+ unreadLabel?: string;
+ disabled?: boolean;
+ last?: boolean;
+ accessibilityLabel: string;
+ onPress(): void;
+ testID?: string;
+}) {
+ const styles = useThemedStyles(makeStyles);
+ return <Pressable accessibilityRole="button" accessibilityLabel={accessibilityLabel} accessibilityState={{ disabled }}
+ disabled={disabled} onPress={onPress} style={({ pressed }) => [styles.row, pressed && !disabled && styles.pressed]} testID={testID}>
+ <View style={styles.avatar}>{avatar}</View>
+ <View style={[styles.body, !last && styles.divider]}>
+ <View style={styles.titleRow}>
+ <Text numberOfLines={1} style={styles.title}>{title}</Text>
+ {device ? <Text numberOfLines={1} style={styles.device}>{`· ${device}`}</Text> : null}
+ <View style={styles.spacer} />
+ <View style={styles.trailing}>
+ {trailing.kind === 'working'
+ ? <SessionRightSpinner testID="companion.row.working" />
+ : <Text numberOfLines={1} style={styles.time}>{trailing.text}</Text>}
+ </View>
+ </View>
+ <View style={styles.previewRow}>
+ {typeof preview === 'string'
+ ? <Text numberOfLines={1} style={[styles.preview, previewTone === 'tertiary' && styles.previewQuiet]}>
+ {previewPrefix ? <Text style={styles.prefix} testID={previewPrefixTestID}>{`${previewPrefix} · `}</Text> : null}
+ {preview}
+ </Text>
+ : <View style={styles.previewSlot}>{preview}</View>}
+ {unread ? <View style={styles.unread} accessibilityLabel={unreadLabel} testID="companion.row.unread" /> : null}
+ </View>
+ </View>
+ </Pressable>;
+}
+
+/** Presence dot on the avatar's bottom-right, ringed with the page surface (desktop BotConnectionStatus). */
+/** The shared status dot in a page-coloured ring, so it stays legible over the avatar. */
+export function CompanionPresenceDot({ connected, testID = 'teammate.connection' }: { connected: boolean | null; testID?: string }) {
+ const styles = useThemedStyles(makeStyles);
+ return <View testID={testID} style={styles.presence}>
+ <StatusDot tone={connected === null ? 'muted' : connected ? 'ready' : 'off'} />
+ </View>;
+}
+
+const makeStyles = (colors: ThemeColors) => StyleSheet.create({
+ row: { flexDirection: 'row', alignItems: 'center', gap: spacing.md, height: COMPANION_ROW_HEIGHT, paddingLeft: LEFT_INSET },
+ pressed: { opacity: 0.72 },
+ avatar: { width: COMPANION_ROW_AVATAR_SIZE, height: COMPANION_ROW_AVATAR_SIZE },
+ body: { flex: 1, minWidth: 0, alignSelf: 'stretch', justifyContent: 'center', paddingRight: spacing.lg },
+ divider: { borderBottomColor: colors.border, borderBottomWidth: StyleSheet.hairlineWidth },
+ titleRow: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs, height: lineHeight.listTitle },
+ // Home list rhythm exception (mobile guide §3): 18/28 title, 15/26 preview, 13/22 metadata.
+ title: { flexShrink: 1, color: colors.textPrimary, fontSize: typeScale.subtitle, lineHeight: lineHeight.listTitle, fontWeight: fontWeight.medium },
+ // Aligned to the title line (alignment exception): the name keeps its width, the computer name truncates first.
+ device: { flexShrink: 3, color: colors.textTertiary, fontSize: typeScale.bodySmall, lineHeight: lineHeight.listTitle, fontWeight: fontWeight.regular },
+ spacer: { flexGrow: 1, minWidth: spacing.sm },
+ trailing: { minWidth: COMPANION_ROW_DOT_SIZE, alignItems: 'flex-end', justifyContent: 'center' },
+ time: { color: colors.textTertiary, fontSize: typeScale.footnote, lineHeight: lineHeight.body, fontWeight: fontWeight.regular, fontVariant: ['tabular-nums'] },
+ previewRow: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm, height: lineHeight.subtitle },
+ preview: { flex: 1, minWidth: 0, color: colors.textSecondary, fontSize: typeScale.bodySmall, lineHeight: lineHeight.subtitle, fontWeight: fontWeight.regular },
+ previewQuiet: { color: colors.textTertiary },
+ previewSlot: { flex: 1, minWidth: 0, flexDirection: 'row' },
+ prefix: { color: colors.textPrimary, fontSize: typeScale.bodySmall, lineHeight: lineHeight.subtitle, fontWeight: fontWeight.medium },
+ unread: { width: COMPANION_ROW_DOT_SIZE, height: COMPANION_ROW_DOT_SIZE, borderRadius: radius.pill, backgroundColor: colors.botUnread },
+ presence: { position: 'absolute', right: 0, bottom: 0, padding: 2, borderRadius: radius.pill, backgroundColor: colors.surface },
+});
diff --git a/apps/mobile/src/session/CompanionMessageCard.tsx b/apps/mobile/src/session/CompanionMessageCard.tsx
index b20a336429..c3dc9b2938 100644
--- a/apps/mobile/src/session/CompanionMessageCard.tsx
+++ b/apps/mobile/src/session/CompanionMessageCard.tsx
@@ -1,17 +1,18 @@
import { CompanionTaskResultCard } from './CompanionTaskResultCard';
-import { Component, useEffect, useState, useSyncExternalStore, type ReactNode } from 'react';
+import { Component, useEffect, useRef, useState, useSyncExternalStore, type ReactNode } from 'react';
import { useLocalSearchParams } from 'expo-router';
import { useGuardedPush } from '@/utils/useGuardedPush';
-import { Linking, Pressable, StyleSheet, View, type LayoutChangeEvent } from 'react-native';
+import { Animated, Easing, Linking, Pressable, StyleSheet, View } from 'react-native';
import {
- FileText,
+ CircleAlert,
+ CircleCheck,
GitPullRequest,
GitMerge,
GitPullRequestClosed,
GitPullRequestDraft,
Square,
- ArrowLeftRight,
ChevronRight,
+ Layers,
Megaphone,
TriangleAlert,
} from 'lucide-react-native';
@@ -46,6 +47,11 @@ import {
import { useTheme, useThemedStyles, type ThemeColors } from '@/theme';
import { fontWeight, iconSize, lineHeight, radius, spacing, typeScale } from '@/theme/tokens';
import type { NormalizedRemoteMessage } from './messageNormalize';
+import { useReduceMotionEnabled } from '@/hooks/useReduceMotion';
+
+const TRACE_AVATAR_SIZE = 20;
+const TRACE_HIT_SLOP = { top: 6, bottom: 6 } as const;
+const AUX_HIT_SLOP = { top: 6, bottom: 6 } as const;
import { useRemoteCompanionQuery } from './useRemoteCompanionQuery';
class CompanionRenderBoundary extends Component<
@@ -135,9 +141,9 @@ function CompanionPrivateTrace({ deviceId, meta }: { deviceId: string; meta: Bot
|| meta.peerBotName || meta.peerBotId;
return (
<View style={styles.privateTrace} testID="companion.privateTrace">
- <View style={styles.traceLine} />
<Pressable
accessibilityRole="button"
+ hitSlop={TRACE_HIT_SLOP}
style={styles.traceTouchTarget}
onPress={() =>
push({
@@ -153,16 +159,14 @@ function CompanionPrivateTrace({ deviceId, meta }: { deviceId: string; meta: Bot
{({ pressed }) => (
<View style={[styles.traceAction, pressed && mobileInteractionStyles.pressed]}>
{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]}>
+ online={status === 'online' && getPresenceAvailability(deviceId) !== false} size={TRACE_AVATAR_SIZE} framed /> : null}
+ <Text numberOfLines={1} style={[styles.note, styles.traceLabel]}>
{t(meta.direction === 'sent' ? 'devices.companions.sentTo' : 'devices.companions.receivedFrom', { name: peerName })}
</Text>
- <ChevronRight size={iconSize.xs} color={colors.textTertiary} />
+ <ChevronRight size={iconSize.sm} color={colors.textTertiary} />
</View>
)}
</Pressable>
- <View style={styles.traceLine} />
</View>
);
}
@@ -197,18 +201,10 @@ function CompanionTaskCard({
row && (BOT_DELEGATION_STATUSES as readonly string[]).includes(row.status)
? row.status
: 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);
- // Equal intrinsic widths in every language; the 32px visible frame sits inside a 44px hit target.
- const [actionWidth, setActionWidth] = useState(104);
const [now, setNow] = useState(Date.now);
const childSessionId = row?.childSessionId || meta.childSessionId;
const active = Boolean(row && ['queued', 'running', 'waiting'].includes(row.status));
@@ -312,48 +308,37 @@ function CompanionTaskCard({
setPending(false);
}
};
- const rememberActionWidth = (event: LayoutChangeEvent) => {
- const width = event.nativeEvent?.layout?.width;
- if (typeof width !== 'number' || !Number.isFinite(width)) return;
- const measuredWidth = Math.ceil(width);
- setActionWidth((current) => Math.max(current, measuredWidth));
- };
+ const openTask = childSessionId ? () => push({
+ pathname: '/sessions/[sessionId]',
+ params: { deviceId, sessionId: childSessionId },
+ }) : undefined;
+ const stale = (!online || error || associated.error || prStatuses.error
+ || (Array.isArray(prStatuses.value) && prStatuses.value.some((result) => !result.ok))) && row;
+ const facts = [
+ duration,
+ Array.isArray(row?.artifacts) && row.artifacts.length > 0 ? t('devices.companions.artifactCount', { count: row.artifacts.length }) : null,
+ prs.length === 1 ? `${prs[0].owner}/${prs[0].repo} #${prs[0].prNumber}` : prs.length > 1 ? t('devices.companions.prCount', { count: prs.length }) : null,
+ ].filter((part): part is string => !!part);
return (
<View style={styles.card} testID="companion.taskCard">
- <View style={styles.header}>
- <Text numberOfLines={2} style={[styles.title, styles.taskTitle]}>
- {title}
- </Text>
- <View style={styles.status}>
- <View style={[styles.statusDot, { backgroundColor: statusColor }]} />
- <Text style={[styles.note, { color: statusColor }]}>
- {t(`devices.companions.status.${status}`)}
- </Text>
+ {/* K6: the whole card opens the task; secondary actions sit below as small buttons. */}
+ <Pressable accessibilityRole="button" disabled={!openTask} onPress={openTask}
+ accessibilityLabel={`${t('devices.companions.backgroundTask')}, ${title}, ${t(`devices.companions.status.${status}`)}`}
+ accessibilityHint={openTask ? t('devices.companions.openTask') : undefined}
+ style={({ pressed }) => [styles.head, pressed && openTask && mobileInteractionStyles.pressed]} testID="companion.taskCard.open">
+ <View style={styles.eyebrow}>
+ <Layers size={iconSize.sm} color={colors.textSecondary} />
+ <Text style={styles.eyebrowText}>{t('devices.companions.backgroundTask')}</Text>
+ {openTask ? <ChevronRight size={iconSize.md} color={colors.textTertiary} /> : null}
</View>
- </View>
- <View style={styles.metadata}>
- {duration ? <Text style={styles.note}>{duration}</Text> : null}
- {Array.isArray(row?.artifacts) && row.artifacts.length > 0 ? (
- <Text style={styles.note}>
- {t('devices.companions.artifactCount', {
- count: row.artifacts.length,
- })}
- </Text>
- ) : null}
- {prs.length === 1 ? (
- <Text numberOfLines={1} style={styles.note}>
- {prs[0].owner}/{prs[0].repo} #{prs[0].prNumber}
- </Text>
- ) : prs.length > 1 ? (
- <Text style={styles.note}>{t('devices.companions.prCount', { count: prs.length })}</Text>
- ) : null}
- </View>
- {(!online ||
- error ||
- associated.error ||
- prStatuses.error ||
- (Array.isArray(prStatuses.value) && prStatuses.value.some((status) => !status.ok))) &&
- row ? (
+ <Text numberOfLines={2} style={styles.title}>{title}</Text>
+ <View style={styles.metadata}>
+ <TaskStatusMark status={status} />
+ <Text style={styles.note}>{t(`devices.companions.status.${status}`)}</Text>
+ {facts.map((part) => <Text key={part} numberOfLines={1} style={styles.note}>{`· ${part}`}</Text>)}
+ </View>
+ </Pressable>
+ {stale ? (
<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>
@@ -371,89 +356,37 @@ function CompanionTaskCard({
{row.lastError.replace(/^[A-Z_]+:\s*/, '')}
</Text>
) : null}
- <View style={styles.actions}>
+ {prs.length > 0 || active || error ? <View style={styles.actions}>
{prs.length > 0 ? (
<Pressable
accessibilityRole="button"
accessibilityState={prs.length > 1 ? { expanded: showPrs } : undefined}
- style={styles.touchTarget}
+ hitSlop={AUX_HIT_SLOP}
+ style={({ pressed }) => [styles.action, pressed && mobileInteractionStyles.pressed]}
onPress={() => (prs.length === 1 ? openPr(sessionPrUrl(prs[0])) : setShowPrs(!showPrs))}
>
- {({ pressed }) => (
- <View
- onLayout={rememberActionWidth}
- style={[
- styles.action,
- { minWidth: actionWidth },
- pressed && mobileInteractionStyles.pressed,
- ]}
- >
- {prs.length === 1 ? (
- prIcon(prs[0])
- ) : (
- <GitPullRequest size={iconSize.sm} color={colors.textPrimary} />
- )}
- <Text style={styles.actionLabel}>{t('devices.companions.viewPr')}</Text>
- </View>
- )}
- </Pressable>
- ) : null}
- {childSessionId ? (
- <Pressable
- accessibilityRole="button"
- style={styles.touchTarget}
- onPress={() =>
- push({
- pathname: '/sessions/[sessionId]',
- params: { deviceId, sessionId: childSessionId },
- })
- }
- >
- {({ pressed }) => (
- <View
- onLayout={rememberActionWidth}
- style={[
- styles.action,
- { minWidth: actionWidth },
- pressed && mobileInteractionStyles.pressed,
- ]}
- >
- <FileText size={iconSize.sm} color={colors.textPrimary} />
- <Text style={styles.actionLabel}>{t('devices.companions.openTask')}</Text>
- </View>
- )}
+ {prs.length === 1 ? prIcon(prs[0]) : <GitPullRequest size={iconSize.sm} color={colors.textPrimary} />}
+ <Text style={styles.actionLabel}>{t('devices.companions.viewPr')}</Text>
</Pressable>
) : null}
{active ? (
<Pressable
accessibilityRole="button"
disabled={!online || pending}
- style={[styles.touchTarget, (!online || pending) && styles.disabled]}
+ hitSlop={AUX_HIT_SLOP}
+ style={({ pressed }) => [styles.action, (!online || pending) && styles.disabled, pressed && mobileInteractionStyles.pressed]}
onPress={() => void stop()}
>
- {({ pressed }) => (
- <View
- onLayout={rememberActionWidth}
- style={[
- styles.action,
- { minWidth: actionWidth },
- pressed && mobileInteractionStyles.pressed,
- ]}
- >
- <Square size={iconSize.sm} color={colors.textPrimary} />
- <Text style={styles.actionLabel}>{t('devices.companions.stopTask')}</Text>
- </View>
- )}
+ <Square size={iconSize.sm} color={colors.textPrimary} />
+ <Text style={styles.actionLabel}>{t('devices.companions.stopTask')}</Text>
</Pressable>
) : null}
{error ? (
- <Pressable accessibilityRole="button" style={styles.touchTarget} onPress={refresh}>
- <View style={[styles.action, { minWidth: actionWidth }]}>
- <Text style={styles.actionLabel}>{t('devices.resources.retry')}</Text>
- </View>
+ <Pressable accessibilityRole="button" hitSlop={AUX_HIT_SLOP} style={({ pressed }) => [styles.action, pressed && mobileInteractionStyles.pressed]} onPress={refresh}>
+ <Text style={styles.actionLabel}>{t('devices.resources.retry')}</Text>
</Pressable>
) : null}
- </View>
+ </View> : null}
{showPrs && prs.length > 1 ? (
<View>
{prs.map((pr) => (
@@ -480,52 +413,70 @@ function CompanionTaskCard({
);
}
+/** K7: running breathes in Heart Orange, done is a check, failure a red alert; nothing else gets a color. */
+function TaskStatusMark({ status }: { status: string }) {
+ const { colors } = useTheme();
+ const styles = useThemedStyles(makeStyles);
+ const animate = useReduceMotionEnabled() === false;
+ const opacity = useRef(new Animated.Value(1)).current;
+ const running = status === 'running' || status === 'queued';
+ useEffect(() => {
+ if (!running || !animate) { opacity.setValue(1); return; }
+ const step = (toValue: number) => Animated.timing(opacity, { toValue, duration: 750, easing: Easing.inOut(Easing.ease), useNativeDriver: true });
+ const loop = Animated.loop(Animated.sequence([step(0.3), step(1)]));
+ loop.start();
+ return () => loop.stop();
+ }, [animate, opacity, running]);
+ if (running) return <Animated.View style={[styles.runningDot, { opacity }]} testID="companion.taskCard.running" />;
+ if (status === 'completed') return <CircleCheck size={iconSize.xs} color={colors.textSecondary} />;
+ if (status === 'failed' || status === 'timed-out') return <CircleAlert size={iconSize.xs} color={colors.statusError} />;
+ return null;
+}
+
const makeStyles = (colors: ThemeColors) =>
StyleSheet.create({
- privateTrace: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm },
- traceLine: { flex: 1, height: StyleSheet.hairlineWidth, backgroundColor: colors.border },
- traceTouchTarget: { minHeight: 44, maxWidth: '90%', justifyContent: 'center', flexShrink: 1 },
- traceAction: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs, borderWidth: StyleSheet.hairlineWidth,
- borderColor: colors.border, borderRadius: radius.pill, paddingHorizontal: spacing.sm, paddingVertical: spacing.xs },
+ // K10: a small pill under the reply text, left aligned with it.
+ privateTrace: { flexDirection: 'row', alignItems: 'center' },
+ traceTouchTarget: { maxWidth: '100%', flexShrink: 1 },
+ traceAction: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs + 2, minHeight: 32, borderWidth: StyleSheet.hairlineWidth,
+ borderColor: colors.border, borderRadius: radius.pill, backgroundColor: colors.surfaceElevated,
+ paddingLeft: spacing.xs + 2, paddingRight: spacing.sm + 2 },
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 },
+ runningDot: { width: 6, height: 6, borderRadius: radius.pill, backgroundColor: colors.statusAccent },
+ // K1 card shell.
card: {
marginVertical: spacing.sm,
- padding: spacing.md,
- gap: spacing.xs,
+ padding: spacing.lg,
+ gap: spacing.sm,
borderWidth: StyleSheet.hairlineWidth,
borderColor: colors.border,
backgroundColor: colors.surfaceElevated,
borderRadius: radius.container,
},
- header: { flexDirection: 'row', alignItems: 'flex-start', gap: spacing.sm },
- taskTitle: { flex: 1, minWidth: 0 },
- title: { color: colors.textPrimary, fontSize: typeScale.body, lineHeight: lineHeight.body, fontWeight: fontWeight.medium },
+ head: { gap: spacing.xs },
+ eyebrow: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs + 2, minHeight: lineHeight.caption },
+ eyebrowText: { flex: 1, minWidth: 0, color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, fontWeight: fontWeight.medium },
+ title: { marginTop: 2, color: colors.textPrimary, fontSize: typeScale.body, lineHeight: lineHeight.body, fontWeight: fontWeight.medium },
note: { color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },
actionLabel: { color: colors.textPrimary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },
// Paragraph errors follow errorText; red is reserved for the status dot.
error: { color: colors.errorText, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },
- metadata: { flexDirection: 'row', flexWrap: 'wrap', gap: spacing.sm },
- actions: { flexDirection: 'row', flexWrap: 'wrap', columnGap: spacing.sm },
- touchTarget: { minHeight: 44, justifyContent: 'center' },
+ metadata: { flexDirection: 'row', flexWrap: 'wrap', alignItems: 'center', columnGap: spacing.xs + 2 },
+ actions: { flexDirection: 'row', flexWrap: 'wrap', gap: spacing.sm, marginTop: spacing.xs },
+ // K6 auxiliary actions: 32 visible (hitSlop to 44), chip fill, no border.
action: {
minHeight: 32,
- minWidth: 104,
paddingHorizontal: spacing.md,
- paddingVertical: spacing.xs,
- gap: spacing.xs,
+ gap: spacing.xs + 2,
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
- borderWidth: StyleSheet.hairlineWidth,
- borderColor: colors.border,
borderRadius: radius.pill,
- backgroundColor: colors.surfaceElevated,
+ backgroundColor: colors.surfaceChip,
},
prOption: { minHeight: 44, justifyContent: 'center' },
disabled: { opacity: 0.5 },
diff --git a/apps/mobile/src/session/CompanionNavigationDrawer.tsx b/apps/mobile/src/session/CompanionNavigationDrawer.tsx
deleted file mode 100644
index 2fd718dfe0..0000000000
--- a/apps/mobile/src/session/CompanionNavigationDrawer.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-import { useCallback, useEffect, useRef, useState, useSyncExternalStore } from 'react';
-import { Alert } from 'react-native';
-import { useRouter } from 'expo-router';
-import { useTranslation } from 'react-i18next';
-import { useAuth } from '@/auth/AuthContext';
-import { formatRemoteError } from '@/device-link/remoteStatus';
-import { useGuardedPush } from '@/utils/useGuardedPush';
-import { AccountSwitcherSheet } from './AccountSwitcherSheet';
-import { HomeChromeDrawer } from './HomeChromeDrawer';
-import { remoteSessionStore } from './remoteSessionStore';
-import { useTeammateNavigation } from './useTeammateNavigation';
-
-/** Reuse the home drawer and account boundary without walking back through earlier chats. */
-export function CompanionNavigationDrawer({ open, onClose, onSearch }: { open: boolean; onClose(): void; onSearch(): void }) {
- const auth = useAuth();
- const { t } = useTranslation();
- const navigation = useTeammateNavigation();
- const push = useGuardedPush();
- const router = useRouter();
- const [accounts, setAccounts] = useState(false);
- const [loggingOut, setLoggingOut] = useState(false);
- const pending = useRef<(() => void) | null>(null);
- const current = useRef<number | null>(auth.accountGeneration); current.current = auth.accountGeneration;
- useEffect(() => () => { current.current = null; pending.current = null; }, []);
- const hasRunningTasks = useSyncExternalStore(
- // 账号切换与抽屉里的退出确认共用;两者都关着时不订阅。
- useCallback(listener => accounts || open ? remoteSessionStore.subscribe(listener) : () => {}, [accounts, open]),
- useCallback(() => (accounts || open) && remoteSessionStore.getSessions().some(session => remoteSessionStore.isSessionRunning(session.id)), [accounts, open]),
- );
- const afterClose = (action: () => void) => { const owner = auth.accountGeneration; pending.current = () => { if (current.current === owner) action(); }; onClose(); };
- const finish = () => { const action = pending.current; pending.current = null; action?.(); };
- return <>
- <HomeChromeDrawer open={open} user={auth.user} loggingOut={loggingOut} hasRunningTasks={hasRunningTasks} mode="teammates"
- onClose={() => { pending.current = null; onClose(); }} onClosed={finish}
- onModeChange={mode => afterClose(() => { void navigation.chooseMode(mode); })}
- onOpenSearch={() => afterClose(onSearch)} onOpenDevices={() => afterClose(() => push('/devices/manage'))}
- onOpenSettings={() => afterClose(() => push('/settings'))} onOpenAccounts={() => afterClose(() => setAccounts(true))}
- // 抽屉内部已 confirmLogout;成功后与设置页一致直接回登录页。
- onLogout={() => {
- if (loggingOut) return;
- setLoggingOut(true); const owner = auth.accountGeneration;
- void auth.logout().then(() => { router.replace('/login'); }, cause => { if (current.current === owner) Alert.alert(t('devices.list.alert.actionFailed'), formatRemoteError(cause)); })
- .finally(() => { if (current.current === owner) setLoggingOut(false); });
- }} />
- <AccountSwitcherSheet visible={accounts} hasRunningTasks={hasRunningTasks} onClose={() => { pending.current = null; setAccounts(false); }} onClosed={finish}
- onAddAccount={() => { const owner = auth.accountGeneration; pending.current = () => { if (current.current === owner) { void auth.beginAddAccount(); push('/add-account'); } }; setAccounts(false); }} />
- </>;
-}
diff --git a/apps/mobile/src/session/CompanionPresenceRing.tsx b/apps/mobile/src/session/CompanionPresenceRing.tsx
new file mode 100644
index 0000000000..8d2914491b
--- /dev/null
+++ b/apps/mobile/src/session/CompanionPresenceRing.tsx
@@ -0,0 +1,53 @@
+import { useEffect, useRef, useState } from 'react';
+import { Animated, Easing, StyleSheet } from 'react-native';
+import { useReduceMotionEnabled } from '@/hooks/useReduceMotion';
+import { motionDuration, radius, useTheme } from '@/theme';
+
+/** Opacity range and half-period of the running breath; the task row's MobileVendorIcon uses the same values. */
+const BREATH_MIN = 0.3;
+const BREATH_HALF_MS = 750;
+const REDUCED_OPACITY = 0.8;
+
+/**
+ * 伙伴「在做事」的呼吸环:头像外一圈 statusAccent 描边,透明度在 0.3 与 1 之间呼吸(与任务行运行中
+ * 图标同一组参数)。结束时 150ms 淡出后卸载;减弱动效时静止在 0.8,结束时直接移除。只画环,不占布局:
+ * 调用方把它放在 position: relative 的头像容器里,`gap` 是环内缘到头像的距离。
+ */
+export function CompanionPresenceRing({ active, gap = 2, width = 2 }: { active: boolean; gap?: number; width?: number }) {
+ const { colors } = useTheme();
+ const reduceMotion = useReduceMotionEnabled();
+ const opacity = useRef(new Animated.Value(active ? BREATH_MIN : 0)).current;
+ const [mounted, setMounted] = useState(active);
+ const mountedRef = useRef(active); mountedRef.current = mounted;
+
+ useEffect(() => {
+ opacity.stopAnimation();
+ if (!active) {
+ if (!mountedRef.current) return;
+ if (reduceMotion !== false) { setMounted(false); return; }
+ const fade = Animated.timing(opacity, { toValue: 0, duration: motionDuration.fast, easing: Easing.in(Easing.ease), useNativeDriver: true });
+ fade.start(({ finished }) => { if (finished) setMounted(false); });
+ return () => fade.stop();
+ }
+ setMounted(true);
+ if (reduceMotion !== false) {
+ opacity.setValue(REDUCED_OPACITY);
+ return;
+ }
+ opacity.setValue(BREATH_MIN);
+ const breathe = (toValue: number) => Animated.timing(opacity, { toValue, duration: BREATH_HALF_MS, easing: Easing.inOut(Easing.ease), useNativeDriver: true });
+ const loop = Animated.loop(Animated.sequence([breathe(1), breathe(BREATH_MIN)]));
+ loop.start();
+ return () => loop.stop();
+ }, [active, opacity, reduceMotion]);
+
+ if (!mounted) return null;
+ const inset = -(gap + width);
+ return <Animated.View pointerEvents="none" accessibilityElementsHidden importantForAccessibility="no-hide-descendants"
+ testID="companion.presenceRing"
+ style={[styles.ring, { top: inset, right: inset, bottom: inset, left: inset, borderWidth: width, borderColor: colors.statusAccent, opacity }]} />;
+}
+
+const styles = StyleSheet.create({
+ ring: { position: 'absolute', borderRadius: radius.pill },
+});
diff --git a/apps/mobile/src/session/CompanionTaskResultCard.tsx b/apps/mobile/src/session/CompanionTaskResultCard.tsx
index d7c4550518..1a7c55c66e 100644
--- a/apps/mobile/src/session/CompanionTaskResultCard.tsx
+++ b/apps/mobile/src/session/CompanionTaskResultCard.tsx
@@ -1,15 +1,17 @@
-import { useContext, useEffect, useMemo, useState, type ReactNode } from 'react';
-import { Pressable, View, StyleSheet } from 'react-native';
+import { useContext, useEffect, useMemo, useRef, useState, type ReactNode } from 'react';
+import { Animated, Easing, Pressable, View, StyleSheet } from 'react-native';
import { useTranslation } from 'react-i18next';
-import { FileText } from 'lucide-react-native';
+import { ChevronDown, CircleAlert, CircleCheck, FileText } from 'lucide-react-native';
import type { BotCollaborationMeta } from '@cindy/maker-shared/botCollaboration';
import type { BotDelegationListResult } from '@cindy/maker-shared/botDelegation';
import { useRemoteCompanionQuery } from './useRemoteCompanionQuery';
import { Text } from '@/components/AppText';
import { mobileInteractionStyles } from '@/components/mobileInteractionStyles';
import { useGuardedPush } from '@/utils/useGuardedPush';
-import { useTheme, useThemedStyles, type ThemeColors } from '@/theme';
-import { fontWeight, iconSize, lineHeight, radius, spacing, typeScale } from '@/theme/tokens';
+import { motionDuration, motionEasing, useTheme, useThemedStyles, type ThemeColors } from '@/theme';
+import { useReduceMotionEnabled } from '@/hooks/useReduceMotion';
+import { parseMobileMarkdownInlines } from './messageMarkdown';
+import { fontWeight, iconSize, iconStroke, lineHeight, 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';
@@ -111,6 +113,8 @@ export function CompanionTaskResultCard({ meta, deviceId, parentSessionId, rende
}) {
const [expanded, setExpanded] = useState(false);
const [showError, setShowError] = useState(false);
+ const animate = useReduceMotionEnabled() === false;
+ const turn = useRef(new Animated.Value(0)).current;
const { t } = useTranslation();
const { colors } = useTheme();
const styles = useThemedStyles(makeStyles);
@@ -123,22 +127,35 @@ export function CompanionTaskResultCard({ meta, deviceId, parentSessionId, rende
? value.delegations.find((item) => item.id === meta.delegationId) : undefined;
if (!result) return null;
const title = result.title?.trim() || row?.title?.trim() || meta.objective.trim().split('\n')[0] || t('devices.companions.backgroundTask');
- const statusColor = result.status === 'completed' ? colors.statusDone
- : result.status === 'cancelled' ? colors.textTertiary : colors.statusError;
+ const preview = result.text ? parseMobileMarkdownInlines(result.text).map((inline) => inline.type === 'image' ? inline.alt : inline.text)
+ .join('').replace(/\s+/g, ' ').trim() : '';
+ const toggle = () => {
+ const next = !expanded;
+ setExpanded(next);
+ if (animate) Animated.timing(turn, { toValue: next ? 1 : 0, duration: motionDuration.base, easing: Easing.bezier(...motionEasing.move), useNativeDriver: true }).start();
+ else turn.setValue(next ? 1 : 0);
+ };
+ const rotate = turn.interpolate({ inputRange: [0, 1], outputRange: ['0deg', '180deg'] });
return <View style={[styles.card, attached && styles.attached]} testID="companion.taskResult">
- <View style={styles.header}>
- <Text numberOfLines={2} style={styles.title}>{title}</Text>
- <View style={styles.status}>
- <View style={[styles.statusDot, { backgroundColor: statusColor }]} />
- <Text style={styles.statusLabel}>{t(`devices.companions.status.${result.status}`)}</Text>
+ {/* K6: the whole card opens and closes the result; no separate 「查看结果」 button. */}
+ <Pressable accessibilityRole="button" accessibilityState={{ expanded }} accessibilityLabel={`${t('devices.companions.taskResult')}, ${title}`}
+ accessibilityHint={t(expanded ? 'devices.companions.collapseResult' : 'devices.companions.viewResult')}
+ onPress={toggle} style={({ pressed }) => [styles.head, pressed && mobileInteractionStyles.pressed]} testID="companion.taskResult.toggle">
+ <View style={styles.eyebrow}>
+ <FileText size={iconSize.sm} color={colors.textSecondary} strokeWidth={iconStroke.regular} />
+ <Text style={styles.eyebrowText}>{t('devices.companions.taskResult')}</Text>
+ <Animated.View style={[styles.chevron, { transform: [{ rotate }] }]}>
+ <ChevronDown size={iconSize.md} color={colors.textTertiary} strokeWidth={iconStroke.regular} />
+ </Animated.View>
</View>
- </View>
- <Pressable accessibilityRole="button" accessibilityState={{ expanded }} onPress={() => setExpanded(!expanded)}
- style={({ pressed }) => [styles.touchTarget, pressed && mobileInteractionStyles.pressed]}>
- <View style={styles.action}>
- <FileText size={iconSize.sm} color={colors.textPrimary} />
- <Text style={styles.view}>{t('devices.companions.viewResult')}</Text>
+ <Text numberOfLines={2} style={styles.title}>{title}</Text>
+ <View style={styles.meta}>
+ {result.status === 'completed'
+ ? <CircleCheck size={iconSize.xs} color={colors.textSecondary} strokeWidth={iconStroke.regular} />
+ : result.status === 'cancelled' ? null : <CircleAlert size={iconSize.xs} color={colors.statusError} strokeWidth={iconStroke.regular} />}
+ <Text style={styles.metaText}>{t(`devices.companions.status.${result.status}`)}</Text>
</View>
+ {!expanded && preview ? <Text numberOfLines={3} style={styles.preview}>{preview}</Text> : null}
</Pressable>
{expanded && <View style={styles.content}>
{result.text ? renderMarkdown
@@ -161,22 +178,22 @@ export function CompanionTaskResultCard({ meta, deviceId, parentSessionId, rende
}
const makeStyles = (colors: ThemeColors) => StyleSheet.create({
+ // K1 card shell: raised surface, hairline border, radius 12, padding 16.
card: { marginVertical: spacing.sm, borderWidth: StyleSheet.hairlineWidth, borderColor: colors.border,
- backgroundColor: colors.surfaceElevated, borderRadius: radius.container, padding: spacing.md, gap: spacing.xs },
- attached: { width: '100%', maxWidth: 440, alignSelf: 'flex-start', marginVertical: 0, padding: spacing.sm },
- header: { flexDirection: 'row', alignItems: 'flex-start', gap: spacing.sm },
- status: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs, flexShrink: 0 },
- statusDot: { width: 6, height: 6, borderRadius: radius.pill },
- statusLabel: { fontSize: typeScale.caption, lineHeight: lineHeight.caption, color: colors.textTertiary },
- touchTarget: { minHeight: 44, justifyContent: 'center', alignSelf: 'flex-start', maxWidth: '100%' },
- action: { minHeight: 32, minWidth: 104, paddingHorizontal: spacing.md, paddingVertical: spacing.xs,
- gap: spacing.xs, flexDirection: 'row', alignItems: 'center', justifyContent: 'center',
- borderWidth: StyleSheet.hairlineWidth, borderColor: colors.border, borderRadius: radius.pill },
- title: { flex: 1, minWidth: 0, fontSize: typeScale.subtitle, lineHeight: lineHeight.subtitle, fontWeight: fontWeight.medium, color: colors.textPrimary },
+ backgroundColor: colors.surfaceElevated, borderRadius: radius.container, padding: spacing.lg },
+ // Hung under the teammate's final reply (the result belongs to that answer): full column width, no outer gap.
+ attached: { width: '100%', maxWidth: 440, alignSelf: 'flex-start', marginVertical: 0, padding: spacing.md },
+ head: { gap: spacing.xs },
+ eyebrow: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs + 2, minHeight: lineHeight.caption },
+ eyebrowText: { flex: 1, minWidth: 0, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, fontWeight: fontWeight.medium, color: colors.textSecondary },
+ chevron: { flexShrink: 0 },
+ title: { marginTop: 2, fontSize: typeScale.body, lineHeight: lineHeight.body, fontWeight: fontWeight.medium, color: colors.textPrimary },
+ meta: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs },
+ metaText: { fontSize: typeScale.footnote, lineHeight: lineHeight.caption, color: colors.textSecondary },
+ preview: { marginTop: spacing.xs, fontSize: typeScale.bodySmall, lineHeight: lineHeight.bodySmall, color: colors.textPrimary },
secondary: { flexShrink: 0, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, color: colors.textSecondary },
- view: { flexShrink: 1, fontSize: typeScale.body, lineHeight: lineHeight.body, fontWeight: fontWeight.medium, color: colors.textPrimary },
body: { fontSize: typeScale.body, lineHeight: lineHeight.body, color: colors.textPrimary },
- content: { paddingTop: spacing.md, gap: spacing.sm,
+ content: { marginTop: spacing.md, paddingTop: 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, lineHeight: lineHeight.body, color: colors.textPrimary },
diff --git a/apps/mobile/src/session/CompanionWorkingStatus.tsx b/apps/mobile/src/session/CompanionWorkingStatus.tsx
index 2f711dad08..9d2906c27f 100644
--- a/apps/mobile/src/session/CompanionWorkingStatus.tsx
+++ b/apps/mobile/src/session/CompanionWorkingStatus.tsx
@@ -1,6 +1,6 @@
import { useCompanionGenerationCopy } from './useCompanionGenerationCopy';
import { useEffect, useMemo, useState, useSyncExternalStore, type ReactNode } from 'react';
-import { ActivityIndicator, StyleSheet, View } from 'react-native';
+import { StyleSheet, View } from 'react-native';
import { useTranslation } from 'react-i18next';
import { isCompactingWorkingStatus, readWorkingPhase } from '@cindy/maker-shared';
import { useAuth } from '@/auth/AuthContext';
@@ -12,7 +12,9 @@ import {
remoteResourceCacheRevision,
subscribeRemoteResourceCache,
} from '@/device-link/remoteResourceCache';
-import { spacing, typeScale, lineHeight, useTheme, useThemedStyles, type ThemeColors } from '@/theme';
+import { spacing, typeScale, lineHeight, useThemedStyles, type ThemeColors } from '@/theme';
+import { CompanionPresenceRing } from './CompanionPresenceRing';
+import { ThinkingDots } from './ThinkingDots';
import { remoteSessionStore, type RemoteSessionRunStatus } from './remoteSessionStore';
import { companionWorkingPhase } from './companionWorkingPhase';
import { WorkingStatusText } from './WorkingStatusText';
@@ -71,21 +73,23 @@ export function useCompanionWorkingLabel({ sessionId, deviceId, botId, active, m
/** 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. */
+/**
+ * Composer-owned live status (Desktop BotWorkingStatus): the avatar breathes in Heart Orange (the
+ * list's running ring), three dots wave where the system spinner used to be, and the copy is paced.
+ */
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">
- {avatar ? <View style={styles.avatar}>{avatar}</View> : null}
- <ActivityIndicator size="small" color={colors.textTertiary} />
+ {avatar ? <View style={styles.avatar}>{avatar}<CompanionPresenceRing active width={1.5} /></View> : null}
+ <ThinkingDots />
<WorkingStatusText text={label} style={styles.text} />
</View>;
}
const makeStyles = (colors: ThemeColors) => StyleSheet.create({
row: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm, minHeight: 32, paddingHorizontal: spacing.xs },
- avatar: { flexShrink: 0 },
+ avatar: { flexShrink: 0, width: COMPANION_STATUS_AVATAR_SIZE, height: COMPANION_STATUS_AVATAR_SIZE },
text: { color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },
});
diff --git a/apps/mobile/src/session/HomeEntryProvider.tsx b/apps/mobile/src/session/HomeEntryProvider.tsx
index 0707ecbe57..6eeeea01fc 100644
--- a/apps/mobile/src/session/HomeEntryProvider.tsx
+++ b/apps/mobile/src/session/HomeEntryProvider.tsx
@@ -3,6 +3,9 @@ import { useGlobalSearchParams, usePathname } from 'expo-router';
import { useAuth } from '@/auth/AuthContext';
import { getMobileAuthOwner, isMobileAuthOwnerCurrent, subscribeMobileAuthOwner } from '@/auth/authOwnerGeneration';
import { homeEntryForRoute, readHomeEntry, saveHomeEntry, type CompanionListHref } from './homeEntryPreference';
+import { readHomeNavigationPreferences, type HomeNavigationPreferences } from './homeViewPreferenceStore';
+import { startBoundedStartupRead } from './mobileHomeStartup';
+import { homeNavigationOwner } from './useHomeMode';
const HomeEntryContext = createContext<{ ready: boolean; href: CompanionListHref | null }>({ ready: false, href: null });
export const useHomeEntry = () => useContext(HomeEntryContext);
@@ -33,9 +36,17 @@ export function HomeEntryProvider({ children }: { children: ReactNode }) {
if (!auth.initialized || !auth.isAuthenticated || !owner.accountKey) return;
let cancelled = false;
const initialRoute = route.current;
- void readHomeEntry(owner.accountKey, owner.accountId).then((destination) => {
+ void Promise.all([
+ readHomeEntry(owner.accountKey, owner.accountId),
+ // Same 2s bound as useHomeMode's read of this preference: a stalled read must not hold the splash.
+ startBoundedStartupRead<HomeNavigationPreferences>(readHomeNavigationPreferences(homeNavigationOwner(auth.user)), {})
+ .initial.then((read) => read.value),
+ ]).then(([destination, navigation]) => {
if (cancelled || !isMobileAuthOwnerCurrent(owner)) return;
- setSnapshot({ owner, href: initialRoute.pathname === '/' && route.current === initialRoute ? destination : null });
+ // In teammate mode the home already is the teammate list: restoring the older collection route
+ // would stack a second list on top, whose Back then runs into the home's last-teammate restore.
+ const restored = navigation.mode === 'teammates' ? null : destination;
+ setSnapshot({ owner, href: initialRoute.pathname === '/' && route.current === initialRoute ? restored : null });
});
return () => { cancelled = true; };
// Route changes deliberately do not restart hydration: explicit navigation wins.
diff --git a/apps/mobile/src/session/HomeModeSwitch.tsx b/apps/mobile/src/session/HomeModeSwitch.tsx
index 1a123b2397..60605f6a26 100644
--- a/apps/mobile/src/session/HomeModeSwitch.tsx
+++ b/apps/mobile/src/session/HomeModeSwitch.tsx
@@ -15,7 +15,8 @@ export function HomeModeSwitch({ mode, onModeChange }: { mode: HomeMode; onModeC
<View style={styles.switch} testID="home.modeSwitch">
{(['tasks', 'teammates'] as const).map((value) => (
<MainWindowOptionButton key={value} accessibilityRole="tab" density="default" variant="segmented"
- label={`${t(value === 'tasks' ? 'devices.companions.tasks' : 'devices.companions.title')}${counts[value] > 0 ? ` · ${counts[value] > 99 ? '99+' : counts[value]}` : ''}`}
+ label={t(value === 'tasks' ? 'devices.companions.tasks' : 'devices.companions.title')}
+ badge={counts[value] > 0 ? (counts[value] > 99 ? '99+' : String(counts[value])) : undefined}
accessibilityLabel={`${t(value === 'tasks' ? 'devices.companions.tasks' : 'devices.companions.title')}${counts[value] > 0 ? `, ${t(value === 'tasks' ? 'devices.companions.taskAttentionCount' : 'devices.companions.unreadChatCount', { count: counts[value] })}` : ''}`}
onPress={() => onModeChange(value)} selected={value === mode} style={styles.option}
testID={`home.mode.${value}`} />
diff --git a/apps/mobile/src/session/HomeSurface.tsx b/apps/mobile/src/session/HomeSurface.tsx
index 3bc823e166..af4dfa42d5 100644
--- a/apps/mobile/src/session/HomeSurface.tsx
+++ b/apps/mobile/src/session/HomeSurface.tsx
@@ -24,7 +24,6 @@ import {
Animated,
AppState,
Platform,
- Easing,
Modal,
type NativeScrollEvent,
type NativeSyntheticEvent,
@@ -54,7 +53,6 @@ import {
FolderOpen,
FileText,
Hammer,
- LoaderCircle,
Menu,
Monitor,
MessagesSquare,
@@ -256,6 +254,7 @@ import {
} from '@/session/scheduleIndex';
import { createScheduleIndexDeferRegistry } from '@/session/scheduleIndexDefer';
import { latestMobileSessionRow, resolveMobileSessionRowStatus } from '@/session/sessionRightStatus';
+import { SessionRightSpinner } from '@/session/SessionRightSpinner';
import { AutomationTimerIcon } from '@/session/AutomationTimerIcon';
import { RenameSessionModal } from '@/session/RenameSessionModal';
import { SessionOptionsPresenter } from '@/session/SessionOptionsExpoSheet';
@@ -4433,8 +4432,6 @@ function automationGroupPreview(item: RemoteSessionListItem, sessionCount: numbe
// 状态提醒点已移到行右侧(替代时间位,与桌面一致),行首图标只保留 vendor 标识 +
// running 呼吸 + 草稿铅笔,不再叠角标点。
-/** 行右侧 running spinner —— 与桌面 SessionItem 右槽同款:LoaderCircle(即桌面的
- * lucide Loader2)圆弧图标,1s linear 无限旋转(Tailwind animate-spin 同参数)。 */
/**
* 行右侧相对时间标签(「刚刚 / N 分钟前」)的独家保鲜叶子:行主体 memo 化后不再逐
* emit 重渲染,时间标签失去偶然保鲜会无限期冻结(review P1);而把分钟订阅挂在行
@@ -4450,41 +4447,6 @@ function SessionRelativeTime({ lastActivityAt, style }: { lastActivityAt: string
);
}
-function SessionRightSpinner({ testID }: { testID?: string }) {
- const { colors } = useTheme();
- const { t } = useTranslation();
- const spin = useRef(new Animated.Value(0)).current;
- // 常驻循环:减弱动态效果(含首帧未知)下静止,只显示静态图标。
- const reduceMotion = useReduceMotionEnabled();
- useEffect(() => {
- if (reduceMotion !== false) return;
- const loop = Animated.loop(
- Animated.timing(spin, {
- duration: motionDuration.spinnerCycle,
- easing: Easing.linear,
- toValue: 1,
- useNativeDriver: true,
- isInteraction: false,
- }),
- );
- loop.start();
- return () => {
- loop.stop();
- spin.setValue(0);
- };
- }, [reduceMotion, spin]);
- const rotate = spin.interpolate({ inputRange: [0, 1], outputRange: ['0deg', '360deg'] });
- return (
- <Animated.View
- accessibilityLabel={t('devices.list.a11y.running')}
- style={{ transform: [{ rotate }] }}
- testID={testID}
- >
- <LoaderCircle color={colors.textTertiary} size={iconSize.md} strokeWidth={iconStroke.regular} />
- </Animated.View>
- );
-}
-
/** 该首页行是否以「块」呈现(上下全宽线):项目组,或自动化组行(顶层 asBlock)。 */
function isBlockHomeRow(row: HomeRow | undefined): boolean {
if (!row) return false;
diff --git a/apps/mobile/src/session/InteractionPanel.tsx b/apps/mobile/src/session/InteractionPanel.tsx
index 6916f16f6f..24d9b0e9c2 100644
--- a/apps/mobile/src/session/InteractionPanel.tsx
+++ b/apps/mobile/src/session/InteractionPanel.tsx
@@ -20,6 +20,7 @@ import {
import {
Image,
Pressable,
+ type PressableProps,
ScrollView,
StyleSheet,
View,
@@ -118,17 +119,40 @@ const CompanionInteractionContext = createContext(false);
export interface CompanionInteractionIdentity { name: string; avatar?: ReactNode }
const CompanionIdentityContext = createContext<CompanionInteractionIdentity | null>(null);
-export function InteractionPanel({ companionIdentity, ...props }: Parameters<typeof InteractionPanelContent>[0] & {
+export function InteractionPanel({ companionIdentity, hangFromAvatar = false, ...props }: Parameters<typeof InteractionPanelContent>[0] & {
companion?: boolean;
companionIdentity?: CompanionInteractionIdentity | null;
+ /**
+ * Teammate chat timeline: the card hangs from the companion's portrait like a reply (avatar 28 + gap 10),
+ * so the card itself no longer repeats who is asking.
+ */
+ hangFromAvatar?: boolean;
}) {
+ const identity = props.companion === true && companionIdentity?.name ? companionIdentity : null;
+ const content = <InteractionPanelContent {...props} />;
return <CompanionInteractionContext.Provider value={props.companion === true}>
- <CompanionIdentityContext.Provider value={props.companion === true && companionIdentity?.name ? companionIdentity : null}>
- <InteractionPanelContent {...props} />
+ <CompanionIdentityContext.Provider value={identity}>
+ <CompanionHungContext.Provider value={hangFromAvatar && !!identity?.avatar}>
+ {hangFromAvatar && identity?.avatar ? <CompanionHungRow avatar={identity.avatar}>{content}</CompanionHungRow> : content}
+ </CompanionHungContext.Provider>
</CompanionIdentityContext.Provider>
</CompanionInteractionContext.Provider>;
}
+/** Whether the card already hangs from the companion's portrait (the card then skips its own requester row). */
+const CompanionHungContext = createContext(false);
+/** Visible height of companion card buttons; hitSlop brings the touch target to 44. */
+const COMPANION_BUTTON_HEIGHT = 38;
+const COMPANION_BUTTON_HIT_SLOP = { top: 3, bottom: 3 } as const;
+
+function CompanionHungRow({ avatar, children }: { avatar: ReactNode; children: ReactNode }) {
+ const styles = useInteractionStyles();
+ return <View style={styles.companionHungRow} testID="interaction.companionRow">
+ <View style={styles.companionHungAvatar}>{avatar}</View>
+ <View style={styles.companionHungContent}>{children}</View>
+ </View>;
+}
+
function useInteractionStyles() {
return useThemedStyles<InteractionStyles>(useContext(CompanionInteractionContext) ? makeCompanionStyles : makeStyles);
}
@@ -351,7 +375,9 @@ function resolveActionCount(kind: string): number {
type InteractionStyles = ReturnType<typeof makeStyles> | ReturnType<typeof makeCompanionStyles>;
-function cardStyle(styles: InteractionStyles, touchLayout: InteractionTouchLayout): StyleProp<ViewStyle> {
+function cardStyle(styles: InteractionStyles, touchLayout: InteractionTouchLayout, companion = false): StyleProp<ViewStyle> {
+ // Teammate cards (K1): one fixed padding and rhythm, independent of the task chat's density table.
+ if (companion) return [styles.card, { gap: spacing.sm, padding: spacing.lg }];
return [
styles.card,
{
@@ -361,7 +387,9 @@ function cardStyle(styles: InteractionStyles, touchLayout: InteractionTouchLayou
];
}
-function actionsStyle(styles: InteractionStyles, touchLayout: InteractionTouchLayout): StyleProp<ViewStyle> {
+function actionsStyle(styles: InteractionStyles, touchLayout: InteractionTouchLayout, companion = false): StyleProp<ViewStyle> {
+ // Teammate cards (K5): equal-width buttons; a full-width primary takes its own row.
+ if (companion) return [styles.actions, { gap: spacing.sm, justifyContent: 'flex-start', marginTop: spacing.sm }];
return [
styles.actions,
{
@@ -370,10 +398,33 @@ function actionsStyle(styles: InteractionStyles, touchLayout: InteractionTouchLa
];
}
+/**
+ * K5 on teammate cards: buttons share one row at equal widths. If any label would wrap at that width
+ * (long English / Japanese copy on a narrow card), the whole group switches once to one full-width
+ * button per row, so no pill ever grows to two lines.
+ */
+const CompanionActionsStackContext = createContext<{ stacked: boolean; onWrap(): void } | null>(null);
+// A width, not a percentage flexBasis: Fabric does not re-lay out a basis that changes from 0 to '100%'.
+const STACKED_COMPANION_BUTTON = { flexBasis: 'auto', width: '100%' } as const;
+
+function InteractionActions({ touchLayout, children }: { touchLayout: InteractionTouchLayout; children: ReactNode }) {
+ const styles = useInteractionStyles();
+ const companion = useContext(CompanionInteractionContext);
+ const [stacked, setStacked] = useState(false);
+ const stack = useMemo(() => ({ stacked, onWrap: () => setStacked(true) }), [stacked]);
+ if (!companion) return <View style={actionsStyle(styles, touchLayout)}>{children}</View>;
+ return <CompanionActionsStackContext.Provider value={stack}>
+ <View style={actionsStyle(styles, touchLayout, true)} testID={stacked ? 'interaction.actions.stacked' : undefined}>{children}</View>
+ </CompanionActionsStackContext.Provider>;
+}
+
function resolveButtonLayoutStyle(
touchLayout: InteractionTouchLayout,
variant: 'primary' | 'secondary' | 'inline',
+ companion = false,
+ fullWidth = false,
): StyleProp<ViewStyle> {
+ if (companion) return { minHeight: COMPANION_BUTTON_HEIGHT, flexGrow: 1, flexBasis: fullWidth ? '100%' : 0 };
return {
minHeight: touchLayout.actionButtonMinHeight,
minWidth: variant === 'inline' ? touchLayout.inlineButtonMinWidth : touchLayout.actionButtonMinWidth,
@@ -399,6 +450,8 @@ function PendingTaskHeader({
const nextItem = presentation.items.length > 1
? presentation.items[(activeIndex + 1) % presentation.items.length]
: null;
+ // Teammate chats: the card's own eyebrow says what is pending; keep only the queue and collapse controls.
+ if (companion && presentation.totalCount <= 1 && !onCollapse) return null;
return (
<View style={styles.taskHeaderWrap} testID="interaction.panelHeader">
<View
@@ -412,7 +465,7 @@ function PendingTaskHeader({
>
<View style={styles.taskHeaderText}>
{!companion && <Text style={styles.taskEyebrow}>{t('interaction.panel.pendingRequests')}</Text>}
- <Text numberOfLines={1} style={styles.taskTitle}>{companion ? t('interaction.panel.pendingRequests') : presentation.title}</Text>
+ {!companion && <Text numberOfLines={1} style={styles.taskTitle}>{presentation.title}</Text>}
</View>
{presentation.totalCount > 1 ? (
<InteractionTouchButton
@@ -653,23 +706,63 @@ function PermissionCard({
onDecision(decision);
};
+ const denyButton = (
+ <ResolveButton
+ key="deny"
+ accessibilityLabel={t('interaction.permission.denyAccessibility')}
+ busy={busy}
+ label={t('interaction.permission.deny')}
+ onPress={() => onDecision(buildPermissionDecision('deny', { reason: 'User denied' }))}
+ requestId={requestId}
+ touchStyle={resolveButtonLayoutStyle(touchLayout, 'secondary', companion)}
+ testID="interaction.permission.denyButton"
+ variant="secondary"
+ />
+ );
+ const alwaysButton = permissionState.canShowAlwaysAllow ? (
+ <ResolveButton
+ key="always"
+ accessibilityLabel={t('interaction.permission.alwaysAllowAccessibility')}
+ armed={armedDecision === 'always-allow'}
+ busy={busy}
+ confirmLabel={t('interaction.permission.alwaysAllowConfirm')}
+ label={t('interaction.permission.alwaysAllow')}
+ onPress={() => requestDecision(
+ 'always-allow',
+ buildPermissionDecision('allow', { permissionUpdates: suggestions }),
+ )}
+ requestId={requestId}
+ touchStyle={resolveButtonLayoutStyle(touchLayout, 'secondary', companion)}
+ testID="interaction.permission.alwaysAllowButton"
+ variant="secondary"
+ />
+ ) : null;
+ const allowButton = (
+ <ResolveButton
+ key="allow"
+ accessibilityLabel={t('interaction.permission.allowOnceAccessibility')}
+ armed={armedDecision === 'allow-once'}
+ busy={busy}
+ confirmLabel={t('interaction.permission.allowOnceConfirm')}
+ label={t('interaction.permission.allowOnce')}
+ onPress={() => requestDecision('allow-once', buildPermissionDecision('allow'))}
+ requestId={requestId}
+ // K5: with three choices the primary takes its own full-width row on top.
+ touchStyle={resolveButtonLayoutStyle(touchLayout, 'primary', companion, companion && !!alwaysButton)}
+ testID="interaction.permission.allowOnceButton"
+ variant="primary"
+ />
+ );
return (
- <View style={cardStyle(styles, touchLayout)} testID="interaction.permission.card">
- {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}>
+ <View style={cardStyle(styles, touchLayout, companion)} testID="interaction.permission.card">
+ {companion ? <>
+ {/* K2 / K3: kind as the eyebrow, then what it will do; who asks is the portrait the card hangs from. */}
+ <View style={styles.companionCaption} testID="interaction.permission.requester">
<ShieldCheck size={iconSize.sm} color={colors.textSecondary} strokeWidth={iconStroke.regular} />
- <Text style={styles.kind}>{t('interaction.kinds.permission.label')}</Text>
+ <Text style={styles.kind}>{permissionState.title}</Text>
</View>
- <Text style={styles.cardTitle}>{permissionState.title}</Text>
+ <Text style={styles.cardTitle}>{presentation.description
+ || (companionIdentity ? t('interaction.companion.permissionRequest', { name: companionIdentity.name }) : permissionState.title)}</Text>
</> : <View style={styles.compactCardHeader}>
<Text style={styles.kind}>{t('interaction.permission.kind')}</Text>
<Text numberOfLines={1} style={styles.compactCardTitle}>{permissionState.title}</Text>
@@ -681,47 +774,9 @@ function PermissionCard({
riskWarningText={permissionState.riskWarningText}
touchLayout={touchLayout}
/>
- <View style={actionsStyle(styles, touchLayout)}>
- <ResolveButton
- accessibilityLabel={t('interaction.permission.denyAccessibility')}
- busy={busy}
- label={t('interaction.permission.deny')}
- onPress={() => onDecision(buildPermissionDecision('deny', { reason: 'User denied' }))}
- requestId={requestId}
- touchStyle={resolveButtonLayoutStyle(touchLayout, 'secondary')}
- testID="interaction.permission.denyButton"
- variant="secondary"
- />
- {permissionState.canShowAlwaysAllow ? (
- <ResolveButton
- accessibilityLabel={t('interaction.permission.alwaysAllowAccessibility')}
- armed={armedDecision === 'always-allow'}
- busy={busy}
- confirmLabel={t('interaction.permission.alwaysAllowConfirm')}
- label={t('interaction.permission.alwaysAllow')}
- onPress={() => requestDecision(
- 'always-allow',
- buildPermissionDecision('allow', { permissionUpdates: suggestions }),
- )}
- requestId={requestId}
- touchStyle={resolveButtonLayoutStyle(touchLayout, 'secondary')}
- testID="interaction.permission.alwaysAllowButton"
- variant="secondary"
- />
- ) : null}
- <ResolveButton
- accessibilityLabel={t('interaction.permission.allowOnceAccessibility')}
- armed={armedDecision === 'allow-once'}
- busy={busy}
- confirmLabel={t('interaction.permission.allowOnceConfirm')}
- label={t('interaction.permission.allowOnce')}
- onPress={() => requestDecision('allow-once', buildPermissionDecision('allow'))}
- requestId={requestId}
- touchStyle={resolveButtonLayoutStyle(touchLayout, 'primary')}
- testID="interaction.permission.allowOnceButton"
- variant="primary"
- />
- </View>
+ <InteractionActions touchLayout={touchLayout}>
+ {companion && alwaysButton ? [allowButton, denyButton, alwaysButton] : [denyButton, alwaysButton, allowButton]}
+ </InteractionActions>
</View>
);
}
@@ -748,23 +803,37 @@ function PermissionEvidence({
const facts = Object.entries(fields).filter((entry): entry is [string, string] =>
typeof entry[1] === 'string' && ['path', 'file_path', 'url', 'command', 'ghost_id', 'tool'].includes(entry[0]));
const fullDetails = Object.keys(fields).length ? JSON.stringify(fields, null, 2) : presentation.code;
- if (companion) return <View style={styles.companionEvidence} testID="interaction.permission.decisionSummary">
- <View style={styles.companionFact}><Text style={styles.companionFactLabel}>{t('interaction.companion.operation')}</Text><Text selectable style={styles.companionFactValue}>{presentation.toolName}</Text></View>
- {facts.map(([key, value]) => <View key={key} style={styles.companionFact}>
- <Text style={styles.companionFactLabel}>{t(`interaction.companion.fields.${key}`)}</Text>
- <Text selectable style={styles.companionFactValue}>{value}</Text>
- </View>)}
- {presentation.autoReviewUnavailable || presentation.description ? <Text style={styles.body}>{presentation.autoReviewUnavailable ? t('interaction.permission.autoReviewUnavailable') : presentation.description}</Text> : null}
- {riskWarningText ? <View style={[styles.permissionRiskRow, armed && styles.permissionRiskRowArmed]} testID="interaction.permission.riskWarning">
- <Text style={styles.permissionRiskLabel}>{t('interaction.permission.highRisk')}</Text><Text style={styles.permissionRiskText}>{riskWarningText}</Text>
- </View> : null}
- {facts.length > 0 ? <InteractionTouchButton accessibilityLabel={t('interaction.companion.details')} expanded={detailsOpen}
- onPress={() => setDetailsOpen(value => !value)} style={styles.companionDetailsButton} testID="interaction.permission.detailsButton">
- <Text style={styles.kind}>{t('interaction.companion.details')}</Text>
- {detailsOpen ? <ChevronUp size={iconSize.sm} color={colors.textSecondary} /> : <ChevronDown size={iconSize.sm} color={colors.textSecondary} />}
- </InteractionTouchButton> : null}
- {(!facts.length || detailsOpen) && <ScrollView style={styles.permissionCodeBlock} nestedScrollEnabled><Text selectable style={styles.codeText}>{fullDetails}</Text></ScrollView>}
- </View>;
+ if (companion) {
+ // K4: the one thing it will run or touch goes in a code block that scrolls sideways instead of
+ // breaking a path mid-word; the rest reads as short lines on the card's single left edge.
+ const primaryKey = ['command', 'url', 'file_path', 'path'].find((key) => facts.some(([name]) => name === key));
+ const primary = facts.find(([name]) => name === primaryKey)?.[1] ?? null;
+ const rest = facts.filter(([name]) => name !== primaryKey);
+ return <View style={styles.companionEvidence} testID="interaction.permission.decisionSummary">
+ {primary
+ ? <ScrollView horizontal showsHorizontalScrollIndicator={false} style={styles.companionCode} contentContainerStyle={styles.companionCodeContent}
+ testID="interaction.permission.primaryFact">
+ <Text selectable style={styles.codeText}>{primary}</Text>
+ </ScrollView>
+ // No single fact to lead with: show the whole input, never the 500-character preview, so nothing
+ // the teammate will act on stays hidden behind a truncation.
+ : <ScrollView style={styles.permissionCodeBlock} nestedScrollEnabled><Text selectable style={styles.codeText}>{fullDetails}</Text></ScrollView>}
+ {rest.map(([key, value]) => <Text key={key} selectable style={styles.companionMeta}>
+ <Text style={styles.companionMetaLabel}>{`${t(`interaction.companion.fields.${key}`)} `}</Text>{value}
+ </Text>)}
+ <Text style={styles.companionMeta}><Text style={styles.companionMetaLabel}>{`${t('interaction.companion.operation')} `}</Text>{presentation.toolName}</Text>
+ {presentation.autoReviewUnavailable ? <Text style={styles.body}>{t('interaction.permission.autoReviewUnavailable')}</Text> : null}
+ {riskWarningText ? <View style={[styles.permissionRiskRow, armed && styles.permissionRiskRowArmed]} testID="interaction.permission.riskWarning">
+ <Text style={styles.permissionRiskLabel}>{t('interaction.permission.highRisk')}</Text><Text style={styles.permissionRiskText}>{riskWarningText}</Text>
+ </View> : null}
+ {facts.length > 0 ? <InteractionTouchButton accessibilityLabel={t('interaction.companion.details')} expanded={detailsOpen}
+ onPress={() => setDetailsOpen(value => !value)} style={styles.companionDetailsButton} testID="interaction.permission.detailsButton">
+ <Text style={styles.companionDetailsText}>{t('interaction.companion.details')}</Text>
+ {detailsOpen ? <ChevronUp size={iconSize.sm} color={colors.textSecondary} /> : <ChevronDown size={iconSize.sm} color={colors.textSecondary} />}
+ </InteractionTouchButton> : null}
+ {facts.length > 0 && detailsOpen ? <ScrollView style={styles.permissionCodeBlock} nestedScrollEnabled><Text selectable style={styles.codeText}>{fullDetails}</Text></ScrollView> : null}
+ </View>;
+ }
return (
<View
style={[
@@ -877,11 +946,11 @@ function AskUserQuestionCard({
if (questions.length === 0) {
return (
- <View style={cardStyle(styles, touchLayout)} testID="interaction.ask.card">
+ <View style={cardStyle(styles, touchLayout, companion)} testID="interaction.ask.card">
<Text style={styles.kind}>{t('interaction.panel.awaitingAnswer')}</Text>
<Text style={styles.askQuestion} testID="interaction.ask.question">{presentation.title}</Text>
<Text style={styles.askMetaCaption}>{presentation.summary.detail}</Text>
- <View style={actionsStyle(styles, touchLayout)}>
+ <InteractionActions touchLayout={touchLayout}>
<ResolveButton
accessibilityLabel={t('interaction.panel.continueAccessibility')}
busy={busy}
@@ -891,11 +960,11 @@ function AskUserQuestionCard({
onDecision(buildAskUserQuestionDecision({}));
}}
requestId={requestId}
- touchStyle={resolveButtonLayoutStyle(touchLayout, 'primary')}
+ touchStyle={resolveButtonLayoutStyle(touchLayout, 'primary', companion)}
testID="interaction.ask.continueButton"
variant="primary"
/>
- </View>
+ </InteractionActions>
</View>
);
}
@@ -974,7 +1043,7 @@ function AskUserQuestionCard({
};
return (
- <View style={cardStyle(styles, touchLayout)} testID="interaction.ask.card">
+ <View style={cardStyle(styles, touchLayout, companion)} testID="interaction.ask.card">
{/* 收起入口统一在队列头(PendingTaskHeader),卡内不再自持一份 collapsed state:
两套状态时页面级那份被卡片 key 变化冲掉,收起会自己弹回来。 */}
<View style={styles.compactCardHeader}>
@@ -1100,7 +1169,7 @@ function AskUserQuestionCard({
</View>
)}
- <View style={actionsStyle(styles, touchLayout)}>
+ <InteractionActions touchLayout={touchLayout}>
{currentIndex > 0 ? (
<InteractionTouchButton
accessibilityLabel={t('interaction.panel.previous')}
@@ -1114,7 +1183,7 @@ function AskUserQuestionCard({
}}
style={[
styles.secondaryButton,
- resolveButtonLayoutStyle(touchLayout, 'secondary'),
+ resolveButtonLayoutStyle(touchLayout, 'secondary', companion),
]}
testID="interaction.ask.previousButton"
>
@@ -1127,7 +1196,7 @@ function AskUserQuestionCard({
label={t('interaction.panel.skip')}
onPress={() => advance('')}
requestId={requestId}
- touchStyle={resolveButtonLayoutStyle(touchLayout, 'secondary')}
+ touchStyle={resolveButtonLayoutStyle(touchLayout, 'secondary', companion)}
testID="interaction.ask.skipButton"
variant="secondary"
/>
@@ -1139,7 +1208,7 @@ function AskUserQuestionCard({
label={isLast ? t('interaction.panel.submit') : t('interaction.panel.next')}
onPress={submitMulti}
requestId={requestId}
- touchStyle={resolveButtonLayoutStyle(touchLayout, 'primary')}
+ touchStyle={resolveButtonLayoutStyle(touchLayout, 'primary', companion)}
testID="interaction.ask.submitButton"
variant="primary"
/>
@@ -1151,12 +1220,12 @@ function AskUserQuestionCard({
label={isLast ? t('interaction.panel.submit') : t('interaction.panel.next')}
onPress={submitSingle}
requestId={requestId}
- touchStyle={resolveButtonLayoutStyle(touchLayout, 'primary')}
+ touchStyle={resolveButtonLayoutStyle(touchLayout, 'primary', companion)}
testID="interaction.ask.submitButton"
variant="primary"
/>
)}
- </View>
+ </InteractionActions>
</View>
);
}
@@ -1531,6 +1600,7 @@ function PluginSetupCard({
touchLayout: InteractionTouchLayout;
}) {
const styles = useInteractionStyles();
+ const companion = useContext(CompanionInteractionContext);
const { t } = useTranslation();
const presentation = useMemo(
() => buildRemotePluginSetupPresentation(item.request),
@@ -1538,7 +1608,7 @@ function PluginSetupCard({
);
const title = presentation.ghostName ?? t('interaction.kinds.plugin_setup.title');
return (
- <View style={cardStyle(styles, touchLayout)} testID="interaction.pluginSetup.card">
+ <View style={cardStyle(styles, touchLayout, companion)} testID="interaction.pluginSetup.card">
<View style={styles.compactCardHeader}>
{presentation.iconDataUrl ? (
<Image
@@ -1585,18 +1655,18 @@ function PluginSetupCard({
<PluginSetupRemoteDesktopButton deviceId={deviceId} busy={busy} />
) : null}
{cancel ? (
- <View style={actionsStyle(styles, touchLayout)}>
+ <InteractionActions touchLayout={touchLayout}>
<ResolveButton
accessibilityLabel={cancel.accessibilityLabel}
busy={busy}
label={cancel.label}
onPress={cancel.onPress}
requestId={requestId}
- touchStyle={resolveButtonLayoutStyle(touchLayout, 'secondary')}
+ touchStyle={resolveButtonLayoutStyle(touchLayout, 'secondary', companion)}
testID="interaction.pluginSetup.cancelButton"
variant="secondary"
/>
- </View>
+ </InteractionActions>
) : null}
</View>
);
@@ -1694,12 +1764,13 @@ function UnsupportedCard({
touchLayout: InteractionTouchLayout;
}) {
const styles = useInteractionStyles();
+ const companion = useContext(CompanionInteractionContext);
const { t } = useTranslation();
// 未知类型只能靠 request 预览交底;整段一次限行,不按行各自限行(每行各自
// numberOfLines={6} 会把总可见行数放大成 6 × 行数,#530 review)。
const summaryText = contentToPreview(request);
return (
- <View style={cardStyle(styles, touchLayout)} testID="interaction.unsupported.card">
+ <View style={cardStyle(styles, touchLayout, companion)} testID="interaction.unsupported.card">
<Text style={styles.kind}>{t('interaction.panel.unsupportedKind')}</Text>
<Text style={styles.cardTitle}>{message}</Text>
{summaryText ? <Text style={styles.body} numberOfLines={6}>{summaryText}</Text> : null}
@@ -1733,6 +1804,8 @@ function ResolveButton({
variant: 'primary' | 'secondary' | 'inline';
}) {
const styles = useInteractionStyles();
+ const companion = useContext(CompanionInteractionContext);
+ const stack = useContext(CompanionActionsStackContext);
const presentation = buildInteractionResolveActionPresentation({
armed,
busy,
@@ -1764,11 +1837,13 @@ function ResolveButton({
accessibilityHint={presentation.disabledReason ?? undefined}
busy={busy}
disabled={presentation.disabled}
+ hitSlop={companion ? COMPANION_BUTTON_HIT_SLOP : undefined}
onPress={onPress}
- style={[buttonStyle, disabledButtonStyle, touchStyle]}
+ style={[buttonStyle, disabledButtonStyle, touchStyle, stack?.stacked && STACKED_COMPANION_BUTTON]}
testID={testID}
>
- <Text style={[textStyle, disabledTextStyle]}>{presentation.label}</Text>
+ <Text onTextLayout={stack && !stack.stacked ? (event) => { if (event.nativeEvent.lines.length > 1) stack.onWrap(); } : undefined}
+ style={[textStyle, disabledTextStyle]}>{presentation.label}</Text>
</InteractionTouchButton>
);
}
@@ -1782,6 +1857,7 @@ function InteractionTouchButton({
onPress,
selected = false,
expanded,
+ hitSlop,
style,
testID,
}: {
@@ -1790,6 +1866,7 @@ function InteractionTouchButton({
busy?: boolean;
children: ReactNode;
disabled?: boolean;
+ hitSlop?: PressableProps['hitSlop'];
onPress?: () => void;
selected?: boolean;
expanded?: boolean;
@@ -1810,6 +1887,7 @@ function InteractionTouchButton({
...(expanded !== undefined ? { expanded } : {}),
}}
disabled={interactionDisabled}
+ hitSlop={hitSlop}
onPress={interactionDisabled ? undefined : onPress}
style={({ pressed }) => [
style,
@@ -1829,6 +1907,14 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({
companionRequesterAvatar: { flexShrink: 0 },
companionRequesterText: { flex: 1, minWidth: 0, gap: 2 },
companionEvidence: { gap: spacing.sm },
+ companionHungRow: { flexDirection: 'row', alignItems: 'flex-start', gap: 10 },
+ companionHungAvatar: { flexShrink: 0, marginTop: 2 },
+ companionHungContent: { flex: 1, minWidth: 0 },
+ companionCode: { flexGrow: 0, backgroundColor: colors.chatCodeSurface, borderRadius: radius.control },
+ companionCodeContent: { paddingHorizontal: spacing.md, paddingVertical: spacing.sm },
+ companionMeta: { color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },
+ companionMetaLabel: { color: colors.textTertiary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },
+ companionDetailsText: { color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },
companionFact: { flexDirection: 'row', gap: spacing.md, alignItems: 'flex-start' },
companionFactLabel: { width: 64, color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },
companionFactValue: { flex: 1, minWidth: 0, color: colors.textPrimary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },
@@ -2595,10 +2681,16 @@ const makeCompanionStyles = (colors: ThemeColors) => {
compactCardHeader: { ...base.compactCardHeader, minHeight: 0, flexWrap: 'wrap' as const },
compactCardTitleWrap: { ...base.compactCardTitleWrap, flexDirection: 'column' as const, alignItems: 'flex-start' as const },
compactCardTitle: { ...base.compactCardTitle, flex: 0, flexShrink: 1 },
- permissionCodeBlock: { ...base.permissionCodeBlock, backgroundColor: colors.surface, borderRadius: radius.control, borderWidth: 0 },
+ permissionCodeBlock: { ...base.permissionCodeBlock, backgroundColor: colors.chatCodeSurface, borderRadius: radius.control, borderWidth: 0 },
+ codeText: { ...base.codeText, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },
+ // K5: 38pt buttons (hitSlop to 44), 15/20 labels centered; secondary is a quiet chip fill without a border.
+ primaryButton: { ...base.primaryButton, minHeight: COMPANION_BUTTON_HEIGHT, paddingHorizontal: spacing.md },
+ secondaryButton: { ...base.secondaryButton, minHeight: COMPANION_BUTTON_HEIGHT, paddingHorizontal: spacing.md, borderWidth: 0, backgroundColor: colors.surfaceChip },
+ primaryText: { ...base.primaryText, fontSize: typeScale.bodySmall, lineHeight: lineHeight.bodySmall, textAlign: 'center' as const },
+ secondaryText: { ...base.secondaryText, fontSize: typeScale.bodySmall, lineHeight: lineHeight.bodySmall, textAlign: 'center' as const },
permissionRiskRow: { ...base.permissionRiskRow, borderRadius: radius.control },
- optionList: { ...base.optionList, borderWidth: 0, overflow: 'visible' as const, gap: spacing.sm },
- optionRow: { ...base.optionRow, borderRadius: radius.control, borderWidth: StyleSheet.hairlineWidth, borderColor: colors.border },
+ // K8: options read as one grouped list inside the card.
+ optionList: { ...base.optionList, borderRadius: radius.control },
inlineInput: { ...base.inlineInput, borderRadius: radius.pill },
inlineInputWide: { ...base.inlineInputWide, borderRadius: radius.pill },
planEditor: { ...base.planEditor, borderRadius: radius.control },
diff --git a/apps/mobile/src/session/MessageRenderer.tsx b/apps/mobile/src/session/MessageRenderer.tsx
index 468668aaee..d9dfb138f1 100644
--- a/apps/mobile/src/session/MessageRenderer.tsx
+++ b/apps/mobile/src/session/MessageRenderer.tsx
@@ -16,6 +16,7 @@ import { AuthorizationMessageCard } from './AuthorizationMessageCard';
import { sharedTaskAuthorName } from '@cindy/maker-shared';
import { collectBotMessageTimeGroups, formatBotMessageGroupTime } from '@cindy/maker-shared/botTimeline';
import { CompanionMessageCard } from '@/session/CompanionMessageCard';
+import { CompanionEntering } from '@/session/CompanionEntering';
import { mobileDebugEnabled, mobileDebugLog } from '@/debug/mobileDebugLog';
import { errorText, resolvedUrlKind } from '@/debug/fileDiagnostics';
import { createContext, Fragment, memo, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState, type ComponentProps, type ReactNode } from 'react';
@@ -3022,13 +3023,20 @@ const RenderItemView = memo(function RenderItemView({
}
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.
+ // K1: every companion card (task, result, teammate-message pill) hangs on the replies' column,
+ // left-aligned with the reply text behind an invisible avatar.
const alignWithReplies = !!actions.companionAvatar && actions.companion && item.type === 'message'
- && item.message.companion?.kind === 'task' && item.message.companion.meta.role === 'delegation-request';
+ && !!item.message.companion;
+ const aligned = alignWithReplies ? <View style={styles.companionAvatarInset}>{node}</View> : node;
+ // Companion chats: a new message or finished reply eases in once (M4 / M5); everything else stays still.
+ const entering = actions.companion && item.type === 'message' && !item.message.systemCardType
+ && (item.message.kind === 'user' || item.message.kind === 'assistant')
+ ? <CompanionEntering key={item.key} id={item.key} createdAt={item.message.createdAt} kind={item.message.kind === 'user' ? 'send' : 'reply'}>{aligned}</CompanionEntering>
+ : aligned;
return (
<View style={focused ? styles.focusedItem : undefined} testID={focused ? 'message.focusedItem' : undefined}>
{groupTimestamp !== undefined ? <CompanionTimeGroupStamp timestamp={groupTimestamp} /> : null}
- {alignWithReplies ? <View style={styles.companionAvatarInset}>{node}</View> : node}
+ {entering}
</View>
);
});
diff --git a/apps/mobile/src/session/SessionRightSpinner.tsx b/apps/mobile/src/session/SessionRightSpinner.tsx
new file mode 100644
index 0000000000..2fad9b4953
--- /dev/null
+++ b/apps/mobile/src/session/SessionRightSpinner.tsx
@@ -0,0 +1,41 @@
+import { useEffect, useRef } from 'react';
+import { Animated, Easing } from 'react-native';
+import { LoaderCircle } from 'lucide-react-native';
+import { useTranslation } from 'react-i18next';
+import { useReduceMotionEnabled } from '@/hooks/useReduceMotion';
+import { iconSize, iconStroke, motionDuration, useTheme } from '@/theme';
+
+/**
+ * 列表行右侧状态位的运行中转圈:与桌面右槽同款 LoaderCircle,中性色,1s 匀速旋转;
+ * 任务行与伙伴 / 群聊行共用。减弱动效时静止。
+ */
+export function SessionRightSpinner({ testID }: { testID?: string }) {
+ const { colors } = useTheme();
+ const { t } = useTranslation();
+ const spin = useRef(new Animated.Value(0)).current;
+ // 常驻循环:减弱动态效果(含首帧未知)下静止,只显示静态图标。
+ const reduceMotion = useReduceMotionEnabled();
+ useEffect(() => {
+ if (reduceMotion !== false) return;
+ const loop = Animated.loop(
+ Animated.timing(spin, {
+ duration: motionDuration.spinnerCycle,
+ easing: Easing.linear,
+ toValue: 1,
+ useNativeDriver: true,
+ isInteraction: false,
+ }),
+ );
+ loop.start();
+ return () => {
+ loop.stop();
+ spin.setValue(0);
+ };
+ }, [reduceMotion, spin]);
+ const rotate = spin.interpolate({ inputRange: [0, 1], outputRange: ['0deg', '360deg'] });
+ return (
+ <Animated.View accessibilityLabel={t('devices.list.a11y.running')} style={{ transform: [{ rotate }] }} testID={testID}>
+ <LoaderCircle color={colors.textTertiary} size={iconSize.md} strokeWidth={iconStroke.regular} />
+ </Animated.View>
+ );
+}
diff --git a/apps/mobile/src/session/TeammateCreateButton.tsx b/apps/mobile/src/session/TeammateCreateButton.tsx
index cf18e48d64..e9ac6e65ed 100644
--- a/apps/mobile/src/session/TeammateCreateButton.tsx
+++ b/apps/mobile/src/session/TeammateCreateButton.tsx
@@ -5,73 +5,125 @@ import { useTranslation } from 'react-i18next';
import type { RemoteResourceRef } from '@cindy/device-link';
import { useAuth } from '@/auth/AuthContext';
import type { RemoteResourceHostTarget } from '@/device-link/remoteResources';
-import { NativePullDownMenu, usesNativePullDownMenu } from '@/platform/chrome/NativePullDownMenu';
+import { NativePullDownMenu, usesNativePullDownMenu, type NativePullDownAction } from '@/platform/chrome/NativePullDownMenu';
import { useTheme } from '@/theme';
import { iconSize, iconStroke } from '@/theme/tokens';
+import { BotGroupCreateSheet } from './BotGroupCreateSheet';
import { CompanionCreateSheet } from './CompanionProfileSheet';
+import { MainWindowActionButton } from '@/components/MobilePrimitives';
import { CompanionSettingsRow } from './CompanionSettingsRow';
import { CompanionSheet } from './CompanionSheet';
import { HomeHeaderGlassButton } from './HomeHeaderGlassButton';
import { TEAMMATE_COLLECTION_ID } from './useTeammateRoster';
-export function TeammateCreateButton({ targets, preferredDeviceId, onInteract, onCreated }: {
+type CreateKind = 'bot' | 'group';
+type Choice = { kind: CreateKind; host: RemoteResourceHostTarget };
+
+/**
+ * 伙伴页顶栏的「+」。支持群聊时是一个菜单:新建伙伴 / 新建群聊(多台电脑时再选电脑);
+ * 旧版电脑不支持群聊时保持原来的直接新建伙伴。表单关闭后才回报创建结果,避免两个 Modal 叠加。
+ */
+export function TeammateCreateButton({ targets, groupTargets = [], preferredDeviceId, onCreated, onGroupCreated, appearance = 'glass' }: {
targets: readonly RemoteResourceHostTarget[];
+ /** `cta`: the empty list's primary button; it only creates a teammate. */
+ appearance?: 'glass' | 'cta';
+ /** Online computers that support group chats; empty keeps the single-purpose button. */
+ groupTargets?: readonly RemoteResourceHostTarget[];
preferredDeviceId?: string;
- onInteract(): void;
onCreated(host: RemoteResourceHostTarget, ref: RemoteResourceRef): void;
+ onGroupCreated?(host: RemoteResourceHostTarget, groupId: string): void;
}) {
const { accountGeneration } = useAuth();
// Account changes discard both native menu selections and dismissal receipts.
- return <CreateButton key={accountGeneration} {...{ targets, preferredDeviceId, onInteract, onCreated }} account={accountGeneration} />;
+ return <CreateButton key={accountGeneration} {...{ targets, groupTargets, preferredDeviceId, onCreated, onGroupCreated, appearance }} account={accountGeneration} />;
}
-function CreateButton({ targets, preferredDeviceId, onInteract, onCreated, account }: Parameters<typeof TeammateCreateButton>[0] & { account: number }) {
+
+function CreateButton({ targets, groupTargets = [], preferredDeviceId, onCreated, onGroupCreated, appearance, account }: Parameters<typeof TeammateCreateButton>[0] & { account: number }) {
const { t } = useTranslation();
const { colors } = useTheme();
const { accountGeneration } = useAuth();
const currentAccount = useRef(accountGeneration); currentAccount.current = accountGeneration;
const mounted = useRef(true);
useEffect(() => { mounted.current = true; return () => { mounted.current = false; }; }, []);
- const [host, setHost] = useState<RemoteResourceHostTarget | null>(null);
+ const [open, setOpen] = useState<Choice | null>(null);
const [visible, setVisible] = useState(false);
const [choosing, setChoosing] = useState(false);
- const pendingHost = useRef<RemoteResourceHostTarget | null>(null);
+ const pendingChoice = useRef<Choice | null>(null);
const receipt = useRef<RemoteResourceRef | null>(null);
- const ordered = [...targets].sort((a, b) => Number(b.deviceId === preferredDeviceId) - Number(a.deviceId === preferredDeviceId));
- const select = (id: string) => {
- onInteract();
- const target = targets.find((item) => item.deviceId === id);
+ const groupReceipt = useRef<string | null>(null);
+ const cta = appearance === 'cta';
+ const withGroups = !cta && groupTargets.length > 0 && !!onGroupCreated;
+ const order = (hosts: readonly RemoteResourceHostTarget[]) => [...hosts]
+ .sort((a, b) => Number(b.deviceId === preferredDeviceId) - Number(a.deviceId === preferredDeviceId));
+ const ordered = order(targets);
+ const orderedGroups = order(groupTargets);
+ const start = (kind: CreateKind, deviceId: string) => {
+ const target = (kind === 'bot' ? targets : groupTargets).find((item) => item.deviceId === deviceId);
if (!mounted.current || currentAccount.current !== account || !target) return;
- setHost(target); setVisible(true);
+ setOpen({ kind, host: target }); setVisible(true);
+ };
+ const botLabel = t(withGroups || cta ? 'devices.companions.createTeammate' : 'devices.companionProfile.create');
+ const groupLabel = t('groupChat.create.title');
+ const entry = (kind: CreateKind, hosts: readonly RemoteResourceHostTarget[]): NativePullDownAction => ({
+ id: hosts.length === 1 ? `${kind}:${hosts[0]!.deviceId}` : kind,
+ title: kind === 'bot' ? botLabel : groupLabel,
+ image: kind === 'bot' ? 'person.crop.circle.badge.plus' : 'person.2',
+ ...(hosts.length > 1 ? { subactions: hosts.map((host) => ({ id: `${kind}:${host.deviceId}`, title: host.deviceName })) } : {}),
+ });
+ const menuActions: NativePullDownAction[] = withGroups
+ ? [...(ordered.length ? [entry('bot', ordered)] : []), entry('group', orderedGroups)]
+ : ordered.map((target) => ({ id: target.deviceId, title: target.deviceName }));
+ const onMenu = (id: string) => {
+ if (!withGroups) { start('bot', id); return; }
+ const split = id.indexOf(':');
+ if (split > 0) start(id.slice(0, split) as CreateKind, id.slice(split + 1));
+ };
+ const label = withGroups ? t('devices.companions.createMenu') : botLabel;
+ const needsMenu = withGroups || targets.length > 1;
+ const press = () => {
+ // The empty state names the next step instead of only reporting that nothing is available.
+ if (!withGroups && !targets.length) Alert.alert(label, t('devices.companions.noCreateHosts'));
+ else if (!needsMenu) start('bot', targets[0]!.deviceId);
+ else if (cta || !usesNativePullDownMenu()) setChoosing(true);
};
- const label = t('devices.companionProfile.create');
- // The empty state names the next step instead of only reporting that nothing is available.
- const alertNoHosts = () => Alert.alert(label, t('devices.companions.noCreateHosts'));
- const button = <HomeHeaderGlassButton accessibilityLabel={label} testID="teammates.create"
- onPress={() => {
- onInteract();
- if (!targets.length) alertNoHosts();
- else if (targets.length === 1) select(targets[0].deviceId);
- else if (targets.length > 1 && !usesNativePullDownMenu()) setChoosing(true);
- }}>
- <Plus color={colors.textPrimary} size={iconSize.xl} strokeWidth={iconStroke.regular} />
- </HomeHeaderGlassButton>;
+ const button = cta
+ ? <MainWindowActionButton action={{ label: botLabel, tone: 'primary', onPress: press, testID: 'teammates.emptyCreate' }} />
+ : <HomeHeaderGlassButton accessibilityLabel={label} testID="teammates.create" onPress={press}>
+ <Plus color={colors.textPrimary} size={iconSize.action} strokeWidth={iconStroke.regular} />
+ </HomeHeaderGlassButton>;
+ const fallbackChoices: Choice[] = [
+ ...ordered.map((host) => ({ kind: 'bot' as const, host })),
+ ...(withGroups ? orderedGroups.map((host) => ({ kind: 'group' as const, host })) : []),
+ ];
+ const choiceLabel = (choice: Choice) => {
+ if (!withGroups) return choice.host.deviceName;
+ const verb = choice.kind === 'bot' ? botLabel : groupLabel;
+ return (choice.kind === 'bot' ? ordered : orderedGroups).length > 1 ? `${verb} · ${choice.host.deviceName}` : verb;
+ };
+ const groupOpen = open?.kind === 'group' ? open : null;
return <>
- {targets.length > 1 ? <NativePullDownMenu actions={ordered.map((target) => ({ id: target.deviceId, title: target.deviceName }))} onAction={select}>
- {button}
- </NativePullDownMenu> : button}
- <CompanionSheet visible={choosing} title={label} onClose={() => { pendingHost.current = null; setChoosing(false); }}
- onClosed={() => { const target = pendingHost.current; pendingHost.current = null; if (target) select(target.deviceId); }}>
- {/* Same choice as the header's native menu: one plain row per computer name, not full-width buttons. */}
- {ordered.map((target) => <CompanionSettingsRow key={target.deviceId} icon={null} label={target.deviceName}
- testID={`teammates.createHost.${target.deviceId}`}
- onPress={() => { pendingHost.current = target; setChoosing(false); }} />)}
+ {!cta && needsMenu && menuActions.length ? <NativePullDownMenu actions={menuActions} onAction={onMenu} testID="teammates.createMenu">{button}</NativePullDownMenu> : button}
+ <CompanionSheet visible={choosing} title={label} testID="teammates.createChooser" onClose={() => { pendingChoice.current = null; setChoosing(false); }}
+ onClosed={() => { const choice = pendingChoice.current; pendingChoice.current = null; if (choice) start(choice.kind, choice.host.deviceId); }}>
+ {/* Same choice as the header's native menu: one plain row per choice, not full-width buttons. */}
+ {fallbackChoices.map((choice) => <CompanionSettingsRow key={`${choice.kind}:${choice.host.deviceId}`} icon={null} label={choiceLabel(choice)}
+ testID={`teammates.createChooser.${choice.kind}.${choice.host.deviceId}`}
+ onPress={() => { pendingChoice.current = choice; setChoosing(false); }} />)}
</CompanionSheet>
- {host ? <CompanionCreateSheet visible={visible} deviceId={host.deviceId} deviceName={host.deviceName}
- collectionId={TEAMMATE_COLLECTION_ID} online={targets.some((target) => target.deviceId === host.deviceId)}
+ {open?.kind === 'bot' ? <CompanionCreateSheet visible={visible} deviceId={open.host.deviceId} deviceName={open.host.deviceName}
+ collectionId={TEAMMATE_COLLECTION_ID} online={targets.some((target) => target.deviceId === open.host.deviceId)}
onClose={() => setVisible(false)} onCreated={(ref) => { receipt.current = ref; }}
onClosed={() => {
const ref = receipt.current; receipt.current = null;
- if (ref && mounted.current && currentAccount.current === account) onCreated(host, ref);
+ if (ref && mounted.current && currentAccount.current === account) onCreated(open.host, ref);
+ }} /> : null}
+ {withGroups ? <BotGroupCreateSheet visible={visible && !!groupOpen} host={groupOpen?.host ?? null}
+ online={!!groupOpen && groupTargets.some((target) => target.deviceId === groupOpen.host.deviceId)}
+ onClose={() => setVisible(false)}
+ onCreated={(groupId) => { groupReceipt.current = groupId; }}
+ onClosed={() => {
+ const groupId = groupReceipt.current; groupReceipt.current = null;
+ if (groupId && groupOpen && mounted.current && currentAccount.current === account) onGroupCreated?.(groupOpen.host, groupId);
}} /> : null}
</>;
}
diff --git a/apps/mobile/src/session/TeammateGenerationLabel.tsx b/apps/mobile/src/session/TeammateGenerationLabel.tsx
index 14e5f6f478..1bff3e8777 100644
--- a/apps/mobile/src/session/TeammateGenerationLabel.tsx
+++ b/apps/mobile/src/session/TeammateGenerationLabel.tsx
@@ -11,7 +11,8 @@ export function TeammateGenerationLabel({ deviceId, botId, generation }: {
const { colors } = useTheme();
const label = useCompanionGenerationCopy({ deviceId, botId, phase: readWorkingPhase(generation.phase) ?? 'processing',
active: true, turnId: String(generation.startedAt) });
- // A transient process note stays tertiary and italic so it never outranks a real new reply.
+ // A transient process note stays tertiary so it never outranks a real new reply. No italic:
+ // CJK has no true italic and the synthetic slant reads as a rendering glitch.
return <WorkingStatusText key={generation.startedAt} text={label ?? ''} style={{ color: colors.textTertiary,
- fontSize: typeScale.bodySmall, fontStyle: 'italic', fontWeight: fontWeight.regular, lineHeight: lineHeight.subtitle }} />;
+ fontSize: typeScale.bodySmall, fontWeight: fontWeight.regular, lineHeight: lineHeight.subtitle }} />;
}
diff --git a/apps/mobile/src/session/TeammateHomeScreen.tsx b/apps/mobile/src/session/TeammateHomeScreen.tsx
index 9c55464648..e4d1ed4d71 100644
--- a/apps/mobile/src/session/TeammateHomeScreen.tsx
+++ b/apps/mobile/src/session/TeammateHomeScreen.tsx
@@ -9,22 +9,20 @@ import { Text } from '@/components/AppText';
import { formatRemoteError } from '@/device-link/remoteStatus';
import { useGuardedPush } from '@/utils/useGuardedPush';
import { useTheme, useThemedStyles, type ThemeColors } from '@/theme';
-import { fontWeight, iconSize, iconStroke, lineHeight, spacing, typeScale } from '@/theme/tokens';
+import { fontWeight, iconSize, iconStroke, lineHeight, navigationChrome, radius, spacing, typeScale } from '@/theme/tokens';
import { AccountSwitcherSheet } from './AccountSwitcherSheet';
-import { BotGroupSection } from './BotGroupList';
import { botGroupRoute } from './botGroupNavigation';
import { HomeChromeDrawer } from './HomeChromeDrawer';
import { HomeHeaderGlassButton } from './HomeHeaderGlassButton';
import { TeammateCreateButton } from './TeammateCreateButton';
import { TeammateList } from './TeammateList';
-import { useHomeRoster } from './HomeUnreadContext';
+import { useHomeRoster, useHomeUnreadCounts } from './HomeUnreadContext';
import { useTeammateRoster } from './useTeammateRoster';
import { useBotGroupRoster } from './useBotGroupRoster';
import { useTeammateNavigation } from './useTeammateNavigation';
-import { findLastTeammate } from './teammateNavigation';
import { remoteSessionStore } from './remoteSessionStore';
-/** Explicit entry stays on the roster; startup can restore a verified remembered identity. */
+/** The teammate home is the roster: launch and every entry land on the list, never inside a chat. */
export function TeammateHomeScreen({ active = true }: { active?: boolean }) {
const { t } = useTranslation();
const auth = useAuth();
@@ -40,8 +38,7 @@ export function TeammateHomeScreen({ active = true }: { active?: boolean }) {
const ownGroups = useBotGroupRoster(ownRoster.groupTargets, focused && !sharedRoster);
const roster = sharedRoster?.roster ?? ownRoster;
const groups = sharedRoster?.groups ?? ownGroups;
- const resumed = useRef(false);
- const wasFocused = useRef(focused);
+ const counts = useHomeUnreadCounts();
const [drawer, setDrawer] = useState(false);
const [accounts, setAccounts] = useState(false);
const [loggingOut, setLoggingOut] = useState(false);
@@ -54,55 +51,47 @@ export function TeammateHomeScreen({ active = true }: { active?: boolean }) {
useCallback((listener) => accounts || drawer ? remoteSessionStore.subscribe(listener) : () => {}, [accounts, drawer]),
useCallback(() => (accounts || drawer) && remoteSessionStore.getSessions().some((session) => remoteSessionStore.isSessionRunning(session.id)), [accounts, drawer]),
);
- useEffect(() => {
- if (!navigation.restoreLastTeammate) { resumed.current = true; return; }
- if (!focused || !navigation.hydrated || roster.loading || resumed.current) return;
- // A mounted old screen does not own the user's last explicit mode.
- if (navigation.mode !== 'teammates') { resumed.current = true; return; }
- const last = findLastTeammate(navigation.lastTeammate, roster.items);
- if (last && roster.isOnline(last.host)) {
- resumed.current = true;
- void navigation.openTeammate(last);
- } else if (roster.authoritative) {
- resumed.current = true;
- if (!last && navigation.lastTeammate) void navigation.rememberTeammate(null);
- }
- // Transient offline/cache-only discovery is not a restoration attempt.
- }, [focused, navigation, roster]);
- useEffect(() => {
- if (wasFocused.current && !focused) resumed.current = true;
- wasFocused.current = focused;
- }, [focused]);
+ const groupCreateTargets = roster.groupTargets.filter(groups.isOnline);
const afterDrawer = (action: () => void) => { pending.current = action; setDrawer(false); };
const finishOverlay = () => { const action = pending.current; pending.current = null; action?.(); };
useEffect(() => {
mounted.current = true;
return () => { mounted.current = false; pending.current = null; };
}, []);
- return <SafeAreaView style={styles.screen} testID="teammates.home" onTouchStart={() => { resumed.current = true; }}>
+ return <SafeAreaView style={styles.screen} testID="teammates.home">
{active ? <Stack.Screen options={{ headerShown: false }} /> : null}
<View style={styles.header}>
- <HomeHeaderGlassButton accessibilityLabel={t('devices.companions.openNavigation')} testID="teammates.navigation"
- onPress={() => { Keyboard.dismiss(); resumed.current = true; setDrawer(true); }}>
- <Menu color={colors.textPrimary} size={iconSize.xl} strokeWidth={iconStroke.regular} />
- </HomeHeaderGlassButton>
+ <View style={styles.slot}>
+ <View style={styles.navButton}>
+ <HomeHeaderGlassButton accessibilityLabel={[t('devices.companions.openNavigation'),
+ counts.tasks > 0 ? t('devices.companions.taskAttentionCount', { count: counts.tasks }) : ''].filter(Boolean).join(', ')}
+ testID="teammates.navigation" onPress={() => { Keyboard.dismiss(); setDrawer(true); }}>
+ <Menu color={colors.textPrimary} size={iconSize.action} strokeWidth={iconStroke.regular} />
+ </HomeHeaderGlassButton>
+ {/* The other side (tasks) needs a look; the drawer shows how many. Neutral, not a status color. */}
+ {counts.tasks > 0 ? <View pointerEvents="none" style={styles.navDot} testID="teammates.navigation.dot" /> : null}
+ </View>
+ </View>
<Text style={styles.title}>{t('devices.companions.title')}</Text>
- <View style={styles.trailing}>
- {roster.createTargets.length > 0 ? <TeammateCreateButton targets={roster.createTargets} preferredDeviceId={navigation.lastTeammate?.deviceId}
- onInteract={() => { resumed.current = true; }} onCreated={(host, ref) => { void navigation.openCreatedTeammate(host, ref); }} /> : null}
+ <View style={[styles.slot, styles.slotEnd]}>
+ {roster.createTargets.length > 0 || groupCreateTargets.length > 0 ? <TeammateCreateButton targets={roster.createTargets}
+ groupTargets={groupCreateTargets} preferredDeviceId={navigation.lastTeammate?.deviceId}
+ onCreated={(host, ref) => { void navigation.openCreatedTeammate(host, ref); }}
+ onGroupCreated={(host, groupId) => { push(botGroupRoute(host, groupId)); }} /> : null}
</View>
</View>
{navigation.saveFailed ? <Text accessibilityRole="alert" style={styles.notice}>{t('devices.companions.preferenceSaveFailed')}</Text> : null}
- <TeammateList key={searchEpoch} {...roster} current={navigation.lastTeammate} autoFocusSearch={searchEpoch > 0}
- onInteract={() => { resumed.current = true; }}
- onRefresh={() => { resumed.current = true; void roster.refresh(); if (groups.supported) void groups.refresh(); }}
- onSelect={(item) => { resumed.current = true; void navigation.openTeammate(item); }}
- renderFooter={(query) => groups.supported || groups.items.length > 0 ? <BotGroupSection items={groups.items} query={query}
- isOnline={groups.isOnline} createTargets={roster.groupTargets.filter(groups.isOnline)}
+ <TeammateList key={searchEpoch} {...roster} autoFocusSearch={searchEpoch > 0}
+ onRefresh={() => { void roster.refresh(); if (groups.supported) void groups.refresh(); }}
+ onSelect={(item) => { void navigation.openTeammate(item); }}
+ groups={groups.supported || groups.items.length > 0 ? {
+ items: groups.items,
+ isOnline: groups.isOnline,
+ onSelect: (row) => { Keyboard.dismiss(); push(botGroupRoute(row.host, row.item.ref.id)); },
+ } : undefined}
+ emptyAction={roster.createTargets.length > 0 ? <TeammateCreateButton appearance="cta" targets={roster.createTargets}
preferredDeviceId={navigation.lastTeammate?.deviceId}
- onInteract={() => { resumed.current = true; }}
- onOpen={(row) => { resumed.current = true; Keyboard.dismiss(); push(botGroupRoute(row.host, row.item.ref.id)); }}
- onOpenCreated={(host, groupId) => { resumed.current = true; push(botGroupRoute(host, groupId)); }} /> : null} />
+ onCreated={(host, ref) => { void navigation.openCreatedTeammate(host, ref); }} /> : null} />
<HomeChromeDrawer open={drawer} user={auth.user} loggingOut={loggingOut} hasRunningTasks={hasRunningTasks} mode="teammates"
onModeChange={(mode) => afterDrawer(() => { void navigation.setMode(mode); })}
onClose={() => { pending.current = null; setDrawer(false); }} onClosed={finishOverlay}
@@ -126,8 +115,13 @@ export function TeammateHomeScreen({ active = true }: { active?: boolean }) {
}
const makeStyles = (colors: ThemeColors) => StyleSheet.create({
screen: { backgroundColor: colors.surface, flex: 1 },
- header: { flexDirection: 'row', alignItems: 'center', paddingHorizontal: spacing.md, minHeight: 48 },
+ // Same chrome as the task home header: 48 tall, 16 side gutter, 92-wide slots keep the title centered.
+ header: { flexDirection: 'row', alignItems: 'center', paddingHorizontal: spacing.lg, paddingBottom: spacing.md, minHeight: 48 },
+ slot: { width: navigationChrome.target * 2 + spacing.xs, flexDirection: 'row' },
+ slotEnd: { justifyContent: 'flex-end' },
+ navButton: { width: navigationChrome.target, height: navigationChrome.target },
+ navDot: { position: 'absolute', top: 6, right: 6, width: 8, height: 8, borderRadius: radius.pill, backgroundColor: colors.textPrimary,
+ borderWidth: 2, borderColor: colors.surface },
title: { flex: 1, color: colors.textPrimary, fontSize: typeScale.title, lineHeight: lineHeight.title, fontWeight: fontWeight.semibold, textAlign: 'center' },
- trailing: { width: 44, alignItems: 'center' },
notice: { color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, padding: spacing.lg },
});
diff --git a/apps/mobile/src/session/TeammateList.tsx b/apps/mobile/src/session/TeammateList.tsx
index 78624e251e..ab13076b75 100644
--- a/apps/mobile/src/session/TeammateList.tsx
+++ b/apps/mobile/src/session/TeammateList.tsx
@@ -1,24 +1,47 @@
import { readWorkingPhase } from '@cindy/maker-shared';
-import { TeammateGenerationLabel } from './TeammateGenerationLabel';
-import { useMemo, useState, type ReactElement } from 'react';
-import { ActivityIndicator, FlatList, Pressable, RefreshControl, StyleSheet, View, type ScrollViewProps } from 'react-native';
+import { useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore, type ReactElement } from 'react';
+import { ActivityIndicator, Animated, Easing, FlatList, Image, Pressable, RefreshControl, StyleSheet, View, type ScrollViewProps } from 'react-native';
import { useTranslation } from 'react-i18next';
-import { RefreshCw, Search, TriangleAlert, X } from 'lucide-react-native';
+import { RefreshCw, Search, X } from 'lucide-react-native';
import { resolveRemoteText } from '@cindy/device-link';
import { Text, TextInput } from '@/components/AppText';
-import { MainWindowEmptyState, RemoteListSyncingPlaceholder, StatusDot } from '@/components/MobilePrimitives';
+import { MainWindowEmptyState, RemoteListSyncingPlaceholder } from '@/components/MobilePrimitives';
import { mobileInteractionStyles } from '@/components/mobileInteractionStyles';
import { RemoteCompanionAvatar } from '@/components/RemoteCompanionAvatar';
import { useAuth } from '@/auth/AuthContext';
import { isRemoteResourceUnread } from '@/device-link/remoteResourceCache';
import type { HostedRemoteCollectionItem, RemoteResourceHostTarget } from '@/device-link/remoteResources';
+import { useReduceMotionEnabled } from '@/hooks/useReduceMotion';
import { useMinuteNow } from '@/utils/useMinuteNow';
import { useThemedStyles, useTheme, type ThemeColors } from '@/theme';
import { fontWeight, iconSize, iconStroke, lineHeight, radius, spacing, typeScale } from '@/theme/tokens';
+import { BotGroupListRow, OFFLINE_AVATAR_OPACITY } from './BotGroupList';
+import { orderedBotGroups } from './botGroupRemote';
+import { CompanionListRow, CompanionPresenceDot, COMPANION_ROW_AVATAR_SIZE, COMPANION_ROW_HEIGHT } from './CompanionListRow';
+import { CompanionPresenceRing } from './CompanionPresenceRing';
+import { remoteSessionStore } from './remoteSessionStore';
import { formatRemoteSessionSidebarTime } from './sessionList';
-import { orderedTeammates, sameTeammate, teammateIdentity } from './teammateNavigation';
-import type { LastTeammateIdentity } from './homeViewPreferenceStore';
+import { orderedTeammates } from './teammateNavigation';
import { parseMobileMarkdownInlines } from './messageMarkdown';
+import { TeammateGenerationLabel } from './TeammateGenerationLabel';
+
+/** Loading placeholders appear only when the first read takes longer than this (no flash on fast loads). */
+const SKELETON_DELAY_MS = 300;
+/** Half-period of the placeholder breath: the running breath's 1.5s cycle. */
+const SKELETON_HALF_MS = 750;
+const SKELETON_WIDTHS = [[96, 210], [72, 180], [120, 232], [84, 160], [104, 200], [64, 190]] as const;
+const EMPTY_PRESETS = [
+ require('../../assets/bot-presets/cindy.png'),
+ require('../../assets/bot-presets/dash.png'),
+ require('../../assets/bot-presets/lizi.png'),
+];
+const EMPTY_PRESET_SIZE = 56;
+
+export interface TeammateListGroups {
+ items: readonly HostedRemoteCollectionItem[];
+ isOnline(host: RemoteResourceHostTarget): boolean;
+ onSelect(item: HostedRemoteCollectionItem): void;
+}
export interface TeammateListProps {
items: readonly HostedRemoteCollectionItem[];
@@ -29,26 +52,51 @@ export interface TeammateListProps {
connectionState?(host: RemoteResourceHostTarget): boolean | null;
onRefresh(): void;
onSelect(item: HostedRemoteCollectionItem): void;
- current?: LastTeammateIdentity | null;
/** SheetSurface already owns the scroll view. */
embedded?: boolean;
- /** 独立整页、铺到透明系统顶栏下时,由列表自己让出上下安全区。 */
- scrollInsetProps?: Pick<ScrollViewProps, 'automaticallyAdjustsScrollIndicatorInsets' | 'contentInsetAdjustmentBehavior'>;
autoFocusSearch?: boolean;
onInteract?(): void;
- /** Home only: the 「群聊」 section under the teammates, filtered by the same search text. */
- renderFooter?(query: string): ReactElement | null;
+ /** Home only: group chats, mixed with the teammates by latest activity and filtered by the same search. */
+ groups?: TeammateListGroups;
+ /** Home only: the create entry shown under an empty list. */
+ emptyAction?: ReactElement | null;
+ /** 独立整页、铺到透明系统顶栏下时,由列表自己让出上下安全区。 */
+ scrollInsetProps?: Pick<ScrollViewProps, 'automaticallyAdjustsScrollIndicatorInsets' | 'contentInsetAdjustmentBehavior'>;
+}
+
+type ListEntry = { kind: 'bot' | 'group'; row: HostedRemoteCollectionItem };
+
+function conversationSessionId(row: HostedRemoteCollectionItem): string | null {
+ const target = row.item.links.find(({ rel, target: link }) => rel === 'conversation' && link.kind === 'session')?.target;
+ return target?.kind === 'session' ? target.sessionId : null;
+}
+
+/** Bot conversations stopped on a question or a permission prompt (「等你确认」). */
+function useAwaitingSessions(items: readonly HostedRemoteCollectionItem[]): ReadonlySet<string> {
+ const sessions = useMemo(() => items.map(conversationSessionId).filter((id): id is string => !!id), [items]);
+ const snapshot = useCallback(() => sessions.filter((id) => remoteSessionStore.getSessionLiveActivity(id)?.phase === 'needs-interaction'
+ || remoteSessionStore.getPendingInteractions(id).length > 0).join('\u0000'), [sessions]);
+ // A joined id string keeps unrelated store churn (streaming, other sessions) from re-rendering the list.
+ const key = useSyncExternalStore(remoteSessionStore.subscribe, snapshot);
+ return useMemo(() => new Set(key ? key.split('\u0000') : []), [key]);
}
-/** Flat identity list shared by home, collection route and the name picker. No host headings or groups. */
+
+/** Identity list shared by home (with group chats) and the collection route. No host headings. */
export function TeammateList({ items, loading, refreshing, error, isOnline, connectionState, onRefresh, onSelect,
- current = null, embedded = false, autoFocusSearch = false, onInteract, renderFooter, scrollInsetProps }: TeammateListProps) {
+ embedded = false, autoFocusSearch = false, onInteract, groups, emptyAction, scrollInsetProps }: TeammateListProps) {
const { t, i18n } = useTranslation();
const { user } = useAuth();
const { colors } = useTheme();
const styles = useThemedStyles(makeStyles);
const now = useMinuteNow();
const [query, setQuery] = useState('');
- const rows = useMemo(() => orderedTeammates(items, query, i18n.language), [items, query, i18n.language]);
+ const awaiting = useAwaitingSessions(items);
+ const entries = useMemo<ListEntry[]>(() => {
+ const bots = orderedTeammates(items, query, i18n.language).map((row) => ({ kind: 'bot' as const, row }));
+ if (!groups) return bots;
+ const chats = orderedBotGroups(groups.items, query, i18n.language).map((row) => ({ kind: 'group' as const, row }));
+ return [...bots, ...chats].sort((a, b) => (b.row.item.display.timestamp ?? 0) - (a.row.item.display.timestamp ?? 0));
+ }, [groups, items, query, i18n.language]);
const duplicateNames = useMemo(() => {
const names = new Map<string, number>();
for (const row of items) {
@@ -57,16 +105,16 @@ export function TeammateList({ items, loading, refreshing, error, isOnline, conn
}
return names;
}, [items, i18n.language]);
- const trimmedQuery = query.trim();
- // Mirrors HomeSearchBar: the trailing X clears typed text.
+ const searchLabel = t(groups ? 'devices.companions.searchWithGroups' : 'devices.companions.search');
const header = <View style={styles.controls}>
- <View style={styles.search} testID="teammates.searchRow">
- <Search color={colors.textSecondary} size={iconSize.md} strokeWidth={iconStroke.regular} />
- <TextInput accessibilityLabel={t('devices.companions.search')} autoFocus={autoFocusSearch}
- autoCorrect={false} onChangeText={(value) => { onInteract?.(); setQuery(value); }} onFocus={onInteract} placeholder={t('devices.companions.search')}
+ <View style={styles.search}>
+ <Search size={iconSize.md} color={colors.textPlaceholder} strokeWidth={iconStroke.regular} />
+ <TextInput accessibilityLabel={searchLabel} autoFocus={autoFocusSearch}
+ autoCorrect={false} onChangeText={(value) => { onInteract?.(); setQuery(value); }} onFocus={onInteract} placeholder={searchLabel}
placeholderTextColor={colors.textPlaceholder} selectionColor={colors.inputCaret}
style={styles.searchInput} value={query} testID="teammates.search" />
- {trimmedQuery ? <Pressable accessibilityRole="button" hitSlop={spacing.xs}
+ {/* Mirrors HomeSearchBar: the trailing X clears typed text. */}
+ {query.trim() ? <Pressable accessibilityRole="button" hitSlop={spacing.xs}
accessibilityLabel={t('devices.detail.search.clearA11y')}
onPress={() => setQuery('')}
style={({ pressed }) => [styles.searchButton, pressed && mobileInteractionStyles.pressed]} testID="teammates.searchClose">
@@ -81,11 +129,24 @@ export function TeammateList({ items, loading, refreshing, error, isOnline, conn
</Pressable>
</View> : null}
</View>;
- const empty = loading ? <RemoteListSyncingPlaceholder testID="teammates.loading" />
- : <MainWindowEmptyState centered style={styles.empty} testID="teammates.empty"
- title={query.trim() ? t('devices.companions.noResults') : t('devices.companions.emptyTitle')}
- copy={query.trim() || error ? '' : t('devices.companions.emptyCopy')} />;
- const renderRow = (row: HostedRemoteCollectionItem) => {
+ const searching = !!query.trim();
+ const empty = loading
+ ? (embedded
+ ? <RemoteListSyncingPlaceholder testID="teammates.loading" />
+ : <TeammateListSkeleton />)
+ : searching || error || !emptyAction
+ ? <MainWindowEmptyState centered style={styles.empty} testID="teammates.empty"
+ title={searching ? t('devices.companions.noResults') : t('devices.companions.emptyTitle')}
+ copy={searching || error ? '' : t('devices.companions.emptyCopy')} />
+ : <View style={styles.emptyHome} testID="teammates.empty">
+ <View style={styles.presetStack} accessibilityElementsHidden importantForAccessibility="no-hide-descendants">
+ {EMPTY_PRESETS.map((source, index) => <Image key={index} source={source} style={[styles.preset, index > 0 && styles.presetOverlap]} />)}
+ </View>
+ <Text accessibilityRole="header" style={styles.emptyTitle}>{t('devices.companions.emptyTitle')}</Text>
+ <Text style={styles.emptyCopy}>{t('devices.companions.emptyCopyCreate')}</Text>
+ <View style={styles.emptyAction}>{emptyAction}</View>
+ </View>;
+ const renderBot = (row: HostedRemoteCollectionItem, last: boolean) => {
const display = row.item.display;
const title = resolveRemoteText(display.title, i18n.language);
const preview = display.preview ? parseMobileMarkdownInlines(resolveRemoteText(display.preview, i18n.language))
@@ -96,51 +157,96 @@ export function TeammateList({ items, loading, refreshing, error, isOnline, conn
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 workingCopy = generating ? t(`devices.companions.working.${readWorkingPhase(display.generation!.phase) ?? 'processing'}`) : '';
const attention = display.status?.tone === 'warning' || display.status?.tone === 'critical'
? resolveRemoteText(display.status.label, i18n.language) : '';
+ const sessionId = conversationSessionId(row);
+ const waiting = online && !generating && !!sessionId && awaiting.has(sessionId);
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);
const timestamp = display.timestamp;
const time = timestamp !== undefined && Number.isFinite(new Date(timestamp).getTime())
? formatRemoteSessionSidebarTime(new Date(timestamp).toISOString(), now) : '';
- // Only the name picker marks the current identity; the single-column home list never does.
- const selected = embedded && 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, 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 && mobileInteractionStyles.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}><StatusDot tone={connected === null ? 'muted' : connected ? 'ready' : 'off'} /></View></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}
+ const connection = connected === false ? t('devices.resources.hostOffline') : connected === null ? t('devices.resources.connectionUnknown') : '';
+ const prefix = attention || (waiting ? t('devices.companions.awaiting') : '');
+ return <CompanionListRow key={`bot:${row.key}`} testID={`teammates.item.${row.host.deviceId}.${row.item.ref.id}`}
+ accessibilityLabel={[title, ambiguous ? row.host.deviceName : '', connection, prefix, generating ? workingCopy : summary, time,
+ unread ? t('devices.companions.unread') : ''].filter(Boolean).join(', ')}
+ avatar={<>
+ <View style={!online ? { opacity: OFFLINE_AVATAR_OPACITY } : undefined}>
+ <RemoteCompanionAvatar avatar={display.avatar} deviceId={row.host.deviceId} name={title} online={online} size={COMPANION_ROW_AVATAR_SIZE} framed />
</View>
- {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>;
+ <CompanionPresenceRing active={generating} />
+ <CompanionPresenceDot connected={connected} />
+ </>}
+ title={title}
+ device={ambiguous ? row.host.deviceName : undefined}
+ trailing={generating ? { kind: 'working' } : { kind: 'time', text: time }}
+ preview={generating
+ ? <TeammateGenerationLabel deviceId={row.host.deviceId} botId={row.item.ref.id} generation={display.generation!} />
+ : connection ? `${connection} · ${summary}` : summary}
+ previewTone={connection ? 'tertiary' : 'secondary'}
+ previewPrefix={connection ? undefined : prefix || undefined}
+ previewPrefixTestID={attention ? 'teammate.attention' : undefined}
+ unread={unread}
+ unreadLabel={t('devices.companions.unread')}
+ disabled={!online}
+ last={last}
+ onPress={() => onSelect(row)} />;
};
- const footer = renderFooter?.(query) ?? null;
- if (embedded) return <View testID="teammates.list">{header}{rows.length ? rows.map(renderRow) : empty}{footer}</View>;
- return <FlatList {...scrollInsetProps} style={styles.list} contentContainerStyle={styles.content} data={rows} keyExtractor={(row) => row.key}
+ const renderEntry = (entry: ListEntry, index: number) => {
+ const last = index === entries.length - 1;
+ if (entry.kind === 'bot' || !groups) return renderBot(entry.row, last);
+ return <BotGroupListRow key={`group:${entry.row.key}`} row={entry.row} online={groups.isOnline(entry.row.host)} last={last}
+ onPress={() => groups.onSelect(entry.row)} />;
+ };
+ if (embedded) return <View testID="teammates.list">{header}{entries.length ? entries.map(renderEntry) : empty}</View>;
+ return <FlatList {...scrollInsetProps} style={styles.list} contentContainerStyle={styles.content} data={entries} keyExtractor={(entry) => `${entry.kind}:${entry.row.key}`}
keyboardShouldPersistTaps="handled" keyboardDismissMode="on-drag" onScrollBeginDrag={onInteract} testID="teammates.list"
- ListHeaderComponent={header} ListEmptyComponent={empty} ListFooterComponent={footer} renderItem={({ item }) => renderRow(item)}
+ ListHeaderComponent={header} ListEmptyComponent={empty} renderItem={({ item, index }) => renderEntry(item, index)}
refreshControl={<RefreshControl refreshing={refreshing} onRefresh={onRefresh} tintColor={colors.textSecondary} />} />;
}
+
+/**
+ * First-load placeholders with the real row geometry. They appear only after SKELETON_DELAY_MS and
+ * breathe in opacity only (no shimmer gradient); reduced motion keeps them still.
+ */
+function TeammateListSkeleton() {
+ const styles = useThemedStyles(makeStyles);
+ const animate = useReduceMotionEnabled() === false;
+ const [shown, setShown] = useState(false);
+ const opacity = useRef(new Animated.Value(1)).current;
+ useEffect(() => {
+ const timer = setTimeout(() => setShown(true), SKELETON_DELAY_MS);
+ return () => clearTimeout(timer);
+ }, []);
+ useEffect(() => {
+ if (!shown || !animate) { opacity.setValue(1); return; }
+ const step = (toValue: number) => Animated.timing(opacity, { toValue, duration: SKELETON_HALF_MS, easing: Easing.inOut(Easing.ease), useNativeDriver: true });
+ const loop = Animated.loop(Animated.sequence([step(0.55), step(1)]));
+ loop.start();
+ return () => loop.stop();
+ }, [animate, opacity, shown]);
+ if (!shown) return null;
+ return <Animated.View style={{ opacity }} testID="teammates.loading" accessibilityElementsHidden importantForAccessibility="no-hide-descendants">
+ {SKELETON_WIDTHS.map(([title, preview], index) => <View key={index} style={styles.skeletonRow}>
+ <View style={styles.skeletonAvatar} />
+ <View style={[styles.skeletonBody, index < SKELETON_WIDTHS.length - 1 && styles.skeletonDivider]}>
+ <View style={[styles.skeletonBar, styles.skeletonTitle, { width: title }]} />
+ <View style={[styles.skeletonBar, { width: preview }]} />
+ </View>
+ </View>)}
+ </Animated.View>;
+}
+
const makeStyles = (colors: ThemeColors) => StyleSheet.create({
list: { flex: 1 },
content: { flexGrow: 1, paddingBottom: spacing.xl },
- controls: { paddingHorizontal: spacing.lg, paddingVertical: spacing.sm, gap: spacing.sm },
+ controls: { paddingHorizontal: spacing.lg, paddingTop: spacing.xs, paddingBottom: spacing.sm, gap: spacing.sm },
// Same pill as HomeSearchBar; the field text follows the 15pt search-box role.
- search: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm, borderRadius: radius.pill, backgroundColor: colors.surfaceElevated,
- borderColor: colors.border, borderWidth: StyleSheet.hairlineWidth, minHeight: 44, paddingLeft: spacing.lg, paddingRight: spacing.xs },
- searchInput: { flex: 1, minWidth: 0, paddingVertical: spacing.sm, color: colors.textPrimary, fontSize: typeScale.bodySmall },
+ search: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm, minHeight: 44, paddingLeft: spacing.lg, paddingRight: spacing.xs,
+ borderRadius: radius.pill, backgroundColor: colors.surfaceElevated, borderColor: colors.border, borderWidth: StyleSheet.hairlineWidth },
+ searchInput: { flex: 1, minWidth: 0, minHeight: 44, paddingVertical: spacing.sm, color: colors.textPrimary, fontSize: typeScale.bodySmall },
// 36 visible + hitSlop 4 on each side = 44pt target.
searchButton: { width: 36, height: 36, alignItems: 'center', justifyContent: 'center' },
notice: { color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption },
@@ -148,21 +254,17 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({
noticeRow: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm },
noticeText: { flex: 1 },
retry: { minWidth: 44, minHeight: 44, alignItems: 'center', justifyContent: 'center' },
- // 行本身不留上下内边距,分割线落在行的最底边:选中底色正好铺在上下两条分割线之间。
- row: { flexDirection: 'row', alignItems: 'center', gap: spacing.md, paddingHorizontal: spacing.lg, minHeight: 78 },
- avatar: { width: 44, height: 44, borderRadius: radius.pill, backgroundColor: colors.surfaceChip, alignItems: 'center', justifyContent: 'center' },
- // StatusDot sits in a page-coloured ring so it stays legible over the avatar.
- connection: { position: 'absolute', right: 0, bottom: 0, padding: 2, borderRadius: radius.pill, backgroundColor: colors.surface },
- selected: { backgroundColor: colors.surfaceChip, borderRadius: radius.container },
- // 原先是行上下各 12 + 文字区底部 12,分割线在行底上方 12 处,选中底色因此整体下错 12。
- // 现在留白上下各 spacing.lg 放进文字区,文字在两条分割线之间居中。
- body: { flex: 1, minWidth: 0, alignSelf: 'stretch', justifyContent: 'center', gap: spacing.xs,
- borderBottomColor: colors.border, borderBottomWidth: StyleSheet.hairlineWidth, paddingVertical: spacing.lg },
- titleRow: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm },
- // Match task rows in HomeListVisuals: title, preview and metadata keep the same hierarchy.
- title: { flex: 1, color: colors.textPrimary, fontSize: typeScale.subtitle, fontWeight: fontWeight.medium, lineHeight: lineHeight.listTitle },
- preview: { color: colors.textSecondary, fontSize: typeScale.bodySmall, fontWeight: fontWeight.regular, lineHeight: lineHeight.subtitle },
- time: { color: colors.textTertiary, fontSize: typeScale.footnote, fontWeight: fontWeight.regular, lineHeight: lineHeight.body },
- meta: { color: colors.textTertiary, fontSize: typeScale.footnote, fontWeight: fontWeight.regular, lineHeight: lineHeight.body },
- unread: { width: 7, height: 7, borderRadius: radius.pill, backgroundColor: colors.textPrimary },
+ emptyHome: { alignItems: 'center', paddingHorizontal: spacing.xxl, paddingTop: spacing.xxl * 2, gap: spacing.sm },
+ presetStack: { flexDirection: 'row', marginBottom: spacing.md },
+ preset: { width: EMPTY_PRESET_SIZE, height: EMPTY_PRESET_SIZE, borderRadius: radius.pill, borderWidth: 3, borderColor: colors.surface },
+ presetOverlap: { marginLeft: -(spacing.md + 2) },
+ emptyTitle: { color: colors.textPrimary, fontSize: typeScale.title, lineHeight: lineHeight.title, fontWeight: fontWeight.semibold, textAlign: 'center' },
+ emptyCopy: { color: colors.textSecondary, fontSize: typeScale.footnote, lineHeight: lineHeight.caption, textAlign: 'center', maxWidth: 260 },
+ emptyAction: { marginTop: spacing.md },
+ skeletonRow: { flexDirection: 'row', alignItems: 'center', gap: spacing.md, height: COMPANION_ROW_HEIGHT, paddingLeft: spacing.lg },
+ skeletonAvatar: { width: COMPANION_ROW_AVATAR_SIZE, height: COMPANION_ROW_AVATAR_SIZE, borderRadius: radius.pill, backgroundColor: colors.surfaceChip },
+ skeletonBody: { flex: 1, alignSelf: 'stretch', justifyContent: 'center', gap: spacing.md, paddingRight: spacing.lg },
+ skeletonDivider: { borderBottomColor: colors.border, borderBottomWidth: StyleSheet.hairlineWidth },
+ skeletonBar: { height: spacing.md, borderRadius: radius.micro, backgroundColor: colors.surfaceChip },
+ skeletonTitle: { height: spacing.lg - 2 },
});
diff --git a/apps/mobile/src/session/TeammatePicker.tsx b/apps/mobile/src/session/TeammatePicker.tsx
deleted file mode 100644
index 80febb7706..0000000000
--- a/apps/mobile/src/session/TeammatePicker.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-import { useEffect, useRef } from 'react';
-import { useTranslation } from 'react-i18next';
-import { useAuth } from '@/auth/AuthContext';
-import type { HostedRemoteCollectionItem } from '@/device-link/remoteResources';
-import { MainWindowActionButton } from '@/components/MobilePrimitives';
-import { CompanionSheet } from './CompanionSheet';
-import { TeammateList } from './TeammateList';
-import { useTeammateRoster } from './useTeammateRoster';
-import type { LastTeammateIdentity } from './homeViewPreferenceStore';
-import { sameTeammate, teammateIdentity } from './teammateNavigation';
-
-/** Name-pill picker. onSelect fires after the shared sheet has dismissed, not through a second Modal. */
-export function TeammatePicker({ visible, onClose, onSelect, onCreate, current }: {
- visible: boolean;
- onClose(): void;
- onCreate?(): void;
- onSelect(item: HostedRemoteCollectionItem): void;
- current?: LastTeammateIdentity | null;
-}) {
- const { t } = useTranslation();
- const { accountGeneration } = useAuth();
- const currentAccount = useRef(accountGeneration); currentAccount.current = accountGeneration;
- const mounted = useRef(true);
- useEffect(() => { mounted.current = true; return () => { mounted.current = false; pending.current = null; }; }, []);
- const pending = useRef<{ account: number; item?: HostedRemoteCollectionItem } | null>(null);
- const roster = useTeammateRoster(visible);
- useEffect(() => { if (visible) { pending.current = null; } }, [visible, accountGeneration]);
- const close = () => { pending.current = null; onClose(); };
- return <CompanionSheet visible={visible} onClose={close} title={t('devices.companions.title')} testID="teammates.picker"
- onClosed={() => { const selected = pending.current; pending.current = null;
- if (mounted.current && selected?.account === currentAccount.current) { if (selected.item) onSelect(selected.item); else onCreate?.(); } }}>
- {onCreate && roster.createTargets.some(host => !current || host.deviceId === current.deviceId) ? <MainWindowActionButton action={{ label: t('devices.companionProfile.create'), onPress: () => {
- pending.current = { account: accountGeneration }; onClose();
- } }} /> : null}
- <TeammateList {...roster} embedded current={current} onRefresh={() => void roster.refresh()}
- onSelect={(item) => {
- // Selecting the current identity only dismisses the picker; do not put a second
- // instance of the same chat over its unsent composer draft.
- if (sameTeammate(current ?? null, teammateIdentity(item))) { close(); return; }
- pending.current = { account: accountGeneration, item }; onClose();
- }} />
- </CompanionSheet>;
-}
diff --git a/apps/mobile/src/session/ThinkingDots.tsx b/apps/mobile/src/session/ThinkingDots.tsx
new file mode 100644
index 0000000000..bbb4f07f3a
--- /dev/null
+++ b/apps/mobile/src/session/ThinkingDots.tsx
@@ -0,0 +1,41 @@
+import { useEffect, useRef } from 'react';
+import { Animated, Easing, StyleSheet, View } from 'react-native';
+import { useReduceMotionEnabled } from '@/hooks/useReduceMotion';
+import { radius, spacing, useThemedStyles, type ThemeColors } from '@/theme';
+
+/** Desktop `thinking-dot-wave`: 1.2s cycle, 0.2s stagger, opacity 0.25 ↔ 1. */
+const CYCLE_MS = 1200;
+const STAGGER_MS = 200;
+const DIM = 0.25;
+const REDUCED_OPACITY = 0.6;
+/** 4pt dots; a tiny glyph measured in points, not an icon or radius step. */
+const DOT_SIZE = 4;
+
+function Dot({ index, animate }: { index: number; animate: boolean }) {
+ const styles = useThemedStyles(makeStyles);
+ const opacity = useRef(new Animated.Value(animate ? DIM : REDUCED_OPACITY)).current;
+ useEffect(() => {
+ if (!animate) { opacity.setValue(REDUCED_OPACITY); return; }
+ opacity.setValue(DIM);
+ const rise = Animated.timing(opacity, { toValue: 1, duration: CYCLE_MS * 0.4, easing: Easing.inOut(Easing.ease), useNativeDriver: true });
+ const fall = Animated.timing(opacity, { toValue: DIM, duration: CYCLE_MS * 0.6, easing: Easing.inOut(Easing.ease), useNativeDriver: true });
+ const run = Animated.sequence([Animated.delay(index * STAGGER_MS), Animated.loop(Animated.sequence([rise, fall]))]);
+ run.start();
+ return () => run.stop();
+ }, [animate, index, opacity]);
+ return <Animated.View style={[styles.dot, { opacity }]} />;
+}
+
+/** 工作中的三点波动,取代系统 ActivityIndicator;减弱动效时三点静止。 */
+export function ThinkingDots() {
+ const styles = useThemedStyles(makeStyles);
+ const animate = useReduceMotionEnabled() === false;
+ return <View style={styles.row} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" testID="companion.thinkingDots">
+ {[0, 1, 2].map((index) => <Dot key={index} index={index} animate={animate} />)}
+ </View>;
+}
+
+const makeStyles = (colors: ThemeColors) => StyleSheet.create({
+ row: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs - 1 },
+ dot: { width: DOT_SIZE, height: DOT_SIZE, borderRadius: radius.pill, backgroundColor: colors.textTertiary },
+});
diff --git a/apps/mobile/src/session/WorkingStatusText.tsx b/apps/mobile/src/session/WorkingStatusText.tsx
index 80e373e091..746f201e0c 100644
--- a/apps/mobile/src/session/WorkingStatusText.tsx
+++ b/apps/mobile/src/session/WorkingStatusText.tsx
@@ -6,6 +6,8 @@ import { motionDuration, motionEasing } from '@/theme';
/** Product cadence shared with Desktop `WorkingStatusText`. */
export const WORKING_STATUS_MIN_INTERVAL_MS = 1000;
+/** While fading, copy sits 3pt low: the old copy sinks out and the new one rises into place. */
+const COPY_SHIFT = 3;
/** 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> }) {
@@ -13,6 +15,7 @@ export function WorkingStatusText({ text, style }: { text: string; style?: Style
const animate = useReduceMotionEnabled() === false;
const [displayed, setDisplayed] = useState(text);
const opacity = useRef(new Animated.Value(1)).current;
+ const translateY = useRef(opacity.interpolate({ inputRange: [0, 1], outputRange: [COPY_SHIFT, 0] })).current;
const state = useRef({
displayed: text,
latest: text,
@@ -88,7 +91,7 @@ export function WorkingStatusText({ text, style }: { text: string; style?: Style
}, [opacity]);
return (
- <Animated.View style={{ opacity, flexShrink: 1, minWidth: 0 }}>
+ <Animated.View style={{ opacity, transform: [{ translateY }], flexShrink: 1, minWidth: 0 }}>
<Text numberOfLines={1} style={style}>{displayed}</Text>
</Animated.View>
);
diff --git a/apps/mobile/src/session/hiddenHistoryChase.ts b/apps/mobile/src/session/hiddenHistoryChase.ts
new file mode 100644
index 0000000000..1f6f4bba1f
--- /dev/null
+++ b/apps/mobile/src/session/hiddenHistoryChase.ts
@@ -0,0 +1,71 @@
+import { useEffect, useRef, useState } from 'react';
+
+/**
+ * A loaded window can be entirely hidden rows: a teammate's scheduled prompt (every 10 minutes for a
+ * mailbox check) is stored as a user row neither client shows, and the host still counts it toward
+ * the 20-item history page. Then the chat renders nothing, the list cannot scroll, and the ordinary
+ * "load earlier" paths — which need at least one visible row — never run, so the chat reads as empty.
+ *
+ * While the loaded window shows nothing and older history exists, keep reading older pages until a
+ * row shows, the history ends, a page makes no progress, or the cap is reached. The cap covers about
+ * two and a half idle days of 10-minute prompts.
+ */
+export const MAX_HIDDEN_HISTORY_CHASE_PAGES = 20;
+
+export interface HiddenHistoryChaseInput {
+ /** Account + computer + session: a new scope starts a fresh chase. */
+ scope: string;
+ /** Online, app in the foreground, and a history the screen may page. */
+ enabled: boolean;
+ /** Rows the chat actually renders (after hiding scheduled prompts and work detail). */
+ visibleCount: number;
+ canLoadEarlier: boolean;
+ loading: boolean;
+ /** Oldest loaded position; an older page moves it. */
+ cursor: string | null;
+}
+
+export interface HiddenHistoryChaseState {
+ scope: string;
+ pages: number;
+ lastCursor: string | null;
+ exhausted: boolean;
+}
+
+export function initialHiddenHistoryChase(scope: string): HiddenHistoryChaseState {
+ return { scope, pages: 0, lastCursor: null, exhausted: false };
+}
+
+export function planHiddenHistoryChase(
+ current: HiddenHistoryChaseState,
+ input: HiddenHistoryChaseInput,
+): { state: HiddenHistoryChaseState; load: boolean } {
+ const state = current.scope === input.scope ? current : initialHiddenHistoryChase(input.scope);
+ if (!input.enabled || input.visibleCount > 0 || !input.canLoadEarlier || input.loading || state.exhausted) {
+ return { state, load: false };
+ }
+ // A page that did not move the cursor (failed or empty) or too many pages: stop instead of looping.
+ if (state.pages >= MAX_HIDDEN_HISTORY_CHASE_PAGES || (state.pages > 0 && input.cursor === state.lastCursor)) {
+ return { state: { ...state, exhausted: true }, load: false };
+ }
+ return { state: { ...state, pages: state.pages + 1, lastCursor: input.cursor }, load: true };
+}
+
+/**
+ * Runs the chase and reports whether it is still going, so the screen shows its syncing placeholder
+ * instead of "No messages yet" meanwhile.
+ */
+export function useHiddenHistoryChase(input: HiddenHistoryChaseInput, loadEarlier: () => void): boolean {
+ const state = useRef(initialHiddenHistoryChase(input.scope));
+ const load = useRef(loadEarlier);
+ load.current = loadEarlier;
+ const [exhaustedScope, setExhaustedScope] = useState<string | null>(null);
+ const { scope, enabled, visibleCount, canLoadEarlier, loading, cursor } = input;
+ useEffect(() => {
+ const plan = planHiddenHistoryChase(state.current, { scope, enabled, visibleCount, canLoadEarlier, loading, cursor });
+ state.current = plan.state;
+ if (plan.state.exhausted) setExhaustedScope(scope);
+ if (plan.load) load.current();
+ }, [scope, enabled, visibleCount, canLoadEarlier, loading, cursor]);
+ return enabled && visibleCount === 0 && canLoadEarlier && exhaustedScope !== scope;
+}
diff --git a/apps/mobile/src/session/teammateNavigation.ts b/apps/mobile/src/session/teammateNavigation.ts
index d236ebdb02..90996b6ec9 100644
--- a/apps/mobile/src/session/teammateNavigation.ts
+++ b/apps/mobile/src/session/teammateNavigation.ts
@@ -8,14 +8,6 @@ export function teammateIdentity(hosted: HostedRemoteCollectionItem): LastTeamma
resourceKind: 'bot', resourceId: hosted.item.ref.id,
} : null;
}
-export function sameTeammate(a: LastTeammateIdentity | null, b: LastTeammateIdentity | null): boolean {
- return !!a && !!b && a.deviceId === b.deviceId && a.collectionId === b.collectionId
- && a.resourceKind === b.resourceKind && a.resourceId === b.resourceId;
-}
-/** Never guess the default from a display name or use another teammate when the saved one is gone. */
-export function findLastTeammate(last: LastTeammateIdentity | null, items: readonly HostedRemoteCollectionItem[]) {
- return items.find((item) => sameTeammate(last, teammateIdentity(item))) ?? null;
-}
export function teammateResourceRoute(hosted: HostedRemoteCollectionItem, locale: string) {
const conversation = hosted.item.links.find(link => link.rel === 'conversation')?.target;
// The link is a display/navigation hint only. The destination revalidates the
diff --git a/apps/mobile/src/session/useHomeMode.ts b/apps/mobile/src/session/useHomeMode.ts
index c49116470b..58738ad148 100644
--- a/apps/mobile/src/session/useHomeMode.ts
+++ b/apps/mobile/src/session/useHomeMode.ts
@@ -14,11 +14,9 @@ interface Snapshot {
hydrated: boolean;
mode: HomeMode;
lastTeammate: LastTeammateIdentity | null;
- /** Startup recovery only; explicit mode selection must land on the roster. Never persisted. */
- restoreLastTeammate: boolean;
saveFailed: boolean;
}
-const initial: Snapshot = { hydrated: false, mode: 'tasks', lastTeammate: null, restoreLastTeammate: true, saveFailed: false };
+const initial: Snapshot = { hydrated: false, mode: 'tasks', lastTeammate: null, saveFailed: false };
interface Entry { snapshot: Snapshot; revision: number; loading?: Promise<void> }
const entries = new Map<string, Entry>();
const listeners = new Set<() => void>();
@@ -71,13 +69,8 @@ export function useHomeMode() {
});
});
}, [entry, owner]);
- const setMode = useCallback((mode: HomeMode) => {
- // Fence recovery before hydration publishes a remembered teammate or mounts its pane.
- // Keeping this in the shared in-memory snapshot also covers route remounts.
- if (owner) publish(entry, { restoreLastTeammate: false });
- return update({ mode });
- }, [entry, owner, update]);
- const rememberTeammate = useCallback((identity: LastTeammateIdentity | null) => update({ lastTeammate: identity }), [update]);
+ const setMode = useCallback((mode: HomeMode) => update({ mode }), [update]);
+ // The remembered teammate only preselects its computer when creating another; launch never reopens it.
const selectTeammate = useCallback((identity: LastTeammateIdentity) => update({ mode: 'teammates', lastTeammate: identity }), [update]);
- return { ...snapshot, owner, setMode, rememberTeammate, selectTeammate };
+ return { ...snapshot, owner, setMode, selectTeammate };
}
diff --git a/apps/mobile/src/theme/tokens.ts b/apps/mobile/src/theme/tokens.ts
index 95ac2b95cd..2951c69835 100644
--- a/apps/mobile/src/theme/tokens.ts
+++ b/apps/mobile/src/theme/tokens.ts
@@ -151,6 +151,11 @@ export interface ThemeColors {
statusDone: string;
/** 自动审批权限模式强调色(Auto Approval 蓝 #417CDD,L=D 同值,设计定稿 2026-07-17;取代 M2 的 #1D4ED8/#19D2C1 拆值) */
permAutoAccent: string;
+ /**
+ * 伙伴列表未读点(信息蓝 #417CDD,L=D 同值)。对齐桌面 `--bot-unread-bg`(DESIGN.md「Bot Unread Badge」):
+ * 表示 IM 未读语义,只用于伙伴列表行(伙伴与群聊)的未读点,不是 CTA、不是状态色,不得挪作他用。
+ */
+ botUnread: string;
/**
* 错误说明文案的黑白系前景 —— **刻意跟随 textPrimary,不是红色**(黑白反色设计里成段
* 错误文案不点红,错误语义由文案与上下文承担;"error" 是历史命名)。勿用于按钮文字
@@ -456,6 +461,7 @@ export const lightColors: ThemeColors = {
statusError: '#D91F37',
statusDone: '#2AAE5B',
permAutoAccent: '#417CDD',
+ botUnread: '#417CDD',
errorText: '#0F0F0F',
destructive: '#f43d3f',
sharedTaskConfirmBackground: '#ac3535',
@@ -545,6 +551,7 @@ export const darkColors: ThemeColors = {
statusError: '#D91F37',
statusDone: '#2AAE5B',
permAutoAccent: '#417CDD',
+ botUnread: '#417CDD',
errorText: '#EDEDED',
destructive: '#f43d3f',
sharedTaskConfirmBackground: '#ec9898',
diff --git a/docs/design-rules/DESIGN.md b/docs/design-rules/DESIGN.md
index 753a9386a4..06353cdfbd 100644
--- a/docs/design-rules/DESIGN.md
+++ b/docs/design-rules/DESIGN.md
@@ -103,7 +103,7 @@ The grayscale rule is near-absolute. The following are the **only** sanctioned n
> - **Usage History category color (owner-approved 2026-09-08, extended 2026-09-09).** The registered usage heatmap uses a blue intensity scale. Daily token bars and their corresponding model-table swatches/share marks use `--usage-model-1` … `--usage-model-5` as the seed palette; additional models receive theme-derived hues without a top-five cutoff. All model identities in the full history are included, even when absent from the last 30 days. Agent/harness swatches, share marks and the stacked share strip reuse the existing engine identity tokens: `--engine-badge-cc` (terracotta orange), `--engine-badge-codex` (blue), and `--usage-model-1` (owner-chosen teal for pi, to distinguish it from Codex blue). Claude/Codex retain their cross-mode fixed-value contract; pi follows the existing Light/Dark teal values. `--usage-heatmap-high` supplies the high end of the heatmap. The heatmap retains its process-blue alias; category colors do not inherit process/status semantics. Task marks, text and control frames stay neutral. See [the component specification](./usage-history-charts.md); colors.ts remains the seed-value source, with runtime derivation under governance §3.4.
> - **Resource Usage Process Categories** — the Resource Usage table may color only its 14px process-type glyphs so dense rows can be scanned by category (user-requested 2026-08-06). The six category pairs are task Agent blue `#2563EB / #60A5FA`, Agent service purple `#7C3AED / #A78BFA`, main-process pink `#DB2777 / #F472B6`, renderer cyan `#0891B2 / #22D3EE`, GPU amber `#D97706 / #F59E0B`, and utility green `#059669 / #34D399` (Light / Dark). These colors encode process category, **not health or status**; row backgrounds, labels, metrics, selection and actions remain on the neutral system. Direct use is confined to `resource-usage` process glyphs; the explicitly registered Usage History heatmap alias above may also reference the task-blue value. No other table or process UI inherits this permission. Tokens: `--process-agent-task-icon`, `--process-agent-service-icon`, `--process-main-icon`, `--process-renderer-icon`, `--process-gpu-icon`, `--process-utility-icon`.
> - **Bot Avatar Hues** — the Bots feature may fill a Bot's round avatar with one of nine registered tints so a list of persistent assistants can be told apart at a glance (registered 2026-08-17). The hue encodes **which Bot this is** — an identity cue like the file-type badges above, never health, status, or channel. Light mode uses soft tints, Dark mode the matching deep tints; the emoji and the initial-letter fallback (always `--text-primary`) stay legible in both. Tokens: `--bot-avatar-red-bg` / `-orange-` / `-amber-` / `-green-` / `-teal-` / `-blue-` / `-violet-` / `-pink-` / `-graphite-bg` (the last is the neutral step, and is where legacy `graphite` avatar data lands). Scope is strictly the Bot avatar fill in `features/bots` — do not reuse these tints for status dots, badges, row backgrounds, or any other surface. External theme import never touches them (the import template is allow-list only), so Bot identity colors do not drift between themes.
-> - **Bot Unread Badge** — the Bots sidebar may paint its unread pill and its pending-todo dot in information blue `#417CDD` with white text (registered 2026-08-19). The color encodes **IM unread semantics** ("how much have I not seen"), the one signal every chat list has taught users to read by color alone; it is not a CTA and not a health/status tone. The pill was previously the inverse-CTA fill, which on the selected row's light-gray pill turned into two high-contrast marks competing for the same glance. Same value both modes — an unread count means the same thing in Light and Dark, and the value is already the registered focus-ring / Auto Approval / Toast-info blue. The foreground is a standalone white: `--accent-pure-cta-fg` flips to black in Dark and cannot be borrowed. Tokens: `--bot-unread-bg` / `--bot-unread-fg`. Scope is strictly teammate-list unread indicators in `features/bots`, including the Cindy device row, its device-picker options/trigger and shared chat-header picker — do not reuse it for other badges, status dots, row backgrounds, or any other surface.
+> - **Bot Unread Badge** — the Bots sidebar may paint its unread pill and its pending-todo dot in information blue `#417CDD` with white text (registered 2026-08-19). The color encodes **IM unread semantics** ("how much have I not seen"), the one signal every chat list has taught users to read by color alone; it is not a CTA and not a health/status tone. The pill was previously the inverse-CTA fill, which on the selected row's light-gray pill turned into two high-contrast marks competing for the same glance. Same value both modes — an unread count means the same thing in Light and Dark, and the value is already the registered focus-ring / Auto Approval / Toast-info blue. The foreground is a standalone white: `--accent-pure-cta-fg` flips to black in Dark and cannot be borrowed. Tokens: `--bot-unread-bg` / `--bot-unread-fg`. Scope is strictly teammate-list unread indicators in `features/bots`, including the Cindy device row, its device-picker options/trigger and shared chat-header picker; Mobile mirrors the value as `botUnread` for the companion list row's unread dot only (registered 2026-09-29 — the host sends a boolean, so Mobile shows a dot, not a count) — do not reuse it for other badges, status dots, row backgrounds, or any other surface.
> - **ConfirmDialog Danger** — `#EF4444` used ONLY on the confirm button background in the Danger variant. The cancel button and rest of the dialog remain grayscale.
> - **Permission Selector Mode Highlights** — selected risky permission modes may color only the option text/icon/checkmark and the collapsed trigger text/icon. The selected row background remains grayscale. Auto Approval uses `#417CDD` in both modes (finalized 2026-07-17, same value light/dark; replaces light #000050 / dark #00D9C5). Full Access uses Heart Orange `#EA6B17` in both modes (auto-follows warning-accent, finalized 2026-07-17). These hex values are the **default-theme palette only** — other themes may override `--perm-auto-selected-text` and `--perm-bypass-selected-text` with their own accent colors, provided both modes remain color-coded, distinguishable from each other, and visually distinct from neutral text. Tokens: `--perm-auto-selected-text` and `--perm-bypass-selected-text` in `apps/desktop/src/renderer/styles/globals.css`.
> - **Shared-task Owner Crown** — the small crown immediately after the Agent/status icon uses the existing gold foreground `#F3A115` in both modes (`--warning-fg` on Desktop, `warningFg` on Mobile). This is a narrowly registered identity mark: it appears only for tasks owned by the current account, stays gold on selected rows, and never colors the title, row background, guest tasks, or an empty placeholder.
@@ -732,7 +732,7 @@ Theme switching: `useTheme.ts` provides `theme` (System / Light / Dark mode) plu
| Toast `#417CDD / #2AAE5B / #F3A115 / #D91F37` | (hardcoded in Toast.tsx, VARIANT_MAP exported) | same | Finalized 2026-07-17 (Toast exemption lifted, merged into the status-color family) |
| `--file-badge-pdf/-doc/-sheet/-slide/-code` + `--file-badge-fg` | `#B23A26` / `#2C5CA8` / `#2E7D4F` / `#A25A12` / `#5B49A8`, fg `#FFFFFF` | same | File-type badges on the self-drawn attachment icon (2026-07-27). Bound to _what the file is_, not to the theme, so both modes share one value. Each accent is picked for ≥4.5:1 against `--file-badge-fg` (5.96 / 6.56 / 5.05 / 5.24 / 7.09) — the badge label renders at 10px (Micro Label floor, §3), so AA small-text applies. `--file-badge-fg` is a standalone white: `--accent-pure-cta-fg` flips to black in Dark and cannot be borrowed. |
| `--bot-avatar-red-bg` … `--bot-avatar-graphite-bg` (9 tokens) | soft tints (`#f7ded9` … `#e5e5e5`) | deep tints (`#4a2e2a` … `#3c3c3a`) | Bot avatar fills in `features/bots` only (2026-08-17). Identity cue ("which Bot"), not status; emoji / initial-letter fallback reads `--text-primary` in both modes. Not part of the external-theme import allow-list, so the hues stay stable across themes. |
-| `--bot-unread-bg` / `--bot-unread-fg` | `#417CDD` / `#FFFFFF` | same | Teammate-list unread indicators in `features/bots`, including the Cindy device row, its device-picker options/trigger and shared chat-header picker (scope extended 2026-09-21). IM unread semantics, not a CTA and not status; theme-invariant because "unread" means the same thing in both modes. Value is the registered focus-ring / Auto Approval / Toast-info blue; the fg is a standalone white because `--accent-pure-cta-fg` flips to black in Dark. Must not leak to unrelated badges, dots or surfaces. |
+| `--bot-unread-bg` / `--bot-unread-fg` | `#417CDD` / `#FFFFFF` | same | Teammate-list unread indicators in `features/bots`, including the Cindy device row, its device-picker options/trigger and shared chat-header picker (scope extended 2026-09-21); Mobile `botUnread` mirrors it for the companion list unread dot only (2026-09-29). IM unread semantics, not a CTA and not status; theme-invariant because "unread" means the same thing in both modes. Value is the registered focus-ring / Auto Approval / Toast-info blue; the fg is a standalone white because `--accent-pure-cta-fg` flips to black in Dark. Must not leak to unrelated badges, dots or surfaces. |
| `--usage-heatmap-high`, `--usage-model-1` … `--usage-model-5` | Heatmap blue alias + reference-refined model palette; see colors.ts | Corresponding Dark palette; see colors.ts | Usage History heatmap, token bars and matching model-table marks only (2026-09-08). Category/intensity, never status. Only these newly introduced model-role defaults are refined; process tokens and user theme overrides do not change. |
| `--process-agent-task-icon`, `--process-agent-service-icon`, `--process-main-icon`, `--process-renderer-icon`, `--process-gpu-icon`, `--process-utility-icon` | `#2563EB` / `#7C3AED` / `#DB2777` / `#0891B2` / `#D97706` / `#059669` | `#60A5FA` / `#A78BFA` / `#F472B6` / `#22D3EE` / `#F59E0B` / `#34D399` | Resource Usage 14px process-category glyphs only (2026-08-06). Category cue, not status; all surrounding UI stays neutral. Protected from automatic external-theme import so category identity does not drift. |
diff --git a/docs/design-rules/design-inventory.md b/docs/design-rules/design-inventory.md
index 821941a042..dd5a04beb3 100644
--- a/docs/design-rules/design-inventory.md
+++ b/docs/design-rules/design-inventory.md
@@ -51,21 +51,21 @@
| `desktop.window.sidebar` | desktop | 右侧栏独立窗口 | `?sidebarWindow=1` → renderer/sidebar-window-entry.tsx;hash `/sidebar-window` | RightSidebar, RightSidebarShell, SidebarWindowLayout | apps/desktop/src/main/right-sidebar-window/controller.ts, apps/desktop/src/main/right-sidebar-window/ipc.ts, apps/desktop/src/main/right-sidebar-window/registry.ts, apps/desktop/src/main/right-sidebar-window/resolveHostContext.ts, apps/desktop/src/main/right-sidebar-window/settings-store.ts, apps/desktop/src/main/right-sidebar-window/window.ts, apps/desktop/src/renderer/components/layout/SidebarWindowLayout.tsx, apps/desktop/src/renderer/features/right-sidebar/AddTabDropdown.tsx, apps/desktop/src/renderer/features/right-sidebar/EmptyState.tsx, apps/desktop/src/renderer/features/right-sidebar/RightSidebarShell.tsx, apps/desktop/src/renderer/features/right-sidebar/TabBar.tsx, apps/desktop/src/renderer/features/right-sidebar/TabBodyErrorBoundary.tsx, apps/desktop/src/renderer/features/right-sidebar/hooks/useBrowserWebview.ts, apps/desktop/src/renderer/features/right-sidebar/hooks/useNativePopupSurface.ts, apps/desktop/src/renderer/features/right-sidebar/iosSimulatorPluginAvailability.ts, apps/desktop/src/renderer/features/right-sidebar/lib/browserPartition.ts, apps/desktop/src/renderer/features/right-sidebar/lib/browserWebviewPool.ts, apps/desktop/src/renderer/features/right-sidebar/lib/detachedSidebarRouting.ts, apps/desktop/src/renderer/features/right-sidebar/lib/executeSidebarCommand.ts, apps/desktop/src/renderer/features/right-sidebar/lib/iosSimulatorFocusBridge.ts, apps/desktop/src/renderer/features/right-sidebar/lib/lastTurnChangedFiles.ts, apps/desktop/src/renderer/features/right-sidebar/lib/nativePopupTabs.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openBackgroundTasksTab.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openInSidebarBrowser.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openInSidebarFileBrowser.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openRoutinesTab.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openSubagentsTab.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openTerminalShortcut.ts, apps/desktop/src/renderer/features/right-sidebar/lib/openTurnReview.ts, apps/desktop/src/renderer/features/right-sidebar/lib/popupRouter.ts, apps/desktop/src/renderer/features/right-sidebar/lib/popupTabs.ts, apps/desktop/src/renderer/features/right-sidebar/lib/rsbBrowserBridge.ts, apps/desktop/src/renderer/features/right-sidebar/lib/sidebarCommands.ts, apps/desktop/src/renderer/features/right-sidebar/lib/sidebarHostSession.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/BackgroundTasksBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/WorkflowAgentStrip.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/WorkflowProgressTree.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/chatTaskFocusIntent.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/listSessionTasks.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/workflowProgressModel.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/cindy-make/CindyMakeTabBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/cindy-make/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/FileBrowserBody.css, apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/FileBrowserBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/dropExternalFile.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/fileTreeImagePreview.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/useSessionScopedTreeWidth.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/index.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/ios-simulator/IOSSimulatorInstanceGrid.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/ios-simulator/IOSSimulatorTabBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/ios-simulator/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/ios-simulator/iosSimulatorH264Decoder.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/orca-workers/OrcaWorkersAttentionIcon.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/orca-workers/OrcaWorkersTabBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/orca-workers/actions.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/orca-workers/closeDecision.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/orca-workers/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/resource-usage/ResourceUsageBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/resource-usage/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/resource-usage/resource-usage.css, apps/desktop/src/renderer/features/right-sidebar/plugins/resource-usage/subscription.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/ImageDiffPreview.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/MarkdownDiffPreview.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/PlainUnifiedDiff.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/diffRows.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/highlight.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/inlineDiff.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/useDiffHighlights.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/ReviewTabBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/review/diffExpansionPreference.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/fileTree.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/gitApplyCommand.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/review/markdownPreview.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/useLastTurnFilter.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/useReviewGitState.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/review/useReviewSource.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/routines/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/ConversationStream.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/DetailView.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/RunList.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/SubagentChrome.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/SubagentToolCard.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/SubagentsBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/subagentChangeFence.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/subagentConversation.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/subagents/subagentFormat.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/terminal/TerminalTabBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/terminal/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/terminal/lib/xtermPool.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserChrome.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserCommentPopover.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserTabBody.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/browserCommentEditorDraft.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/index.tsx, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/lib/parseOmnibox.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/useBrowserComment.ts, apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/useLocalHtmlAutoReload.ts, apps/desktop/src/renderer/features/right-sidebar/registry.ts, apps/desktop/src/renderer/features/right-sidebar/store.ts, apps/desktop/src/renderer/features/right-sidebar/types.ts, apps/desktop/src/renderer/sidebar-window-entry.tsx, apps/desktop/src/renderer/styles/generated/tokens.css, apps/desktop/src/renderer/styles/globals.css | 103 | 45 | 179 |
| `desktop.window.voice-dictionary-toast` | desktop | 语音词典 Toast 窗 | `?view=voice-input-dictionary-toast` → main-entry.tsx → VoiceInputDictionaryToast | VoiceInputDictionaryToast | apps/desktop/src/renderer/voice-input/VoiceInputDictionaryToast.tsx | 6 | 0 | 2 |
| `desktop.window.voice-overlay` | desktop | 语音输入浮窗 | `?view=voice-input-overlay` → main-entry.tsx → VoiceInputOverlay | VoiceInputOverlay, VoiceInputStatusNotice | apps/desktop/src/main/voice-input/global.ts, apps/desktop/src/renderer/styles/generated/tokens.css, apps/desktop/src/renderer/styles/globals.css, apps/desktop/src/renderer/voice-input/VoiceInputOverlay.tsx, apps/desktop/src/renderer/voice-input/VoiceInputStatusNotice.tsx | 69 | 38 | 19 |
-| `mobile.account-deletion` | mobile | 账号注销 | app/account-deletion.tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, _layout, account-deletion, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/account-deletion.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.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/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 208 | 61 |
-| `mobile.auth` | mobile | 登录与添加账号 | app/(auth)/login.tsx / app/add-account.tsx | AccountSwitcherSheet, AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, 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, MobileUserAvatar, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, 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/MobileUserAvatar.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/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/ClipboardSharedTaskPrompt.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/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 215 | 83 |
-| `mobile.chat.new` | mobile | 新建任务 | app/sessions/new.tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AnnotationBurnInWebView, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerAttachmentTray, ComposerDockKeyboardFollow, ComposerFrame, ComposerFrame.ios, ComposerKeyboardAvoidingView, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ContextSheetCollabView, ContextSheetGoalView, ContextSheetGoalView.ios, ContextSheetMediaViews, DeviceLinkContext, FileTypeIcon, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, ImageLightbox, IncomingShareBridge, MobileAgentMark, MobileAgentSwitcher, MobileChoicePickerList, MobileComposerInputRow, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileModelPickerList, MobileModelPickerList.ios, MobileOutboxBridge, MobilePermissionPickerList, MobilePermissionPickerList.ios, MobilePrimitives, MobileProviderMark, MobileVendorIcon, ModelOptionsSheetView, ModelOptionsSheetView.ios, ModelPickerNativeHeader, ModelPickerNativeHeader.ios, ModelPickerSheet, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePermissionSheet, NativePermissionSheet.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, NewTaskSelectionSheet, NewTaskSelectionSheet.ios, OutsideTap, PaperPlaneIcon, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PlanModeChip, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, SlowSendNotice, StartupSplashOverlay, ThemeProvider, UnifiedModelPickerSheet, UnifiedModelPickerView, UnifiedModelPickerView.ios, VoiceRecordingPill, _layout, gestureHandler, new, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/sessions/new.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/FileTypeIcon.tsx, apps/mobile/src/components/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/PaperPlaneIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AnnotationBurnInWebView.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.tsx, apps/mobile/src/session/ComposerAttachmentTray.tsx, apps/mobile/src/session/ComposerDockKeyboardFollow.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/ContextSheetCollabView.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/SharedTaskAdmissionDialog.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/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 | 240 | 108 |
-| `mobile.chat.session` | mobile | 任务内容与输入 | app/sessions/[sessionId].tsx | AccountSwitcherSheet, AdaptiveWindow, AgentErrorDetails, AnchoredPullDownMenu, AndroidUpdateSheet, AnnotationBurnInWebView, AppText, AuthContext, AuthorizationMessageCard, AutomationTimerIcon, BlurBackdrop, CenteredScreen, ChatFileChipMenuSheet, ClipboardSharedTaskPrompt, CompanionBackButton, CompanionBackButton.ios, CompanionChoice, CompanionCreateNativeView, CompanionCreateNativeView.ios, CompanionHeader, CompanionImportSheet, CompanionMemoryPage, CompanionMemoryPage.ios, CompanionMessageActions, CompanionMessageCard, CompanionModelChain, CompanionNativeContent.ios, CompanionNavigationDrawer, CompanionPortraitPicker, CompanionProfileArtifacts, CompanionProfileNativeView, CompanionProfileNativeView.ios, CompanionProfileSheet, CompanionSettingsRow, CompanionSettingsRow.ios, CompanionSheet, CompanionSheet.ios, CompanionTaskResultCard, CompanionWorkingStatus, ComposerAttachmentTray, ComposerDockKeyboardFollow, ComposerExpandButton, ComposerExpandButton.ios, ComposerFrame, ComposerFrame.ios, ComposerKeyboardAvoidingView, ComposerMorphSource, ComposerMorphSource.ios, ComposerNativeInput, ComposerNativeInput.ios, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerRichInput, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ContextSheetCollabView, 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, HomeUnreadContext, ImageLightbox, IncomingShareBridge, InlineQueueSection, InlineQuoteChip, InlineReferenceChip, InteractionPanel, MarkdownBlockContent, MessageActionSheet, MessageRenderer, MobileAgentMark, MobileAgentSwitcher, MobileBoundaryNotice, MobileComposerInputRow, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileModelPickerList, MobileModelPickerList.ios, MobileOutboxBridge, MobilePermissionPickerList, MobilePermissionPickerList.ios, MobilePrimitives, MobileProviderMark, MobileUserAvatar, MobileVendorIcon, ModalContentArea, ModelOptionsSheetView, ModelOptionsSheetView.ios, ModelPickerNativeHeader, ModelPickerNativeHeader.ios, ModelPickerSheet, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePermissionSheet, NativePermissionSheet.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PaperPlaneIcon, PendingSendBubble, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PlanModeChip, PluginInvocationHeader, PromptRecommendation, PushNotificationsBridge, QuietSyncIndicator, QuoteCapsule, RecentMessageHistories, RemoteAccessGuide, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteTaskSuggestions, RenameSessionModal, ResidentHomeList, RewindPreviewPanel, RunningTokenRatePopover, SentInlineAtomBody, SessionActionSheet, SessionDetailsNative, SessionDetailsNative.ios, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, SessionListDrawer, SessionMenuSheet, SessionOptionsExpoSheet, SessionResourceCards, SessionSearchNative, SessionSearchNative.ios, SessionTailBanner, SessionTransientNotice, SessionUsageSummary, ShareImageNativeButton, ShareImageNativeButton.ios, ShareMessageCheckbox, ShareSelectAllButton, ShareSelectionBar, SharedTaskAdmissionDialog, 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/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileUserAvatar.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/PaperPlaneIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteAccessGuide.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/chrome/SystemNavigationBack.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/AgentErrorDetails.tsx, apps/mobile/src/session/AnnotationBurnInWebView.tsx, apps/mobile/src/session/AuthorizationMessageCard.tsx, apps/mobile/src/session/AutomationTimerIcon.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ChatFileChipMenuSheet.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.tsx, apps/mobile/src/session/CompanionBackButton.ios.tsx, apps/mobile/src/session/CompanionBackButton.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/CompanionImportSheet.tsx, apps/mobile/src/session/CompanionMemoryPage.ios.tsx, apps/mobile/src/session/CompanionMemoryPage.tsx, apps/mobile/src/session/CompanionMessageActions.tsx, apps/mobile/src/session/CompanionMessageCard.tsx, apps/mobile/src/session/CompanionModelChain.tsx, apps/mobile/src/session/CompanionNativeContent.ios.tsx, apps/mobile/src/session/CompanionNavigationDrawer.tsx, apps/mobile/src/session/CompanionPortraitPicker.tsx, apps/mobile/src/session/CompanionProfileArtifacts.tsx, apps/mobile/src/session/CompanionProfileNativeView.ios.tsx, apps/mobile/src/session/CompanionProfileNativeView.tsx, apps/mobile/src/session/CompanionProfileSheet.tsx, apps/mobile/src/session/CompanionSettingsRow.ios.tsx, apps/mobile/src/session/CompanionSettingsRow.tsx, apps/mobile/src/session/CompanionSheet.ios.tsx, apps/mobile/src/session/CompanionSheet.tsx, apps/mobile/src/session/CompanionTaskResultCard.tsx, apps/mobile/src/session/CompanionWorkingStatus.tsx, apps/mobile/src/session/ComposerAttachmentTray.tsx, apps/mobile/src/session/ComposerDockKeyboardFollow.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/ComposerMorphSource.ios.tsx, apps/mobile/src/session/ComposerMorphSource.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/ContextSheetCollabView.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/HomeUnreadContext.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/SessionTransientNotice.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/SharedTaskAdmissionDialog.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 | 241 | 302 |
-| `mobile.chat.sharing` | mobile | 共享任务邀请与成员 | app/shared-session.tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskEndedState, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, _layout, gestureHandler, peerFileTransport, shared-session, useLocale, useSharedTaskConfirmation | apps/mobile/app/_layout.tsx, apps/mobile/app/shared-session.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.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/SharedTaskAdmissionDialog.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 | 208 | 67 |
-| `mobile.companions.direct` | mobile | 伙伴私聊回看 | app/companions/direct/[threadId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, [threadId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/companions/direct/[threadId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.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/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 208 | 59 |
-| `mobile.companions.groups` | mobile | 伙伴群聊与分工 | app/companions/groups/[groupId].tsx | AdaptiveWindow, AgentErrorDetails, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, AuthorizationMessageCard, BlurBackdrop, BotGroupAvatars, BotGroupChatScreen, BotGroupComposer, BotGroupMenu, BotGroupMessageAttachments, BotGroupMessageText, BotGroupPlan, BotGroupSettingsSheet, BotGroupSpeakerRow, CenteredScreen, ClipboardSharedTaskPrompt, CompanionMessageActions, CompanionMessageCard, CompanionSheet, CompanionSheet.ios, CompanionTaskResultCard, ComposerAttachmentTray, ComposerFrame, ComposerFrame.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ContextSheetMediaViews, DeviceLinkContext, FileTypeIcon, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, ImageLightbox, IncomingShareBridge, InlineQuoteChip, InlineReferenceChip, InteractionPanel, MarkdownBlockContent, MessageActionSheet, MessageRenderer, MobileBoundaryNotice, MobileComposerInputRow, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PaperPlaneIcon, PendingSendBubble, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PluginInvocationHeader, PushNotificationsBridge, QuietSyncIndicator, QuoteCapsule, 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, SentInlineAtomBody, ShareMessageCheckbox, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, StreamingStatusText, ThemeProvider, WorkingStatusText, [groupId], _layout, gestureHandler, mathWebView, mediaPlayerWebView, mermaidWebView, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/companions/groups/[groupId].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/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/PaperPlaneIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AgentErrorDetails.tsx, apps/mobile/src/session/AuthorizationMessageCard.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/BotGroupAvatars.tsx, apps/mobile/src/session/BotGroupChatScreen.tsx, apps/mobile/src/session/BotGroupComposer.tsx, apps/mobile/src/session/BotGroupMenu.tsx, apps/mobile/src/session/BotGroupMessageAttachments.tsx, apps/mobile/src/session/BotGroupMessageText.tsx, apps/mobile/src/session/BotGroupPlan.tsx, apps/mobile/src/session/BotGroupSettingsSheet.tsx, apps/mobile/src/session/BotGroupSpeakerRow.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.tsx, apps/mobile/src/session/CompanionMessageActions.tsx, apps/mobile/src/session/CompanionMessageCard.tsx, apps/mobile/src/session/CompanionSheet.ios.tsx, apps/mobile/src/session/CompanionSheet.tsx, apps/mobile/src/session/CompanionTaskResultCard.tsx, apps/mobile/src/session/ComposerAttachmentTray.tsx, apps/mobile/src/session/ComposerFrame.ios.tsx, apps/mobile/src/session/ComposerFrame.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/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/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/MobileBoundaryNotice.tsx, apps/mobile/src/session/MobileComposerInputRow.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/PendingSendBubble.tsx, apps/mobile/src/session/PluginInvocationHeader.tsx, apps/mobile/src/session/QuoteCapsule.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SentInlineAtomBody.tsx, apps/mobile/src/session/ShareMessageCheckbox.tsx, apps/mobile/src/session/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/StreamingStatusText.tsx, apps/mobile/src/session/WorkingStatusText.tsx, 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/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 240 | 179 |
-| `mobile.device-management` | mobile | 设备管理 | app/devices/manage.tsx / app/devices/manage/[deviceId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceInformationFields, DeviceInformationFields.ios, DeviceLinkContext, DeviceManagementDialogs, DeviceManagementList, DeviceManagementList.ios, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, ModalContentArea, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RenameDeviceModal, ResidentHomeList, SettingsGroupRows, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, [deviceId], _layout, gestureHandler, manage, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/devices/manage.tsx, apps/mobile/app/devices/manage/[deviceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceInformationFields.ios.tsx, apps/mobile/src/device-link/DeviceInformationFields.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/DeviceManagementDialogs.tsx, apps/mobile/src/device-link/DeviceManagementList.ios.tsx, apps/mobile/src/device-link/DeviceManagementList.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.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/SettingsGroupRows.tsx, apps/mobile/src/session/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 208 | 59 |
-| `mobile.devices` | mobile | 主机详情 | app/devices/[deviceId].tsx | AccountSwitcherSheet, AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, AutomationTimerIcon, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerMorphSource, ComposerMorphSource.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, HomeModeSwitch, HomeNativeStackHeader, HomeNewTaskButton, HomeProjectMachineLabel, HomeSearchBar, HomeSurface, HomeUnreadContext, IncomingShareBridge, MobileAgentMark, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, MobileUserAvatar, MobileVendorIcon, ModalContentArea, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteAccessGuide, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteTaskSuggestions, RenameSessionModal, ResidentHomeList, SessionActionSheet, SessionDetailsNative, SessionDetailsNative.ios, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, SessionOptionsExpoSheet, SharedTaskAdmissionDialog, SharedTaskScreen, 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/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileUserAvatar.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteAccessGuide.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/AutomationTimerIcon.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.tsx, apps/mobile/src/session/ComposerMorphSource.ios.tsx, apps/mobile/src/session/ComposerMorphSource.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/HomeUnreadContext.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/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 208 | 110 |
-| `mobile.files` | mobile | 任务文件与预览 | app/files/[sessionId].tsx / app/files/preview/[sessionId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FileBrowserSegmentedControl, FileTypeIcon, FileTypeTile, FoldTouchpad, HomeEntryProvider, HtmlBrowserChrome, HtmlBrowserChrome.ios, HtmlFileReader, HtmlWebsiteBrowser, ImageLightbox, IncomingShareBridge, MarkdownFileReader, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, ModalContentArea, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, SystemNavigationBack, ThemeProvider, [sessionId], _layout, gestureHandler, mediaPlayerWebView, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/files/[sessionId].tsx, apps/mobile/app/files/preview/[sessionId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/FileTypeIcon.tsx, apps/mobile/src/components/FileTypeTile.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/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/BlurBackdrop.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.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/FileBrowserSegmentedControl.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/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 240 | 80 |
-| `mobile.home` | mobile | 主机与资源首页 | app/index.tsx / app/devices/index.tsx | AccountSwitcherSheet, AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, AutomationTimerIcon, BlurBackdrop, BotGroupAvatars, BotGroupCreateSheet, BotGroupList, BotGroupMenu, CenteredScreen, ClipboardSharedTaskPrompt, CompanionChoice, CompanionCreateNativeView, CompanionCreateNativeView.ios, CompanionImportSheet, CompanionMemoryPage, CompanionMemoryPage.ios, CompanionModelChain, CompanionNativeContent.ios, CompanionPortraitPicker, CompanionProfileArtifacts, CompanionProfileNativeView, CompanionProfileNativeView.ios, CompanionProfileSheet, CompanionSettingsRow, CompanionSettingsRow.ios, CompanionSheet, CompanionSheet.ios, ComposerMorphSource, ComposerMorphSource.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, HomeUnreadContext, IncomingShareBridge, MobileAgentMark, MobileAgentSwitcher, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileModelPickerList, MobileModelPickerList.ios, MobileOutboxBridge, MobilePermissionPickerList, MobilePermissionPickerList.ios, MobilePrimitives, MobileProviderMark, MobileUserAvatar, MobileVendorIcon, ModalContentArea, ModelOptionsSheetView, ModelOptionsSheetView.ios, ModelPickerNativeHeader, ModelPickerNativeHeader.ios, ModelPickerSheet, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteAccessGuide, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteTaskSuggestions, RenameSessionModal, ResidentHomeList, SessionActionSheet, SessionDetailsNative, SessionDetailsNative.ios, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, SessionOptionsExpoSheet, SharedTaskAdmissionDialog, SharedTaskScreen, 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/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileUserAvatar.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteAccessGuide.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/AutomationTimerIcon.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/BotGroupAvatars.tsx, apps/mobile/src/session/BotGroupCreateSheet.tsx, apps/mobile/src/session/BotGroupList.tsx, apps/mobile/src/session/BotGroupMenu.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.tsx, apps/mobile/src/session/CompanionChoice.tsx, apps/mobile/src/session/CompanionCreateNativeView.ios.tsx, apps/mobile/src/session/CompanionCreateNativeView.tsx, apps/mobile/src/session/CompanionImportSheet.tsx, apps/mobile/src/session/CompanionMemoryPage.ios.tsx, apps/mobile/src/session/CompanionMemoryPage.tsx, apps/mobile/src/session/CompanionModelChain.tsx, apps/mobile/src/session/CompanionNativeContent.ios.tsx, apps/mobile/src/session/CompanionPortraitPicker.tsx, apps/mobile/src/session/CompanionProfileArtifacts.tsx, apps/mobile/src/session/CompanionProfileNativeView.ios.tsx, apps/mobile/src/session/CompanionProfileNativeView.tsx, apps/mobile/src/session/CompanionProfileSheet.tsx, apps/mobile/src/session/CompanionSettingsRow.ios.tsx, apps/mobile/src/session/CompanionSettingsRow.tsx, apps/mobile/src/session/CompanionSheet.ios.tsx, apps/mobile/src/session/CompanionSheet.tsx, apps/mobile/src/session/ComposerMorphSource.ios.tsx, apps/mobile/src/session/ComposerMorphSource.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/HomeUnreadContext.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/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 208 | 141 |
-| `mobile.overlay.connection-startup` | mobile | 根布局挂载的启动与连接反馈 | app/_layout.tsx → StartupSplashOverlay / ConnectionNoticeProvider;各页面 ConnectionBanner | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ConnectionNoticeProvider, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/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/ClipboardSharedTaskPrompt.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/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 208 | 54 |
-| `mobile.remote-desktop` | mobile | 远程桌面 | app/devices/desktop/[deviceId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, [deviceId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/devices/desktop/[deviceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/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/ClipboardSharedTaskPrompt.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/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 208 | 54 |
-| `mobile.resources` | mobile | 远程资源列表与详情 | app/resources/[collectionId].tsx / app/resources/[collectionId]/[resourceId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, TeammateGenerationLabel, TeammateList, ThemeProvider, WorkingStatusText, [collectionId], [resourceId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/resources/[collectionId].tsx, apps/mobile/app/resources/[collectionId]/[resourceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.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/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 208 | 66 |
-| `mobile.settings` | mobile | 设置(含调试与日志上传可见入口) | app/settings.tsx / app/settings/device-name.tsx / app/settings/voice-dictionary.tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileChoicePickerList, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, MobileUserAvatar, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SettingsGroupRows, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, _layout, device-name, gestureHandler, peerFileTransport, settings, useLocale, voice-dictionary | apps/mobile/app/_layout.tsx, apps/mobile/app/settings.tsx, apps/mobile/app/settings/device-name.tsx, apps/mobile/app/settings/voice-dictionary.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/MobileUserAvatar.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.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/SettingsGroupRows.tsx, apps/mobile/src/session/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 208 | 62 |
+| `mobile.account-deletion` | mobile | 账号注销 | app/account-deletion.tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, _layout, account-deletion, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/account-deletion.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.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/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 210 | 62 |
+| `mobile.auth` | mobile | 登录与添加账号 | app/(auth)/login.tsx / app/add-account.tsx | AccountSwitcherSheet, AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, 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, MobileUserAvatar, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, 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/MobileUserAvatar.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/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/ClipboardSharedTaskPrompt.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/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 217 | 84 |
+| `mobile.chat.new` | mobile | 新建任务 | app/sessions/new.tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AnnotationBurnInWebView, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerAttachmentTray, ComposerDockKeyboardFollow, ComposerFrame, ComposerFrame.ios, ComposerKeyboardAvoidingView, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ContextSheetCollabView, ContextSheetGoalView, ContextSheetGoalView.ios, ContextSheetMediaViews, DeviceLinkContext, FileTypeIcon, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, ImageLightbox, IncomingShareBridge, MobileAgentMark, MobileAgentSwitcher, MobileChoicePickerList, MobileComposerInputRow, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileModelPickerList, MobileModelPickerList.ios, MobileOutboxBridge, MobilePermissionPickerList, MobilePermissionPickerList.ios, MobilePrimitives, MobileProviderMark, MobileVendorIcon, ModelOptionsSheetView, ModelOptionsSheetView.ios, ModelPickerNativeHeader, ModelPickerNativeHeader.ios, ModelPickerSheet, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePermissionSheet, NativePermissionSheet.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, NewTaskSelectionSheet, NewTaskSelectionSheet.ios, OutsideTap, PaperPlaneIcon, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PlanModeChip, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, SlowSendNotice, StartupSplashOverlay, ThemeProvider, UnifiedModelPickerSheet, UnifiedModelPickerView, UnifiedModelPickerView.ios, VoiceRecordingPill, _layout, gestureHandler, new, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/sessions/new.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/FileTypeIcon.tsx, apps/mobile/src/components/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/PaperPlaneIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AnnotationBurnInWebView.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.tsx, apps/mobile/src/session/ComposerAttachmentTray.tsx, apps/mobile/src/session/ComposerDockKeyboardFollow.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/ContextSheetCollabView.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/SharedTaskAdmissionDialog.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/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 | 242 | 109 |
+| `mobile.chat.session` | mobile | 任务内容与输入 | app/sessions/[sessionId].tsx | AccountSwitcherSheet, AdaptiveWindow, AgentErrorDetails, AnchoredPullDownMenu, AndroidUpdateSheet, AnnotationBurnInWebView, AppText, AuthContext, AuthorizationMessageCard, AutomationTimerIcon, BlurBackdrop, CenteredScreen, ChatFileChipMenuSheet, ChatIdentityHeader, ClipboardSharedTaskPrompt, CompanionChoice, CompanionCreateNativeView, CompanionCreateNativeView.ios, CompanionEntering, CompanionHeader, CompanionImportSheet, CompanionMemoryPage, CompanionMemoryPage.ios, CompanionMessageActions, CompanionMessageCard, CompanionModelChain, CompanionNativeContent.ios, CompanionPortraitPicker, CompanionPresenceRing, CompanionProfileArtifacts, CompanionProfileNativeView, CompanionProfileNativeView.ios, CompanionProfileSheet, CompanionSettingsRow, CompanionSettingsRow.ios, CompanionSheet, CompanionSheet.ios, CompanionTaskResultCard, CompanionWorkingStatus, ComposerAttachmentTray, ComposerDockKeyboardFollow, ComposerExpandButton, ComposerExpandButton.ios, ComposerFrame, ComposerFrame.ios, ComposerKeyboardAvoidingView, ComposerMorphSource, ComposerMorphSource.ios, ComposerNativeInput, ComposerNativeInput.ios, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerRichInput, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ContextSheetCollabView, 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, HomeUnreadContext, ImageLightbox, IncomingShareBridge, InlineQueueSection, InlineQuoteChip, InlineReferenceChip, InteractionPanel, MarkdownBlockContent, MessageActionSheet, MessageRenderer, MobileAgentMark, MobileAgentSwitcher, MobileBoundaryNotice, MobileComposerInputRow, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileModelPickerList, MobileModelPickerList.ios, MobileOutboxBridge, MobilePermissionPickerList, MobilePermissionPickerList.ios, MobilePrimitives, MobileProviderMark, MobileUserAvatar, MobileVendorIcon, ModalContentArea, ModelOptionsSheetView, ModelOptionsSheetView.ios, ModelPickerNativeHeader, ModelPickerNativeHeader.ios, ModelPickerSheet, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePermissionSheet, NativePermissionSheet.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PaperPlaneIcon, PendingSendBubble, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PlanModeChip, PluginInvocationHeader, PromptRecommendation, PushNotificationsBridge, QuietSyncIndicator, QuoteCapsule, RecentMessageHistories, RemoteAccessGuide, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteTaskSuggestions, RenameSessionModal, ResidentHomeList, RewindPreviewPanel, RunningTokenRatePopover, SentInlineAtomBody, SessionActionSheet, SessionDetailsNative, SessionDetailsNative.ios, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, SessionListDrawer, SessionMenuSheet, SessionOptionsExpoSheet, SessionResourceCards, SessionRightSpinner, SessionSearchNative, SessionSearchNative.ios, SessionTailBanner, SessionTransientNotice, SessionUsageSummary, ShareImageNativeButton, ShareImageNativeButton.ios, ShareMessageCheckbox, ShareSelectAllButton, ShareSelectionBar, SharedTaskAdmissionDialog, SharedTaskEndedState, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, SlowSendNotice, StartupSplashOverlay, StreamingStatusText, SwipeableSessionRow, SwipeableSessionRow.ios, SystemNavigationBack, TaskTags, TaskTagsSheet, ThemeProvider, ThinkingDots, 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/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileUserAvatar.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/PaperPlaneIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteAccessGuide.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/chrome/SystemNavigationBack.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/AgentErrorDetails.tsx, apps/mobile/src/session/AnnotationBurnInWebView.tsx, apps/mobile/src/session/AuthorizationMessageCard.tsx, apps/mobile/src/session/AutomationTimerIcon.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ChatFileChipMenuSheet.tsx, apps/mobile/src/session/ChatIdentityHeader.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.tsx, apps/mobile/src/session/CompanionChoice.tsx, apps/mobile/src/session/CompanionCreateNativeView.ios.tsx, apps/mobile/src/session/CompanionCreateNativeView.tsx, apps/mobile/src/session/CompanionEntering.tsx, apps/mobile/src/session/CompanionHeader.tsx, apps/mobile/src/session/CompanionImportSheet.tsx, apps/mobile/src/session/CompanionMemoryPage.ios.tsx, apps/mobile/src/session/CompanionMemoryPage.tsx, apps/mobile/src/session/CompanionMessageActions.tsx, apps/mobile/src/session/CompanionMessageCard.tsx, apps/mobile/src/session/CompanionModelChain.tsx, apps/mobile/src/session/CompanionNativeContent.ios.tsx, apps/mobile/src/session/CompanionPortraitPicker.tsx, apps/mobile/src/session/CompanionPresenceRing.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/ComposerDockKeyboardFollow.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/ComposerMorphSource.ios.tsx, apps/mobile/src/session/ComposerMorphSource.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/ContextSheetCollabView.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/HomeUnreadContext.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/SessionRightSpinner.tsx, apps/mobile/src/session/SessionSearchNative.ios.tsx, apps/mobile/src/session/SessionSearchNative.tsx, apps/mobile/src/session/SessionTailBanner.tsx, apps/mobile/src/session/SessionTransientNotice.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/SharedTaskAdmissionDialog.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/ThinkingDots.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 | 243 | 300 |
+| `mobile.chat.sharing` | mobile | 共享任务邀请与成员 | app/shared-session.tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskEndedState, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, _layout, gestureHandler, peerFileTransport, shared-session, useLocale, useSharedTaskConfirmation | apps/mobile/app/_layout.tsx, apps/mobile/app/shared-session.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.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/SharedTaskAdmissionDialog.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 | 210 | 68 |
+| `mobile.companions.direct` | mobile | 伙伴私聊回看 | app/companions/direct/[threadId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, [threadId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/companions/direct/[threadId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.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/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 210 | 60 |
+| `mobile.companions.groups` | mobile | 伙伴群聊与分工 | app/companions/groups/[groupId].tsx | AdaptiveWindow, AgentErrorDetails, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, AuthorizationMessageCard, BlurBackdrop, BotGroupAvatars, BotGroupChatScreen, BotGroupComposer, BotGroupMenu, BotGroupMessageAttachments, BotGroupMessageText, BotGroupPlan, BotGroupSettingsSheet, BotGroupSpeakerRow, CenteredScreen, ChatIdentityHeader, ClipboardSharedTaskPrompt, CompanionCardButton, CompanionEntering, CompanionMessageActions, CompanionMessageCard, CompanionPresenceRing, CompanionSheet, CompanionSheet.ios, CompanionTaskResultCard, ComposerAttachmentTray, ComposerFrame, ComposerFrame.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ContextSheetMediaViews, DeviceLinkContext, FileTypeIcon, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, ImageLightbox, IncomingShareBridge, InlineQuoteChip, InlineReferenceChip, InteractionPanel, MarkdownBlockContent, MessageActionSheet, MessageRenderer, MobileBoundaryNotice, MobileComposerInputRow, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PaperPlaneIcon, PendingSendBubble, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PluginInvocationHeader, PushNotificationsBridge, QuietSyncIndicator, QuoteCapsule, 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, SentInlineAtomBody, ShareMessageCheckbox, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, StreamingStatusText, ThemeProvider, ThinkingDots, WorkingStatusText, [groupId], _layout, gestureHandler, mathWebView, mediaPlayerWebView, mermaidWebView, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/companions/groups/[groupId].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/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/PaperPlaneIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AgentErrorDetails.tsx, apps/mobile/src/session/AuthorizationMessageCard.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/BotGroupAvatars.tsx, apps/mobile/src/session/BotGroupChatScreen.tsx, apps/mobile/src/session/BotGroupComposer.tsx, apps/mobile/src/session/BotGroupMenu.tsx, apps/mobile/src/session/BotGroupMessageAttachments.tsx, apps/mobile/src/session/BotGroupMessageText.tsx, apps/mobile/src/session/BotGroupPlan.tsx, apps/mobile/src/session/BotGroupSettingsSheet.tsx, apps/mobile/src/session/BotGroupSpeakerRow.tsx, apps/mobile/src/session/ChatIdentityHeader.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.tsx, apps/mobile/src/session/CompanionCardButton.tsx, apps/mobile/src/session/CompanionEntering.tsx, apps/mobile/src/session/CompanionMessageActions.tsx, apps/mobile/src/session/CompanionMessageCard.tsx, apps/mobile/src/session/CompanionPresenceRing.tsx, apps/mobile/src/session/CompanionSheet.ios.tsx, apps/mobile/src/session/CompanionSheet.tsx, apps/mobile/src/session/CompanionTaskResultCard.tsx, apps/mobile/src/session/ComposerAttachmentTray.tsx, apps/mobile/src/session/ComposerFrame.ios.tsx, apps/mobile/src/session/ComposerFrame.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/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/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/MobileBoundaryNotice.tsx, apps/mobile/src/session/MobileComposerInputRow.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/PendingSendBubble.tsx, apps/mobile/src/session/PluginInvocationHeader.tsx, apps/mobile/src/session/QuoteCapsule.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SentInlineAtomBody.tsx, apps/mobile/src/session/ShareMessageCheckbox.tsx, apps/mobile/src/session/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/StreamingStatusText.tsx, apps/mobile/src/session/ThinkingDots.tsx, apps/mobile/src/session/WorkingStatusText.tsx, 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/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 242 | 183 |
+| `mobile.device-management` | mobile | 设备管理 | app/devices/manage.tsx / app/devices/manage/[deviceId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceInformationFields, DeviceInformationFields.ios, DeviceLinkContext, DeviceManagementDialogs, DeviceManagementList, DeviceManagementList.ios, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, ModalContentArea, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RenameDeviceModal, ResidentHomeList, SettingsGroupRows, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, [deviceId], _layout, gestureHandler, manage, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/devices/manage.tsx, apps/mobile/app/devices/manage/[deviceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceInformationFields.ios.tsx, apps/mobile/src/device-link/DeviceInformationFields.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/DeviceManagementDialogs.tsx, apps/mobile/src/device-link/DeviceManagementList.ios.tsx, apps/mobile/src/device-link/DeviceManagementList.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.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/SettingsGroupRows.tsx, apps/mobile/src/session/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 210 | 60 |
+| `mobile.devices` | mobile | 主机详情 | app/devices/[deviceId].tsx | AccountSwitcherSheet, AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, AutomationTimerIcon, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerMorphSource, ComposerMorphSource.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, HomeModeSwitch, HomeNativeStackHeader, HomeNewTaskButton, HomeProjectMachineLabel, HomeSearchBar, HomeSurface, HomeUnreadContext, IncomingShareBridge, MobileAgentMark, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, MobileUserAvatar, MobileVendorIcon, ModalContentArea, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteAccessGuide, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteTaskSuggestions, RenameSessionModal, ResidentHomeList, SessionActionSheet, SessionDetailsNative, SessionDetailsNative.ios, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, SessionOptionsExpoSheet, SessionRightSpinner, SharedTaskAdmissionDialog, SharedTaskScreen, 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/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileUserAvatar.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteAccessGuide.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/AutomationTimerIcon.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.tsx, apps/mobile/src/session/ComposerMorphSource.ios.tsx, apps/mobile/src/session/ComposerMorphSource.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/HomeUnreadContext.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/SessionRightSpinner.tsx, apps/mobile/src/session/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 210 | 111 |
+| `mobile.files` | mobile | 任务文件与预览 | app/files/[sessionId].tsx / app/files/preview/[sessionId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FileBrowserSegmentedControl, FileTypeIcon, FileTypeTile, FoldTouchpad, HomeEntryProvider, HtmlBrowserChrome, HtmlBrowserChrome.ios, HtmlFileReader, HtmlWebsiteBrowser, ImageLightbox, IncomingShareBridge, MarkdownFileReader, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, ModalContentArea, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, SystemNavigationBack, ThemeProvider, [sessionId], _layout, gestureHandler, mediaPlayerWebView, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/files/[sessionId].tsx, apps/mobile/app/files/preview/[sessionId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/FileTypeIcon.tsx, apps/mobile/src/components/FileTypeTile.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/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/BlurBackdrop.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.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/FileBrowserSegmentedControl.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/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 242 | 81 |
+| `mobile.home` | mobile | 主机与资源首页 | app/index.tsx / app/devices/index.tsx | AccountSwitcherSheet, AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, AutomationTimerIcon, BlurBackdrop, BotGroupAvatars, BotGroupCreateSheet, BotGroupList, CenteredScreen, ClipboardSharedTaskPrompt, CompanionChoice, CompanionCreateNativeView, CompanionCreateNativeView.ios, CompanionImportSheet, CompanionListRow, CompanionMemoryPage, CompanionMemoryPage.ios, CompanionModelChain, CompanionNativeContent.ios, CompanionPortraitPicker, CompanionPresenceRing, CompanionProfileArtifacts, CompanionProfileNativeView, CompanionProfileNativeView.ios, CompanionProfileSheet, CompanionSettingsRow, CompanionSettingsRow.ios, CompanionSheet, CompanionSheet.ios, ComposerMorphSource, ComposerMorphSource.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, HomeUnreadContext, IncomingShareBridge, MobileAgentMark, MobileAgentSwitcher, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileModelPickerList, MobileModelPickerList.ios, MobileOutboxBridge, MobilePermissionPickerList, MobilePermissionPickerList.ios, MobilePrimitives, MobileProviderMark, MobileUserAvatar, MobileVendorIcon, ModalContentArea, ModelOptionsSheetView, ModelOptionsSheetView.ios, ModelPickerNativeHeader, ModelPickerNativeHeader.ios, ModelPickerSheet, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteAccessGuide, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteTaskSuggestions, RenameSessionModal, ResidentHomeList, SessionActionSheet, SessionDetailsNative, SessionDetailsNative.ios, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, SessionOptionsExpoSheet, SessionRightSpinner, SharedTaskAdmissionDialog, SharedTaskScreen, 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/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileUserAvatar.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteAccessGuide.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/AutomationTimerIcon.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/BotGroupAvatars.tsx, apps/mobile/src/session/BotGroupCreateSheet.tsx, apps/mobile/src/session/BotGroupList.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.tsx, apps/mobile/src/session/CompanionChoice.tsx, apps/mobile/src/session/CompanionCreateNativeView.ios.tsx, apps/mobile/src/session/CompanionCreateNativeView.tsx, apps/mobile/src/session/CompanionImportSheet.tsx, apps/mobile/src/session/CompanionListRow.tsx, apps/mobile/src/session/CompanionMemoryPage.ios.tsx, apps/mobile/src/session/CompanionMemoryPage.tsx, apps/mobile/src/session/CompanionModelChain.tsx, apps/mobile/src/session/CompanionNativeContent.ios.tsx, apps/mobile/src/session/CompanionPortraitPicker.tsx, apps/mobile/src/session/CompanionPresenceRing.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/ComposerMorphSource.ios.tsx, apps/mobile/src/session/ComposerMorphSource.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/HomeUnreadContext.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/SessionRightSpinner.tsx, apps/mobile/src/session/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 210 | 143 |
+| `mobile.overlay.connection-startup` | mobile | 根布局挂载的启动与连接反馈 | app/_layout.tsx → StartupSplashOverlay / ConnectionNoticeProvider;各页面 ConnectionBanner | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ConnectionNoticeProvider, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/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/ClipboardSharedTaskPrompt.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/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 210 | 55 |
+| `mobile.remote-desktop` | mobile | 远程桌面 | app/devices/desktop/[deviceId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, [deviceId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/devices/desktop/[deviceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/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/ClipboardSharedTaskPrompt.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/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 210 | 55 |
+| `mobile.resources` | mobile | 远程资源列表与详情 | app/resources/[collectionId].tsx / app/resources/[collectionId]/[resourceId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, BotGroupAvatars, BotGroupList, CenteredScreen, ClipboardSharedTaskPrompt, CompanionListRow, CompanionPresenceRing, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SessionRightSpinner, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, TeammateGenerationLabel, TeammateList, ThemeProvider, WorkingStatusText, [collectionId], [resourceId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/resources/[collectionId].tsx, apps/mobile/app/resources/[collectionId]/[resourceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/BotGroupAvatars.tsx, apps/mobile/src/session/BotGroupList.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.tsx, apps/mobile/src/session/CompanionListRow.tsx, apps/mobile/src/session/CompanionPresenceRing.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/SessionRightSpinner.tsx, apps/mobile/src/session/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 210 | 71 |
+| `mobile.settings` | mobile | 设置(含调试与日志上传可见入口) | app/settings.tsx / app/settings/device-name.tsx / app/settings/voice-dictionary.tsx | AdaptiveWindow, AnchoredPullDownMenu, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, IncomingShareBridge, MobileChoicePickerList, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, MobileUserAvatar, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, ResidentHomeList, SettingsGroupRows, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, _layout, device-name, gestureHandler, peerFileTransport, settings, useLocale, voice-dictionary | apps/mobile/app/_layout.tsx, apps/mobile/app/settings.tsx, apps/mobile/app/settings/device-name.tsx, apps/mobile/app/settings/voice-dictionary.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/MobileUserAvatar.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.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/SettingsGroupRows.tsx, apps/mobile/src/session/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskScreen.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 | 210 | 63 |
### 生产路由覆盖
diff --git a/docs/product-rules/bot-group-chat.md b/docs/product-rules/bot-group-chat.md
index b29a4a03d7..4b1552b4ba 100644
--- a/docs/product-rules/bot-group-chat.md
+++ b/docs/product-rules/bot-group-chat.md
@@ -223,7 +223,9 @@
### 8.2 界面
-- 伙伴页增加「群聊」分组:叠放头像、群名、最近状态(与电脑侧栏相同的分工状态)、运行中标记;可新建群聊。
+- 伙伴页把群聊和伙伴混排在同一个列表里,按最近活动排序:群用双人叠放头像、群名、最近状态(与电脑侧栏相同的分工
+ 状态)、运行中标记,行样式与伙伴行一致。右上角「+」菜单可新建伙伴或新建群聊。
+- 群设置里点成员行打开该成员的菜单(设为负责人、移出群聊);群至少保留两人,移出在只剩两人时不可用。
- 群聊页与电脑一致:多作者时间线、安排卡、交接消息与文件名、「下一步 · 继续」「没做完 · 重试」、
「N 步都做完了」、正在发言/安排/做的伙伴、待确认操作内嵌;输入框支持 @、附件(见 3.1)与「+」安排分工。
- 电脑不支持群附件时(旧版本,`supportsAttachments` 缺省),手机不显示附件入口。