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(sharing): align shared task navigation across clients

DavidShenfbdd4126215c
diff --git a/apps/desktop/src/renderer/components/ui/confirm-dialog.tsx b/apps/desktop/src/renderer/components/ui/confirm-dialog.tsx
index 6a7b00c0e1..32da8bed55 100644
--- a/apps/desktop/src/renderer/components/ui/confirm-dialog.tsx
+++ b/apps/desktop/src/renderer/components/ui/confirm-dialog.tsx
@@ -21,6 +21,8 @@ export interface ConfirmDialogProps {
description?: string;
/** 可选的标题与正文样式;富内容区与按钮不受影响。 */
textClassName?: string;
+ /** 可选的正文样式;不改变标题字号。 */
+ descriptionClassName?: string;
/**
* 富内容区(如装意识的逐项权限清单):渲染在 description 之后、复选框之前。
* 与 description 独立 —— Radix Description 是 <p>,块级列表不能塞进去。
@@ -104,6 +106,7 @@ export function ConfirmDialog({
title,
description,
textClassName,
+ descriptionClassName,
content,
maxWidth,
confirmText,
@@ -287,7 +290,7 @@ export function ConfirmDialog({
>
{description && (
<AlertDialog.Description
- className={cn('text-base text-[var(--confirm-desc)]', textClassName)}
+ className={cn('text-base text-[var(--confirm-desc)]', textClassName, descriptionClassName)}
>
{description}
</AlertDialog.Description>
diff --git a/apps/desktop/src/renderer/features/cc-agent/CCAgentSidebarUpper.tsx b/apps/desktop/src/renderer/features/cc-agent/CCAgentSidebarUpper.tsx
index d6de783909..79763e1d17 100644
--- a/apps/desktop/src/renderer/features/cc-agent/CCAgentSidebarUpper.tsx
+++ b/apps/desktop/src/renderer/features/cc-agent/CCAgentSidebarUpper.tsx
@@ -69,6 +69,7 @@ import { SidebarTopNav } from '@/components/sidebar/SidebarTopNav';
import { SidebarFilterPopover } from './sidebar/SidebarFilterPopover';
import { MainListScopeHeader } from './sidebar/MainListScopeHeader';
import { SharedTasksSection } from '@/features/device-link/SharedTasksSection';
+import { sharedTaskErrorKey } from '@/features/device-link/sharedTaskCompatibility';
import { isSharedTaskPeer } from '@cindy/device-link';
import { stripTrailingPathSeparators } from '../../../shared/pathText';
import {
@@ -824,6 +825,8 @@ interface ConfirmState {
action: 'delete' | 'archive';
/** P1: 会话 worktree 有未提交更改 → 确认文案追加警告(打开前预检)。 */
dirtyWorktree: boolean;
+ /** Owned shared task to close before the confirmed archive/delete. */
+ sharedTaskId?: string;
}
const CONFIRM_INITIAL: ConfirmState = {
@@ -831,6 +834,7 @@ const CONFIRM_INITIAL: ConfirmState = {
sessionId: '',
action: 'delete',
dirtyWorktree: false,
+ sharedTaskId: undefined,
};
function ExpandedView({
@@ -2894,8 +2898,23 @@ function ExpandedView({
includeArchived: filter.status,
});
+ const closeOwnedSharedTask = useCallback(async (sharedTaskId?: string): Promise<boolean> => {
+ if (!sharedTaskId) return true;
+ try {
+ await window.electronAPI.sharedTask.account({ action: 'close', sharedTaskId });
+ return true;
+ } catch (error) {
+ toast.error(t(sharedTaskErrorKey(error)));
+ return false;
+ }
+ }, [t]);
+
const handleActionClick = useCallback(
- async (sessionId: string, action: 'delete' | 'archive' | 'archive-now' | 'unarchive') => {
+ async (
+ sessionId: string,
+ action: 'delete' | 'archive' | 'archive-now' | 'unarchive',
+ sharedTaskId?: string,
+ ) => {
const session = sessionsByIdRef.current.get(sessionId);
if (isRemoteSessionWriteBlocked(session)) {
toast.warning(t('ccAgent.remoteSession.actionsUnavailable'));
@@ -2963,12 +2982,14 @@ function ExpandedView({
sessionId,
action: 'archive',
dirtyWorktree: preflight === 'dirty',
+ sharedTaskId,
});
return;
}
// 重定向判定用 viewedSessionId:files 路由下归档「正在浏览的会话」也要
// 跳离失效的文件视图(codex review;正常路由下两者恒等)。经 ref 读:它随
// 路由切换而变,留在 deps 里会让本 handler 每次切换都重建、打穿整表 memo。
+ if (!(await closeOwnedSharedTask(sharedTaskId))) return;
await runSessionAction(sessionId, 'archive', {
activeSessionId: viewedSessionIdRef.current,
});
@@ -2981,22 +3002,28 @@ function ExpandedView({
const dirtyWorktree =
(await resolveWorktreeRemovalPreflight(sessionId, session?.deviceLinkDeviceId)) ===
'dirty';
+ // Keep the existing confirm-state shape for the normal delete flow, then attach
+ // the shared-task scope in a functional update so cancellation still leaves it open.
setConfirm({ open: true, sessionId, action, dirtyWorktree });
+ if (sharedTaskId) {
+ setConfirm((previous) => ({ ...previous, sharedTaskId }));
+ }
return;
}
await unarchiveSession(sessionId);
},
- [runningSessionIds, runSessionAction, unarchiveSession, t],
+ [closeOwnedSharedTask, runningSessionIds, runSessionAction, unarchiveSession, t],
);
const handleConfirm = useCallback(async () => {
- const { sessionId, action } = confirm;
+ const { sessionId, action, sharedTaskId } = confirm;
const session = sessionsById.get(sessionId);
if (isRemoteSessionWriteBlocked(session)) {
toast.warning(t('ccAgent.remoteSession.actionsUnavailable'));
setConfirm(CONFIRM_INITIAL);
return;
}
+ if (!(await closeOwnedSharedTask(sharedTaskId))) return;
// 重定向判定统一用 viewedSessionId(files 路由下 = 被浏览文件的会话,
// 正常路由下与 activeSessionId 恒等):从面板删除/归档正在浏览的会话时
// 也要跳离失效的 /cc-agent/files/:id(codex review)。
@@ -3009,7 +3036,7 @@ function ExpandedView({
deleteRedirectRoute,
});
setConfirm(CONFIRM_INITIAL);
- }, [viewedSessionId, confirm, resolveSessionRemovalRedirect, runSessionAction, sessionsById, t]);
+ }, [closeOwnedSharedTask, viewedSessionId, confirm, resolveSessionRemovalRedirect, runSessionAction, sessionsById, t]);
const handleCancelConfirm = useCallback(() => {
setConfirm(CONFIRM_INITIAL);
@@ -3594,7 +3621,10 @@ function ExpandedView({
) : null}
{/* 搜索时原列表只隐藏、不卸载:置顶段折叠等本地 state 才能保住。 */}
<div hidden={searchActive} className="flex flex-col gap-2">
- <SharedTasksSection activeSessionId={activeSessionId} localSessions={sessions} onSelect={(id) => {
+ <SharedTasksSection activeSessionId={activeSessionId} localSessions={sessions}
+ runningSessionIds={displayRunningSessionIds} attachedSessionIds={attachedSessionIds} notifications={sidebarNotifications}
+ onAction={handleActionClick} onRename={handleRename} onTogglePin={handleTogglePin}
+ onMoveSession={handleMoveSession} projectOptions={projectPickerOptions} onSelect={(id) => {
clearNotification(id);
navigate('/cc-agent/' + encodeURIComponent(id));
}} />
diff --git a/apps/desktop/src/renderer/features/cc-agent/sidebar/SessionCard.tsx b/apps/desktop/src/renderer/features/cc-agent/sidebar/SessionCard.tsx
index 8c9f1fe3c6..73f77e0661 100644
--- a/apps/desktop/src/renderer/features/cc-agent/sidebar/SessionCard.tsx
+++ b/apps/desktop/src/renderer/features/cc-agent/sidebar/SessionCard.tsx
@@ -156,11 +156,13 @@ export const SessionCard = withSidebarNavigation<SessionCardProps>(function Sess
variant = 'card',
isFirst = false,
hideBottomDivider = false,
+ navigationOnly = false,
}: SessionCardProps & SidebarNavigationProps) {
const { t } = useTranslation();
const cindyMakePreparing = useCindyMakePreparing(session);
// mod+1..9 序号徽标:模块 store 按 sessionId 精准订阅,非按住态恒为 null。
- const ordinalBadgeLabel = useSessionOrdinalBadge(session.id);
+ const ordinalBadge = useSessionOrdinalBadge(session.id);
+ const ordinalBadgeLabel = navigationOnly ? null : ordinalBadge;
// 灵动岛同源的 per-session 实时活动(执行中逐步活动 + 等待交互态)。
const islandActivity = useAgentIslandActivity(session.id);
// list 变体与文字模式共用右侧状态优先级:
@@ -222,7 +224,7 @@ export const SessionCard = withSidebarNavigation<SessionCardProps>(function Sess
);
const canHighlightDisplayTitle = canHighlightSessionDisplayTitle(session, t);
const isArchived = session.status === 'archived';
- const canQuickArchive = !isArchived && !isEmpty && !remoteWritesBlocked;
+ const canQuickArchive = !navigationOnly && !isArchived && !isEmpty && !remoteWritesBlocked;
// 卡片/列表的正文固定给预览区域。list 保留实时执行文案,正文只用最近消息;
// card + 置顶才用稳定任务摘要,完成后由 summary 更新。
const bodyPreview = resolveSessionCardBody({
@@ -353,7 +355,7 @@ export const SessionCard = withSidebarNavigation<SessionCardProps>(function Sess
});
}, []);
const needsSplitDragHandle = needsDedicatedSplitGroupDragHandle(dragContainerState);
- const splitDragEnabled = isSplitGroupDragSource({
+ const splitDragEnabled = !navigationOnly && isSplitGroupDragSource({
editing: isEditing,
orcaRole: session.orcaRole,
...dragContainerState,
@@ -410,7 +412,7 @@ export const SessionCard = withSidebarNavigation<SessionCardProps>(function Sess
(e: React.MouseEvent) => {
// 已在编辑态时不重复进入:编辑器内部元素漏拦的 dblclick 冒泡到这里会
// setEditValue 重置草稿(与 handleClick 的 isEditing 守卫对称)。
- if (isEditing) return;
+ if (isEditing || navigationOnly) return;
e.stopPropagation();
e.preventDefault();
if (remoteWritesBlocked) {
@@ -421,12 +423,12 @@ export const SessionCard = withSidebarNavigation<SessionCardProps>(function Sess
committedRef.current = false;
setIsEditing(true);
},
- [displayTitle, isEditing, remoteWritesBlocked, t],
+ [displayTitle, isEditing, navigationOnly, remoteWritesBlocked, t],
);
useEffect(() => {
- if (isActive) scrollIntoNearestView(cardRef.current);
- }, [isActive]);
+ if (isActive && !navigationOnly) scrollIntoNearestView(cardRef.current);
+ }, [isActive, navigationOnly]);
// archive 两步确认生命周期(redesign 稿:3s 超时 + 点外面撤回)
useEffect(() => {
@@ -628,7 +630,8 @@ export const SessionCard = withSidebarNavigation<SessionCardProps>(function Sess
data-session-id={session.id}
// 多选范围选取靠 getVisibleSidebarSessionIds 扫 [data-sidebar-session-row][data-session-id];
// 卡片也打这个标记,shift 范围选才能把卡片纳入"可见行"。
- data-sidebar-session-row="true"
+ data-sidebar-session-row={navigationOnly ? undefined : 'true'}
+ data-sidebar-navigation-row={navigationOnly ? 'true' : undefined}
data-split-group-drag-source={splitDragEnabled ? 'true' : undefined}
draggable={splitDragEnabled && (dragContainerState.nativeSortable || !needsSplitDragHandle)}
role="button"
@@ -648,7 +651,7 @@ export const SessionCard = withSidebarNavigation<SessionCardProps>(function Sess
finishSessionDrag(event, session.id, session.deviceLinkDeviceId);
}}
onPointerDown={(e) => {
- if (shouldPrefetchSessionOnPointerDown(e, { isActive, isEditing })) {
+ if (!navigationOnly && shouldPrefetchSessionOnPointerDown(e, { isActive, isEditing })) {
makerChatStore.ensureInitialMessages(session.id);
}
}}
@@ -670,6 +673,7 @@ export const SessionCard = withSidebarNavigation<SessionCardProps>(function Sess
}
e.preventDefault();
e.stopPropagation();
+ if (navigationOnly) return;
prefetchRemovalPreflight();
setMenuPos({ x: e.clientX, y: e.clientY });
}}
@@ -815,6 +819,7 @@ export const SessionCard = withSidebarNavigation<SessionCardProps>(function Sess
Agent 身份图标留在标题左侧,状态指示器改由下方右下角承担。 */}
{!isEditing && (
<TimeActionsSlot
+ navigationOnly={navigationOnly}
pieces={cardInfoPieces}
prRef={cardInfoPrRef}
worktree={cardInfoWorktree ?? undefined}
@@ -872,7 +877,7 @@ export const SessionCard = withSidebarNavigation<SessionCardProps>(function Sess
<div className="relative flex h-full flex-col px-[10px] pt-[8px] pb-[8px]">
{/* 右上角 hover 操作钮(More + Archive/Undo);archivePending 时换成红色确认胶囊。
时间在右下角(见下),操作钮放右上角空位、不和时间挤在一起。 */}
- {!isEditing && !archivePending && (
+ {!navigationOnly && !isEditing && !archivePending && (
<div
className={cn(
'absolute right-[6px] top-[6px] z-10 flex items-center gap-0.5',
@@ -1059,7 +1064,7 @@ export const SessionCard = withSidebarNavigation<SessionCardProps>(function Sess
)}
{/* 右键菜单——与 SessionItem 同款 coordinate-anchored DropdownMenu */}
- {!isEditing && (
+ {!navigationOnly && !isEditing && (
<DropdownMenu
open={menuPos !== null}
onOpenChange={(open) => {
@@ -1202,6 +1207,7 @@ export const SessionCard = withSidebarNavigation<SessionCardProps>(function Sess
* 交互逻辑与对话列表(SessionItem)一致。Agent 身份 / 草稿由左侧 SessionStatusIcon 承担;
* list 的右下状态指示器由 SidebarRightStatusIndicator 单独承担。 */
function TimeActionsSlot({
+ navigationOnly = false,
pieces,
prRef,
worktree,
@@ -1219,6 +1225,7 @@ function TimeActionsSlot({
yieldToOrdinalBadge = false,
ordinalBadgeLabel,
}: {
+ navigationOnly?: boolean;
pieces: readonly SessionInfoPiece[];
prRef?: SessionPrRef;
worktree?: SessionWorktreeInfo;
@@ -1251,7 +1258,7 @@ function TimeActionsSlot({
className={cn(
// duration 与操作钮的渐显同拍(120ms),让位/回归一进一出同步。
'col-start-1 row-start-1 flex items-center gap-1 transition-opacity duration-[120ms]',
- !archivePending &&
+ !navigationOnly && !archivePending &&
'group-hover/card:opacity-0 group-hover/card:w-0 group-hover/card:overflow-hidden group-focus-within/slot:opacity-0 group-focus-within/slot:w-0 group-focus-within/slot:overflow-hidden',
(menuOpen || yieldToOrdinalBadge) && 'opacity-0 w-0 overflow-hidden',
// 确认胶囊覆盖同一槽位时立即隐藏日期,避免 120ms 淡出期间文字叠在一起。
@@ -1304,7 +1311,7 @@ function TimeActionsSlot({
</button>
)}
- {!archivePending && (
+ {!navigationOnly && !archivePending && (
<>
<div
aria-hidden
diff --git a/apps/desktop/src/renderer/features/cc-agent/sidebar/SessionItem.tsx b/apps/desktop/src/renderer/features/cc-agent/sidebar/SessionItem.tsx
index 1d4d2846b1..7514c9fca0 100644
--- a/apps/desktop/src/renderer/features/cc-agent/sidebar/SessionItem.tsx
+++ b/apps/desktop/src/renderer/features/cc-agent/sidebar/SessionItem.tsx
@@ -210,7 +210,7 @@ export function SidebarTitleMarquee({ children, className, title }: SidebarTitle
}, [startMarquee, title]);
useEffect(() => {
- const row = containerRef.current?.closest('[data-sidebar-session-row="true"]');
+ const row = containerRef.current?.closest('[data-sidebar-session-row="true"], [data-sidebar-navigation-row="true"]');
if (!(row instanceof HTMLElement)) return undefined;
const onEnter = () => {
@@ -255,6 +255,8 @@ export function SidebarTitleMarquee({ children, className, title }: SidebarTitle
}
export interface SessionItemProps {
+ /** Shared-group entries reuse the presentation without task-management actions or selection. */
+ navigationOnly?: boolean;
session: Session;
isActive: boolean;
/** F-SB-7: Whether this session's agent is currently running. */
@@ -266,7 +268,11 @@ export interface SessionItemProps {
/** Multi-select visual state in the sidebar. */
isSelected?: boolean;
onClick: SessionClickHandler;
- onAction: (sessionId: string, action: 'delete' | 'archive' | 'archive-now' | 'unarchive') => void;
+ onAction: (
+ sessionId: string,
+ action: 'delete' | 'archive' | 'archive-now' | 'unarchive',
+ sharedTaskId?: string,
+ ) => void;
onRename: (sessionId: string, newTitle: string) => void;
onTogglePin: (sessionId: string, currentlyPinned: boolean) => void;
onMoveSession?: (sessionId: string, target: SessionMoveTarget) => void;
@@ -338,6 +344,7 @@ export const SessionItem = withSidebarNavigation<SessionItemProps>(function Sess
matchIndices,
sourceLabel,
insideAutomationGroup = false,
+ navigationOnly = false,
}: SessionItemProps & SidebarNavigationProps) {
const { t } = useTranslation();
const cindyMakePreparing = useCindyMakePreparing(session);
@@ -355,7 +362,8 @@ export const SessionItem = withSidebarNavigation<SessionItemProps>(function Sess
}, [wantsPrInfo, remoteDeviceId, session.id, registerPrConsumer]);
// mod+1..9 序号徽标:模块 store 按 sessionId 精准订阅(性能不变量第 2 条),
// 非按住态恒为 null,不惊动 memo。
- const ordinalBadgeLabel = useSessionOrdinalBadge(session.id);
+ const ordinalBadge = useSessionOrdinalBadge(session.id);
+ const ordinalBadgeLabel = navigationOnly ? null : ordinalBadge;
const isPinned = session.pinnedAt != null;
const isEmpty = isEmptyDraftSession(session);
// 取 userSendAt 与 updatedAt 中较新的值,兼容存量 DB 行(旧版只写 userSendAt),
@@ -527,7 +535,7 @@ export const SessionItem = withSidebarNavigation<SessionItemProps>(function Sess
// - 左侧 status icon 由 CircleDashed 换成 Archive
// - 右侧 ⋮ 菜单只显示 Rename + Unarchive(屏蔽 Pin/Delete/Archive 等无意义项)
const isArchived = session.status === 'archived';
- const canQuickArchive = !isArchived && !isEmpty && !remoteWritesBlocked;
+ const canQuickArchive = !navigationOnly && !isArchived && !isEmpty && !remoteWritesBlocked;
// 右键菜单弹出位置:null = 关闭;{x,y} = 在该屏幕坐标处弹出(fixed 定位的
// 隐形 trigger 锚定到这里)。与 ProjectNode 同款 coordinate-anchored 模式。
@@ -605,7 +613,7 @@ export const SessionItem = withSidebarNavigation<SessionItemProps>(function Sess
(e: React.MouseEvent) => {
// 已在编辑态时不重复进入:编辑器内部元素漏拦的 dblclick 冒泡到这里会
// setEditValue 重置草稿(与 handleClick 的 isEditing 守卫对称)。
- if (isEditing) return;
+ if (isEditing || navigationOnly) return;
e.stopPropagation();
e.preventDefault();
if (remoteWritesBlocked) {
@@ -616,7 +624,7 @@ export const SessionItem = withSidebarNavigation<SessionItemProps>(function Sess
committedRef.current = false;
setIsEditing(true);
},
- [displayTitle, isEditing, remoteWritesBlocked, t],
+ [displayTitle, isEditing, navigationOnly, remoteWritesBlocked, t],
);
// 置顶段使用原生 Sortable DnD:Sortable 负责侧栏内排序,原生 dragstart 同时写入
@@ -637,7 +645,7 @@ export const SessionItem = withSidebarNavigation<SessionItemProps>(function Sess
});
}, []);
const needsSplitDragHandle = needsDedicatedSplitGroupDragHandle(dragContainerState);
- const splitDragEnabled = isSplitGroupDragSource({
+ const splitDragEnabled = !navigationOnly && isSplitGroupDragSource({
editing: isEditing,
orcaRole: session.orcaRole,
...dragContainerState,
@@ -663,7 +671,10 @@ export const SessionItem = withSidebarNavigation<SessionItemProps>(function Sess
// isActive 由 false → true(或初次 mount 时即为 true)→ 把行滚进 viewport。
// 同 active 重渲染 / 其它字段更新不触发(useEffect deps 只有 isActive)。
useEffect(() => {
- if (isActive) scrollIntoNearestView(rowRef.current);
+ if (isActive && !navigationOnly) scrollIntoNearestView(rowRef.current);
+ // navigationOnly is fixed for the lifetime of a mounted row; shared role switches
+ // unmount the old list, so the active-session scroll contract stays isActive-only.
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [isActive]);
// archivePending 生命周期:进入 pending → 起 4s 自动撤回 timer + document mousedown
@@ -900,7 +911,8 @@ export const SessionItem = withSidebarNavigation<SessionItemProps>(function Sess
<div
ref={rowRef}
data-session-id={session.id}
- data-sidebar-session-row="true"
+ data-sidebar-session-row={navigationOnly ? undefined : 'true'}
+ data-sidebar-navigation-row={navigationOnly ? 'true' : undefined}
data-split-group-drag-source={splitDragEnabled ? 'true' : undefined}
draggable={splitDragEnabled && (dragContainerState.nativeSortable || !needsSplitDragHandle)}
role="button"
@@ -924,7 +936,7 @@ export const SessionItem = withSidebarNavigation<SessionItemProps>(function Sess
finishSessionDrag(event, session.id, session.deviceLinkDeviceId);
}}
onPointerDown={(e) => {
- if (shouldPrefetchSessionOnPointerDown(e, { isActive, isEditing })) {
+ if (!navigationOnly && shouldPrefetchSessionOnPointerDown(e, { isActive, isEditing })) {
makerChatStore.ensureInitialMessages(session.id);
}
}}
@@ -952,6 +964,7 @@ export const SessionItem = withSidebarNavigation<SessionItemProps>(function Sess
}
e.preventDefault();
e.stopPropagation();
+ if (navigationOnly) return;
prefetchRemovalPreflight();
setMenuPos({ x: e.clientX, y: e.clientY });
}}
@@ -1102,7 +1115,7 @@ export const SessionItem = withSidebarNavigation<SessionItemProps>(function Sess
'col-start-1 row-start-1 flex items-center gap-1',
// duration 与 action 按钮组的渐显同拍(120ms),让位/回归一进一出同步。
'transition-opacity duration-[120ms]',
- !archivePending &&
+ !navigationOnly && !archivePending &&
'group-hover:opacity-0 group-hover:w-0 group-hover:overflow-hidden group-focus-within/slot:opacity-0 group-focus-within/slot:w-0 group-focus-within/slot:overflow-hidden',
menuPos !== null && 'opacity-0 w-0 overflow-hidden',
archivePending && 'opacity-0 w-0 overflow-hidden',
@@ -1176,7 +1189,7 @@ export const SessionItem = withSidebarNavigation<SessionItemProps>(function Sess
按钮立即还原,符合用户对 "撤回 = 回到点击前" 的直觉预期。
- archived:More + Undo(lucide Undo),单击直接走 unarchive,
不像 Archive 那样需要二次确认 pill(unarchive 非破坏性)。 */}
- {!archivePending && (
+ {!navigationOnly && !archivePending && (
<>
{/* 入流占位只负责把标题挤窄;真正的按钮保持可聚焦,不能 display:none。 */}
<div
@@ -1231,7 +1244,7 @@ export const SessionItem = withSidebarNavigation<SessionItemProps>(function Sess
{/* 右键菜单:与 ProjectNode 同款 coordinate-anchored DropdownMenu —
隐形 fixed-position trigger 锚定到 onContextMenu 捕获的鼠标坐标,
Radix 自动处理打开/关闭、ESC、点外面关闭等行为。 */}
- {!isEditing && (
+ {!navigationOnly && !isEditing && (
<DropdownMenu
open={menuPos !== null}
onOpenChange={(open) => {
diff --git a/apps/desktop/src/renderer/features/cc-agent/sidebar/__tests__/SessionCard.visual.test.ts b/apps/desktop/src/renderer/features/cc-agent/sidebar/__tests__/SessionCard.visual.test.ts
index fd81e27c3c..61c26c44fc 100644
--- a/apps/desktop/src/renderer/features/cc-agent/sidebar/__tests__/SessionCard.visual.test.ts
+++ b/apps/desktop/src/renderer/features/cc-agent/sidebar/__tests__/SessionCard.visual.test.ts
@@ -25,6 +25,7 @@ import {
} from '@/features/device-link/remoteSessionActivityStore';
import { SessionCard } from '../SessionCard';
+import { SessionItem } from '../SessionItem';
import { sessionCardVisualCases } from '../__fixtures__/sessionCardVisualCases';
import { SPLIT_GROUP_SESSION_MIME } from '../../splitGroupDnd';
@@ -256,6 +257,50 @@ describe('SessionCard visual cases', () => {
vi.restoreAllMocks();
});
+ it.each(['list', 'text'] as const)('reuses the %s presentation for shared navigation without task actions', (variant) => {
+ const session = { ...sessionCardVisualCases[0].session, preview: 'Shared message preview' };
+ const onClick = vi.fn();
+ const onRename = vi.fn();
+ const onAction = vi.fn();
+ const onTogglePin = vi.fn();
+ const props = { session, isActive: false, isRunning: false, hasAttentionNotification: false, navigationOnly: true, onClick, onRename, onAction, onTogglePin };
+ const view = render(variant === 'list'
+ ? createElement(SessionCard, { ...props, variant: 'list' })
+ : createElement(SessionItem, props));
+ const row = view.container.querySelector<HTMLElement>('[data-sidebar-navigation-row="true"]')!;
+ expect(row).toBeTruthy();
+ expect(view.container.querySelector('[data-sidebar-session-row="true"]')).toBeNull();
+ expect(row.draggable).toBe(false);
+ expect(row.querySelector('button')).toBeNull();
+ if (variant === 'list') expect(row.textContent).toContain(session.preview);
+ const context = createEvent.contextMenu(row);
+ fireEvent(row, context);
+ expect(context.defaultPrevented).toBe(true);
+ expect(screen.queryByRole('menu')).toBeNull();
+ fireEvent.doubleClick(row);
+ expect(screen.queryByRole('textbox')).toBeNull();
+ fireEvent.pointerDown(row, { button: 0, isPrimary: true });
+ expect(mocks.ensureInitialMessages).not.toHaveBeenCalled();
+ fireEvent.click(row);
+ fireEvent.keyDown(row, { key: 'Enter' });
+ expect(onClick).toHaveBeenCalledTimes(2);
+ expect(onAction).not.toHaveBeenCalled();
+ expect(onRename).not.toHaveBeenCalled();
+ expect(onTogglePin).not.toHaveBeenCalled();
+ });
+
+ it('uses ordinary running and awaiting preview text in shared navigation rows', () => {
+ const visualCase = sessionCardVisualCases.find(item => item.id === 'short-idle-cc')!;
+ mocks.runningDetailBySession.set(visualCase.session.id, 'Reading shared files');
+ const view = renderCase(visualCase.id, { variant: 'list', navigationOnly: true });
+ expect(screen.getByText('Reading shared files')).toBeTruthy();
+ view.unmount();
+ mocks.runningDetailBySession.clear();
+ mocks.pendingPluginSetupSessionIds.add(visualCase.session.id);
+ renderCase(visualCase.id, { variant: 'list', navigationOnly: true });
+ expect(screen.getByText('等待插件设置')).toBeTruthy();
+ });
+
it.each([
{ locale: 'en', resource: en },
{ locale: 'zh-CN', resource: zhCN },
diff --git a/apps/desktop/src/renderer/features/device-link/JoinSharedTaskDialog.tsx b/apps/desktop/src/renderer/features/device-link/JoinSharedTaskDialog.tsx
index dc23d4efb0..3456a73a61 100644
--- a/apps/desktop/src/renderer/features/device-link/JoinSharedTaskDialog.tsx
+++ b/apps/desktop/src/renderer/features/device-link/JoinSharedTaskDialog.tsx
@@ -141,22 +141,24 @@ export function JoinSharedTaskDialog({ open, onOpenChange }: { open: boolean; on
onInteractOutside={(event) => { if (pending.current || closeTargets) event.preventDefault(); }}>
<div className="mb-4 flex items-center justify-between gap-2">
<Dialog.Title className="text-18 font-medium">{t(closeTargets ? 'sharedTask.closeAllTitle' : request ? 'sharedTask.title' : 'sharedTask.join')}</Dialog.Title>
- {!closeTargets && <Dialog.Close asChild>
- <Button variant="secondary" size="lg" className="w-9 border-transparent bg-transparent p-0" aria-label={t('sharedTask.dismiss')} disabled={busy}><X size={18} aria-hidden /></Button>
- </Dialog.Close>}
+ {closeTargets ? <Button variant="secondary" size="lg" className="w-9 border-transparent bg-transparent p-0" aria-label={t('sharedTask.closeAllCancel')} disabled={busy}
+ onClick={() => setCloseTargets(null)}><X size={18} aria-hidden /></Button>
+ : <Dialog.Close asChild>
+ <Button variant="secondary" size="lg" className="w-9 border-transparent bg-transparent p-0" aria-label={t('sharedTask.dismiss')} disabled={busy}><X size={18} aria-hidden /></Button>
+ </Dialog.Close>}
</div>
- <Dialog.Description className={request ? 'sr-only' : 'mb-4 text-13 text-[var(--text-secondary)]'}>{t(closeTargets ? 'sharedTask.closeAllBody' : request ? 'sharedTask.joinedBody' : 'sharedTask.joinIntro')}</Dialog.Description>
+ <Dialog.Description className={request ? 'sr-only' : 'mb-4 text-13 text-[var(--text-secondary)]'}>{t(closeTargets ? 'sharedTask.closeAllJoinBody' : request ? 'sharedTask.joinedBody' : 'sharedTask.joinIntro', { count: closeTargets?.length ?? 0 })}</Dialog.Description>
{closeTargets && <div>
- <div className="max-h-56 space-y-2 overflow-y-auto">{closeTargets.map(item => <div key={item.sharedTaskId} className="rounded-lg border border-[var(--border-default)] p-3">
+ <div className="max-h-56 overflow-y-auto rounded-xl border border-[var(--border-default)]">{closeTargets.map((item, index) => <div key={item.sharedTaskId} className={index ? 'border-t border-[var(--border-default)] p-3' : 'p-3'}>
<p className="break-words text-13 font-medium">{item.title}</p>
- <p className="text-11 text-[var(--text-secondary)]">{t(item.local ? 'sharedTask.thisDevice' : 'sharedTask.otherDevice')}</p>
+ <p className="text-12 text-[var(--text-secondary)]">{t(item.local ? 'sharedTask.thisDevice' : 'sharedTask.otherDevice')}</p>
</div>)}</div>
<p className="mt-4 text-12 text-[var(--text-secondary)]">{t('sharedTask.closeAllScopeNote')}</p>
<div className="mt-5 flex flex-wrap items-center justify-between gap-3">
<Button ref={keepSharing} variant="secondary" size="lg" disabled={busy} onClick={() => setCloseTargets(null)}>{t('sharedTask.closeAllKeep')}</Button>
<Button variant="primary" size="lg" loading={busy} onClick={closeOwned}
className="h-auto min-h-9 max-w-full whitespace-normal border-transparent bg-[hsl(var(--destructive))] py-1.5 text-[var(--accent-pure-cta-fg)] enabled:hover:border-transparent enabled:active:border-transparent enabled:hover:bg-[hsl(var(--destructive))] enabled:active:bg-[hsl(var(--destructive))]">
- {t('sharedTask.closeAllAction', { count: closeTargets.length })}
+ {t('sharedTask.closeAllJoinAction')}
</Button>
</div>
</div>}
@@ -174,7 +176,7 @@ export function JoinSharedTaskDialog({ open, onOpenChange }: { open: boolean; on
: <>
<div className="mb-4 flex items-center justify-between gap-3 rounded-lg border border-[var(--border-default)] p-3">
<div className="min-w-0"><p className="text-13">{t('sharedTask.ownedTitle')}</p>
- <p className="text-11 text-[var(--text-secondary)]" role="status">{t(ownedError ? 'sharedTask.ownedLoadFailed' : owned === null ? 'sharedTask.loadingOwned' : 'sharedTask.ownedActiveCount', { count: owned?.length ?? 0 })}</p>
+ <p className="text-11 text-[var(--text-secondary)]" role="status">{t(ownedError ? 'sharedTask.ownedLoadFailed' : owned === null ? 'sharedTask.loadingOwned' : owned.length ? 'sharedTask.ownedActiveCount' : 'sharedTask.ownedNone', { count: owned?.length ?? 0 })}</p>
</div>
{ownedError ? <Button variant="secondary" disabled={busy} className="px-3 text-12" onClick={() => void loadOwned()}>{t('sharedTask.retryAction')}</Button>
: <Button variant="secondary" className="px-3 text-12" disabled={busy || !owned?.length} onClick={() => setCloseTargets([...(owned ?? [])])}>{t('sharedTask.closeAllShort')}</Button>}
diff --git a/apps/desktop/src/renderer/features/device-link/SharedTaskButton.tsx b/apps/desktop/src/renderer/features/device-link/SharedTaskButton.tsx
index 599264f52e..e43d1d3940 100644
--- a/apps/desktop/src/renderer/features/device-link/SharedTaskButton.tsx
+++ b/apps/desktop/src/renderer/features/device-link/SharedTaskButton.tsx
@@ -172,7 +172,6 @@ export function SharedTaskButton({ session }: { session: Session }) {
{emptyIcon(<Check size={18} aria-hidden />)}
<h3 className="break-words text-14 font-medium">{t('sharedTask.joinedTitle', { title: detail.title })}</h3>
<p className="mx-auto mb-5 mt-2 max-w-[280px] text-12 text-[var(--text-secondary)]">{t('sharedTask.joinedBody')}</p>
- <Button variant="cta" size="lg" onClick={() => setOpen(false)}>{t('sharedTask.enterTask')}</Button>
</div>
<div className="border-t border-[var(--border-default)] pt-4"><Button variant="secondary" size="lg" disabled={busy} className="w-full text-[var(--error-fg)]"
onClick={() => setConfirm({ kind: 'leave' })}>{t('sharedTask.leave')}</Button></div>
@@ -202,7 +201,7 @@ export function SharedTaskButton({ session }: { session: Session }) {
</div>;
})}
<div className={noticeClass}><Clock size={16} className="mt-0.5 shrink-0" aria-hidden /><p>{t(session.deviceLinkDeviceId ? 'sharedTask.remoteHostOfflineNote' : 'sharedTask.hostOfflineNote')}</p></div>
- <div className="mt-5"><Button variant="secondary" size="lg" disabled={busy} className="text-[var(--error-fg)]"
+ <div className="mt-5"><Button variant="secondary" size="lg" disabled={busy} className="w-full px-4 text-[var(--error-fg)]"
onClick={() => setConfirm({ kind: 'closeCurrent' })}>{t('sharedTask.closeCurrent')}</Button></div>
</>
: <div className="px-1 py-6 text-center">
@@ -220,18 +219,22 @@ export function SharedTaskButton({ session }: { session: Session }) {
</div>
: <>
<p className="mb-4 text-[var(--text-secondary)]">{t('sharedTask.ownedIntro', { count: owned.length })}</p>
- {owned.map((item) => <div key={item.sharedTaskId} className="my-2.5 flex items-center gap-2.5 rounded-lg border border-[var(--border-default)] p-3">
- <Users size={18} className="shrink-0" aria-hidden />
- <div className="min-w-0 flex-1">
- <div className="truncate text-13 font-medium">{item.title}</div>
- <div className="text-11 text-[var(--text-secondary)]">{item.local ? t('sharedTask.thisDevice') : t('sharedTask.otherDevice')}
- {item.sharedTaskId === detail?.sharedTaskId && <> · {t('sharedTask.guestCount', { count: detail.guests.length })}</>}
+ <div className="my-4 overflow-hidden rounded-xl border border-[var(--border-default)]">
+ {owned.map((item, index) => <div key={item.sharedTaskId} className={index
+ ? 'flex items-center gap-2.5 border-t border-[var(--border-default)] p-3'
+ : 'flex items-center gap-2.5 p-3'}>
+ <Users size={18} className="shrink-0" aria-hidden />
+ <div className="min-w-0 flex-1">
+ <div className="truncate text-13 font-medium">{item.title}</div>
+ <div className="text-12 text-[var(--text-secondary)]">{item.local ? t('sharedTask.thisDevice') : t('sharedTask.otherDevice')}
+ {item.sharedTaskId === detail?.sharedTaskId && <> · {t('sharedTask.guestCount', { count: detail.guests.length })}</>}
+ </div>
</div>
- </div>
- {item.sessionId === session.id && item.hostDeviceId === detail?.hostDeviceId
- ? <Button variant="secondary" disabled={busy} className="px-3 text-12" onClick={() => switchTab('current')}>{t('sharedTask.manage')}</Button>
- : <span className="shrink-0 rounded-full bg-[var(--surface-chip)] px-2 py-0.5 text-11 text-[var(--text-secondary)]">{t('sharedTask.sharingBadge')}</span>}
- </div>)}
+ {item.sessionId === session.id && item.hostDeviceId === detail?.hostDeviceId
+ ? <Button variant="secondary" disabled={busy} className="px-3 text-12" onClick={() => switchTab('current')}>{t('sharedTask.manage')}</Button>
+ : <span className="shrink-0 rounded-full bg-[var(--surface-chip)] px-2 py-0.5 text-11 text-[var(--text-secondary)]">{t('sharedTask.sharingBadge')}</span>}
+ </div>)}
+ </div>
<div className="mt-4 border-t border-[var(--border-default)] pt-4 text-12 text-[var(--text-secondary)]">{t('sharedTask.closeAllNote')}</div>
<div className="mt-5"><Button variant="secondary" size="lg" disabled={busy} className="w-full gap-2 text-[var(--error-fg)]"
onClick={() => setConfirm({ kind: 'closeAll' })}><CircleStop size={18} aria-hidden />{t('sharedTask.closeAll', { count: owned.length })}</Button></div>
@@ -263,7 +266,7 @@ export function SharedTaskButton({ session }: { session: Session }) {
<div className="text-13">{tab === 'current' ? currentTab : ownedTab}</div>
<ConfirmDialog presentation="standard" cancelFirst open={!!confirmation} onOpenChange={(next) => { if (!next && !pending.current) setConfirm(null); }}
title={confirmation?.title ?? ''} description={confirmation?.body} cancelText={confirmation?.keep} confirmText={confirmation?.action}
- confirmVariant="destructive" loading={busy} zIndex={10002} maxWidth={440} onConfirm={confirmation?.run}
+ confirmVariant="destructive" descriptionClassName="text-13" loading={busy} zIndex={10002} maxWidth={440} onConfirm={confirmation?.run}
content={confirm?.kind === 'closeAll' ? <>
<div className="space-y-2 rounded-lg bg-[var(--surface-chip)] p-3 text-12">
{(owned ?? []).map((item) => <div key={item.sharedTaskId} className="break-words">{item.title} <span className="text-[var(--text-secondary)]">· {item.local ? t('sharedTask.thisDevice') : t('sharedTask.otherDevice')}</span></div>)}
diff --git a/apps/desktop/src/renderer/features/device-link/SharedTasksSection.tsx b/apps/desktop/src/renderer/features/device-link/SharedTasksSection.tsx
index 1e1a5cb442..ffe500ce2c 100644
--- a/apps/desktop/src/renderer/features/device-link/SharedTasksSection.tsx
+++ b/apps/desktop/src/renderer/features/device-link/SharedTasksSection.tsx
@@ -1,26 +1,45 @@
import { useEffect, useMemo, useRef, useState } from 'react';
-import { ChevronDown, ChevronRight, Plus } from 'lucide-react';
+import { ChevronDown, ChevronRight, FileText, Plus } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { isSharedTaskPeer, type SharedTaskOwnedItem } from '@cindy/device-link';
import { Button } from '@/components/ui/button';
import { SegmentedControl } from '@/components/ui/segmented-control';
-import { VendorIcon, agentKindToVendor } from '@/components/sidebar/VendorIcon';
+import { SessionCard } from '@/features/cc-agent/sidebar/SessionCard';
+import { SessionItem } from '@/features/cc-agent/sidebar/SessionItem';
+import type { SessionMoveTarget } from '@/features/cc-agent/sidebar/sessionMoveTarget';
+import type { FolderPickerOption } from '@/components/new-chat/FolderPickerPopover';
+import { useSidebarMainViewMode } from '@/hooks/useSidebarCardMode';
import type { Session } from '@/lib/ccAgent.types';
import { useAuth } from '@/contexts/AuthContext';
import { getDataOwnerGeneration, isDataOwnerGenerationCurrent } from '@/contexts/dataOwnerGeneration';
import { toast } from '@/lib/toast';
import { cn } from '@/lib/utils';
-import { useRemoteProjectSessions, isRemoteDeviceMarkedDisconnected, remoteProjectsStore } from './remoteProjectsStore';
+import { useRemoteProjectSessions, remoteProjectsStore } from './remoteProjectsStore';
import { JoinSharedTaskDialog } from './JoinSharedTaskDialog';
import { sharedTaskErrorKey } from './sharedTaskCompatibility';
/** Uses the existing session mirror; choosing a task must not reconnect or fetch it again. */
-export function SharedTasksSection({ activeSessionId, localSessions = [], onSelect }: {
+const EMPTY_IDS: ReadonlySet<string> = new Set();
+const ignoreTaskAction = () => {};
+type SharedTaskSessionAction = 'delete' | 'archive' | 'archive-now' | 'unarchive';
+
+interface SharedTasksSectionProps {
activeSessionId?: string | null;
localSessions?: readonly Session[];
+ runningSessionIds?: ReadonlySet<string>;
+ attachedSessionIds?: ReadonlySet<string>;
+ notifications?: ReadonlySet<string>;
onSelect(id: string): void;
-}) {
+ onAction?: (sessionId: string, action: SharedTaskSessionAction, sharedTaskId?: string) => void;
+ onRename?: (sessionId: string, title: string) => void;
+ onTogglePin?: (sessionId: string, currentlyPinned: boolean) => void;
+ onMoveSession?: (sessionId: string, target: SessionMoveTarget) => void;
+ projectOptions?: readonly FolderPickerOption[];
+}
+
+export function SharedTasksSection({ activeSessionId, localSessions = [], runningSessionIds = EMPTY_IDS, attachedSessionIds = EMPTY_IDS, notifications = EMPTY_IDS, onSelect, onAction = () => {}, onRename = () => {}, onTogglePin = () => {}, onMoveSession, projectOptions = [] }: SharedTasksSectionProps) {
const { t } = useTranslation();
+ const { mode } = useSidebarMainViewMode();
const { isAuthenticated, dataOwnerId } = useAuth();
const generation = getDataOwnerGeneration().generation;
const sessions = useRemoteProjectSessions();
@@ -78,6 +97,27 @@ export function SharedTasksSection({ activeSessionId, localSessions = [], onSele
} catch (error) { if (current()) toast.error(t(sharedTaskErrorKey(error))); }
finally { if (current()) { pending.current = false; setOpening(null); } }
};
+ const renderTask = (session: Session, onClick: () => void, key: string, navigationOnly: boolean, sharedTaskId?: string) => {
+ const props = {
+ session,
+ navigationOnly,
+ isActive: session.id === activeSessionId,
+ isRunning: runningSessionIds.has(session.id),
+ isAttached: attachedSessionIds.has(session.id),
+ hasAttentionNotification: notifications.has(session.id),
+ onClick,
+ onAction: navigationOnly
+ ? ignoreTaskAction
+ : (sessionId: string, action: SharedTaskSessionAction) => onAction(sessionId, action, sharedTaskId),
+ onRename: navigationOnly ? ignoreTaskAction : onRename,
+ onTogglePin: navigationOnly ? ignoreTaskAction : onTogglePin,
+ onMoveSession: navigationOnly ? undefined : onMoveSession,
+ projectOptions: navigationOnly ? [] : projectOptions,
+ };
+ return mode === 'list'
+ ? <SessionCard key={key} {...props} variant="list" />
+ : <SessionItem key={key} {...props} />;
+ };
if (!isAuthenticated) return null;
return <>{(owned.length > 0 || joined.length > 0) && <section className="mx-3 mb-2 border-b border-[var(--border-default)] pb-3" aria-label={t('sharedTask.title')}
onContextMenu={event => {
@@ -98,34 +138,28 @@ export function SharedTasksSection({ activeSessionId, localSessions = [], onSele
</button>}
<Button variant="secondary" className="w-8 shrink-0 border-transparent bg-transparent p-0" aria-label={t('sharedTask.join')} title={t('sharedTask.join')} onClick={() => setJoinOpen(true)}><Plus size={16} aria-hidden /></Button>
</div>
- {(!collapsed || both) && visibleTab === 'owned' && owned.map(item => <button key={item.sharedTaskId} type="button"
- aria-current={item.sessionId === activeSessionId ? 'page' : undefined} disabled={!!opening} aria-busy={opening === item.sharedTaskId || undefined}
- onClick={() => void openOwned(item)} title={item.title}
- className={cn('my-0.5 flex min-h-14 w-full items-start gap-2.5 rounded-lg px-2.5 py-2.5 text-left hover:bg-[var(--surface-hover-soft)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus-ring-soft)]', item.sessionId === activeSessionId && 'bg-[var(--surface-chip)]')}>
- <SharedTaskAgentIcon agentKind={(item.local ? localSessions : sessions).find(session => session.id === item.sessionId)?.agentKind} />
- <span className="min-w-0 flex-1"><span className="block truncate text-13 font-medium text-[var(--text-primary)]">{item.title}</span>
- <span className="mt-0.5 block truncate text-11 text-[var(--text-secondary)]">{t(item.local ? 'sharedTask.thisDevice' : 'sharedTask.otherDevice')}</span>
- </span>
- </button>)}
- {(!collapsed || both) && visibleTab === 'joined' && joined.map(session => <button key={session.id} type="button"
- aria-current={session.id === activeSessionId ? 'page' : undefined}
- onClick={() => { if (session.id !== activeSessionId) onSelect(session.id); }}
- className={cn('my-0.5 flex min-h-14 w-full items-start gap-2.5 rounded-lg px-2.5 py-2.5 text-left hover:bg-[var(--surface-hover-soft)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus-ring-soft)]',
- session.id === activeSessionId && 'bg-[var(--surface-chip)]')}
- title={session.title || t('sharedTask.title')}>
- <SharedTaskAgentIcon agentKind={session.agentKind} />
- <span className="min-w-0 flex-1"><span className="block truncate text-13 font-medium text-[var(--text-primary)]">{session.title || t('sharedTask.title')}</span>
- <span className="mt-0.5 block truncate text-11 text-[var(--text-secondary)]">{t(isRemoteDeviceMarkedDisconnected(session.deviceLinkDeviceId!) ? 'sharedTask.reconnecting' : 'sharedTask.title')}</span>
- </span>
- </button>)}
+ {(!collapsed || both) && visibleTab === 'owned' && owned.map(item => {
+ const session = item.local
+ ? localSessions.find(candidate => candidate.id === item.sessionId && !candidate.deviceLinkDeviceId)
+ : sessions.find(candidate => candidate.id === item.sessionId && candidate.deviceLinkDeviceId === item.hostDeviceId);
+ if (session) return <div key={item.sharedTaskId} aria-busy={opening === item.sharedTaskId || undefined}>
+ {renderTask(session, () => void openOwned(item), item.sharedTaskId, false, item.sharedTaskId)}
+ </div>;
+ // Account discovery can precede the host's session mirror. Keep navigation available
+ // without inventing a preview, activity timestamp or Agent identity.
+ return <button key={item.sharedTaskId} type="button"
+ aria-current={item.sessionId === activeSessionId ? 'page' : undefined} disabled={!!opening} aria-busy={opening === item.sharedTaskId || undefined}
+ onClick={() => void openOwned(item)} title={item.title}
+ className={cn('flex w-full items-center gap-2.5 text-left text-sm font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus-ring-soft)]',
+ mode === 'list' ? 'min-h-14 rounded-lg px-2.5 py-2' : 'h-8 rounded-full pl-3 pr-2',
+ item.sessionId === activeSessionId ? 'bg-sidebar-item-active text-sidebar-item-active-foreground' : 'text-foreground hover:bg-sidebar-item-hover')}>
+ <FileText size={12} className="shrink-0" aria-hidden />
+ <span className="truncate">{item.title}</span>
+ </button>;
+ })}
+ {(!collapsed || both) && visibleTab === 'joined' && joined.map(session => renderTask(session,
+ () => { if (session.id !== activeSessionId) onSelect(session.id); }, session.id, true))}
</section>}
<JoinSharedTaskDialog open={joinOpen} onOpenChange={setJoinOpen} />
</>;
}
-
-function SharedTaskAgentIcon({ agentKind }: { agentKind?: Session['agentKind'] }) {
- const vendor = agentKindToVendor(agentKind);
- return <span className="mt-0.5 flex w-[15px] shrink-0 items-center justify-center" aria-hidden>
- <VendorIcon vendor={vendor} size={vendor === 'cc' ? 13 : 12} />
- </span>;
-}
diff --git a/apps/desktop/src/renderer/features/device-link/__tests__/JoinSharedTaskDialog.test.tsx b/apps/desktop/src/renderer/features/device-link/__tests__/JoinSharedTaskDialog.test.tsx
index 2cd32f72f8..2ddb867243 100644
--- a/apps/desktop/src/renderer/features/device-link/__tests__/JoinSharedTaskDialog.test.tsx
+++ b/apps/desktop/src/renderer/features/device-link/__tests__/JoinSharedTaskDialog.test.tsx
@@ -71,6 +71,18 @@ it('keeps the C confirmation in one dialog and preserves the invitation on cance
expect((screen.getByLabelText('sharedTask.joinNickname') as HTMLInputElement).value).toBe('Guest');
expect(state.account).not.toHaveBeenCalledWith(expect.objectContaining({ action: 'close' }));
});
+it('returns to the join form from the confirmation close button and preserves the form', async () => {
+ state.account.mockResolvedValue(owned); open();
+ await waitFor(() => expect((screen.getByRole('button', { name: 'sharedTask.closeAllShort' }) as HTMLButtonElement).disabled).toBe(false));
+ fireEvent.change(screen.getByLabelText('sharedTask.invitation'), { target: { value: 'A'.repeat(43) } });
+ fireEvent.change(screen.getByLabelText('sharedTask.joinNickname'), { target: { value: 'Guest' } });
+ fireEvent.click(screen.getByRole('button', { name: 'sharedTask.closeAllShort' }));
+ fireEvent.click(screen.getByRole('button', { name: 'sharedTask.closeAllCancel' }));
+ expect((screen.getByLabelText('sharedTask.invitation') as HTMLTextAreaElement).value).toBe('A'.repeat(43));
+ expect((screen.getByLabelText('sharedTask.joinNickname') as HTMLInputElement).value).toBe('Guest');
+ expect(screen.getByRole('button', { name: 'sharedTask.closeAllShort' })).toBeTruthy();
+ expect(state.account).not.toHaveBeenCalledWith(expect.objectContaining({ action: 'close' }));
+});
it('closes only confirmed owned tasks and retries just the failed task', async () => {
let secondAttempt = false;
@@ -82,10 +94,10 @@ it('closes only confirmed owned tasks and retries just the failed task', async (
open();
await waitFor(() => expect((screen.getByRole('button', { name: 'sharedTask.closeAllShort' }) as HTMLButtonElement).disabled).toBe(false));
fireEvent.click(screen.getByRole('button', { name: 'sharedTask.closeAllShort' }));
- fireEvent.click(screen.getByRole('button', { name: 'sharedTask.closeAllAction' }));
+ fireEvent.click(screen.getByRole('button', { name: 'sharedTask.closeAllJoinAction' }));
await waitFor(() => expect(screen.queryByText('First owned task')).toBeNull());
expect(screen.getByText('Other computer task')).toBeTruthy();
- fireEvent.click(screen.getByRole('button', { name: 'sharedTask.closeAllAction' }));
+ fireEvent.click(screen.getByRole('button', { name: 'sharedTask.closeAllJoinAction' }));
await waitFor(() => expect(screen.queryByText('sharedTask.closeAllTitle')).toBeNull());
const closes = state.account.mock.calls.map(([command]) => command).filter(command => command.action === 'close');
expect(closes).toEqual([
@@ -99,7 +111,7 @@ it('stops the batch after an account change and ignores its late result', async
open();
await waitFor(() => expect((screen.getByRole('button', { name: 'sharedTask.closeAllShort' }) as HTMLButtonElement).disabled).toBe(false));
fireEvent.click(screen.getByRole('button', { name: 'sharedTask.closeAllShort' }));
- fireEvent.click(screen.getByRole('button', { name: 'sharedTask.closeAllAction' }));
+ fireEvent.click(screen.getByRole('button', { name: 'sharedTask.closeAllJoinAction' }));
await act(async () => {
setDataOwnerGeneration('another-account');
finish({ closed: ['own-1'], failed: [] });
diff --git a/apps/desktop/src/renderer/features/device-link/__tests__/SharedTaskButton.test.tsx b/apps/desktop/src/renderer/features/device-link/__tests__/SharedTaskButton.test.tsx
index e6b1d42678..7e4523ec16 100644
--- a/apps/desktop/src/renderer/features/device-link/__tests__/SharedTaskButton.test.tsx
+++ b/apps/desktop/src/renderer/features/device-link/__tests__/SharedTaskButton.test.tsx
@@ -105,7 +105,9 @@ it.each([false, true])('refreshes members after an already-left removal complete
await waitFor(() => expect(body.textContent).not.toContain('Departing Guest'));
expect(body.textContent).toContain('Remaining Guest');
expect(within(body).queryByRole('button', { name: 'sharedTask.remove' })).toBeNull();
- expect(within(body).getByRole('button', { name: 'sharedTask.closeCurrent' })).toBeDefined();
+ const closeCurrent = within(body).getByRole('button', { name: 'sharedTask.closeCurrent' });
+ expect(closeCurrent).toBeDefined();
+ expect(closeCurrent.className).toContain('w-full');
expect(command).toHaveBeenCalledWith({ action: 'remove', sharedTaskId: 'st1', memberId: 'left' });
expect(toast.error).not.toHaveBeenCalled();
});
@@ -140,6 +142,7 @@ it('lists owned shares and routes close-all through the account command', async
const confirmation = within(body).getByRole('alertdialog');
expect(confirmation.contains(document.activeElement)).toBe(true);
expect(document.activeElement?.textContent).toBe('sharedTask.closeAllKeep');
+ expect(within(confirmation).getByText('sharedTask.closeAllBody').className).toContain('text-13');
expect(within(confirmation).getAllByRole('button').map((button) => button.textContent)).toEqual([
'sharedTask.closeAllKeep', 'sharedTask.closeAllAction',
]);
@@ -179,3 +182,12 @@ it('shows the host-offline ending for a guest whose share closed', async () => {
expect(body.textContent).toContain('sharedTask.hostOfflineBody');
expect(body.textContent).not.toContain('sharedTask.leave');
});
+it('does not offer to enter a guest task that is already open', async () => {
+ state.account.mockImplementation((command: { action: string }) => command.action === 'get'
+ ? Promise.resolve(detail)
+ : Promise.resolve([]));
+ const body = await openWindow({ id: 'session-1', deviceLinkDeviceId: sharedTaskHostPeer('st1', 'desktop') } as Session);
+ await waitFor(() => expect(body.textContent).toContain('sharedTask.joinedTitle'));
+ expect(within(body).queryByRole('button', { name: 'sharedTask.enterTask' })).toBeNull();
+ expect(within(body).getByRole('button', { name: 'sharedTask.leave' })).toBeDefined();
+});
diff --git a/apps/desktop/src/renderer/features/device-link/__tests__/SharedTasksSection.test.tsx b/apps/desktop/src/renderer/features/device-link/__tests__/SharedTasksSection.test.tsx
index 5fdda04635..6458b1c6b5 100644
--- a/apps/desktop/src/renderer/features/device-link/__tests__/SharedTasksSection.test.tsx
+++ b/apps/desktop/src/renderer/features/device-link/__tests__/SharedTasksSection.test.tsx
@@ -5,7 +5,20 @@ import { afterEach, beforeEach, expect, it, vi } from 'vitest';
import { SharedTasksSection } from '../SharedTasksSection';
import { setDataOwnerGeneration } from '@/contexts/dataOwnerGeneration';
import type { Session } from '@/lib/ccAgent.types';
-const state = vi.hoisted(() => ({ sessions: [] as Session[], account: vi.fn(), openLink: vi.fn(), pin: vi.fn() }));
+const state = vi.hoisted(() => ({ sessions: [] as Session[], account: vi.fn(), openLink: vi.fn(), pin: vi.fn(), row: vi.fn(), mode: 'list' as 'list' | 'text' }));
+vi.mock('@/hooks/useSidebarCardMode', () => ({ useSidebarMainViewMode: () => ({ mode: state.mode }) }));
+vi.mock('@/features/cc-agent/sidebar/SessionCard', () => ({
+ SessionCard: (props: { session: Session; onClick(): void }) => {
+ state.row(props);
+ return <button data-testid="ordinary-list-row" onClick={props.onClick}>{props.session.title}<span>{props.session.preview}</span></button>;
+ },
+}));
+vi.mock('@/features/cc-agent/sidebar/SessionItem', () => ({
+ SessionItem: (props: { session: Session; onClick(): void }) => {
+ state.row(props);
+ return <button data-testid="ordinary-text-row" onClick={props.onClick}>{props.session.title}</button>;
+ },
+}));
vi.mock('react-i18next', () => ({ useTranslation: () => ({ t: (key: string, args?: { count?: number }) => key + (args?.count === undefined ? '' : ':' + args.count) }) }));
vi.mock('@/contexts/AuthContext', () => ({ useAuth: () => ({ dataOwnerId: 'guest', isAuthenticated: true }) }));
vi.mock('../JoinSharedTaskDialog', () => ({ JoinSharedTaskDialog: () => null }));
@@ -17,11 +30,68 @@ vi.mock('../remoteProjectsStore', () => ({
const guestTask = { id: 'joined-1', title: 'Joined task', deviceLinkDeviceId: sharedTaskHostPeer('share-1', 'desktop') } as Session;
beforeEach(() => {
vi.clearAllMocks(); setDataOwnerGeneration('guest');
+ state.mode = 'list';
state.sessions = [guestTask, { id: 'own-device-task', title: 'Own device task', deviceLinkDeviceId: 'my-computer' } as Session];
state.account.mockResolvedValue([]);
Object.assign(window, { electronAPI: { sharedTask: { account: state.account }, deviceLink: { openLink: state.openLink } } });
});
afterEach(cleanup);
+it('uses the ordinary list row with the joined session preview and live status props', async () => {
+ const session = { ...guestTask, preview: 'Latest shared message', agentKind: 'codex' } as Session;
+ state.sessions = [session];
+ render(<SharedTasksSection onSelect={vi.fn()} runningSessionIds={new Set([session.id])} attachedSessionIds={new Set([session.id])} notifications={new Set([session.id])} />);
+ await act(async () => {});
+ expect(screen.getByTestId('ordinary-list-row').textContent).toContain(session.preview);
+ expect(state.row).toHaveBeenLastCalledWith(expect.objectContaining({
+ session, navigationOnly: true, variant: 'list', isRunning: true, isAttached: true, hasAttentionNotification: true,
+ }));
+ expect(screen.queryByText('sharedTask.title')).toBeNull();
+});
+it('uses the local session title and preview instead of device labels and follows the ordinary text mode', async () => {
+ state.sessions = [];
+ const session = { id: 'host-task', title: 'Current title', preview: 'Latest local message' } as Session;
+ state.account.mockResolvedValue([{ sharedTaskId: 'owned-1', sessionId: session.id, local: true, title: 'Old title' }]);
+ const onAction = vi.fn();
+ const onRename = vi.fn();
+ const onTogglePin = vi.fn();
+ const { rerender } = render(<SharedTasksSection localSessions={[session]} onAction={onAction} onRename={onRename} onTogglePin={onTogglePin} onSelect={vi.fn()} />);
+ expect(await screen.findByTestId('ordinary-list-row')).toBeTruthy();
+ expect(screen.getByText(session.preview!)).toBeTruthy();
+ expect(screen.queryByText('sharedTask.thisDevice')).toBeNull();
+ expect(screen.queryByText('Old title')).toBeNull();
+ state.mode = 'text';
+ rerender(<SharedTasksSection localSessions={[session]} onAction={onAction} onRename={onRename} onTogglePin={onTogglePin} onSelect={vi.fn()} />);
+ expect(screen.getByTestId('ordinary-text-row')).toBeTruthy();
+ expect(screen.queryByTestId('ordinary-list-row')).toBeNull();
+ expect(state.row).toHaveBeenLastCalledWith(expect.objectContaining({ navigationOnly: false }));
+ state.row.mock.lastCall?.[0].onAction(session.id, 'archive');
+ expect(onAction).toHaveBeenCalledWith(session.id, 'archive', 'owned-1');
+ state.row.mock.lastCall?.[0].onRename(session.id, 'Renamed');
+ state.row.mock.lastCall?.[0].onTogglePin(session.id, false);
+ expect(onRename).toHaveBeenCalledWith(session.id, 'Renamed');
+ expect(onTogglePin).toHaveBeenCalledWith(session.id, false);
+});
+it('keeps undiscovered host tasks navigable and only hydrates from the matching host mirror', async () => {
+ const item = { sharedTaskId: 'owned-1', sessionId: 'host-task', hostDeviceId: 'other-pc', local: false, title: 'Hosted task' };
+ state.account.mockResolvedValue([item]);
+ state.sessions = [{ id: item.sessionId, title: 'Wrong host', preview: 'Wrong preview', deviceLinkDeviceId: 'unrelated-pc' } as Session];
+ state.openLink.mockResolvedValue(undefined);
+ const select = vi.fn();
+ const { rerender } = render(<SharedTasksSection onSelect={select} />);
+ const fallback = await screen.findByRole('button', { name: item.title });
+ expect(screen.queryByTestId('ordinary-list-row')).toBeNull();
+ expect(screen.queryByText('sharedTask.otherDevice')).toBeNull();
+ expect(screen.queryByText('Wrong preview')).toBeNull();
+ fireEvent.click(fallback);
+ await waitFor(() => expect(select).toHaveBeenCalledWith(item.sessionId));
+ expect(state.openLink).toHaveBeenCalledWith(item.hostDeviceId);
+ state.sessions = [{ id: item.sessionId, title: item.title, preview: 'Host preview', deviceLinkDeviceId: item.hostDeviceId } as Session];
+ rerender(<SharedTasksSection onSelect={select} />);
+ expect(screen.getByTestId('ordinary-list-row').textContent).toContain('Host preview');
+ fireEvent.click(screen.getByTestId('ordinary-list-row'));
+ await act(async () => {});
+ expect(state.openLink).toHaveBeenCalledTimes(1);
+});
it.each(['owned', 'joined'] as const)('suppresses context menus within the %s group without changing left-click actions or sidebar blank space', async (role) => {
if (role === 'owned') {
state.sessions = [];
diff --git a/apps/desktop/src/renderer/i18n/locales/en/common.json b/apps/desktop/src/renderer/i18n/locales/en/common.json
index 46db2bfcfe..a8ca80d4f8 100644
--- a/apps/desktop/src/renderer/i18n/locales/en/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/en/common.json
@@ -8,6 +8,7 @@
"ownedLoadFailed": "Unable to load",
"loadingOwned": "Loading…",
"ownedActiveCount": "{{count}} active",
+ "ownedNone": "No active shares",
"retryAction": "Retry",
"closeAllShort": "Close all sharing",
"invitationCopyFailed": "The invitation was created but could not be copied. Return to this window and try again.",
@@ -87,6 +88,9 @@
"closeAll": "Stop All Sharing ({{count}})",
"closeAllNote": "After everything is closed, guests lose access and old invitations expire. Task history and Agent work are kept.",
"closeAllTitle": "Stop all sharing?",
+ "closeAllCancel": "Cancel closing",
+ "closeAllJoinBody": "This will close the {{count}} shared tasks you started for this account and region. All guests will lose access.",
+ "closeAllJoinAction": "Close all sharing",
"closeAllBody": "This closes every task you share in this region, including tasks hosted on other computers.",
"closeAllKeep": "Keep Sharing",
"closeAllAction": "Close {{count}} shares",
diff --git a/apps/desktop/src/renderer/i18n/locales/ja/common.json b/apps/desktop/src/renderer/i18n/locales/ja/common.json
index 28d7938dc1..6d6ec39250 100644
--- a/apps/desktop/src/renderer/i18n/locales/ja/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/ja/common.json
@@ -8,6 +8,7 @@
"ownedLoadFailed": "取得できません",
"loadingOwned": "取得中…",
"ownedActiveCount": "{{count}} 件が進行中",
+ "ownedNone": "進行中の共有はありません",
"retryAction": "再試行",
"closeAllShort": "すべての共有を終了",
"invitationCopyFailed": "招待は作成されましたが、コピーできませんでした。このウィンドウに戻って再試行してください。",
@@ -87,6 +88,9 @@
"closeAll": "すべての共有を停止({{count}})",
"closeAllNote": "すべて停止すると、ゲストはアクセスできなくなり、古い招待は無効になります。セッションの記録と Agent の作業は保持されます。",
"closeAllTitle": "すべての共有を停止しますか?",
+ "closeAllCancel": "停止をキャンセル",
+ "closeAllJoinBody": "このアカウントとリージョンで開始した {{count}} 件の共有を停止し、すべてのゲストがアクセスできなくなります。",
+ "closeAllJoinAction": "すべての共有を停止",
"closeAllBody": "このリージョンで自分が共有中のすべてのセッション(他のパソコンを含む)を停止します。",
"closeAllKeep": "共有を続ける",
"closeAllAction": "{{count}} 件の共有を停止",
diff --git a/apps/desktop/src/renderer/i18n/locales/ko/common.json b/apps/desktop/src/renderer/i18n/locales/ko/common.json
index 2acf61e975..30bd1f134b 100644
--- a/apps/desktop/src/renderer/i18n/locales/ko/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/ko/common.json
@@ -8,6 +8,7 @@
"ownedLoadFailed": "불러올 수 없음",
"loadingOwned": "불러오는 중…",
"ownedActiveCount": "{{count}}개 진행 중",
+ "ownedNone": "진행 중인 공유가 없습니다",
"retryAction": "다시 시도",
"closeAllShort": "모든 공유 종료",
"invitationCopyFailed": "초대가 생성되었지만 복사하지 못했습니다. 이 창으로 돌아와 다시 시도해 주세요.",
@@ -87,6 +88,9 @@
"closeAll": "전체 공유 중지 ({{count}})",
"closeAllNote": "모두 중지하면 게스트는 접근할 수 없고 기존 초대는 만료됩니다. 세션 기록과 Agent 작업은 유지됩니다.",
"closeAllTitle": "전체 공유를 중지할까요?",
+ "closeAllCancel": "중지 취소",
+ "closeAllJoinBody": "이 계정과 리전에서 시작한 공유 {{count}}개를 중지하면 모든 게스트가 액세스할 수 없습니다.",
+ "closeAllJoinAction": "전체 공유 중지",
"closeAllBody": "이 리전에서 내가 공유한 모든 세션(다른 PC 포함)을 중지합니다.",
"closeAllKeep": "공유 유지",
"closeAllAction": "{{count}}개 공유 중지",
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 c61038bb08..a9d2ff3c78 100644
--- a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
@@ -8,6 +8,7 @@
"ownedLoadFailed": "暂时无法获取",
"loadingOwned": "正在获取…",
"ownedActiveCount": "{{count}} 个进行中",
+ "ownedNone": "暂无正在共享的任务",
"retryAction": "重试",
"closeAllShort": "关闭全部共享",
"invitationCopyFailed": "邀请已生成,但未能复制。请回到此窗口后重试。",
@@ -87,6 +88,9 @@
"closeAll": "关闭全部共享({{count}})",
"closeAllNote": "全部关闭后,访客无法继续访问,原邀请失效。任务记录和 Agent 工作会保留。",
"closeAllTitle": "关闭全部共享?",
+ "closeAllCancel": "取消关闭",
+ "closeAllJoinBody": "将关闭你在当前账号、当前区域发起的 {{count}} 个共享任务,所有访客将失去访问权限。",
+ "closeAllJoinAction": "关闭全部共享",
"closeAllBody": "将关闭当前账号在此区域发起的全部共享,包含其他电脑上的任务。",
"closeAllKeep": "保持共享",
"closeAllAction": "关闭 {{count}} 个共享",
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 db42c039e3..0665ea82a1 100644
--- a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
@@ -8,6 +8,7 @@
"ownedLoadFailed": "暫時無法取得",
"loadingOwned": "正在取得…",
"ownedActiveCount": "{{count}} 個進行中",
+ "ownedNone": "暫無正在共享的任務",
"retryAction": "重試",
"closeAllShort": "關閉全部共享",
"invitationCopyFailed": "邀請已產生,但未能複製。請回到此視窗後重試。",
@@ -87,6 +88,9 @@
"closeAll": "關閉全部共享({{count}})",
"closeAllNote": "全部關閉後,訪客無法繼續存取,原邀請失效。任務記錄和 Agent 工作會保留。",
"closeAllTitle": "關閉全部共享?",
+ "closeAllCancel": "取消關閉",
+ "closeAllJoinBody": "將關閉你在目前帳號、目前區域發起的 {{count}} 個共享任務,所有訪客將失去存取權限。",
+ "closeAllJoinAction": "關閉全部共享",
"closeAllBody": "將關閉目前帳號在此區域發起的全部共享,包含其他電腦上的任務。",
"closeAllKeep": "保持共享",
"closeAllAction": "關閉 {{count}} 個共享",
diff --git a/apps/mobile/app/devices/index.tsx b/apps/mobile/app/devices/index.tsx
index 629233b2b8..db034272f0 100644
--- a/apps/mobile/app/devices/index.tsx
+++ b/apps/mobile/app/devices/index.tsx
@@ -33,7 +33,7 @@ import {
import { Text } from '@/components/AppText';
import { DeviceLinkError, isSharedTaskPeer, type DeviceView, type PresenceSnapshot } from '@cindy/device-link';
import { useSharedTasks } from '@/device-link/useSharedTasks';
-import { splitSharedHomeGroup } from '@/session/sharedHomeGroup';
+import { splitSharedHomeGroup, type SharedHomeRole } from '@/session/sharedHomeGroup';
import type { SharedTaskListItem } from '@cindy/device-link';
import {
Archive,
@@ -2666,6 +2666,7 @@ function HomeScreenContent({ ownedSharedTasks }: { ownedSharedTasks: readonly Sh
indented
hideDivider={index === sharedRows.length - 1}
item={row.item}
+ sharedRole={row.role}
expandedAutomationGroups={expandedAutomationGroups}
onToggleAutomationGroup={toggleAutomationGroup}
onOpenSession={openSession}
@@ -2683,14 +2684,21 @@ function HomeScreenContent({ ownedSharedTasks }: { ownedSharedTasks: readonly Sh
accessibilityRole="button"
accessibilityLabel={row.task.title}
onPress={() => guardedPush({ pathname: '/shared-session', params: { sharedTaskId: row.task.sharedTaskId } })}
- style={({ pressed }) => [styles.sessionListRow, styles.sessionListRowSingleLine, styles.sessionListRowIndented, pressed && styles.pressed]}
+ style={({ pressed }) => [styles.sessionListRow, styles.sessionListRowIndented, pressed && styles.pressed]}
testID="home.sharedOwnerRow"
>
- <View style={[styles.sessionIconCell, styles.sessionIconCellSingleLine]}>
+ <View style={styles.sessionIconCell}>
<FileText color={colors.textSecondary} size={iconSize.action} strokeWidth={iconStroke.thin} />
</View>
<View style={[styles.sessionListContent, index === sharedRows.length - 1 && styles.sessionListContentNoDivider]}>
- <Text style={styles.sessionTitle} numberOfLines={1} ellipsizeMode="tail">{row.task.title}</Text>
+ <View style={styles.sessionTitleRow}>
+ <Text style={styles.sessionTitle} numberOfLines={1} ellipsizeMode="tail">{row.task.title}</Text>
+ </View>
+ <View style={[styles.sessionPreviewRow, styles.sharedOwnerRoleCell]}>
+ <View style={styles.sharedRoleBadge} testID="home.sharedOwnerRoleBadge">
+ <Text style={styles.sharedRoleBadgeText}>{t('sharedTask.roleOwnedBadge')}</Text>
+ </View>
+ </View>
</View>
</Pressable>; })}
</View> : null}
@@ -3913,6 +3921,7 @@ function HomeSessionRowInner({
selected = false,
selectionMarkTestID,
selectionMode = false,
+ sharedRole,
sourceLabel,
suppressBlockTopBorder = false,
swipe,
@@ -3951,6 +3960,8 @@ function HomeSessionRowInner({
selected?: boolean;
selectionMarkTestID?: string;
selectionMode?: boolean;
+ /** Shared-task role shown as a compact, non-interactive badge in the row metadata slot. */
+ sharedRole?: SharedHomeRole;
/** 平铺时标题旁的来源标签(项目名 /「对话」);分组模式下不传。 */
sourceLabel?: string;
/** 块模式下,前一行也是块时不画自己的顶线(前块的底线已经是这根线)。 */
@@ -4003,8 +4014,8 @@ function HomeSessionRowInner({
{ running },
);
// 零消息会话没有摘要。此时不要保留双行列表的空白第二行;但定时任务与置顶
- // 标记仍占用右下状态槽,因此继续使用双行布局。
- const showPreviewLine = !!preview?.trim() || showSchedule || showPinned;
+ // 标记和共享角色仍占用右下状态槽,因此继续使用双行布局。
+ const showPreviewLine = !!preview?.trim() || showSchedule || showPinned || !!sharedRole;
// 组行点击语义对齐桌面版侧边栏:收起且有需关注内容(未读运行 / 待处理)时,点行直接打开
// 该看的那条会话(共享层 primary:运行中 > 有未读 > 最新);想展开点行首箭头(独立热区)。
// 无需关注内容或已展开时,点行仍是展开 / 收起。
@@ -4168,6 +4179,13 @@ function HomeSessionRowInner({
{showPinned ? <Pin color={colors.textTertiary} size={iconSize.lg} strokeWidth={iconStroke.thin} /> : null}
</View>
) : null}
+ {sharedRole ? (
+ <View style={styles.sharedRoleBadge} testID={`home.sharedRoleBadge.${sharedRole}.${item.session.id}`}>
+ <Text style={styles.sharedRoleBadgeText}>
+ {t(sharedRole === 'owned' ? 'sharedTask.roleOwnedBadge' : 'sharedTask.roleJoinedBadge')}
+ </Text>
+ </View>
+ ) : null}
</View>
) : null}
</View>
@@ -5038,6 +5056,22 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({
minHeight: lineHeight.subtitle,
paddingTop: 3,
},
+ sharedOwnerRoleCell: {
+ justifyContent: 'flex-end',
+ },
+ sharedRoleBadge: {
+ backgroundColor: colors.surfaceChip,
+ borderColor: colors.border,
+ borderRadius: radius.pill,
+ borderWidth: StyleSheet.hairlineWidth,
+ flexShrink: 0,
+ paddingHorizontal: spacing.xs,
+ },
+ sharedRoleBadgeText: {
+ color: colors.textTertiary,
+ fontSize: typeScale.caption,
+ lineHeight: lineHeight.caption,
+ },
sessionTime: {
color: colors.textTertiary,
flexShrink: 0,
diff --git a/apps/mobile/src/__tests__/homeDesktopFirst.test.ts b/apps/mobile/src/__tests__/homeDesktopFirst.test.ts
index a15439cedf..d67d821ac6 100644
--- a/apps/mobile/src/__tests__/homeDesktopFirst.test.ts
+++ b/apps/mobile/src/__tests__/homeDesktopFirst.test.ts
@@ -547,7 +547,7 @@ describe('mobile home desktop-first surface', () => {
expect(sessionRowSource).toContain('buildRemoteSessionCardPreview(');
expect(sessionRowSource).toContain('useRemoteSessionMessagePreview(item.session.id)');
expect(sessionRowSource).toContain('testID={`home.sessionRowPreview.${item.session.id}`}');
- expect(sessionRowSource).toContain('const showPreviewLine = !!preview?.trim() || showSchedule || showPinned;');
+ expect(sessionRowSource).toContain('const showPreviewLine = !!preview?.trim() || showSchedule || showPinned || !!sharedRole;');
expect(sessionRowSource).toContain('!showPreviewLine && styles.sessionListRowSingleLine');
expect(sessionRowSource).toContain('!showPreviewLine && styles.sessionIconCellSingleLine');
expect(sessionRowSource).toContain('{showPreviewLine ? (');
diff --git a/apps/mobile/src/__tests__/mobileHomeSharedTasks.test.ts b/apps/mobile/src/__tests__/mobileHomeSharedTasks.test.ts
index 8a9116d8ac..a41982ef9e 100644
--- a/apps/mobile/src/__tests__/mobileHomeSharedTasks.test.ts
+++ b/apps/mobile/src/__tests__/mobileHomeSharedTasks.test.ts
@@ -1,4 +1,6 @@
import { describe, expect, it } from 'vitest';
+import { readFileSync } from 'node:fs';
+import { resolve } from 'node:path';
import { sharedTaskHostPeer } from '@cindy/device-link';
import { buildMobileHomePresentation, type MobileHomeSessionLike } from '@/session/mobileHome';
import { buildHomeScopeMenuItems, buildHomeScopePullDownActions } from '@/session/homeChromeMenus';
@@ -64,12 +66,14 @@ describe('shared Home group', () => {
it('groups joined and owned tasks, retaining ordinary tasks without duplicates', () => {
const result = split([session('joined', peer, 'Joined'), session('owner-task', 'desktop', 'My share'), session('normal', 'desktop', 'Normal')]);
expect(result.rows.map(row => row.item?.session.id).sort()).toEqual(['joined', 'owner-task']);
+ expect(result.rows.find(row => row.item?.session.id === 'joined')?.role).toBe('joined');
+ expect(result.rows.find(row => row.item?.session.id === 'owner-task')?.role).toBe('owned');
expect(result.home.chats.map(item => item.session.id)).toEqual(['normal']);
expect((result.rows.find(row => row.item?.session.id === 'joined')?.item?.session as MobileHomeSessionLike).deviceLinkDeviceId).toBe(peer);
});
it('keeps account-discovered owner tasks visible before their device is controllable', () => {
- expect(split([]).rows).toEqual([{ key: 'shared:mine', task: own }]);
+ expect(split([]).rows).toEqual([{ key: 'shared:mine', role: 'owned', task: own }]);
expect(split([], []).rows).toEqual([]);
});
@@ -101,7 +105,7 @@ describe('shared Home group', () => {
it('does not merge a same-ID task on a different host', () => {
const result = split([session('owner-task', 'other', 'Unrelated')]);
- expect(result.rows).toEqual([{ key: 'shared:mine', task: own }]);
+ expect(result.rows).toEqual([{ key: 'shared:mine', role: 'owned', task: own }]);
expect(result.home.chats[0].title).toBe('Unrelated');
});
@@ -110,4 +114,47 @@ describe('shared Home group', () => {
expect(result.rows).toEqual([]);
expect(result.home.chats).toHaveLength(1);
});
+
+ it('keeps a joined role when a different host owns a task with the same session ID', () => {
+ const result = split([session('owner-task', peer, 'Joined elsewhere')]);
+ expect(result.rows.map(row => row.role)).toEqual(['joined', 'owned']);
+ });
+
+ it.each(['owned', 'joined'] as const)('keeps a single-role %s group without an extra subgroup', (role) => {
+ const result = role === 'owned'
+ ? split([session('owner-task', 'desktop', 'Mine')])
+ : split([session('joined', peer, 'Joined')], []);
+ expect(result.rows.map(row => row.role)).toEqual([role]);
+ expect(result.home.chats).toEqual([]);
+ });
+});
+
+describe('shared role row wiring', () => {
+ const source = readFileSync(resolve(process.cwd(), 'app/devices/index.tsx'), 'utf8');
+
+ it('adds roles only to the existing shared group and still hides an empty group', () => {
+ expect(source).toContain('ListHeaderComponent={sharedRows.length > 0 ?');
+ expect(source.match(/sharedRole={row.role}/g)).toHaveLength(1);
+ expect(source).toContain('testID="home.sharedOwnerRoleBadge"');
+ });
+
+ it('keeps empty-preview roles in the second line, after existing trailing icons', () => {
+ expect(source).toContain('const showPreviewLine = !!preview?.trim() || showSchedule || showPinned || !!sharedRole;');
+ const row = source.slice(source.indexOf('function HomeSessionRowInner('), source.indexOf('function AutomationGroupChildren('));
+ const badge = row.indexOf('<View style={styles.sharedRoleBadge}');
+ expect(badge).toBeGreaterThan(row.indexOf('<View style={styles.sessionPreviewRow}>'));
+ expect(badge).toBeGreaterThan(row.indexOf('<View style={styles.sessionTrailingIcons}>'));
+ expect(row).toContain("sharedRole === 'owned' ? 'sharedTask.roleOwnedBadge' : 'sharedTask.roleJoinedBadge'");
+ });
+
+ it.each(['en', 'zh-CN', 'zh-TW', 'ja', 'ko'])('provides distinct role copy in %s', (locale) => {
+ const copy = JSON.parse(readFileSync(resolve(process.cwd(), 'src/i18n/locales', locale, 'sharedTask.json'), 'utf8'));
+ expect(copy.roleOwnedBadge).toBeTruthy();
+ expect(copy.roleJoinedBadge).toBeTruthy();
+ expect(copy.roleOwnedBadge).not.toBe(copy.roleJoinedBadge);
+ if (locale === 'zh-CN') {
+ expect(copy.roleOwnedBadge).toBe('我开启');
+ expect(copy.roleJoinedBadge).toBe('已加入');
+ }
+ });
});
diff --git a/apps/mobile/src/i18n/locales/en/sharedTask.json b/apps/mobile/src/i18n/locales/en/sharedTask.json
index 95cf40e31b..315588afe0 100644
--- a/apps/mobile/src/i18n/locales/en/sharedTask.json
+++ b/apps/mobile/src/i18n/locales/en/sharedTask.json
@@ -44,6 +44,8 @@
"enterTask": "Enter Task",
"inviteBoxTitle": "Send the invitation to your teammates",
"roleGuest": "Guest",
+ "roleOwnedBadge": "Shared by me",
+ "roleJoinedBadge": "Joined",
"removeShort": "Remove",
"removeNamedTitle": "Remove {{name}}?",
"shareCurrent": "Share Current Task",
diff --git a/apps/mobile/src/i18n/locales/ja/sharedTask.json b/apps/mobile/src/i18n/locales/ja/sharedTask.json
index e13bac513c..bed8e9d069 100644
--- a/apps/mobile/src/i18n/locales/ja/sharedTask.json
+++ b/apps/mobile/src/i18n/locales/ja/sharedTask.json
@@ -44,6 +44,8 @@
"enterTask": "タスクを開く",
"inviteBoxTitle": "仲間に招待を送信",
"roleGuest": "ゲスト",
+ "roleOwnedBadge": "自分が共有",
+ "roleJoinedBadge": "参加中",
"removeShort": "削除",
"removeNamedTitle": "{{name}}を削除しますか?",
"shareCurrent": "現在のタスクを共有",
diff --git a/apps/mobile/src/i18n/locales/ko/sharedTask.json b/apps/mobile/src/i18n/locales/ko/sharedTask.json
index 4670ed529a..8c76278068 100644
--- a/apps/mobile/src/i18n/locales/ko/sharedTask.json
+++ b/apps/mobile/src/i18n/locales/ko/sharedTask.json
@@ -44,6 +44,8 @@
"enterTask": "작업 열기",
"inviteBoxTitle": "동료에게 초대 보내기",
"roleGuest": "게스트",
+ "roleOwnedBadge": "내가 공유",
+ "roleJoinedBadge": "참여 중",
"removeShort": "제거",
"removeNamedTitle": "{{name}} 님을 제거할까요?",
"shareCurrent": "현재 작업 공유",
diff --git a/apps/mobile/src/i18n/locales/zh-CN/sharedTask.json b/apps/mobile/src/i18n/locales/zh-CN/sharedTask.json
index 3b33eaf385..74cb1ca3f3 100644
--- a/apps/mobile/src/i18n/locales/zh-CN/sharedTask.json
+++ b/apps/mobile/src/i18n/locales/zh-CN/sharedTask.json
@@ -44,6 +44,8 @@
"enterTask": "进入任务",
"inviteBoxTitle": "将邀请发给你的伙伴",
"roleGuest": "访客",
+ "roleOwnedBadge": "我开启",
+ "roleJoinedBadge": "已加入",
"removeShort": "移除",
"removeNamedTitle": "移除{{name}}?",
"shareCurrent": "共享当前任务",
diff --git a/apps/mobile/src/i18n/locales/zh-TW/sharedTask.json b/apps/mobile/src/i18n/locales/zh-TW/sharedTask.json
index 142e18d1e0..8a870687a4 100644
--- a/apps/mobile/src/i18n/locales/zh-TW/sharedTask.json
+++ b/apps/mobile/src/i18n/locales/zh-TW/sharedTask.json
@@ -44,6 +44,8 @@
"enterTask": "進入任務",
"inviteBoxTitle": "將邀請傳給你的夥伴",
"roleGuest": "訪客",
+ "roleOwnedBadge": "我開啟",
+ "roleJoinedBadge": "已加入",
"removeShort": "移除",
"removeNamedTitle": "移除{{name}}?",
"shareCurrent": "共享目前任務",
diff --git a/apps/mobile/src/session/sharedHomeGroup.ts b/apps/mobile/src/session/sharedHomeGroup.ts
index 606494b40d..50ac8d0d46 100644
--- a/apps/mobile/src/session/sharedHomeGroup.ts
+++ b/apps/mobile/src/session/sharedHomeGroup.ts
@@ -3,8 +3,10 @@ import type { MobileHomePresentation, MobileHomeSessionLike } from './mobileHome
import type { RemoteSessionListItem } from './sessionList';
export type SharedHomeRow =
- | { key: string; item: RemoteSessionListItem; task?: never }
- | { key: string; task: SharedTaskListItem; item?: never };
+ | { key: string; item: RemoteSessionListItem; role: SharedHomeRole; task?: never }
+ | { key: string; role: 'owned'; task: SharedTaskListItem; item?: never };
+
+export type SharedHomeRole = 'owned' | 'joined';
/** Group presentation only: routing IDs, store contents and grants stay untouched. */
export function splitSharedHomeGroup(home: MobileHomePresentation, owned: readonly SharedTaskListItem[], options: {
@@ -21,7 +23,11 @@ export function splitSharedHomeGroup(home: MobileHomePresentation, owned: readon
const all = [...home.pinned, ...home.chats, ...home.projects.flatMap(project => project.sessions)];
const rows: SharedHomeRow[] = all.filter(isShared)
.sort((a, b) => b.lastActivityAt.localeCompare(a.lastActivityAt))
- .map(item => ({ key: `shared:${(item.session as MobileHomeSessionLike).deviceLinkDeviceId}:${item.session.id}`, item }));
+ .map(item => {
+ const session = item.session as MobileHomeSessionLike;
+ const role: SharedHomeRole = owned.some(task => owns(session, task)) ? 'owned' : 'joined';
+ return { key: `shared:${session.deviceLinkDeviceId}:${session.id}`, item, role };
+ });
// Discovery is account-level even before same-account remote control is allowed.
// Don't recreate a row that the active search/status filter intentionally hid.
for (const task of owned) {
@@ -29,7 +35,7 @@ export function splitSharedHomeGroup(home: MobileHomePresentation, owned: readon
if (home.selectedDeviceId && home.selectedDeviceId !== task.hostDeviceId) continue;
if (options.statusFilter !== 'active' && options.statusFilter !== 'all') continue;
if (!task.title.toLocaleLowerCase().includes(options.searchQuery.trim().toLocaleLowerCase())) continue;
- rows.push({ key: `shared:${task.sharedTaskId}`, task });
+ rows.push({ key: `shared:${task.sharedTaskId}`, role: 'owned', task });
}
return {
rows,
diff --git a/docs/design-rules/design-inventory.md b/docs/design-rules/design-inventory.md
index dfc1f800d9..fc9c8a9b03 100644
--- a/docs/design-rules/design-inventory.md
+++ b/docs/design-rules/design-inventory.md
@@ -59,9 +59,9 @@
| `mobile.chat.sharing` | mobile | 共享任务邀请与成员 | app/shared-session.tsx | AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, HomeEntryProvider, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobilePrimitives, NativePullDownMenu, NativeRemoteDesktopView, NativeSwitch, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, SharedTaskEndedState, SharedTaskScreen, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, _layout, gestureHandler, peerFileTransport, shared-session, useLocale, useSharedTaskConfirmation | apps/mobile/app/_layout.tsx, apps/mobile/app/shared-session.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/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/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/SharedTaskEndedState.tsx, apps/mobile/src/session/SharedTaskScreen.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/useSharedTaskConfirmation.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 200 | 59 |
| `mobile.companions.direct` | mobile | 伙伴私聊回看 | app/companions/direct/[threadId].tsx | AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, HomeEntryProvider, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobilePrimitives, NativePullDownMenu, NativeRemoteDesktopView, NativeSwitch, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, [threadId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/companions/direct/[threadId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.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/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/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 | 200 | 50 |
| `mobile.device-management` | mobile | 设备管理 | app/devices/manage.tsx / app/devices/manage/[deviceId].tsx | AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceInformationFields, DeviceInformationFields.ios, DeviceLinkContext, DeviceManagementDialogs, DeviceManagementList, DeviceManagementList.ios, HomeEntryProvider, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobilePrimitives, NativePullDownMenu, NativeRemoteDesktopView, NativeSwitch, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RenameDeviceModal, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, [deviceId], _layout, gestureHandler, manage, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/devices/manage.tsx, apps/mobile/app/devices/manage/[deviceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceInformationFields.ios.tsx, apps/mobile/src/device-link/DeviceInformationFields.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/DeviceManagementDialogs.tsx, apps/mobile/src/device-link/DeviceManagementList.ios.tsx, apps/mobile/src/device-link/DeviceManagementList.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.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/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/RenameDeviceModal.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 | 200 | 53 |
-| `mobile.devices` | mobile | 主机详情 | app/devices/[deviceId].tsx | AccountSwitcherSheet, AndroidUpdateSheet, AppText, AuthContext, AutomationTimerIcon, BlurBackdrop, CenteredScreen, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ConversationSearchFilterSheet, DeviceLinkContext, HomeChromeDrawer, HomeChromeFrost, HomeEntryProvider, HomeGlassMenuPanel, HomeHeaderGlassButton, HomeNativeStackHeader, HomeProjectMachineLabel, HomeSearchBar, IncomingShareBridge, MobileAgentMark, MobileLoginHandoffContext, MobileLoginHandoffStage, MobilePrimitives, MobileVendorIcon, NativePullDownMenu, NativeRemoteDesktopView, NativeSwitch, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RemoteAccessGuide, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteTaskSuggestions, RenameSessionModal, SessionActionSheet, SessionDetailsNative, SessionDetailsNative.ios, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, SessionOptionsExpoSheet, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, SwipeableSessionRow, SwipeableSessionRow.ios, TaskTags, ThemeProvider, [deviceId], _layout, gestureHandler, index, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/devices/[deviceId].tsx, apps/mobile/app/devices/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/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/chrome/HomeNativeStackHeader.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/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/AutomationTimerIcon.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeRow.ios.tsx, apps/mobile/src/session/ComposerNativeRow.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/ConversationSearchFilterSheet.tsx, apps/mobile/src/session/HomeChromeDrawer.tsx, apps/mobile/src/session/HomeChromeFrost.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeGlassMenuPanel.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/HomeProjectMachineLabel.tsx, apps/mobile/src/session/HomeSearchBar.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/RemoteTaskSuggestions.tsx, apps/mobile/src/session/RenameSessionModal.tsx, apps/mobile/src/session/SessionActionSheet.tsx, apps/mobile/src/session/SessionDetailsNative.ios.tsx, apps/mobile/src/session/SessionDetailsNative.tsx, apps/mobile/src/session/SessionHeaderNativeControls.ios.tsx, apps/mobile/src/session/SessionHeaderNativeControls.tsx, apps/mobile/src/session/SessionOptionsExpoSheet.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/SwipeableSessionRow.ios.tsx, apps/mobile/src/session/SwipeableSessionRow.tsx, apps/mobile/src/session/TaskTags.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 200 | 112 |
+| `mobile.devices` | mobile | 主机详情 | app/devices/[deviceId].tsx | AccountSwitcherSheet, AndroidUpdateSheet, AppText, AuthContext, AutomationTimerIcon, BlurBackdrop, CenteredScreen, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ConversationSearchFilterSheet, DeviceLinkContext, HomeChromeDrawer, HomeChromeFrost, HomeEntryProvider, HomeGlassMenuPanel, HomeHeaderGlassButton, HomeNativeStackHeader, HomeProjectMachineLabel, HomeSearchBar, IncomingShareBridge, MobileAgentMark, MobileLoginHandoffContext, MobileLoginHandoffStage, MobilePrimitives, MobileVendorIcon, NativePullDownMenu, NativeRemoteDesktopView, NativeSwitch, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RemoteAccessGuide, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteTaskSuggestions, RenameSessionModal, SessionActionSheet, SessionDetailsNative, SessionDetailsNative.ios, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, SessionOptionsExpoSheet, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, SwipeableSessionRow, SwipeableSessionRow.ios, TaskTags, ThemeProvider, [deviceId], _layout, gestureHandler, index, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/devices/[deviceId].tsx, apps/mobile/app/devices/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/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/chrome/HomeNativeStackHeader.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/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/AutomationTimerIcon.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeRow.ios.tsx, apps/mobile/src/session/ComposerNativeRow.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/ConversationSearchFilterSheet.tsx, apps/mobile/src/session/HomeChromeDrawer.tsx, apps/mobile/src/session/HomeChromeFrost.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeGlassMenuPanel.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/HomeProjectMachineLabel.tsx, apps/mobile/src/session/HomeSearchBar.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/RemoteTaskSuggestions.tsx, apps/mobile/src/session/RenameSessionModal.tsx, apps/mobile/src/session/SessionActionSheet.tsx, apps/mobile/src/session/SessionDetailsNative.ios.tsx, apps/mobile/src/session/SessionDetailsNative.tsx, apps/mobile/src/session/SessionHeaderNativeControls.ios.tsx, apps/mobile/src/session/SessionHeaderNativeControls.tsx, apps/mobile/src/session/SessionOptionsExpoSheet.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/SwipeableSessionRow.ios.tsx, apps/mobile/src/session/SwipeableSessionRow.tsx, apps/mobile/src/session/TaskTags.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 200 | 113 |
| `mobile.files` | mobile | 任务文件与预览 | app/files/[sessionId].tsx / app/files/preview/[sessionId].tsx | AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, HomeEntryProvider, HtmlBrowserChrome, HtmlBrowserChrome.ios, HtmlFileReader, HtmlWebsiteBrowser, ImageLightbox, IncomingShareBridge, MarkdownFileReader, MobileLoginHandoffContext, MobileLoginHandoffStage, MobilePrimitives, NativePullDownMenu, NativeRemoteDesktopView, NativeSwitch, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, SheetModal, SheetSurface, StartupSplashOverlay, 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/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/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HtmlBrowserChrome.ios.tsx, apps/mobile/src/session/HtmlBrowserChrome.tsx, apps/mobile/src/session/HtmlFileReader.tsx, apps/mobile/src/session/HtmlWebsiteBrowser.tsx, apps/mobile/src/session/ImageLightbox.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/MarkdownFileReader.tsx, apps/mobile/src/session/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 | 232 | 77 |
-| `mobile.home` | mobile | 主机与资源首页 | app/index.tsx / app/devices/index.tsx | AccountSwitcherSheet, AndroidUpdateSheet, AppText, AuthContext, AutomationTimerIcon, BlurBackdrop, CenteredScreen, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ConversationSearchFilterSheet, DeviceLinkContext, HomeChromeDrawer, HomeChromeFrost, HomeEntryProvider, HomeGlassMenuPanel, HomeHeaderGlassButton, HomeNativeStackHeader, HomeProjectMachineLabel, HomeSearchBar, IncomingShareBridge, MobileAgentMark, MobileLoginHandoffContext, MobileLoginHandoffStage, MobilePrimitives, MobileVendorIcon, NativePullDownMenu, NativeRemoteDesktopView, NativeSwitch, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RemoteAccessGuide, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteTaskSuggestions, RenameSessionModal, SessionActionSheet, SessionDetailsNative, SessionDetailsNative.ios, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, SessionOptionsExpoSheet, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, SwipeableSessionRow, SwipeableSessionRow.ios, TaskTags, ThemeProvider, _layout, gestureHandler, index, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/devices/index.tsx, apps/mobile/app/index.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/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/chrome/HomeNativeStackHeader.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/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/AutomationTimerIcon.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeRow.ios.tsx, apps/mobile/src/session/ComposerNativeRow.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/ConversationSearchFilterSheet.tsx, apps/mobile/src/session/HomeChromeDrawer.tsx, apps/mobile/src/session/HomeChromeFrost.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeGlassMenuPanel.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/HomeProjectMachineLabel.tsx, apps/mobile/src/session/HomeSearchBar.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/RemoteTaskSuggestions.tsx, apps/mobile/src/session/RenameSessionModal.tsx, apps/mobile/src/session/SessionActionSheet.tsx, apps/mobile/src/session/SessionDetailsNative.ios.tsx, apps/mobile/src/session/SessionDetailsNative.tsx, apps/mobile/src/session/SessionHeaderNativeControls.ios.tsx, apps/mobile/src/session/SessionHeaderNativeControls.tsx, apps/mobile/src/session/SessionOptionsExpoSheet.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/SwipeableSessionRow.ios.tsx, apps/mobile/src/session/SwipeableSessionRow.tsx, apps/mobile/src/session/TaskTags.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 200 | 108 |
+| `mobile.home` | mobile | 主机与资源首页 | app/index.tsx / app/devices/index.tsx | AccountSwitcherSheet, AndroidUpdateSheet, AppText, AuthContext, AutomationTimerIcon, BlurBackdrop, CenteredScreen, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ConversationSearchFilterSheet, DeviceLinkContext, HomeChromeDrawer, HomeChromeFrost, HomeEntryProvider, HomeGlassMenuPanel, HomeHeaderGlassButton, HomeNativeStackHeader, HomeProjectMachineLabel, HomeSearchBar, IncomingShareBridge, MobileAgentMark, MobileLoginHandoffContext, MobileLoginHandoffStage, MobilePrimitives, MobileVendorIcon, NativePullDownMenu, NativeRemoteDesktopView, NativeSwitch, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RemoteAccessGuide, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteTaskSuggestions, RenameSessionModal, SessionActionSheet, SessionDetailsNative, SessionDetailsNative.ios, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, SessionOptionsExpoSheet, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, SwipeableSessionRow, SwipeableSessionRow.ios, TaskTags, ThemeProvider, _layout, gestureHandler, index, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/devices/index.tsx, apps/mobile/app/index.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/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/chrome/HomeNativeStackHeader.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/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/AutomationTimerIcon.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeRow.ios.tsx, apps/mobile/src/session/ComposerNativeRow.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/ConversationSearchFilterSheet.tsx, apps/mobile/src/session/HomeChromeDrawer.tsx, apps/mobile/src/session/HomeChromeFrost.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeGlassMenuPanel.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/HomeProjectMachineLabel.tsx, apps/mobile/src/session/HomeSearchBar.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/RemoteTaskSuggestions.tsx, apps/mobile/src/session/RenameSessionModal.tsx, apps/mobile/src/session/SessionActionSheet.tsx, apps/mobile/src/session/SessionDetailsNative.ios.tsx, apps/mobile/src/session/SessionDetailsNative.tsx, apps/mobile/src/session/SessionHeaderNativeControls.ios.tsx, apps/mobile/src/session/SessionHeaderNativeControls.tsx, apps/mobile/src/session/SessionOptionsExpoSheet.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/SwipeableSessionRow.ios.tsx, apps/mobile/src/session/SwipeableSessionRow.tsx, apps/mobile/src/session/TaskTags.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 200 | 109 |
| `mobile.overlay.connection-startup` | mobile | 根布局挂载的启动与连接反馈 | app/_layout.tsx → StartupSplashOverlay / ConnectionNoticeProvider;各页面 ConnectionBanner | AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ConnectionNoticeProvider, ContextSheet, ContextSheet.ios, DeviceLinkContext, HomeEntryProvider, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobilePrimitives, NativePullDownMenu, NativeRemoteDesktopView, NativeSwitch, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, SheetModal, SheetSurface, StartupSplashOverlay, ThemeProvider, _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/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 | 200 | 48 |
| `mobile.remote-desktop` | mobile | 远程桌面 | app/devices/desktop/[deviceId].tsx | AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, HomeEntryProvider, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobilePrimitives, NativePullDownMenu, NativeRemoteDesktopView, NativeSwitch, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, SheetModal, SheetSurface, StartupSplashOverlay, ThemeProvider, [deviceId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/devices/desktop/[deviceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/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 | 200 | 48 |
| `mobile.resources` | mobile | 远程资源列表与详情 | app/resources/[collectionId].tsx / app/resources/[collectionId]/[resourceId].tsx | AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, HomeEntryProvider, HomeNativeStackHeader, IncomingShareBridge, MobileLoginHandoffContext, MobileLoginHandoffStage, MobilePrimitives, NativePullDownMenu, NativeRemoteDesktopView, NativeSwitch, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, 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, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, [collectionId], [resourceId], _layout, gestureHandler, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/resources/[collectionId].tsx, apps/mobile/app/resources/[collectionId]/[resourceId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.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/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/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 | 200 | 54 |
diff --git a/docs/product-rules/shared-task-mode.md b/docs/product-rules/shared-task-mode.md
index 09dc946621..b10a06d8d9 100644
--- a/docs/product-rules/shared-task-mode.md
+++ b/docs/product-rules/shared-task-mode.md
@@ -91,7 +91,8 @@
- 设备菜单仅保留真实设备,不显示共享任务或内部 peer 标识。访客任务不再重复混入下方普通项目/任务列表。房主任务仍保留原项目归属,共享分组作为快捷入口。
- 共享任务行沿用普通任务的 Agent 身份图标,按任务的 Agent 类型显示;不得因共享状态替换为人群图标。
- 已加入任务直接打开既有任务页面,重复点击当前任务不重新连接、不清空页面。访客撤权继续使用现有结束提示与清理路径,不缓存已失效的可访问内容。
-- 共享分组标题、角色切换条和任务行不提供右键菜单,也不触发侧栏空白处的整理菜单;左键折叠/展开、切换角色与进入任务保持不变,共享管理仍使用任务内已有入口(2026-09-21,用户确认)。侧栏其他区域的右键行为不变。
+- “我加入的共享”分组标题、角色切换条和任务行不提供右键菜单,也不触发侧栏空白处的整理菜单;“我开启的共享”任务行复用普通任务的右键菜单与归档快捷操作,归档或删除前先停止共享。左键折叠/展开、切换角色与进入任务保持不变,共享管理仍使用任务内已有入口(2026-09-21,用户确认)。侧栏其他区域的右键行为不变。
+- 共享只是新增分组:任务行复用普通主列表的文字/列表显示模式、标题、最近消息预览、Agent 图标及状态信息,不使用“这台电脑/其他电脑/共享任务”替代预览。“我加入的共享”保留仅导航交互;“我开启的共享”沿用普通任务右键行为,但归档/删除必须先停止共享。尚未取得跨设备任务镜像时只显示已知标题,仍可点击进入,不伪造预览、时间或 Agent 身份(2026-09-21,用户确认)。
- 加入弹窗采用 C 方案:标题说明下显示「我发起的共享 / N 个进行中」,右侧灰阶「关闭全部共享」,与底部加入按钮分离。无共享时禁用,获取失败可重试,不把未知状态当成零个。
- 关闭确认在同一个窗口内替换表单内容,不叠加第二个弹窗;列出确认时的任务及所在电脑类别,默认聚焦取消。取消保留邀请与昵称。只关闭确认清单中的我发起的共享,失败保留未关闭项重试;不退出我加入的任务、不停止 Agent、不删除记录。账号变化或窗口退出后,旧请求不得继续操作下一项。
- 本轮设计稿面向 Desktop;Mobile 仍遵循上文全屏主页面和平台确认控件规则。