Skip to content

feat(desktop): add configurable macOS HUD mode - #7336

Open
Allen-ux-dev wants to merge 6 commits into
makecindy:mainfrom
Allen-ux-dev:feat/hud-mode
Open

Allen-ux-dev wants to merge 6 commits into
makecindy:mainfrom
Allen-ux-dev:feat/hud-mode

Conversation

@Allen-ux-dev

@Allen-ux-dev Allen-ux-dev commented Oct 26, 2026 •

Copy link
Copy Markdown

这次改了什么

摘要

为 macOS 增加可配置的 HUD 悬浮模式。在新建准备页或已有任务点击右上角 HUD 按钮,即可将当前输入框和消息放进小窗口,在操作其他软件时继续提问;无需创建另一条任务或切换聊天状态。

变更类型

  • feat 新功能
  • fix 缺陷修复

范围

  • 关联需求:macOS 悬浮对话与按次查看屏幕;暂无关联公开 Issue。
  • HUD 复用现有任务、输入框与设置组件;退出恢复正常布局、窗口大小、层级与全屏状态。支持窗口位置/大小记忆、层级按钮、上/下输入条、背景/输入/消息文字/图片/控件分别调整透明度。移动时透明度按原值增加 10%(例如 40% → 44%),停止后线性恢复。
  • 支持分区域鼠标穿透;全局快捷键双向切换,默认 ⌘⇧H,可在 HUD 设置和快捷键设置中修改,两处绑定与提示同步。恢复快捷键注册失败时拒绝开启穿透。
  • “本次查看屏幕”、七天剩余额度与可复制路径放在同一行;路径优先显示结尾,左右留白一致。上下文使用细条并保留悬停详情。普通窗口仍保留原用量信息。
  • 截图需要用户开启屏幕访问,且逐次发送决定是否附图;不持续采集。原生采集前后、附件缓存后、登录/目录选择/命令处理/发送等待期间校验截图授权;退出 HUD、撤销授权或切换任务会取消未接受的截图。消息队列接受后不因输入框卸载而误取消。
  • 五种语言:简中、繁中、英文、日文、韩文;复用现有术语,新增 HUD / Click-Through 在词汇表中登记为 proposed,等待维护者裁决。
  • 不包含 Windows/Linux HUD、移动端功能、依赖升级、数据库迁移、跨端协议或 system prompt 改动。非 macOS 隐藏 HUD 入口/设置,并在原生激活入口拒绝请求。Breaking change:无。
  • 当前已通过同步提交 7b7807d532 合入 upstream/main@0694ed7e001e027a031ffed21a088bd1975132de;首轮验证基线为 82d44ec3ee。

UI 变化

  • 引用的设计规范:docs/design-rules/DESIGN.md §2 Color Palette & Roles、§4 Buttons / Desktop settings rows、§5 Layout Principles、§10 Light / Dark Dual-Mode Delivery Gate、§14.2 Focus Management、§14.3 Keyboard & IME。沿用官方 titlebar hover token、28px 图标按钮/6px 圆角、设置行与快捷键录制组件;保留原输入焦点和 IME 行为。功能性透明度过渡采用用户指定的线性变化。
  • 以下为首轮提交 b3aad8513c 的合成组件截图,无真实聊天、个人路径或账户信息。截图记录的 66aff08d96d7 加未提交改动,已完整纳入首轮提交 b3aad8513c。这些截图不证明系统透明合成或完整发送流程。
查看五种语言、深浅主题和两种尺寸的界面验证截图
  • 截图来源:单页验证 pnpm ui:check --page hud --case all --theme all --locale all --viewport 420x900,685x1100,macOS · Electron 42.11.12(Chromium 148.0.7778.280,与 Cindy 同一渲染内核);真实组件与主题,场景数据,不是登录账号下的完整 Cindy
  • 版本:66aff08d96d7(含未提交改动)
  • 结果:120/120 个场景通过
  • 页面 hud:light / dark · zh-CN / zh-TW / en / ja / ko · 420×900 / 685×1100
    • default:HUD settings
    • entry:Normal titlebar HUD entry and hover
    • settings:HUD settings
    • chrome:Localized screen controls, settings overlay and custom shortcut
    • chrome-no-quota:Localized unavailable weekly quota beside screen control and truncated path
    • nested-panes:Retain docked pane DOM while giving all space to chat
    • 未覆盖:Native window, system shortcuts, capture permissions, full LayoutRoot (nested pane DOM is a fixture)

单页验证截图 1/20
单页验证截图 2/20
单页验证截图 3/20
单页验证截图 4/20
单页验证截图 5/20
单页验证截图 6/20
单页验证截图 7/20
单页验证截图 8/20
单页验证截图 9/20
单页验证截图 10/20
单页验证截图 11/20
单页验证截图 12/20
单页验证截图 13/20
单页验证截图 14/20
单页验证截图 15/20
单页验证截图 16/20
单页验证截图 17/20
单页验证截图 18/20
单页验证截图 19/20
单页验证截图 20/20

怎么验证的

自动验证

首轮提交 b3aad8513c 的工作树运行以下检查;后续审查修复的验证记录见下节:

  • pnpm --filter desktop typecheck:通过。
  • 下方定向 Vitest 命令:22 个文件、387 项通过,18.09 秒(2 workers)。覆盖 HUD、原生生命周期、快捷键、额度、布局、输入及本地/远程首次发送、命令和 side chat。
  • pnpm ui:check --page hud --case all --theme all --locale all --viewport 420x900,685x1100:120/120 场景通过,75.9 秒。检查入口 hover、五语设置、长自定义快捷键、元信息行基线/不重叠和嵌套面板呈现。
  • node --test scripts/__tests__/glossary-rules.test.mjs scripts/__tests__/design-inventory.test.mjs:123 项通过,99.94 秒。
  • pnpm check:test-hygiene、pnpm check:i18n、pnpm check:i18n-glossary、pnpm check:design-inventory:通过;国际化保留仓库已有非阻断提示。
  • pnpm check:design-colors --worktree --base-ref 82d44ec3ee:通过,unexpected=0;几何值提示仍列在报告中。
  • 55 个变更的 TS/TSX 文件执行 ESLint:0 新错误,21 个既有错误逐项与官方基线按文件、规则和消息对比。既有错误分布于 bootstrap-electron(6)、UserMessage(1)、chatInputAnnotationAbort 测试(1)、settingsSearchCatalog 测试(3)、openSideChatTab 测试(10)。不宣称仓库 ESLint 全绿。
  • git diff --check 与 pnpm check:dco --base 82d44ec3ee:通过,两条代码提交均带匹配作者的 DCO 签名。
  • 最终 diff 独立静态审查:未发现确定 P0/P1。
可复现的定向测试命令
pnpm --filter desktop exec vitest run \
  src/main/hud/__tests__ \
  src/shared/__tests__/hud.test.ts \
  src/main/app-shortcuts/__tests__/AppShortcutStore.test.ts \
  src/renderer/features/hud/__tests__ \
  src/renderer/components/settings/__tests__/HudShortcutSync.test.tsx \
  src/renderer/components/settings/__tests__/settingsSearchCatalog.test.ts \
  src/renderer/components/settings/__tests__/KeyboardShortcutsSection.accessories.test.tsx \
  src/renderer/components/settings/__tests__/KeyboardShortcutsSection.mutationRace.test.tsx \
  src/renderer/components/status/__tests__/TodaySpendChip.popover.test.tsx \
  src/renderer/layout/__tests__/LayoutRoot.test.tsx \
  src/renderer/components/new-chat/__tests__/chatInputAnnotationAbort.test.tsx \
  src/renderer/__tests__/chatInputSessionFocus.test.ts \
  src/renderer/__tests__/newMakerLocalFirstMessageSend.test.ts \
  src/renderer/__tests__/newMakerRemoteFirstMessageSend.test.ts \
  src/renderer/__tests__/newMakerOrcaCreateOrder.test.ts \
  src/renderer/__tests__/reviewCommandDispatch.test.ts \
  src/renderer/__tests__/issueCommandAttachments.test.ts \
  src/renderer/features/cc-agent/__tests__/newMakerDraftSubmission.test.ts \
  src/renderer/features/right-sidebar/lib/__tests__/openSideChatTab.test.ts \
  --maxWorkers=2
测试价值及逐文件耗时(engineering-conventions.md §3.2)

下列路径均相对 apps/desktop/src。tier 为 unit;每个文件另以 pnpm --filter desktop exec vitest run <文件> --maxWorkers=1 单独运行,耗时为本机墙钟。原生 API 使用 Electron fake;UI 使用 jsdom。原生新增取消用例在修复前 3 项失败,修复后通过。

文件 生产入口 / 原覆盖缺口 / 最小失败输入与结果 单独耗时
main/app-shortcuts/__tests__/AppShortcutStore.test.ts 快捷键存储原入口;原先无 HUD 动作;自定义组合键持久化并读回,归一化结果一致。 1.84s
main/hud/__tests__/controller.test.ts HUD controller;新增截图生命周期;捕获中撤销/退出或捕获失败,必须丢弃过期结果并恢复窗口。 1.45s
main/hud/__tests__/ipc.test.ts 真实 IPC handlers;新增原生入口缺生命周期覆盖;非主窗口、非 macOS、权限拒绝、快捷键冲突、全屏进入后立刻退出、最大化恢复,以及隐藏等待中退出/授权 off-on,验证拒绝、状态恢复和取消后不调用 OS 捕获。 0.95s
renderer/__tests__/newMakerLocalFirstMessageSend.test.ts 本地首条发送代码路径的既有 guard;HUD 包装改变 source locator;定位实际 sendMessage 调用,保留发送和导航次序断言,未放宽行为要求。 0.86s
renderer/components/new-chat/__tests__/chatInputAnnotationAbort.test.tsx 原 ChatInput 发送/取消与附件入口 34 项回归;仅补全普通输入框的 HUD mock,确保未挂载 HUD 时原矩阵不变。 8.02s
renderer/components/settings/__tests__/HudShortcutSync.test.tsx 两处真实设置入口;原测试只覆盖单入口;修改、删除、重置 HUD 快捷键后,另一入口和提示同步。 1.63s
renderer/components/settings/__tests__/settingsSearchCatalog.test.ts 设置搜索目录;新增 HUD 平台可见性;darwin 可搜到,win32/linux 不出现。 2.14s
renderer/components/status/__tests__/TodaySpendChip.popover.test.tsx 原额度组件;新增 quotaOnly 模式;只有 300 分钟窗口不能冒充七天额度,HUD 只显示七天信息。 3.44s
renderer/features/cc-agent/__tests__/newMakerDraftSubmission.test.ts 实际发送回调由既有 AST/VM 测试入口执行;旧覆盖未包含 HUD 授权时序;auth/rehome/preflight/目录选择/命令目录等待中撤销,断言不提交过期截图;接受后先交接再导航。 5.35s
renderer/features/hud/__tests__/HudPathChip.test.tsx 真实路径按钮;新增截断展示;更换任务路径后点击仍复制完整当前路径。 1.61s
renderer/features/hud/__tests__/pointerRouting.test.ts 实际指针区域判定;新增分区域穿透;消息旁空白、回复工具组和输入弹层匹配各自设置。 1.41s
renderer/features/hud/__tests__/screenAttachment.test.tsx 真实 hook/store 与发送 preflight;原先只检查截图前状态;缓存等待中退出/重入、授权 off-on、切换任务或取消/重选拒绝旧截图,已接受交接不因卸载失效,旧 accept 不清除新选择。 1.57s
renderer/features/right-sidebar/lib/__tests__/openSideChatTab.test.ts 真实 side chat 创建入口;原流程无截图撤销 guard;子任务创建/页签激活等待中撤销,清理新页签和子任务,不转移过期截图。 2.23s
renderer/layout/__tests__/LayoutRoot.test.tsx 真实 LayoutRoot;原布局无 HUD 模式;失衡比例进入 HUD 时不写回临时尺寸,保留聊天节点,退出恢复自愈。 1.98s
shared/__tests__/hud.test.ts 共享设置解析/屏幕提问识别/移动透明度;新设置契约及五语识别缺口;0/100、非法字段、40%→44%、独立请求与引用/否定/API讨论。 0.81s

审查反馈修复(87016b8a6b)

  • 修复任务创建后撤销 HUD 截图导致下一次发送重复创建同一任务的问题:转到已创建任务并恢复用户草稿与附件,不恢复已撤销的自动截图。复用已迁移附件缓存,保留用户选择的隔离工作区;账号切换后停止向新账号状态恢复旧草稿。
  • 修复退出全屏超时后残留恢复标志的问题,避免后续普通 HUD 进入/退出意外回到全屏。
  • 先运行失败用例再修复:原实现出现 4 项失败;扩展缓存迁移、工作区和账号边界用例后,分别再现了 4 项和 2 项失败,修复后均通过。
  • 最新代码定向回归:10 个文件、147 项通过,3.94 秒(2 workers)。范围包括原生 HUD、截图 hook、草稿首次发送、provisional task、本地/远程首次发送及 Orca 创建顺序。
  • pnpm --filter desktop typecheck、4 个修改文件的 ESLint、pnpm check:test-hygiene、git diff --check 均通过。DCO 检查通过,3 条代码提交均已签名。
  • 修改测试文件单独运行:原生 IPC 24 项通过,墙钟 1.27 秒;草稿发送 58 项通过,墙钟 4.97 秒。测试执行生产 IPC 和实际发送回调,并使用实际附件迁移 helper;Electron、会话服务与图片缓存用 fake 隔离。
  • 独立静态复核未发现剩余确定的 P0/P1。本次修改不改变界面布局;未重复运行首轮的全量 UI 截图矩阵,也未将原生 fake 测试当作真实桌面验证。

纯截图发送补充(1f5e8e680e)

  • 用户明确勾选“本次查看屏幕”后,无需输入文字即可发送一次截图;取消勾选后,空输入框仍不可发送。沿用现有截图授权、撤销和附件发送链,不代填提问文字。
  • 待拍截图同时计入按钮、发送函数、语音结束后的发送和输入框判空;不会接受推荐提示词或误走空输入框的队列插话快捷路径。未新增设置、依赖、UI 文案或国际化 key。
  • 定向 Vitest:8 文件、176 项通过(9.78 秒);包含真实 ChatInput + HUD hook 的新建页点击发送、已有任务 Enter 发送、取消勾选、截图失败重试与推荐词隔离。图片字节和宿主接口为 fake,不宣称真实模型端到端发送。
  • 修改测试文件单独运行 36 项通过,墙钟 8.55 秒(已有大型 ChatInput/Tiptap harness,收集 4.75 秒、测试 2.00 秒;复用原文件,未新增模块重载或真实等待)。
  • Desktop typecheck、test-hygiene、diff 检查及 DCO 通过(4 条代码提交)。修改文件 ESLint 无新增错误;测试文件中原有 view 未使用错误仍保留,已与父提交核对。
  • pnpm ui:check --changed=87016b8a6b --theme all 等效检查 18/18 场景通过(29.9 秒),查看了全部 3 张 overview。保留 4 条 companion composer 文字裁切警告,未将警告写为零。
  • 在已运行的隔离 Cindy 开发窗口验证:空白输入框勾选后发送按钮可用,取消后禁用;未主动向真实模型发送桌面截图。独立只读复核未发现具体 P0/P1/P2。
  • 以下合成截图在 87016b8a6b 加本次未提交改动时生成,源码已完整纳入 1f5e8e680e;不含个人桌面或真实聊天。截图覆盖深浅主题与组件回归,纯截图的派发语义由上述交互单测验证。
本次深浅主题回归截图

组件回归
HUD 设置与入口
HUD 信息栏与布局

同步官方 main(7b7807d532)

  • 合入 upstream/main@0694ed7e001e027a031ffed21a088bd1975132de,保留原提交历史。解决设备名称 import、侧栏折叠与 HUD 布局参数、上下文控件抽取及生成清单冲突。
  • 沿用官方抽出的 ContextCapacityRing,将 HUD 长条变体迁入该组件,保留普通模式新加入的上下文详情与档位设置;HUD 继续显示长条及悬停提示。保留模型切换时的 provider、只读状态及官方侧栏折叠逻辑。
  • 新增一个组件回归用例验证 HUD 只读长条与普通圆环切换:适配前失败,适配后通过。复用已有测试文件;该文件单独运行 62 项通过,Vitest 报告耗时 3.26 秒。
  • 定向回归 25 文件、548 项通过,18.18 秒(2 workers),覆盖 HUD 原生入口、截图授权与发送、草稿恢复、快捷键、侧栏布局、远程草稿及上下文控件。Desktop typecheck、test-hygiene、五语 key 一致性、design-inventory、相对新 main 的 diff 检查与 DCO 均通过。
  • 手工合并的 7 个 TS/TSX 文件执行 ESLint:生产文件无错误,测试文件有 3 个上游既有未使用导入错误,已通过对 upstream/main 同文件执行相同检查确认。本次无新增 lint 错误;i18n 保留现有 1387 条非阻断警告。
  • 下方 16 个深浅色场景通过,已查看全部 3 张总览图。截图生成于 1f5e8e680eaf 加正在合入的官方代码与适配改动,内容已完整纳入 7b7807d532。本轮未重新启动完整应用或发送真实截图,未运行整仓测试;远端 CI 仍以 GitHub 结果为准。
同步后的上下文圆环与 HUD 长条验证截图
  • 截图来源:单页验证 pnpm ui:check --page context-capacity --case all --theme all,macOS · Electron 42.11.12(Chromium 148.0.7778.280,与 Cindy 同一渲染内核);真实组件与主题,场景数据,不是登录账号下的完整 Cindy
  • 版本:1f5e8e680eaf(含未提交改动)
  • 结果:16/16 个场景通过
  • 页面 context-capacity:light / dark · zh-CN · 560×650 / 320×650
    • hud:HUD compactable context bar
    • hud-codex:HUD read-only native context bar
    • default:One ring opens usage, manual compaction and window choices
    • high:Context nearly full
    • codex:Native Codex details above window choices
    • narrow:Read-only task at 320px
    • narrow-editable:Window controls and model settings at 320px
    • unknown:Missing route data keeps the ring and usage details
    • 未覆盖:Real model settings, remote writes and compaction. Uses fixture host data.
    • 场景替换的模块(未验证):src/renderer/lib/modelDefinitions

单页验证截图 1/3
单页验证截图 2/3
单页验证截图 3/3

手工验证

macOS 隔离开发配置 cindy-dev。开发过程中验证准备页和已有任务进入/退出 HUD、未发送草稿与模型选择保留、最大化恢复、上下输入位置、路径复制。使用者确认真实桌面背景可透出、AI 回复区域可穿透、切换至其他软件后默认快捷键能恢复点击、Esc 能退出 HUD,并实际发送过“查看屏幕测试”获得截图内容解释。最终元信息栏的左右留白由使用者目检确认。

未执行的验证

  • 未运行整仓完整测试;上面的定向回归不替代 GitHub CI。远端检查以本 PR checks 为准。
  • 未在 Windows/Linux 真机、全新 macOS 录屏权限环境、真实多显示器或正式签名发行包中验证;非 macOS 激活拒绝、录屏权限拒绝与窗口时序由 fake API 测试覆盖。
  • 最新自定义快捷键未再次做真实键盘全部组合冲突复验;双向切换、设置同步、录制暂停与注册失败已自动验证。
  • 五语未经过母语审校;单页 fixture 不覆盖真实 OS 合成、完整 LayoutRoot 或远程模型发送。完整应用交互的手工证据含私人聊天/桌面信息,未公开上传;本 PR 仅附合成 UI 截图。

风险

风险分类

  • 权限 / 安全 / 用户数据
  • 原生层 / fingerprint / OTA
  • 跨平台差异

影响与回滚

  • macOS 主窗口增加透明底层;HUD 激活时调整窗口尺寸、层级与鼠标事件,退出/关闭/渲染崩溃时清理穿透和全局快捷键并恢复窗口状态。主题变更后恢复当前主题,而非进入 HUD 前的旧主题。
  • 屏幕访问受设置与 OS 权限控制;IPC 仅接受受信主窗口。只采集当前屏幕一次;发送等待时再次验证,接受后由原有消息队列负责。原生修改需要随桌面应用发布。
  • 非 macOS 不提供 HUD;无数据库迁移、无跨端 wire 格式变化、无 mobile runtime fingerprint 变化。存量插件影响:无。
  • 回滚:撤销本 PR 并重启桌面应用;HUD 配置独立存储,普通任务与聊天数据沿用原存储,无迁移回滚步骤。

提交前检查

  • 已 review 完整 diff,并做最终独立审查
  • 每个代码 commit 都带 DCO 签名
  • UI 变化注明设计规范章节,截图已发布至个人 Fork
  • 未提交凭证、令牌、授权文件、真实聊天或个人路径
  • 已核对受影响文档,更新设计清单和新术语登记
  • 已确认测试结果并说明未执行范围

撤销截图授权时序修复(6ce27f66c9)

  • 修复 Greptile P1 取消后仍会截屏:在发送动作开始、引用加载/文件传输/语音结束等待之前固定本次截图意图及授权版本,并在调用原生截图前再次校验。取消后重新勾选不能让旧发送恢复截图。
  • 复用现有失败恢复链路;取消发送保留原正文、引用及等待期间输入的新草稿。未取消的发送仍正常附图,已接受的截图保持原交接语义。
  • 修复前对照:同一真实 ChatInput 回归矩阵中,引用等待取消/取消后重选、语音等待取消、远程引用等待取消和文件传输等待取消共 5 项失败,均观察到不应发生的截图调用;修复后全部通过。正常发送对照两项在修复前后均通过。
  • 定向回归:15 文件、264 项通过,8.57 秒(2 workers),覆盖原生 HUD、截图 hook、输入框、首次发送、远程引用、命令及 side chat。测试替身的只读数组类型调整后,输入框 43 项再跑通过;Desktop typecheck、test-hygiene、diff 与 DCO 检查通过;4 个修改文件 ESLint 无新增错误,原测试文件的一处未使用变量与父提交一致。
  • 测试价值(unit):现有 hook 用例只覆盖截图/缓存后的撤销,缺少发送开始至原生截图前的等待。新增真实 ChatInput + hook 回归上述等待,并检查不调用截图、不发送、恢复草稿;hook 追加切换任务、卸载、账号和授权版本变化前的拒绝检查。继续使用原有两个测试文件,外部设备、语音、引用加载和原生截图接口使用 fake,没有真实屏幕采集或模型发送。
  • 单独文件耗时:输入框 43 项通过,单独复跑 6.02 秒(收集 3.73 秒、执行 1.73 秒;与类型检查及其他检查并行时曾为 10.46 秒,沿用既有大型 Tiptap harness,没有新增真实等待或模块重载);截图 hook 16 项通过,0.943 秒。独立只读复核未发现本次修改引入的 P0/P1;本次没有布局/文案改动,未启动完整应用或重复发布界面截图。远端 CI 与维护者确认仍需分别完成。

Signed-off-by: Allen-ux-dev <13522567881@163.com>
Signed-off-by: Allen-ux-dev <13522567881@163.com>
@Allen-ux-dev
Allen-ux-dev requested a review from a team as a code owner October 26, 2026 21:29
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-27T16:20:23.971919Z
We couldn’t complete this review. Comment @codex review to try again.
7b7807d Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[High impact] 此前的截图撤销问题已修复,本轮未发现阻止合并的新问题。

Summary

本 PR 为 macOS 增加可配置的 HUD 悬浮模式,复用当前任务、输入框和消息。

  • The current chat can stay open in a compact, configurable macOS HUD window.
  • The HUD can pass selected mouse clicks through and toggle the mode with a global shortcut.
  • A message can include a one-time screenshot when the user asks about the screen or checks the screen box.
  • HUD chat details fit beside the composer while normal chat keeps its usual usage display.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[用户发送] --> B[固定截图意图和授权版本]
  B --> C[等待语音、目录传输或引用加载]
  C --> D{授权仍有效?}
  D -- 否 --> E[停止发送并保留草稿]
  D -- 是 --> F[截图并缓存]
  F --> G[发送前再次检查授权]
  G --> H[消息队列接受截图]
  H --> I[后续卸载不再取消已接受的截图]
Loading

Reviews (5) · Last reviewed commit: "fix(desktop): freeze HUD capture consent..." · Reviewed by Greptile

Comment thread apps/desktop/src/renderer/features/cc-agent/NewMakerDraftRoute.tsx
Comment thread apps/desktop/src/main/hud/ipc.ts
Signed-off-by: Allen-ux-dev <13522567881@163.com>

Copy link
Copy Markdown
Author

@greptileai Please re-review the latest commit, 87016b8. It addresses both findings from the initial review: cancelled HUD capture recovery after task creation and stale fullscreen restoration after a timeout. Please verify the fixes and check for regressions.

Signed-off-by: Allen-ux-dev <13522567881@163.com>

Copy link
Copy Markdown
Author

@greptileai Please re-review the latest commit 1f5e8e6. This small follow-up allows explicitly selected HUD screenshots to be sent with empty message text, preserves the existing consent/cancellation checks, and prevents suggested text from being implicitly included. Related regression tests (176), desktop typecheck and 18 UI scenarios passed; validation details and limitations are in the PR description.

@MagicLizi

Copy link
Copy Markdown
Contributor

本 PR 命中维护者确认门(product:feat + 生产 UI 路径;security:apps/desktop/src/main/hud/ipc.ts:421 navigation-escape 危险写法 1 处;rules:改到 docs/design-rules/design-inventory.md;arch:核心路径 1526 行 + 全量 4920 行大 diff),需要维护者确认后才能进入代码审查与合并。

确认方式:请维护者直接在本 PR 上 Approve;需要作者修改则 Request Changes 并写明要求,作者改完后维护者再 Approve。普通留言不构成放行。

讨论 issue 见本评论关联的链接。

另如实记录本轮其他前置状态(不在本门处置范围):2 条 review conversation 均已 Resolve(greptile 撤销截图重试 P1、全屏恢复标记 P2);2 个 workflow(pr-design-basis / client-ci)待批准后才能跑 CI。

讨论 issue:#7360

@MagicLizi MagicLizi added awaiting-discussion 等待维护者讨论(review-pr) touches:core 改动碰到架构核心路径(review-pr 自动维护,仅展示) touches:large-diff 改动量较大(review-pr 自动维护,仅展示) touches:product-ui 改动碰到产品 / UI 面(review-pr 自动维护,仅展示) touches:rules 改动碰到规则 / 规范文档(review-pr 自动维护,仅展示) touches:security 改动碰到安全边界(review-pr 自动维护,仅展示) labels Oct 27, 2026
Signed-off-by: Allen-ux-dev <13522567881@163.com>

Copy link
Copy Markdown
Author

@greptileai Please re-review the current head 7b7807d after syncing upstream/main (0694ed7). Conflict resolution preserves upstream device labels and collapsed-sidebar behavior and adapts the HUD bar to the extracted ContextCapacityRing without removing the normal ring's new controls. Local validation: 548 targeted tests, desktop typecheck, and 16 light/dark UI scenarios passed; details and limitations are in the PR description. Please check the integration for regressions.

Copy link
Copy Markdown
Author

@codex review

Please review the latest head 7b7807d. The initial review did not complete; the branch now includes upstream/main and the HUD integration fixes. Validation evidence is recorded in the PR description. The maintainer confirmation gate and approval of the pending GitHub Actions workflows remain separate requirements.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/desktop/src/renderer/features/hud/useHudScreenAttachment.tsx Outdated
Signed-off-by: Allen-ux-dev <13522567881@163.com>

Copy link
Copy Markdown
Author

@greptileai Please re-review the latest head 6ce27f6, addressing the P1 in #7336 (comment).

HUD capture consent is now frozen at the original send action, before reference hydration, folder transfers, or voice refinement; it is revalidated before native capture. Uncheck/recheck cannot revive the old send. The existing rejection path preserves the original draft and any newer text typed during remote hydration.

The new production-entry regression matrix reproduced five unwanted capture calls on the previous implementation and passes with this fix, with unchanged-consent controls still sending normally. Validation: 264 targeted tests, desktop typecheck, test-hygiene and DCO passed; the composer file was rerun after correcting a test-only readonly-array return type (43 passed). Full evidence, isolated test timings, and limitations are in the PR description. Please verify both the reported race and adjacent cancellation/acceptance paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-discussion 等待维护者讨论(review-pr) touches:core 改动碰到架构核心路径(review-pr 自动维护,仅展示) touches:large-diff 改动量较大(review-pr 自动维护,仅展示) touches:product-ui 改动碰到产品 / UI 面(review-pr 自动维护,仅展示) touches:rules 改动碰到规则 / 规范文档(review-pr 自动维护,仅展示) touches:security 改动碰到安全边界(review-pr 自动维护,仅展示)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants