# Web UI

只有一套工作区界面：React 和 Next.js 应用（`apps/web/`），预先构建，由 Python worker 在 API 同一端口提供，所以同样的页面运行在浏览器标签页、桌面 App 和远程服务器上。`apps/desktop/` 是 macOS 和 Windows 的 Electron 外壳；Linux 和服务器用浏览器。

| 部分 | 现状 |
| --- | --- |
| 侧栏和页面 | 项目和聊天；Agents、Abilities（Programs、skills、plugins、MCP）、Applications、History、Scheduler。设置在用户菜单。列表页共用一个二级侧栏。 |
| 中央标签页 | 聊天、文件、终端、网页。标签页可分屏；标签页和分组可在窗口间移动。 |
| 转录 | 回复，工具调用折叠成行，文件修改摘要，子代理行，等待中的请求。跟随新输出，直到你滚开。 |
| 输入框 | 附件、模型和强度选择、按文件夹的 git 胶囊、选项菜单。本地路径保留到模型上下文。 |
| 视觉系统 | 颜色、尺寸和形状来自 token 和主题；图标、圆点和悬浮提示各有一套规则。 |

改相关模块前先过一遍[跨模块 UI 不变量](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/invariants.zh.html)。

## 聊天

| 设计 | 内容 |
| --- | --- |
| [转录跟随](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/chat/chat-transcript-follow.zh.html) | 发送、流式、跳到最新、切换会话和历史窗口共用一套吸附策略 |
| [聊天轮次视觉规范](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/chat/chat-turn-visual-spec.zh.html) | 执行时间线、文件修改摘要、手动函数运行、小地图。文件历史：[运行时设计](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/operations/file-management.zh.html) |
| [工具组摘要](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/chat/tool-group-summary.zh.html) | 折叠行标题：语法、+N −M 徽标、进行时、轮次摘要 |
| [Activity 面板](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/chat/activity-panel.zh.html) | 工作图上用颜色和图标表示每个 agent、待你处理的事项、每行一页 |
| [子代理行](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/chat/sub-agent-row.zh.html) | 状态、它自己的对话、带 `job_id` 的帧、分支转录加载 |
| [任务块](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/chat/task-blocks.zh.html) | 回复里一段有名字、可折叠的工作：步骤、每步下的工作、状态、两个任务工具 |
| [任务存储](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/chat/todo-list.zh.html) | 一个任务一份清单，一个步骤一条待办；每条回复和任务一段；发给界面的内容 |
| [附件处理](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/chat/attachment-handling.zh.html) | 存储、准入、交付、恢复、验收 |
| [聊天附件](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/chat/chat-attachments.zh.html) | 转录显示什么、agent 如何交回文件、文件如何打开 |
| [轮次占用](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/turn-lifecycle/turn-occupancy.zh.html) | 停止、发送队列和会话槽，在取消意图时释放 |

## 输入框

| 设计 | 内容 |
| --- | --- |
| [交互模式](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/composer/composer-interaction-modes.zh.html) | 输入框模式 |
| [选项菜单](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/composer/composer-options-menu.zh.html) | 共用菜单语法的 (+)；工具来自 Agent |
| [响应式控件](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/composer/composer-responsive-controls.zh.html) | 紧凑状态的交互约定 |
| [本地附件路径](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/composer/composer-local-attachment-paths.zh.html) | 路径保留到模型上下文 |
| [强度选择](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/composer/effort-picker.zh.html) | 级别名和 `?` 提示、最高级带动画的分段轨道、滑块提示、推荐说明 |
| [Git 文件夹胶囊](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/composer/git-folder-pills.zh.html) | 分支、改动数、切分支、worktree、PR |
| [悬浮提示](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/composer/hover-tips.zh.html) | 统一的 `HoverTip` + `TipBody` 布局 |

## 工作区与浏览器

| 设计 | 内容 |
| --- | --- |
| [中央标签页与分屏](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/workspace/center-tabs-and-split-layout.zh.html) | 单标签和组合标签的生命周期、渲染、持久化、转移 |
| [集成终端](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/workspace/integrated-terminal.zh.html) | 真实 PTY、本地 Claude Code 启动器 |
| [面板录制](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/workspace/pane-recording.zh.html) | Agent 把一个面板录成视频：动作、规则、采集路线、文件 |
| [审阅面板](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/workspace/review-pane.zh.html) | 未暂存和已暂存范围、暂存、待发送的行评论、让 agent 审阅 |
| [内置浏览器](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/browser/built-in-browser.zh.html) | 主页、配置导入、紧凑历史、新建面板启动器 |
| [浏览器批注](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/browser/annotate.zh.html) | 钉在网页上的批注、实时调整、发到对话的一条消息 |
| [浏览器扩展](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/browser/browser-extensions.zh.html) | 不支持、保留的能力、不再使用的旧数据 |
| [Agent 控制覆盖层](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/browser/agent-control-overlay.zh.html) | agent 控制对象上的辉光、指示灯和指针 |
| [资源预览](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/resources/resource-preview.zh.html) | 资源列表、操作预览、人工接管页面 |
| [Programs 分类](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/programs/programs-source-categories.zh.html) | 分组和来源分类 |
| [二级侧栏](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/sidebar/secondary-rail.zh.html) | 唯一的列表列：行、折叠、按钮职责 |
| [设置分栏](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/settings/settings-collapsible-columns.zh.html) | 独立的 49px 折叠；Providers 列表保持展开 |
| [头像选择](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/settings/avatar-randomization.zh.html) | 先选类型，再选同风格变体或字母字段 |

## 视觉系统

| 设计 | 内容 |
| --- | --- |
| [主题系统](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/visual-system/theme-system.zh.html) | 主题入口、token 约定、使用方式、覆盖层传播 |
| [设计 token](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/visual-system/design-tokens.zh.html) | 所有尺寸、形状和墨色层级 |
| [表面系统](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/visual-system/surface-system.zh.html) | 表面 |
| [图标](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/visual-system/icons.zh.html) | 各图标族的位置、动效、署名 |
| [指示圆点](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/visual-system/indicator-dots.zh.html) | 圆点 |
| [Agent 头像](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/visual-system/agent-avatars.zh.html) | 角色、存储、显示位置、来源和许可 |
| [Web 样式](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/visual-system/web-styles.zh.html) | 一个组件一个文件；目录对应组件树 |

## 状态与桌面

| 设计 | 内容 |
| --- | --- |
| [交互反馈](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/interaction-feedback.zh.html) | 0 ms 规则：先乐观状态，数据回填 |
| [状态层](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/state-layer.zh.html) | 每会话一个 store；共享数据全局 |
| [手机布局](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/phone-layout.zh.html) | 760px 及以下：侧边栏抽屉、右侧面板整屏、分区列表单独成页、输入框在键盘之上 |
| [窗口状态](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/desktop/window-state.zh.html) | 位置、最大化、全屏、标题栏命中 |
| [窗口生命周期](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/desktop/window-lifecycle.zh.html) | 一个主窗口：启动、Dock 激活、第二实例共用一次创建 |
| [窗口间移动标签页](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/desktop/window-tab-transfer.zh.html) | 一个事务、同一活页面、日志、回滚 |
| [嵌入其他应用的窗口](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/desktop/embedded-windows.zh.html) | 标签页里放另一个应用的窗口：Windows 和 X11 用子窗口，macOS 用实时画面加转发输入 |
| [截图](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/desktop/screenshots.zh.html) | 定格、选窗口或区域、标注、OCR、贴图；每个显示器一个覆盖层 |
