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(remote-files): 远程文件取回与下载提示增加「取消」 (#6062)

Dashdedcf0ec2dac
diff --git a/apps/desktop/src/main/file-browser/index.ts b/apps/desktop/src/main/file-browser/index.ts
index 2c57c18f81..f5aaf31c4a 100644
--- a/apps/desktop/src/main/file-browser/index.ts
+++ b/apps/desktop/src/main/file-browser/index.ts
@@ -20,7 +20,7 @@ import { readRemoteDeviceFile } from '../device-link/fileAccess';
* watcherManager;远程 watch 桥接见 remote-watch.ts。
*/
-import { app, ipcMain, BrowserWindow } from 'electron';
+import { app, ipcMain, BrowserWindow, type WebContents } from 'electron';
import {
createFile,
createFolder,
@@ -62,7 +62,7 @@ import {
type ChatFileFetchArgs,
buildDevicePathUrl,
} from './chat-file.js';
-import { createFileTransferProgressReporter } from './transfer-progress.js';
+import { createFileTransferProgressReporter, fileTransferRequestId } from './transfer-progress.js';
import { downloadChatEntry, type ChatDownloadDeps } from './chat-download.js';
import { isTransientDeviceExportStatusError } from './device-export-status-error.js';
import { makeSshChunkExecutor } from './ssh-media.js';
@@ -106,6 +106,8 @@ export const FILE_BROWSER_INVOKE = {
CHAT_FILE_STAT: 'maker:chat-file:stat',
/** 远程文件 / 文件夹下载到系统「下载」文件夹(见 chat-download.ts)。 */
CHAT_FILE_DOWNLOAD: 'maker:chat-file:download',
+ /** 取消进行中的聊天文件取回 / 下载(按发起时的 requestId)。 */
+ CHAT_FILE_CANCEL: 'maker:chat-file:cancel',
} as const;
export const FILE_BROWSER_PUSH = {
@@ -363,6 +365,33 @@ async function fetchRemoteBigFile(
* during bootstrap. The handlers themselves are stateless beyond the
* watcherManager singleton.
*/
+/** 进行中的聊天文件取回 / 下载:发起窗口 + requestId → 中止器(供提示条上的「取消」)。 */
+const chatTransfers = new Map<string, AbortController>();
+
+/** requestId 与进度事件同一判据(非空且 ≤64 字符),不合格时不登记、不可取消。 */
+function chatTransferKey(wc: WebContents, requestId: unknown): string | null {
+ const id = fileTransferRequestId(requestId);
+ return id ? `${wc.id}:${id}` : null;
+}
+
+/** 用户取消、发起窗口关闭或渲染进程崩溃时中止:停止轮询 / 关闭 SSH 流,不再落盘。 */
+function beginChatTransfer(wc: WebContents, requestId: unknown) {
+ const abort = new AbortController();
+ const key = chatTransferKey(wc, requestId);
+ if (key) chatTransfers.set(key, abort);
+ const onGone = () => abort.abort();
+ wc.once('destroyed', onGone);
+ wc.once('render-process-gone', onGone);
+ return {
+ signal: abort.signal,
+ end: () => {
+ if (key && chatTransfers.get(key) === abort) chatTransfers.delete(key);
+ wc.removeListener('destroyed', onGone);
+ wc.removeListener('render-process-gone', onGone);
+ },
+ };
+}
+
export function registerFileBrowserIpc(): void {
// file-browser-core 是宿主无关的共享包(也跑在远端 file-service daemon 里),
// 日志设施由宿主注入——desktop 侧接统一 logger(规则 12),scope 与抽包前一致。
@@ -479,13 +508,16 @@ export function registerFileBrowserIpc(): void {
};
ipcMain.handle(FILE_BROWSER_INVOKE.CHAT_FILE_FETCH, async (event, args: ChatFileFetchArgs) => {
const wc = event.sender;
+ const transfer = beginChatTransfer(wc, args?.requestId);
const onProgress = createFileTransferProgressReporter(
{ workdir: args?.workdir ?? '', relPath: args?.absPath ?? '', requestId: args?.requestId },
(progress) => {
if (!wc.isDestroyed()) wc.send(FILE_BROWSER_PUSH.TRANSFER, progress);
},
);
- const result = await fetchChatFile(args, onProgress, chatFileDeps);
+ const result = await fetchChatFile(args, onProgress, chatFileDeps, transfer.signal).finally(
+ transfer.end,
+ );
if (!result.ok) {
log.warn('chat-file fetch failed', {
code: result.code,
@@ -568,11 +600,7 @@ export function registerFileBrowserIpc(): void {
// 会把远端内容写进用户的下载文件夹:只接受 Cindy 自有页面发起(与 HTML 预览同一判据)。
assertTrustedAppRendererEvent(event);
const wc = event.sender;
- // 发起窗口关闭或渲染进程崩溃时中止:停止轮询 / 关闭 SSH 流,不再落盘。
- const abort = new AbortController();
- const onGone = () => abort.abort();
- wc.once('destroyed', onGone);
- wc.once('render-process-gone', onGone);
+ const transfer = beginChatTransfer(wc, args?.requestId);
// 进度带上发起方的请求 id:同一路径同时有取回 / 下载时 renderer 不串线。
const onProgress = createFileTransferProgressReporter(
{ workdir: args?.workdir ?? '', relPath: args?.absPath ?? '', requestId: args?.requestId },
@@ -584,11 +612,8 @@ export function registerFileBrowserIpc(): void {
args,
onProgress,
chatDownloadDeps,
- abort.signal,
- ).finally(() => {
- wc.removeListener('destroyed', onGone);
- wc.removeListener('render-process-gone', onGone);
- });
+ transfer.signal,
+ ).finally(transfer.end);
if (!result.ok) {
log.warn('chat-file download failed', {
code: result.code,
@@ -600,6 +625,13 @@ export function registerFileBrowserIpc(): void {
},
);
+ ipcMain.handle(FILE_BROWSER_INVOKE.CHAT_FILE_CANCEL, (event, requestId: unknown) => {
+ // 会中止主进程里的传输:与下载同一来源判据,只接受 Cindy 自有页面发起。
+ assertTrustedAppRendererEvent(event);
+ const key = chatTransferKey(event.sender, requestId);
+ if (key) chatTransfers.get(key)?.abort();
+ });
+
// chip 点亮预检:远端精确 stat,verdict 见 statChatFile 注释。查询型接口,
// 任何异常都折叠进 verdict(unknown),不 throw。
ipcMain.handle(FILE_BROWSER_INVOKE.CHAT_FILE_STAT, async (_event, args: ChatFileFetchArgs) => {
diff --git a/apps/desktop/src/main/right-sidebar-window/__tests__/preload-contract.test.ts b/apps/desktop/src/main/right-sidebar-window/__tests__/preload-contract.test.ts
index f67d119547..62d96bc130 100644
--- a/apps/desktop/src/main/right-sidebar-window/__tests__/preload-contract.test.ts
+++ b/apps/desktop/src/main/right-sidebar-window/__tests__/preload-contract.test.ts
@@ -188,7 +188,7 @@ describe('sidebarWindowPreload 椤跺眰濂戠害', () => {
'listDir', 'listAllFiles', 'readFile', 'writeFile', 'createFile', 'createFolder',
'deleteEntry', 'renameEntry', 'stat', 'startWatch', 'stopWatch', 'onEvent',
'fetchRemote', 'readCached', 'cachePut', 'onTransferProgress', 'chatFetch', 'chatDownload',
- 'chatStat',
+ 'chatCancel', 'chatStat',
]));
expect(terminalKeys).toEqual(expect.arrayContaining([
'create', 'write', 'resize', 'dispose', 'restart', 'onData', 'onExit',
diff --git a/apps/desktop/src/preload/preload.ts b/apps/desktop/src/preload/preload.ts
index 05b1dfa9c1..36ff986801 100644
--- a/apps/desktop/src/preload/preload.ts
+++ b/apps/desktop/src/preload/preload.ts
@@ -2939,6 +2939,9 @@ contextBridge.exposeInMainWorld('electronAPI', {
message?: string;
}
> => ipcRenderer.invoke('maker:chat-file:download', params),
+ /** 取消进行中的 chatFetch / chatDownload(按发起时的 requestId);已结束时无操作。 */
+ chatCancel: (requestId: string): Promise<void> =>
+ ipcRenderer.invoke('maker:chat-file:cancel', requestId),
/** 聊天流文件 chip 点亮预检:远端精确 stat。file=点亮;nonfile=保持纯文本;unknown=乐观点亮。 */
chatStat: (params: {
origin: { kind: 'device'; deviceId: string } | { kind: 'ssh'; remoteHostId: string };
diff --git a/apps/desktop/src/preload/sidebarWindowPreload.ts b/apps/desktop/src/preload/sidebarWindowPreload.ts
index 6cdbef6fcf..ea20a6cac6 100644
--- a/apps/desktop/src/preload/sidebarWindowPreload.ts
+++ b/apps/desktop/src/preload/sidebarWindowPreload.ts
@@ -226,6 +226,7 @@ contextBridge.exposeInMainWorld('electronAPI', {
previewHtml: (params: unknown): Promise<unknown> => ipcRenderer.invoke('maker:html-preview:open', params),
chatFetch: (params: unknown): Promise<unknown> => ipcRenderer.invoke('maker:chat-file:fetch', params),
chatDownload: (params: unknown): Promise<unknown> => ipcRenderer.invoke('maker:chat-file:download', params),
+ chatCancel: (requestId: string): Promise<unknown> => ipcRenderer.invoke('maker:chat-file:cancel', requestId),
chatStat: (params: unknown): Promise<unknown> => ipcRenderer.invoke('maker:chat-file:stat', params),
},
terminal: {
diff --git a/apps/desktop/src/renderer/__tests__/remoteFileProgress.test.ts b/apps/desktop/src/renderer/__tests__/remoteFileProgress.test.ts
index ca13ec93dc..b3860ba56c 100644
--- a/apps/desktop/src/renderer/__tests__/remoteFileProgress.test.ts
+++ b/apps/desktop/src/renderer/__tests__/remoteFileProgress.test.ts
@@ -27,6 +27,8 @@ const absPath = `${workdir}/file.zip`;
const listeners = new Set<(e: Progress) => void>();
const chatFetch = vi.fn();
const chatDownload = vi.fn();
+const chatCancel = vi.fn();
+const showItemInFolder = vi.fn();
const success = { ok: true as const, cachePath: '/cache/file.zip', stale: false, size: 4096 };
function deferred<T>() {
@@ -56,17 +58,20 @@ beforeEach(() => {
vi.spyOn(performance, 'now').mockImplementation(() => Date.now());
chatFetch.mockReset();
chatDownload.mockReset();
+ chatCancel.mockReset().mockResolvedValue(undefined);
+ showItemInFolder.mockReset().mockResolvedValue({ success: true });
vi.stubGlobal('window', {
electronAPI: {
fileBrowser: {
chatFetch,
chatDownload,
+ chatCancel,
onTransferProgress: (listener: (e: Progress) => void) => {
listeners.add(listener);
return () => listeners.delete(listener);
},
},
- showItemInFolder: vi.fn().mockResolvedValue({ success: true }),
+ showItemInFolder,
},
});
});
@@ -241,4 +246,34 @@ describe('remote file transfer toasts', () => {
expect(active()).toEqual([]);
expect(listeners.size).toBe(0);
});
+
+ it('cancels a fetch from the progress toast without a failure toast or follow-up action', async () => {
+ const result = deferred<{ ok: false; code: 'FETCH_FAILED' }>();
+ chatFetch.mockReturnValue(result.promise);
+ const pending = fetchChatFileWithToasts(origin, workdir, absPath);
+ const { requestId } = chatFetch.mock.calls[0][0];
+ await vi.advanceTimersByTimeAsync(600);
+ expect(active()[0].action?.label).toBe(messages.chat.remoteFile.cancelTransfer);
+ active()[0].action!.onClick();
+ expect(chatCancel).toHaveBeenCalledWith(requestId);
+ result.resolve({ ok: false, code: 'FETCH_FAILED' });
+ await expect(pending).resolves.toBeNull();
+ expect(active().filter((item) => item.variant === 'error')).toEqual([]);
+ expect(listeners.size).toBe(0);
+ });
+
+ it('does not reveal a download that finished after the user cancelled', async () => {
+ const result = deferred<{ ok: true; path: string; stale: boolean; skipped: number }>();
+ chatDownload.mockReturnValue(result.promise);
+ const pending = downloadRemoteChatEntry(origin, workdir, absPath);
+ const { requestId } = chatDownload.mock.calls[0][0];
+ emit(requestId, 2048);
+ await vi.advanceTimersByTimeAsync(600);
+ active()[0].action!.onClick();
+ expect(chatCancel).toHaveBeenCalledWith(requestId);
+ result.resolve({ ok: true, path: '/downloads/file.zip', stale: false, skipped: 0 });
+ await pending;
+ expect(showItemInFolder).not.toHaveBeenCalled();
+ expect(listeners.size).toBe(0);
+ });
});
diff --git a/apps/desktop/src/renderer/i18n/locales/en/common.json b/apps/desktop/src/renderer/i18n/locales/en/common.json
index 57482d1873..52e30cb48e 100644
--- a/apps/desktop/src/renderer/i18n/locales/en/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/en/common.json
@@ -10872,7 +10872,8 @@
"downloadExtracting": "Unpacking…",
"downloadUnsupported": "The remote computer can't download folders yet. Update Cindy on that computer and try again",
"downloadNoSpace": "Not enough disk space to finish the download",
- "downloadSkipped": "Saved to Downloads, but some files could not be downloaded"
+ "downloadSkipped": "Saved to Downloads, but some files could not be downloaded",
+ "cancelTransfer": "Cancel"
},
"mivoAction": {
"promptPlaceholder": "Type a prompt, press Enter to send",
diff --git a/apps/desktop/src/renderer/i18n/locales/ja/common.json b/apps/desktop/src/renderer/i18n/locales/ja/common.json
index 6b5b09aa06..9d9db26407 100644
--- a/apps/desktop/src/renderer/i18n/locales/ja/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/ja/common.json
@@ -10831,7 +10831,8 @@
"downloadExtracting": "展開しています…",
"downloadUnsupported": "リモートコンピュータはまだフォルダのダウンロードに対応していません。そのコンピュータの Cindy を更新してから再試行してください",
"downloadNoSpace": "ディスクの空き容量が足りないため、ダウンロードを完了できません",
- "downloadSkipped": "ダウンロードフォルダに保存しましたが、一部のファイルはダウンロードできませんでした"
+ "downloadSkipped": "ダウンロードフォルダに保存しましたが、一部のファイルはダウンロードできませんでした",
+ "cancelTransfer": "キャンセル"
},
"mivoAction": {
"promptPlaceholder": "プロンプトを入力し、Enter で送信",
diff --git a/apps/desktop/src/renderer/i18n/locales/ko/common.json b/apps/desktop/src/renderer/i18n/locales/ko/common.json
index 4b1e0e50d1..ec8141ff3d 100644
--- a/apps/desktop/src/renderer/i18n/locales/ko/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/ko/common.json
@@ -10831,7 +10831,8 @@
"downloadExtracting": "압축 푸는 중…",
"downloadUnsupported": "원격 컴퓨터가 아직 폴더 다운로드를 지원하지 않습니다. 해당 컴퓨터의 Cindy를 업데이트한 후 다시 시도하세요",
"downloadNoSpace": "디스크 공간이 부족해 다운로드를 완료할 수 없습니다",
- "downloadSkipped": "다운로드 폴더에 저장했지만 일부 파일은 다운로드하지 못했습니다"
+ "downloadSkipped": "다운로드 폴더에 저장했지만 일부 파일은 다운로드하지 못했습니다",
+ "cancelTransfer": "취소"
},
"mivoAction": {
"promptPlaceholder": "프롬프트를 입력하고 Enter로 전송",
diff --git a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
index e78c9f69b1..07101dfa4d 100644
--- a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
@@ -10831,7 +10831,8 @@
"downloadExtracting": "正在解压…",
"downloadUnsupported": "远程电脑暂不支持下载文件夹,请更新该电脑上的 Cindy 后重试",
"downloadNoSpace": "磁盘空间不足,无法完成下载",
- "downloadSkipped": "已下载到「下载」文件夹,但有部分文件未能下载"
+ "downloadSkipped": "已下载到「下载」文件夹,但有部分文件未能下载",
+ "cancelTransfer": "取消"
},
"mivoAction": {
"promptPlaceholder": "输入提示词,回车发送",
diff --git a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
index 1b15646701..271b703d50 100644
--- a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
@@ -10830,7 +10830,8 @@
"downloadExtracting": "正在解壓縮…",
"downloadUnsupported": "遠端電腦暫不支援下載資料夾,請更新該電腦上的 Cindy 後重試",
"downloadNoSpace": "磁碟空間不足,無法完成下載",
- "downloadSkipped": "已下載到「下載項目」資料夾,但有部分檔案未能下載"
+ "downloadSkipped": "已下載到「下載項目」資料夾,但有部分檔案未能下載",
+ "cancelTransfer": "取消"
},
"mivoAction": {
"promptPlaceholder": "輸入提示詞,按 Enter 傳送",
diff --git a/apps/desktop/src/renderer/lib/fileTransferProgress.ts b/apps/desktop/src/renderer/lib/fileTransferProgress.ts
index d956bcd31c..b9944ade82 100644
--- a/apps/desktop/src/renderer/lib/fileTransferProgress.ts
+++ b/apps/desktop/src/renderer/lib/fileTransferProgress.ts
@@ -69,19 +69,37 @@ export function observeFileTransferProgressText(onProgress: (text: string) => vo
return observeFileTransferProgress((e) => onProgress(format(e)));
}
-/** Same delayed, persistent loading toast for open/reveal/copy and explicit downloads. */
+/**
+ * Same delayed, persistent loading toast for open/reveal/copy and explicit downloads.
+ * Its Cancel button aborts the chatFetch / chatDownload started with `requestId`;
+ * callers check `cancelled` and skip the follow-up action and failure toast.
+ */
export function createFileTransferToast() {
let id: string | null = null;
+ let cancelled = false;
let text = i18n.t('chat.remoteFile.fetching');
const progress = observeFileTransferProgressText((next) => {
text = next;
if (id) toast.update(id, text);
});
const delayed = setTimeout(() => {
- id = toast.loading(text);
+ id = toast.loading(text, {
+ action: {
+ label: i18n.t('chat.remoteFile.cancelTransfer'),
+ onClick: () => {
+ // The toast dismisses itself after the action runs.
+ cancelled = true;
+ id = null;
+ void window.electronAPI.fileBrowser.chatCancel(progress.requestId).catch(() => {});
+ },
+ },
+ });
}, 600);
return {
requestId: progress.requestId,
+ get cancelled() {
+ return cancelled;
+ },
dispose() {
clearTimeout(delayed);
progress.dispose();
diff --git a/apps/desktop/src/renderer/lib/remoteFileOpen.ts b/apps/desktop/src/renderer/lib/remoteFileOpen.ts
index 9cc704b18f..33edf022ef 100644
--- a/apps/desktop/src/renderer/lib/remoteFileOpen.ts
+++ b/apps/desktop/src/renderer/lib/remoteFileOpen.ts
@@ -67,7 +67,7 @@ export async function fetchChatFileToCache(
/**
* 带 toast UX 的取回:成功返回缓存副本路径(stale 时附 warning 提示),失败
- * toast 后返回 null。适用于「取到副本后马上做一个本机动作」的一次性交互
+ * toast 后返回 null;用户在进度 toast 上点了「取消」则静默返回 null。适用于「取到副本后马上做一个本机动作」的一次性交互
* (打开 / 定位 / 复制文件)。
*/
export async function fetchChatFileWithToasts(
@@ -78,6 +78,7 @@ export async function fetchChatFileWithToasts(
const progress = createFileTransferToast();
try {
const res = await fetchChatFileToCache(origin, workdir, absPath, progress.requestId);
+ if (progress.cancelled) return null;
if (!res.ok) {
toast.error(chatFileErrorText(res.code));
return null;
@@ -134,6 +135,7 @@ export async function downloadRemoteChatEntry(
code: 'FETCH_FAILED' as const,
message: String(err),
}));
+ if (progress.cancelled) return;
if (!res.ok) {
toast.error(chatDownloadErrorText(res.code));
return;
diff --git a/apps/desktop/src/renderer/vite-env.d.ts b/apps/desktop/src/renderer/vite-env.d.ts
index b031177c82..a43ca20a6e 100644
--- a/apps/desktop/src/renderer/vite-env.d.ts
+++ b/apps/desktop/src/renderer/vite-env.d.ts
@@ -2717,6 +2717,8 @@ interface ElectronAPI {
message?: string;
}
>;
+ /** 取消进行中的 chatFetch / chatDownload(按发起时的 requestId);已结束时无操作。 */
+ chatCancel: (requestId: string) => Promise<void>;
/** 聊天流文件 chip 点亮预检:远端精确 stat。file=点亮;nonfile=保持纯文本;unknown=乐观点亮。 */
chatStat: (params: {
origin: { kind: 'device'; deviceId: string } | { kind: 'ssh'; remoteHostId: string };
diff --git a/apps/mobile/app/files/[sessionId].tsx b/apps/mobile/app/files/[sessionId].tsx
index a1db16e51b..ff531928c1 100644
--- a/apps/mobile/app/files/[sessionId].tsx
+++ b/apps/mobile/app/files/[sessionId].tsx
@@ -72,6 +72,7 @@ import {
} from '@/session/composerAttachmentInbox';
import { mergePathIntoComposerDraft, shareMimeForFileName } from '@/session/fileBrowserActions';
import { exportRemoteFileToUrl } from '@/session/fileBrowserExport';
+import { FileTransferBusyNotice } from '@/session/FileTransferBusyNotice';
import {
getCachedListingSync,
loadAllFilesIndex,
@@ -502,45 +503,84 @@ function RemoteFileBrowserContent() {
});
}, [absolutePathOf, deviceId, router, sessionId]);
+ // 进行中的长按「导出/分享」:底栏一直显示到结束并带「取消」;取消或新的导出
+ // 接替后,旧一次的结果(含失败)一律丢弃,不再弹分享单。cancelled 给导出轮询与
+ // 结果检查用,abort 中止图片取件。
+ const exportRunRef = useRef<{ cancelled: boolean; abort: AbortController } | null>(null);
+ const [exporting, setExporting] = useState(false);
+ const stopExportRun = useCallback(() => {
+ const run = exportRunRef.current;
+ if (!run) return;
+ run.cancelled = true;
+ run.abort.abort();
+ exportRunRef.current = null;
+ }, []);
+ const cancelExport = useCallback(() => {
+ stopExportRun();
+ setExporting(false);
+ }, [stopExportRun]);
+ // 离开本屏即取消(含点进下一层目录:Expo Router 把本屏留在栈中不卸载,只失焦);
+ // 与点「取消」同一出口,一并复位底栏,回到本屏时不残留忙碌状态。
+ useFocusEffect(useCallback(() => cancelExport, [cancelExport]));
+
const shareItem = useCallback((item: FileBrowserGridItem) => {
// 导出/分享 = 系统分享单一步到位(iOS 分享单自带「存储图像」,不再单设保存)。
setContextItem(null);
if (item.kind !== 'file') return;
- showNotice(t('files.browser.exporting'));
+ stopExportRun();
+ const run = { cancelled: false, abort: new AbortController() };
+ exportRunRef.current = run;
+ setExporting(true);
void (async () => {
try {
let url: string;
let mime: string;
if (item.thumb === 'image') {
// 图片走媒体取件管线(与 lightbox 同源,命中它的解析缓存)。
- const resolved = await resolveFileMedia({
- kind: 'image',
- url: remoteFileMediaUrl(absolutePathOf(item.relPath), item.mtimeMs),
- previewable: false,
- });
+ const resolved = await resolveFileMedia(
+ {
+ kind: 'image',
+ url: remoteFileMediaUrl(absolutePathOf(item.relPath), item.mtimeMs),
+ previewable: false,
+ },
+ { signal: run.abort.signal },
+ );
url = resolved.url;
mime = resolved.mimeType;
} else {
// 非图片同样一步到系统分享单(两段式导出,与预览页分享同链路),
// 不再折跳预览页多一步操作。
url = await exportRemoteFileToUrl(
- { maker, deviceId, openLink, presignGet, isCancelled: () => unmountedRef.current },
+ {
+ maker,
+ deviceId,
+ openLink,
+ presignGet,
+ isCancelled: () => unmountedRef.current || run.cancelled,
+ },
workdir,
item.relPath,
item.mtimeMs,
);
mime = shareMimeForFileName(item.name);
}
- const localUri = await downloadRemoteMediaShareTemp(url, mime, item.name);
+ if (run.cancelled) return;
+ const localUri = await downloadRemoteMediaShareTemp(url, mime, item.name, run.abort.signal);
+ if (run.cancelled) return;
if (!localUri) throw new Error(t('files.browser.downloadFailed'));
const sharing = await import('expo-sharing');
+ if (run.cancelled) return;
await sharing.shareAsync(localUri, { mimeType: mime });
- setNotice(null);
} catch (err) {
- showNotice(formatRemoteError(err));
+ if (!run.cancelled) showNotice(formatRemoteError(err));
+ } finally {
+ if (exportRunRef.current === run) {
+ exportRunRef.current = null;
+ setExporting(false);
+ }
}
})();
- }, [absolutePathOf, deviceId, maker, openLink, presignGet, resolveFileMedia, showNotice, t, workdir]);
+ }, [absolutePathOf, deviceId, maker, openLink, presignGet, resolveFileMedia, showNotice, stopExportRun, t, workdir]);
/** lightbox 底部显式操作(与预览页底栏同构):复制路径 / 发送到会话。 */
const lightboxActions = useMemo((): readonly ImageLightboxAction[] => [
@@ -996,12 +1036,23 @@ function RemoteFileBrowserContent() {
/>
)}
- {!searchOpen ? (
+ {/* 导出进行中的提示与「取消」不随搜索隐藏:搜索期间导出仍在继续。 */}
+ {!searchOpen || exporting ? (
<View style={styles.footer}>
- <Text style={styles.footerStrong} testID="files.summary">{summary}</Text>
- <Text style={styles.footerText}>
- {notice ?? (status === 'online' ? t('files.browser.footerOnline') : t('files.browser.footerConnecting'))}
- </Text>
+ {!searchOpen ? (
+ <Text style={styles.footerStrong} testID="files.summary">{summary}</Text>
+ ) : null}
+ {exporting ? (
+ <FileTransferBusyNotice
+ label={t('files.browser.exporting')}
+ onCancel={cancelExport}
+ testID="files.exporting"
+ />
+ ) : (
+ <Text style={styles.footerText}>
+ {notice ?? (status === 'online' ? t('files.browser.footerOnline') : t('files.browser.footerConnecting'))}
+ </Text>
+ )}
</View>
) : null}
diff --git a/apps/mobile/app/files/preview/[sessionId].tsx b/apps/mobile/app/files/preview/[sessionId].tsx
index 00d44bbd6d..df00c4b29d 100644
--- a/apps/mobile/app/files/preview/[sessionId].tsx
+++ b/apps/mobile/app/files/preview/[sessionId].tsx
@@ -23,7 +23,7 @@ import { SystemNavigationBack, useSystemNavigationBack } from '@/platform/chrome
import * as Clipboard from 'expo-clipboard';
import { useAdaptiveWindow } from '@/platform/AdaptiveWindowContext';
import { Image } from 'expo-image';
-import { useIsFocused, useLocalSearchParams, useRouter } from 'expo-router';
+import { useFocusEffect, useIsFocused, useLocalSearchParams, useRouter } from 'expo-router';
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { ArrowDownToLine, Copy, Database, File as FileIcon, Info, MessageSquarePlus, Share as ShareIcon } from 'lucide-react-native';
@@ -60,6 +60,7 @@ import { decodeGzipBase64Text, mergePathIntoComposerDraft, shareMimeForFileName
import { appendQuote, truncateQuoteText } from '@/session/chatQuoteStore';
import { getCachedPreviewText, storeCachedPreviewText } from '@/session/fileBrowserCache';
import { exportRemoteFileToUrl } from '@/session/fileBrowserExport';
+import { FileTransferBusyNotice } from '@/session/FileTransferBusyNotice';
import type { RemoteMediaSshContext } from '@/session/fileBrowserGallery';
import { HtmlSnapshotReader } from '@/session/HtmlFileReader';
import { HtmlBrowserChrome } from '@/session/HtmlBrowserChrome';
@@ -117,7 +118,7 @@ type TextPreviewState =
type RichTextKind = 'markdown' | 'html';
type HtmlBrowserActions = Pick<HtmlBrowserChromeProps,
- 'busy' | 'notice' | 'onClose' | 'onShare' | 'onCopyPath' | 'onAddToTask'>;
+ 'busy' | 'notice' | 'onCancelNotice' | 'onClose' | 'onShare' | 'onCopyPath' | 'onAddToTask'>;
interface SiblingListing {
key: string;
@@ -128,6 +129,8 @@ interface ExportToUrlOptions {
/** 缺省 true:预览播放要可保留的地址;分享下载传 false。 */
stream?: boolean;
onProgress?: (uploaded: number, total: number) => void;
+ /** 用户取消(如导出提示上的「取消」);页面卸载始终中止。 */
+ isCancelled?: () => boolean;
}
type ExportToUrl = (relPath: string, mtimeMs: number, options?: ExportToUrlOptions) => Promise<string>;
@@ -437,8 +440,12 @@ function RemoteFilePreviewContent() {
const exportToUrl = useCallback(
(relPath: string, mtimeMs: number, options?: ExportToUrlOptions): Promise<string> => {
const stream = options?.stream ?? true;
+ const isCancelled = () => unmountedRef.current || options?.isCancelled?.() === true;
if (singleAbsPath) {
- return fetchRemoteAbsFileToUrl({ maker, deviceId, openLink, presignGet, stream }, singleAbsPath);
+ return fetchRemoteAbsFileToUrl(
+ { maker, deviceId, openLink, presignGet, stream, isCancelled },
+ singleAbsPath,
+ );
}
return exportRemoteFileToUrl(
{
@@ -447,7 +454,7 @@ function RemoteFilePreviewContent() {
openLink,
presignGet,
stream,
- isCancelled: () => unmountedRef.current,
+ isCancelled,
onProgress: options?.onProgress,
},
workdir,
@@ -527,22 +534,47 @@ function RemoteFilePreviewContent() {
[deviceId, maker, openLink, singleAbsPath, workdir],
);
+ // 进行中的「下载原文件 / 分享」:提示上点「取消」即标记本次已取消并立刻收起提示,
+ // 之后的结果(含失败)一律丢弃,不再弹分享单;手机侧下载阶段随之中止。
+ const exportRunRef = useRef<{ cancelled: boolean; abort: AbortController } | null>(null);
+ const cancelExport = useCallback(() => {
+ const run = exportRunRef.current;
+ if (!run) return;
+ run.cancelled = true;
+ run.abort.abort();
+ exportRunRef.current = null;
+ setBusyLabel(null);
+ }, []);
+ // 离开预览页同样取消(与文件页一致,失焦即算离开):不再下载,也不在下一屏弹分享单。
+ useFocusEffect(useCallback(() => cancelExport, [cancelExport]));
+
const downloadAndShare = useCallback(async (item: FileBrowserGridItem) => {
if (busyLabel) return;
+ const run = { cancelled: false, abort: new AbortController() };
+ exportRunRef.current = run;
setBusyLabel(t('files.preview.exporting'));
try {
- const url = await exportToUrl(item.relPath, item.mtimeMs, { stream: false });
+ const url = await exportToUrl(item.relPath, item.mtimeMs, {
+ stream: false,
+ isCancelled: () => run.cancelled,
+ });
+ if (run.cancelled) return;
// 传原始文件名:分享单按真实扩展名识别类型(PDF/视频等非图片 mime 不在
// extOfMime 映射里,不带名字会落成 .img 让接收方无法预览)。
const mime = shareMimeForFileName(item.name);
- const localUri = await downloadRemoteMediaShareTemp(url, mime, item.name);
+ const localUri = await downloadRemoteMediaShareTemp(url, mime, item.name, run.abort.signal);
+ if (run.cancelled) return;
if (!localUri) throw new Error(t('files.preview.downloadFailed'));
const sharing = await import('expo-sharing');
+ if (run.cancelled) return;
await sharing.shareAsync(localUri, { mimeType: mime });
} catch (err) {
- showNotice(formatRemoteError(err));
+ if (!run.cancelled) showNotice(formatRemoteError(err));
} finally {
- setBusyLabel(null);
+ if (exportRunRef.current === run) {
+ exportRunRef.current = null;
+ setBusyLabel(null);
+ }
}
}, [busyLabel, exportToUrl, showNotice, t]);
@@ -700,6 +732,8 @@ function RemoteFilePreviewContent() {
htmlBrowserActions={{
busy: !!busyLabel,
notice: busyLabel ?? notice,
+ // busyLabel 只由导出 / 分享设置,进行中的提示带「取消」。
+ ...(busyLabel ? { onCancelNotice: cancelExport } : {}),
onClose: () => goBackGuarded(router),
onShare: () => void downloadAndShare(item),
onCopyPath: () => void copyPath(item),
@@ -759,8 +793,10 @@ function RemoteFilePreviewContent() {
testID="filePreview.sendToSession"
/>
</View>
- {busyLabel || notice ? (
- <Text style={styles.noticeText} testID="filePreview.notice">{busyLabel ?? notice}</Text>
+ {busyLabel ? (
+ <FileTransferBusyNotice label={busyLabel} onCancel={cancelExport} testID="filePreview.busy" />
+ ) : notice ? (
+ <Text style={styles.noticeText} testID="filePreview.notice">{notice}</Text>
) : null}
</> : null}
diff --git a/apps/mobile/src/__tests__/filePreviewPagerWiring.test.ts b/apps/mobile/src/__tests__/filePreviewPagerWiring.test.ts
index 9532a381bd..3bb3f9aaf3 100644
--- a/apps/mobile/src/__tests__/filePreviewPagerWiring.test.ts
+++ b/apps/mobile/src/__tests__/filePreviewPagerWiring.test.ts
@@ -22,6 +22,18 @@ function readSource(rel: string): string {
const source = readSource('app/files/preview/[sessionId].tsx');
describe('remote file preview pager wiring', () => {
+ it.each(['app/files/[sessionId].tsx', 'app/files/preview/[sessionId].tsx'])('cancels the in-flight export on blur and on Cancel, including the phone download and share sheet, in %s', (path) => {
+ const routeSource = readSource(path);
+ // 失焦即取消:点进下一层 / 跳会话页时本屏留在栈中不卸载。必须走与「取消」按钮同一个
+ // 会复位忙碌提示的出口,否则回到本屏时残留一个无事可取消的忙碌底栏。
+ expect(routeSource).toContain('useFocusEffect(useCallback(() => cancelExport, [cancelExport]));');
+ expect(routeSource).toMatch(/onCancel(Notice)?[=:] ?\{? ?cancelExport/);
+ // 动态加载分享模块期间可能已取消:shareAsync 前必须再查一次。
+ expect(routeSource).toMatch(/await import\('expo-sharing'\);\n\s*if \(run\.cancelled\) return;\n\s*await sharing\.shareAsync/);
+ expect(routeSource).toMatch(/run\.abort\.abort\(\);/);
+ expect(routeSource).toMatch(/downloadRemoteMediaShareTemp\(url, mime, item\.name, run\.abort\.signal\)/);
+ });
+
it.each(['app/files/[sessionId].tsx', 'app/files/preview/[sessionId].tsx'])('passes the route device ID into the source gate for %s', (path) => {
const routeSource = readSource(path).split('export default function ')[1]?.split('\n}\n')[0] ?? '';
expect(routeSource).toContain('const { sessionId, deviceId } = useLocalSearchParams<');
diff --git a/apps/mobile/src/__tests__/remoteAbsFileFetch.test.ts b/apps/mobile/src/__tests__/remoteAbsFileFetch.test.ts
index e97a8b570b..af18ea7865 100644
--- a/apps/mobile/src/__tests__/remoteAbsFileFetch.test.ts
+++ b/apps/mobile/src/__tests__/remoteAbsFileFetch.test.ts
@@ -50,6 +50,28 @@ describe('fetchRemoteAbsFileToUrl', () => {
);
}
});
+ it('aborts an in-flight fetch once the caller cancels and does not retry', async () => {
+ const { deps, fetchRemoteMedia, presignGet } = makeDeps();
+ let cancelled = false;
+ let seenSignal: AbortSignal | undefined;
+ fetchRemoteMedia.mockImplementation(
+ (...args: unknown[]) =>
+ new Promise((_resolve, reject) => {
+ seenSignal = (args[1] as { signal?: AbortSignal } | undefined)?.signal;
+ seenSignal?.addEventListener('abort', () => reject(new Error('aborted')));
+ }),
+ );
+ const pending = fetchRemoteAbsFileToUrl(
+ { ...deps, stream: false, isCancelled: () => cancelled },
+ '/tmp/big.zip',
+ );
+ await vi.waitFor(() => expect(seenSignal).toBeDefined());
+ cancelled = true;
+ await expect(pending).rejects.toThrow();
+ expect(seenSignal?.aborted).toBe(true);
+ expect(fetchRemoteMedia).toHaveBeenCalledTimes(1);
+ expect(presignGet).not.toHaveBeenCalled();
+ });
it('走 media:fetch 绝对路径通道并 presign 出下载地址', async () => {
const { deps, fetchRemoteMedia, presignGet } = makeDeps();
const url = await fetchRemoteAbsFileToUrl(deps, '/tmp/shot.png');
diff --git a/apps/mobile/src/__tests__/remoteMediaDiskCacheExpo.test.ts b/apps/mobile/src/__tests__/remoteMediaDiskCacheExpo.test.ts
index 607975e030..632a7c39bb 100644
--- a/apps/mobile/src/__tests__/remoteMediaDiskCacheExpo.test.ts
+++ b/apps/mobile/src/__tests__/remoteMediaDiskCacheExpo.test.ts
@@ -1,6 +1,7 @@
import { beforeEach, describe, expect, it, vi } from 'vitest';
import {
downloadRemoteMediaAsDataUri,
+ downloadRemoteMediaShareTemp,
withDownloadedRemoteMediaFile,
} from '@/session/remoteMediaDiskCacheExpo';
@@ -10,6 +11,17 @@ const io = vi.hoisted(() => ({
copied: new Set<string>(),
download: vi.fn(),
remove: vi.fn(),
+ resumable: vi.fn(),
+ cancel: vi.fn(async () => undefined),
+ deleteAsync: vi.fn(async () => undefined),
+}));
+
+vi.mock('expo-file-system/legacy', () => ({
+ createDownloadResumable: (url: string, uri: string) => ({
+ downloadAsync: () => io.resumable(url, uri),
+ cancelAsync: io.cancel,
+ }),
+ deleteAsync: io.deleteAsync,
}));
vi.mock('expo-file-system', () => ({
@@ -32,6 +44,7 @@ vi.mock('expo-file-system', () => ({
io.copied.add(target.uri);
}
get size() { return io.copying.has(this.uri) ? 0 : io.size; }
+ get exists() { return true; }
async base64() { return 'aGVsbG8='; }
delete() { io.remove(this.uri); }
static downloadFileAsync = io.download;
@@ -44,6 +57,9 @@ beforeEach(() => {
io.copied.clear();
io.remove.mockClear();
io.download.mockReset().mockImplementation(async (_url, target) => target);
+ io.resumable.mockReset().mockResolvedValue({ status: 200 });
+ io.cancel.mockClear();
+ io.deleteAsync.mockClear();
});
describe('bounded temporary media downloads', () => {
@@ -86,3 +102,51 @@ describe('bounded temporary media downloads', () => {
expect(io.remove).toHaveBeenCalledOnce();
});
});
+
+describe('share temp downloads', () => {
+ it('keeps the existing download path when no cancellation signal is given', async () => {
+ expect(await downloadRemoteMediaShareTemp('https://example.com/a.pdf', 'application/pdf', 'a.pdf'))
+ .toMatch(/\/a\.pdf$/);
+ expect(io.download).toHaveBeenCalledOnce();
+ expect(io.resumable).not.toHaveBeenCalled();
+ });
+
+ it('downloads through a cancellable task when a signal is given', async () => {
+ const uri = await downloadRemoteMediaShareTemp(
+ 'https://example.com/a.pdf', 'application/pdf', 'a.pdf', new AbortController().signal,
+ );
+ expect(uri).toMatch(/\/a\.pdf$/);
+ expect(io.resumable).toHaveBeenCalledExactlyOnceWith('https://example.com/a.pdf', uri);
+ expect(io.download).not.toHaveBeenCalled();
+ });
+
+ it('stops the transfer and removes the partial file on cancel', async () => {
+ io.resumable.mockReturnValue(new Promise(() => {})); // native download never settles after cancel
+ const abort = new AbortController();
+ const result = downloadRemoteMediaShareTemp('https://example.com/a.pdf', 'application/pdf', 'a.pdf', abort.signal);
+ await vi.waitFor(() => expect(io.resumable).toHaveBeenCalledOnce());
+ abort.abort();
+ expect(await result).toBeNull();
+ expect(io.cancel).toHaveBeenCalled();
+ expect(io.deleteAsync).toHaveBeenCalledExactlyOnceWith(io.resumable.mock.calls[0]![1], { idempotent: true });
+ // The partial file is removed only after the native task has confirmed it stopped.
+ expect(io.cancel.mock.invocationCallOrder.at(-1)!).toBeLessThan(io.deleteAsync.mock.invocationCallOrder[0]!);
+ });
+
+ it('removes a direct-transfer copy that finished after cancel', async () => {
+ const abort = new AbortController();
+ const result = downloadRemoteMediaShareTemp('file:///peer/staged', 'application/pdf', 'a.pdf', abort.signal);
+ abort.abort(); // local File.copy cannot be interrupted; the copy settles afterwards
+ expect(await result).toBeNull();
+ expect(io.copied.size).toBe(1);
+ expect(io.remove).toHaveBeenCalledExactlyOnceWith([...io.copied][0]);
+ });
+
+ it('treats a non-2xx response as a failed download', async () => {
+ io.resumable.mockResolvedValue({ status: 403 });
+ expect(await downloadRemoteMediaShareTemp(
+ 'https://example.com/a.pdf', 'application/pdf', 'a.pdf', new AbortController().signal,
+ )).toBeNull();
+ expect(io.deleteAsync).toHaveBeenCalledOnce();
+ });
+});
diff --git a/apps/mobile/src/session/FileTransferBusyNotice.tsx b/apps/mobile/src/session/FileTransferBusyNotice.tsx
new file mode 100644
index 0000000000..fd400f9478
--- /dev/null
+++ b/apps/mobile/src/session/FileTransferBusyNotice.tsx
@@ -0,0 +1,58 @@
+/**
+ * FileTransferBusyNotice —— 文件浏览页 / 预览页底部「正在从电脑导出…」的进行中提示。
+ *
+ * 导出期间一直显示(不自动消失),带「取消」:与桌面下载提示条的取消按钮同一语义,
+ * 点了就停止导出,不再弹分享单,也不提示失败。
+ */
+import { ActivityIndicator, StyleSheet, View } from "react-native";
+import { useTranslation } from "react-i18next";
+
+import { Text } from "@/components/AppText";
+import { MainWindowActionButton } from "@/components/MobilePrimitives";
+import { useTheme, useThemedStyles, type ThemeColors } from "@/theme";
+import { lineHeight, spacing, typeScale } from "@/theme/tokens";
+
+export function FileTransferBusyNotice({
+ label,
+ onCancel,
+ testID,
+}: {
+ label: string;
+ onCancel: () => void;
+ testID?: string;
+}) {
+ const styles = useThemedStyles(makeStyles);
+ const { colors } = useTheme();
+ const { t } = useTranslation();
+ return (
+ <View style={styles.row} testID={testID}>
+ <ActivityIndicator color={colors.textTertiary} size="small" />
+ <Text style={styles.label}>{label}</Text>
+ <MainWindowActionButton
+ action={{
+ label: t("files.browser.cancel"),
+ onPress: onCancel,
+ testID: testID ? `${testID}.cancel` : undefined,
+ }}
+ density="compact"
+ />
+ </View>
+ );
+}
+
+const makeStyles = (colors: ThemeColors) =>
+ StyleSheet.create({
+ row: {
+ alignItems: "center",
+ alignSelf: "center",
+ flexDirection: "row",
+ gap: spacing.sm,
+ paddingBottom: spacing.sm,
+ },
+ label: {
+ color: colors.textSecondary,
+ flexShrink: 1,
+ fontSize: typeScale.footnote,
+ lineHeight: lineHeight.caption,
+ },
+ });
diff --git a/apps/mobile/src/session/HtmlBrowserChrome.ios.tsx b/apps/mobile/src/session/HtmlBrowserChrome.ios.tsx
index 90813e323d..785aa703d8 100644
--- a/apps/mobile/src/session/HtmlBrowserChrome.ios.tsx
+++ b/apps/mobile/src/session/HtmlBrowserChrome.ios.tsx
@@ -36,6 +36,7 @@ import { Alert, StyleSheet, View } from "react-native";
import { useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { Text } from "@/components/AppText";
+import { MainWindowActionButton } from "@/components/MobilePrimitives";
import { iconSize, lineHeight, navigationChrome, radius, spacing, typeScale, useTheme } from "@/theme";
import { useLiquidGlassAvailable } from "./useLiquidGlassAvailable";
import {
@@ -197,7 +198,7 @@ export function HtmlBrowserChrome(p: HtmlBrowserChromeProps) {
</View>
{p.notice ? (
<View
- pointerEvents="none"
+ pointerEvents={p.onCancelNotice ? "box-none" : "none"}
style={{
position: "absolute",
bottom: p.bottom + size + spacing.sm,
@@ -206,20 +207,39 @@ export function HtmlBrowserChrome(p: HtmlBrowserChromeProps) {
alignItems: "center",
}}
>
- <Text
- accessibilityLiveRegion="polite"
- testID="filePreview.notice"
+ <View
style={{
- color: colors.textPrimary,
+ flexDirection: "row",
+ alignItems: "center",
+ gap: spacing.sm,
backgroundColor: colors.surfaceElevated,
padding: spacing.sm,
- borderRadius: radius.pill,
- fontSize: typeScale.caption,
- lineHeight: lineHeight.caption,
+ borderRadius: radius.container,
}}
>
- {p.notice}
- </Text>
+ <Text
+ accessibilityLiveRegion="polite"
+ testID="filePreview.notice"
+ style={{
+ flexShrink: 1,
+ color: colors.textPrimary,
+ fontSize: typeScale.caption,
+ lineHeight: lineHeight.caption,
+ }}
+ >
+ {p.notice}
+ </Text>
+ {p.onCancelNotice ? (
+ <MainWindowActionButton
+ action={{
+ label: t("files.browser.cancel"),
+ onPress: p.onCancelNotice,
+ testID: "filePreview.notice.cancel",
+ }}
+ density="compact"
+ />
+ ) : null}
+ </View>
</View>
) : null}
<View
diff --git a/apps/mobile/src/session/HtmlBrowserChrome.tsx b/apps/mobile/src/session/HtmlBrowserChrome.tsx
index e13a8e934d..0e2a260787 100644
--- a/apps/mobile/src/session/HtmlBrowserChrome.tsx
+++ b/apps/mobile/src/session/HtmlBrowserChrome.tsx
@@ -21,6 +21,7 @@ import {
type LucideIcon,
} from "lucide-react-native";
import { Text, TextInput } from "@/components/AppText";
+import { MainWindowActionButton } from "@/components/MobilePrimitives";
import { SheetModal } from "./SheetModal";
import {
fontWeight,
@@ -140,10 +141,10 @@ export function HtmlBrowserChrome(p: HtmlBrowserChromeProps) {
</View>
{p.notice ? (
<View
- pointerEvents="none"
+ pointerEvents={p.onCancelNotice ? "box-none" : "none"}
style={[styles.notice, { bottom: p.bottom + size + spacing.sm }]}
>
- {p.notice ? (
+ <View style={styles.noticePill}>
<Text
accessibilityLiveRegion="polite"
testID="filePreview.notice"
@@ -151,9 +152,17 @@ export function HtmlBrowserChrome(p: HtmlBrowserChromeProps) {
>
{p.notice}
</Text>
- ) : (
- <ActivityIndicator color={colors.textSecondary} />
- )}
+ {p.onCancelNotice ? (
+ <MainWindowActionButton
+ action={{
+ label: t("files.browser.cancel"),
+ onPress: p.onCancelNotice,
+ testID: "filePreview.notice.cancel",
+ }}
+ density="compact"
+ />
+ ) : null}
+ </View>
</View>
) : null}
<View
@@ -320,11 +329,17 @@ const makeStyles = (c: ThemeColors) =>
right: spacing.lg,
alignItems: "center",
},
- noticeText: {
- color: c.textPrimary,
+ noticePill: {
+ flexDirection: "row",
+ alignItems: "center",
+ gap: spacing.sm,
backgroundColor: c.surfaceElevated,
padding: spacing.sm,
borderRadius: radius.container,
+ },
+ noticeText: {
+ flexShrink: 1,
+ color: c.textPrimary,
fontSize: typeScale.footnote,
lineHeight: lineHeight.caption,
},
diff --git a/apps/mobile/src/session/HtmlBrowserChrome.types.ts b/apps/mobile/src/session/HtmlBrowserChrome.types.ts
index 899eb1eb44..c87df16e65 100644
--- a/apps/mobile/src/session/HtmlBrowserChrome.types.ts
+++ b/apps/mobile/src/session/HtmlBrowserChrome.types.ts
@@ -18,6 +18,8 @@ export interface HtmlBrowserChromeProps {
/** The file has not opened yet: address editing and the more menu stay disabled. */
pending?: boolean;
notice?: string | null;
+ /** Set while the notice describes a cancellable export: the notice shows a Cancel button. */
+ onCancelNotice?: () => void;
onClose(): void;
onBack(): void;
onForward(): void;
diff --git a/apps/mobile/src/session/fileBrowserGallery.ts b/apps/mobile/src/session/fileBrowserGallery.ts
index 9419e65dea..a23734e1dc 100644
--- a/apps/mobile/src/session/fileBrowserGallery.ts
+++ b/apps/mobile/src/session/fileBrowserGallery.ts
@@ -144,8 +144,12 @@ export function createFileBrowserMediaResolver(deps: MobileRemoteMediaResolverDe
// cachedOnly(lightbox 垫底预取):只吃缓存,未命中不触发取件——本 resolver 不区分
// 缩略图变体,放行会变成一次装饰性的整图导出+下载,与主取件叠成双下载。
if (opts?.cachedOnly) throw new Error(i18n.t('files.gallery.cacheMiss'));
- // forceRefresh(Image 加载失败自愈)映射为被控端 skipCache,穿透上传去重缓存。
- const resolved = await resolveMobileRemoteMedia(media, deps, opts?.forceRefresh ? { skipCache: true } : undefined);
+ // forceRefresh(Image 加载失败自愈)映射为被控端 skipCache,穿透上传去重缓存;
+ // signal(长按导出/分享的「取消」)中止取件。
+ const resolved = await resolveMobileRemoteMedia(media, deps, {
+ ...(opts?.forceRefresh ? { skipCache: true } : {}),
+ ...(opts?.signal ? { signal: opts.signal } : {}),
+ });
cache.set(media.url, resolved);
return resolved;
};
diff --git a/apps/mobile/src/session/remoteAbsFileFetch.ts b/apps/mobile/src/session/remoteAbsFileFetch.ts
index a753e3adcc..865f9f2149 100644
--- a/apps/mobile/src/session/remoteAbsFileFetch.ts
+++ b/apps/mobile/src/session/remoteAbsFileFetch.ts
@@ -43,6 +43,8 @@ export interface RemoteAbsFileFetchDeps {
deviceId: string;
openLink: (deviceId: string) => Promise<unknown>;
presignGet: (ossKey: string) => Promise<MobileRemoteMediaPresignResult>;
+ /** 取消信号(如页面卸载、导出提示上的「取消」):中止取件,不再重试。 */
+ isCancelled?: () => boolean;
}
/** 缓存 TTL:只护住一次预览/分享动作链,把「同路径覆写吃旧字节」窗口压到 1 分钟。 */
@@ -101,17 +103,37 @@ export async function fetchRemoteAbsFileToUrl(
const key = `${deps.deviceId}\u0000${absPath}\u0000${sshKey}\u0000${deps.stream === false ? 'file' : 'stream'}`;
const cached = lookupCache(key, Date.now());
if (cached) return cached.url;
- const resolved = await withTransientRemoteRetry(async () => {
- await deps.openLink(deps.deviceId);
- // kind 只影响结果的 previewable 标志(此处不消费),按 image 占位。
- return resolveMobileRemoteMedia(
- { kind: 'image', url: remoteFileMediaUrl(absPath, undefined, ssh) },
- { fetchRemoteMedia: deps.maker.fetchRemoteMedia, presignGet: deps.presignGet },
- deps.stream === false ? { stream: false } : undefined,
- );
- });
- rememberFetch(key, resolved, Date.now());
- return resolved.url;
+ // 与 exportRemoteFileToUrl 同一写法:轮询 isCancelled 转成取件的 AbortSignal。
+ const abort = deps.isCancelled ? new AbortController() : null;
+ const check = () => {
+ if (deps.isCancelled?.()) abort?.abort();
+ };
+ const assertActive = () => {
+ check();
+ if (abort?.signal.aborted) throw new Error(i18n.t('files.export.leftPage'));
+ };
+ const timer = abort ? setInterval(check, 100) : null;
+ try {
+ const fetchOpts = {
+ ...(deps.stream === false ? { stream: false } : {}),
+ ...(abort ? { signal: abort.signal } : {}),
+ };
+ const resolved = await withTransientRemoteRetry(async () => {
+ assertActive();
+ await deps.openLink(deps.deviceId);
+ // kind 只影响结果的 previewable 标志(此处不消费),按 image 占位。
+ return resolveMobileRemoteMedia(
+ { kind: 'image', url: remoteFileMediaUrl(absPath, undefined, ssh) },
+ { fetchRemoteMedia: deps.maker.fetchRemoteMedia, presignGet: deps.presignGet },
+ Object.keys(fetchOpts).length ? fetchOpts : undefined,
+ );
+ });
+ rememberFetch(key, resolved, Date.now());
+ assertActive();
+ return resolved.url;
+ } finally {
+ if (timer) clearInterval(timer);
+ }
}
/**
diff --git a/apps/mobile/src/session/remoteMediaDiskCacheExpo.ts b/apps/mobile/src/session/remoteMediaDiskCacheExpo.ts
index b4aa704305..82c09fcd67 100644
--- a/apps/mobile/src/session/remoteMediaDiskCacheExpo.ts
+++ b/apps/mobile/src/session/remoteMediaDiskCacheExpo.ts
@@ -18,7 +18,50 @@ const INDEX_FILE_NAME = "index.json";
const INDEX_TMP_NAME = "index.json.tmp";
const SHARE_TMP_DIR_NAME = "remote-media-share";
-async function copyRemoteFile(url: string, target: File): Promise<File> {
+/**
+ * 可中止的 http 下载:新 API 的 File.downloadFileAsync 无法中途停止,这里沿用
+ * androidInstaller 的 legacy DownloadResumable + cancelAsync;取消后不等
+ * downloadAsync(cancelAsync 后它未必 settle),等 cancelAsync 结算后删掉半成品。
+ */
+async function downloadCancellable(
+ url: string,
+ target: File,
+ signal: AbortSignal,
+): Promise<File> {
+ const FileSystem = await import("expo-file-system/legacy");
+ const task = FileSystem.createDownloadResumable(url, target.uri);
+ let rejectStopped: (reason: Error) => void = () => undefined;
+ const stopped = new Promise<never>((_, reject) => {
+ rejectStopped = reject;
+ });
+ const stop = () => {
+ rejectStopped(new Error("DOWNLOAD_CANCELLED"));
+ void task.cancelAsync().catch(() => undefined);
+ };
+ signal.addEventListener("abort", stop, { once: true });
+ try {
+ if (signal.aborted) throw new Error("DOWNLOAD_CANCELLED");
+ const result = await Promise.race([task.downloadAsync(), stopped]);
+ if (!result || result.status < 200 || result.status >= 300)
+ throw new Error("DOWNLOAD_FAILED");
+ return target;
+ } catch (error) {
+ // 先等原生任务确认停止再删,否则可能删后又被写回半成品(同 androidInstaller)。
+ await task.cancelAsync().catch(() => undefined);
+ await FileSystem.deleteAsync(target.uri, { idempotent: true }).catch(
+ () => undefined,
+ );
+ throw error;
+ } finally {
+ signal.removeEventListener("abort", stop);
+ }
+}
+
+async function copyRemoteFile(
+ url: string,
+ target: File,
+ signal?: AbortSignal,
+): Promise<File> {
if (url.startsWith("file://")) {
await new File(url).copy(target);
return target;
@@ -32,6 +75,7 @@ async function copyRemoteFile(url: string, target: File): Promise<File> {
target.write(Uint8Array.from(atob(match[1]), (char) => char.charCodeAt(0)));
return target;
}
+ if (signal) return downloadCancellable(url, target, signal);
return File.downloadFileAsync(url, target, { idempotent: true });
}
@@ -39,11 +83,14 @@ async function copyRemoteFile(url: string, target: File): Promise<File> {
* 一次性分享临时文件:超出磁盘缓存预算的对象走 store 会被 LRU 立即逐出,
* lookup 拿不到 → 分享失败。这里绕开 LRU 直接下到独立临时目录,只服务本次
* 分享;文件留在系统 cache 区,OS 低存储时统一回收(罕见路径,不做主动清理)。
+ * 传入 signal 时 http 下载可被「取消」真正中止(停止流量、删半成品);任何来源在
+ * 取消后都不留分享副本,返回 null。
*/
export async function downloadRemoteMediaShareTemp(
url: string,
mimeType: string,
fileName?: string,
+ signal?: AbortSignal,
): Promise<string | null> {
try {
const dir = new Directory(Paths.cache, SHARE_TMP_DIR_NAME);
@@ -61,7 +108,12 @@ export async function downloadRemoteMediaShareTemp(
} else {
target = new File(dir, `share-${unique}.${extOfMime(mimeType)}`);
}
- const file = await copyRemoteFile(url, target);
+ const file = await copyRemoteFile(url, target, signal);
+ // 直连 file:// 复制与 data: 写入无法中途停止:结束后已取消就删掉这份副本。
+ if (signal?.aborted) {
+ if (file.exists) file.delete();
+ return null;
+ }
return file.exists ? file.uri : null;
} catch {
return null; // 分享失败由调用方兜底提示
diff --git a/docs/design-rules/design-inventory.md b/docs/design-rules/design-inventory.md
index 470e11a3b7..ffc4f5fc39 100644
--- a/docs/design-rules/design-inventory.md
+++ b/docs/design-rules/design-inventory.md
@@ -61,7 +61,7 @@
| `mobile.companions.groups` | mobile | 伙伴群聊与分工 | app/companions/groups/[groupId].tsx | AdaptiveWindow, AgentErrorDetails, AnchoredPullDownMenu, AnchoredPullDownMenu.android, AndroidUpdateSheet, AppText, AuthContext, AuthorizationMessageCard, BlurBackdrop, BotGroupAvatars, BotGroupChatScreen, BotGroupComposer, BotGroupMenu, BotGroupMessageAttachments, BotGroupMessageText, BotGroupPlan, BotGroupQuote, BotGroupSettingsSheet, BotGroupSpeakerRow, CenteredScreen, ChatIdentityHeader, ClipboardSharedTaskPrompt, CompanionCardButton, CompanionEntering, CompanionLearningFooter, CompanionMessageActions, CompanionMessageCard, CompanionNativeContent.ios, 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, HomeStackHeader, ImageLightbox, IncomingShareBridge, InlineQuoteChip, InlineReferenceChip, InputHandoffCard, InputHandoffDeviceCode, InputHandoffPictureStep, InputHandoffQrCode, InputHandoffRecordRow, InputHandoffSheet, InputHandoffSheet.ios, InputHandoffStepFields, InteractionPanel, MarkdownBlockContent, MessageActionSheet, MessageLoadingImage, MessageRenderer, MobileBoundaryNotice, MobileComposerInputRow, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeBottomSheet, NativeBottomSheet.android, NativeChromeBackButton, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, NativeVideoPlayer, OutsideTap, PaperPlaneIcon, PendingSendBubble, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PluginCardActions, PluginInvocationHeader, PluginSetupNativeActions, PluginSetupNativeForm, 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, RemoteHistoryPrefetchBridge, ResidentHomeList, SentInlineAtomBody, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, ShareMessageCheckbox, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, TaskTags, ThemeProvider, ThinkingDots, WorkingStatusText, [groupId], _layout, gestureHandler, mathWebView, mediaPlayerWebView, mermaidWebView, nativeToolbarMenuItems, peerFileTransport, useLocale, voicePillWidthMotion | 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/inputHandoff/InputHandoffCard.tsx, apps/mobile/src/inputHandoff/InputHandoffDeviceCode.tsx, apps/mobile/src/inputHandoff/InputHandoffPictureStep.tsx, apps/mobile/src/inputHandoff/InputHandoffQrCode.tsx, apps/mobile/src/inputHandoff/InputHandoffRecordRow.tsx, apps/mobile/src/inputHandoff/InputHandoffSheet.ios.tsx, apps/mobile/src/inputHandoff/InputHandoffSheet.tsx, apps/mobile/src/inputHandoff/InputHandoffStepFields.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.android.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/HomeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.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/nativeToolbarMenuItems.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/plugins/PluginCardActions.tsx, apps/mobile/src/plugins/PluginSetupNativeActions.tsx, apps/mobile/src/plugins/PluginSetupNativeForm.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/BotGroupQuote.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/CompanionLearningFooter.tsx, apps/mobile/src/session/CompanionMessageActions.tsx, apps/mobile/src/session/CompanionMessageCard.tsx, apps/mobile/src/session/CompanionNativeContent.ios.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/MessageLoadingImage.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/NativeBottomSheet.android.tsx, apps/mobile/src/session/NativeBottomSheet.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/NativeVideoPlayer.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/RemoteHistoryPrefetchBridge.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SentInlineAtomBody.tsx, apps/mobile/src/session/SessionHeaderNativeControls.ios.tsx, apps/mobile/src/session/SessionHeaderNativeControls.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/TaskTags.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/session/voicePillWidthMotion.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 | 251 | 209 |
| `mobile.device-management` | mobile | 设备管理 | app/devices/manage.tsx / app/devices/manage/[deviceId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AnchoredPullDownMenu.android, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, CompanionNativeContent.ios, 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, HomeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, ModalContentArea, NativeBottomSheet, NativeBottomSheet.android, 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, RemoteHistoryPrefetchBridge, RenameDeviceModal, ResidentHomeList, SettingsGroupRows, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, [deviceId], _layout, gestureHandler, listDisclosureTransition, manage, nativeToolbarMenuItems, 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.android.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/HomeStackHeader.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/nativeToolbarMenuItems.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/CompanionNativeContent.ios.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/NativeBottomSheet.android.tsx, apps/mobile/src/session/NativeBottomSheet.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteHistoryPrefetchBridge.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/session/listDisclosureTransition.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 | 214 | 60 |
| `mobile.devices` | mobile | 主机详情 | app/devices/[deviceId].tsx | AccountSwitcherSheet, AdaptiveWindow, AnchoredPullDownMenu, AnchoredPullDownMenu.android, AndroidUpdateSheet, AppText, AuthContext, AutomationTimerIcon, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, CompanionNativeContent.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, HomeModeSwitch, HomeNativeStackHeader, HomeNewTaskButton, HomeProjectMachineLabel, HomeSearchBar, HomeSessionInfoMeta, HomeStackHeader, HomeSurface, HomeUnreadContext, IncomingShareBridge, MobileAgentMark, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, MobileUserAvatar, MobileVendorIcon, ModalContentArea, MountOnFirstOpen, NativeBottomSheet, NativeBottomSheet.android, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PluginMenuUnreadDot, 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, RemoteHistoryPrefetchBridge, RemoteSourceMark, RemoteTaskSuggestions, RenameSessionModal, ResidentHomeList, SessionActionSheet, SessionActionSheetFrame, SessionActionSheetFrame.android, SessionDetailsNative, SessionDetailsNative.ios, SessionOptionsExpoSheet, SessionRightSpinner, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, SwipeableSessionRow, SwipeableSessionRow.ios, TaskTags, ThemeProvider, [deviceId], _layout, gestureHandler, listDisclosureTransition, nativeToolbarMenuItems, 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.android.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/HomeStackHeader.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/nativeToolbarMenuItems.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/plugins/PluginMenuUnreadDot.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/CompanionNativeContent.ios.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/HomeSessionInfoMeta.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/MountOnFirstOpen.tsx, apps/mobile/src/session/NativeBottomSheet.android.tsx, apps/mobile/src/session/NativeBottomSheet.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteHistoryPrefetchBridge.tsx, apps/mobile/src/session/RemoteSourceMark.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/SessionActionSheetFrame.android.tsx, apps/mobile/src/session/SessionActionSheetFrame.tsx, apps/mobile/src/session/SessionDetailsNative.ios.tsx, apps/mobile/src/session/SessionDetailsNative.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/listDisclosureTransition.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 | 214 | 113 |
-| `mobile.files` | mobile | 任务文件与预览 | app/files/[sessionId].tsx / app/files/preview/[sessionId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AnchoredPullDownMenu.android, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, CindyMakeSessionGate, ClipboardSharedTaskPrompt, CompanionNativeContent.ios, 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, NativeBottomSheet, NativeBottomSheet.android, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, NativeVideoPlayer, 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, RemoteHistoryPrefetchBridge, ResidentHomeList, SessionEntryRecovery, 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.android.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/CindyMakeSessionGate.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.tsx, apps/mobile/src/session/CompanionNativeContent.ios.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/NativeBottomSheet.android.tsx, apps/mobile/src/session/NativeBottomSheet.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/NativeVideoPlayer.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteHistoryPrefetchBridge.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SessionEntryRecovery.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 | 251 | 84 |
+| `mobile.files` | mobile | 任务文件与预览 | app/files/[sessionId].tsx / app/files/preview/[sessionId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AnchoredPullDownMenu.android, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, CindyMakeSessionGate, ClipboardSharedTaskPrompt, CompanionNativeContent.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FileBrowserSegmentedControl, FileTransferBusyNotice, FileTypeIcon, FileTypeTile, FoldTouchpad, HomeEntryProvider, HtmlBrowserChrome, HtmlBrowserChrome.ios, HtmlFileReader, HtmlWebsiteBrowser, ImageLightbox, IncomingShareBridge, MarkdownFileReader, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, ModalContentArea, NativeBottomSheet, NativeBottomSheet.android, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, NativeVideoPlayer, 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, RemoteHistoryPrefetchBridge, ResidentHomeList, SessionEntryRecovery, 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.android.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/CindyMakeSessionGate.tsx, apps/mobile/src/session/ClipboardSharedTaskPrompt.tsx, apps/mobile/src/session/CompanionNativeContent.ios.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/FileTransferBusyNotice.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/NativeBottomSheet.android.tsx, apps/mobile/src/session/NativeBottomSheet.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/NativeVideoPlayer.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteHistoryPrefetchBridge.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SessionEntryRecovery.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 | 251 | 84 |
| `mobile.home` | mobile | 主机与资源首页 | app/index.tsx / app/devices/index.tsx | AccountSwitcherSheet, AdaptiveWindow, AnchoredPullDownMenu, AnchoredPullDownMenu.android, 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, HomeSessionInfoMeta, HomeStackHeader, 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, MountOnFirstOpen, NativeBottomSheet, NativeBottomSheet.android, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PluginMenuUnreadDot, 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, RemoteHistoryPrefetchBridge, RemoteSourceMark, RemoteTaskSuggestions, RenameSessionModal, ResidentHomeList, SessionActionSheet, SessionActionSheetFrame, SessionActionSheetFrame.android, 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, listDisclosureTransition, nativeToolbarMenuItems, 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.android.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/HomeStackHeader.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/nativeToolbarMenuItems.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/plugins/PluginMenuUnreadDot.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/HomeSessionInfoMeta.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/MountOnFirstOpen.tsx, apps/mobile/src/session/NativeBottomSheet.android.tsx, apps/mobile/src/session/NativeBottomSheet.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteHistoryPrefetchBridge.tsx, apps/mobile/src/session/RemoteSourceMark.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/SessionActionSheetFrame.android.tsx, apps/mobile/src/session/SessionActionSheetFrame.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/session/listDisclosureTransition.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 | 214 | 145 |
| `mobile.overlay.connection-startup` | mobile | 根布局挂载的启动与连接反馈 | app/_layout.tsx → StartupSplashOverlay / ConnectionNoticeProvider;各页面 ConnectionBanner | AdaptiveWindow, AnchoredPullDownMenu, AnchoredPullDownMenu.android, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, CompanionNativeContent.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ConnectionNoticeProvider, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeBottomSheet, NativeBottomSheet.android, 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, RemoteHistoryPrefetchBridge, 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.android.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/CompanionNativeContent.ios.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/NativeBottomSheet.android.tsx, apps/mobile/src/session/NativeBottomSheet.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteHistoryPrefetchBridge.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 | 214 | 55 |
| `mobile.plugins` | mobile | 插件目录、页面与原生交互 | app/plugins.tsx | AdaptiveWindow, AnchoredPullDownMenu, AnchoredPullDownMenu.android, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ClipboardSharedTaskPrompt, CompanionNativeContent.ios, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, HomeStackHeader, HtmlBrowserChrome, HtmlBrowserChrome.ios, HtmlFileReader, HtmlWebsiteBrowser, ImageLightbox, IncomingShareBridge, MobileAgentMark, MobileAgentSwitcher, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileModelPickerList, MobileModelPickerList.ios, MobileOutboxBridge, MobilePermissionPickerList, MobilePermissionPickerList.ios, MobilePrimitives, MobileProviderMark, ModelOptionsSheetView, ModelOptionsSheetView.ios, ModelPickerNativeHeader, ModelPickerNativeHeader.ios, ModelPickerSheet, NativeBottomSheet, NativeBottomSheet.android, NativeChromeBackButton.ios, NativeChromeButton.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, NativeVideoPlayer, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PluginDetailView, PluginDetailView.ios, PluginDirectoryPicker, PluginDirectoryView, PluginDirectoryView.ios, PluginMediaViewer, PluginNativeIntent, PluginPage, PluginScheduleDraft, PluginTaskPicker, PluginTaskPickerView, PluginTaskPickerView.ios, PluginToolChips, PluginsScreen, 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, RemoteHistoryPrefetchBridge, RemoteSourceMark, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, UnifiedModelPickerSheet, UnifiedModelPickerView, UnifiedModelPickerView.ios, _layout, gestureHandler, mediaPlayerWebView, nativeToolbarMenuItems, peerFileTransport, plugins, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/plugins.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/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.android.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/HomeStackHeader.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/nativeToolbarMenuItems.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/plugins/PluginDetailView.ios.tsx, apps/mobile/src/plugins/PluginDetailView.tsx, apps/mobile/src/plugins/PluginDirectoryPicker.tsx, apps/mobile/src/plugins/PluginDirectoryView.ios.tsx, apps/mobile/src/plugins/PluginDirectoryView.tsx, apps/mobile/src/plugins/PluginMediaViewer.tsx, apps/mobile/src/plugins/PluginNativeIntent.tsx, apps/mobile/src/plugins/PluginPage.tsx, apps/mobile/src/plugins/PluginScheduleDraft.tsx, apps/mobile/src/plugins/PluginTaskPicker.tsx, apps/mobile/src/plugins/PluginTaskPickerView.ios.tsx, apps/mobile/src/plugins/PluginTaskPickerView.tsx, apps/mobile/src/plugins/PluginToolChips.tsx, apps/mobile/src/plugins/PluginsScreen.tsx, apps/mobile/src/plugins/pluginPageHtml.ts, 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/CompanionNativeContent.ios.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/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.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/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/NativeBottomSheet.android.tsx, apps/mobile/src/session/NativeBottomSheet.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/NativeVideoPlayer.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteHistoryPrefetchBridge.tsx, apps/mobile/src/session/RemoteSourceMark.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/UnifiedModelPickerSheet.tsx, apps/mobile/src/session/UnifiedModelPickerView.ios.tsx, apps/mobile/src/session/UnifiedModelPickerView.tsx, apps/mobile/src/session/mediaPlayerWebView.tsx, apps/mobile/src/session/mediaPlayerWebViewHtml.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 | 251 | 88 |