Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,8 @@ dispatch 动词**。手机对外只有这一个通道,所以「手机能控制
提交一个 job」。手机提供的全是决定:目标、工作区路径、提示词、审批策略、要不要带未提交改动、
模型与附件。Git 基线、bundle、worker,一件都不经过手机。

这正好接上侧栏的设备上下文:用户先选择 controller 设备,再从设备行打开工作区选择器。工作区是
Agent 的执行上下文,不再作为常驻树层级;派发仍然需要明确的两个坐标(哪台机器出活、哪台机器
干活),因此入口应复用已选设备和工作区,而不是从历史会话反推。
这正好接上已经做完的侧栏:「设备 > 工作区 > 会话」让手机能看见每台桌面上的每个工作区,派发需要
的两个坐标(哪台机器出活、哪台机器干活)在侧栏里本来就是选好的。入口就长在工作区行上。

**失败必须直说。**relay 不排队 job,目标离线就是提交失败,不存在「先收下,回头替你发」。响应
丢失时 job 处于 `submission_unknown`,靠 status 或幂等重试与 target 的持久事实对账——手机不得
Expand Down Expand Up @@ -184,8 +183,7 @@ loudly:不支持就收起入口或明写不支持,绝不静默失败,更

规范要求 controller **不得**把 target 会话建进自己的正常会话库,观察记录只是 observer-only 的
路由记录。手机照办:job 不进 `remote_session_list`,不进侧栏会话时间线,不参与 `deviceId + id`
那套会话去重。它是与设备下的活跃 Agent 投影并列的另一层,共用设备这一维,不共用 Agent/会话
这一维。
那套会话去重。它是与「设备 > 工作区 > 会话」并列的另一层,共用设备这一维,不共用会话这一维。

混进去两边都会坏:会话列表的每一行都假设自己能被打开成一个对话,而 job 不能;job 的每一行都
带着目标机器、审批策略、完整性事实,而会话行没有位置放它们。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ Scope: `src/apps/mobile/harmonyos`,主要涉及双屏/三屏布局、会话来
- 固定来源选择器改为 `clear(false)` / `pushPath(..., false)` 后重新安装 HAP,并在点击后连续抓取中间帧;本地与远程完整布局直接更新,未出现页面滑入、缩放或淡入转场。该无转场路径只由宽屏来源选择器调用。
- 移除远程宽屏菜单入口后重新安装 HAP,在 Mate X7 展开态验证:远程 master 顶部只保留右侧设置按钮,控件树中该 header 仅有 `[897,177][1016,296]` 的右上点击区,没有左上全局侧边栏点击区;来源选择器仍可一步切回本地。
- 设备切换进入 busy 或工作区变化时清空远程项目创建菜单;空工作区路径不渲染创建按钮,也不能与菜单关闭哨兵值匹配,避免选择设备后误弹 Code/Cowork 菜单。
- 全局侧栏的远程设备区改为“设备 → 活跃 Agent”投影:点击设备打开工作区选择器,工作区只作为
Agent 执行上下文,不再常驻为树层级;Agent 标题旁保留唯一创建入口。手机仍沿用 `RemoteSession`
传输协议与持久化结构,仅把当前运行和当前选中的远程会话投影成活跃 Agent,历史会话继续由远程
Home 的历史列表承载,避免协议改名破坏新旧桌面互联。
- 未配对时远程设备身份保持为空,由界面显示“尚未连接桌面端”;只接受二维码 `dn` 参数或账号设备返回的真实名称,不再使用 `MacBook Pro` 伪默认值,清除配对时同步清空设备身份。
- 移除伪设备名后重新安装 HAP,在 Mate X7 展开未连接态验证:右侧远程占位标题显示“尚未连接桌面端”,控件树中不存在 `MacBook` 文本。
- 在同一设备的折叠单屏态(`1080 x 2444`)验证:页面保持原单屏头部和 Composer,可打开原侧边栏;点击 `Remote` 继续打开原“选择桌面设备”Sheet,系统返回可关闭 Sheet 并恢复本地 Home;本地历史会话的显示保持原样。
Expand Down Expand Up @@ -346,18 +342,14 @@ MasterDetail -> 双屏和三屏共同使用的 master-detail

- 在远程标题区域与会话列表之间显示同一个来源选择器,并选中 `Remote`。
- 当前设备和连接状态。
- 点击设备打开工作区选择器,并在设备行显示当前工作区摘要
- 设备下只投影当前运行和当前选中的活跃 Agent;历史会话搜索、分页和删除继续留在远程 Home
- 从 Agent 标题旁的唯一入口,在当前工作区创建 Agent;尚未选择工作区时先打开选择器
- 打开活跃 Agent
- 工作区选择
- 远程会话搜索和分页
- 新建远程会话
- 打开和删除远程会话
- 连接、重连和远程设置。

未连接时,仅将远程内容区域替换为断开状态和连接操作。来源选择器必须继续显示。

这一层是手机端产品投影,不是 wire migration:传输、缓存和升级兼容仍使用 `RemoteSession` 与原命令
名。当前工作区选择器只列出桌面已返回的最近工作区;在远端机器上任意浏览目录仍是未实现能力,
不得静默回退为手机本地文件选择。

## 来源切换状态机

### 本地切换到远程
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,6 @@ export const EN_US_MESSAGES: [string, string][] = [
['sidebar.generalChat', 'General chat'],
['sidebar.conversations', 'Recent chats'],
['sidebar.devices', 'Devices'],
['sidebar.agents', 'Agents'],
['sidebar.selectWorkspace', 'Choose workspace'],
['sidebar.newAgent', 'New Agent'],
['sidebar.untitledAgent', 'Untitled Agent'],
['sidebar.emptyAgents', 'No active Agents'],
['sidebar.noMatchingAgents', 'No matching Agents'],
['sidebar.agentRunning', 'Running'],
['sidebar.agentChatWorkspace', 'Chat'],
['sidebar.workspacesOffline', 'Disconnected'],
['sidebar.connectDesktop', 'Connect a computer'],
['sidebar.addConnection', 'Add connection'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,6 @@ export const ZH_CN_MESSAGES: [string, string][] = [
['sidebar.generalChat', '普通对话'],
['sidebar.conversations', '最近对话'],
['sidebar.devices', '设备'],
['sidebar.agents', 'Agent'],
['sidebar.selectWorkspace', '选择工作区'],
['sidebar.newAgent', '新建 Agent'],
['sidebar.untitledAgent', '未命名 Agent'],
['sidebar.emptyAgents', '暂无活跃 Agent'],
['sidebar.noMatchingAgents', '没有匹配的 Agent'],
['sidebar.agentRunning', '运行中'],
['sidebar.agentChatWorkspace', '聊天'],
['sidebar.workspacesOffline', '未连接'],
['sidebar.connectDesktop', '连接电脑'],
['sidebar.addConnection', '添加连接'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export struct AppSidebarSurface {
this.remotePageState.desktopName,
selectedSessionId: this.remoteSelectedSessionId(),
runningSessionId: this.remoteRunningSessionId(),
workspacePickerPlacement: this.sessionDetailsPlacement,
onOpenSession: this.actions.onSidebar.openSession,
onCreateInWorkspace: (deviceId: string, path: string) => {
this.actions.onSidebar.close();
Expand Down
Loading