fix: keep question order and streamline contextual help
GoodBuddy Agents / Validate Agent source (push) Canceled after 0s
GoodBuddy Agents / Build darwin arm64 Agent (push) Canceled after 0s
GoodBuddy Agents / Build linux arm64 Agent (push) Canceled after 0s
GoodBuddy Agents / Build linux x64 Agent (push) Canceled after 0s
Cross-platform packages / Validate source (push) Canceled after 0s
Cross-platform packages / Authorize desktop packaging (push) Canceled after 0s
Cross-platform packages / linux arm64 (push) Canceled after 0s
Cross-platform packages / macos arm64 (push) Canceled after 0s
Cross-platform packages / windows arm64 (push) Canceled after 0s
Cross-platform packages / linux x64 (push) Canceled after 0s
Cross-platform packages / macos x64 (push) Canceled after 0s
Cross-platform packages / windows x64 (push) Canceled after 0s
Cross-platform packages / Publish GitHub and OSS release (push) Canceled after 0s

Keep interactive questions and answered cards at their original position in
conversation history, including remote reception, recovery, and reopening.
Preserve legacy history placement without a database migration.

Move supplementary guidance into shared accessible contextual-help popovers
across pages and settings. Add keyboard, modal, accessibility, and Electron
regressions, plus bounded opt-in live canvas-analysis validation.

Remove unused Agent, Runtime, and in-memory graph-search helpers, obsolete
mocks and browser copy; reuse the existing package-size formatter. Keep
production execution paths, protocol schemas, and released data migrations.

Validation: targeted cleanup tests, typecheck, lint, shared Linux Host
attach/read/re-attach, and added help/Electron checks passed. Final full-suite
verification passed 4,858 tests with 67 skipped and zero failures (412 files
passed, 9 skipped). Focused help checks passed 54 tests, including Electron
style comparisons and Chromium accessibility descriptions. Details and
validation boundaries are recorded in feature docs.

Release note: 修复交互式问答在回答后排到后续输出末尾的问题,重新打开会话仍保留提问位置。页面和设置中的补充说明改为标题或字段旁的按需帮助,支持鼠标与键盘操作。
This commit is contained in:
mesalogo
2026-09-20 01:26:36 +08:00
parent bf1d34e897
commit 9836a4cc9d
89 changed files with 1961 additions and 1111 deletions
@@ -1,5 +1,25 @@
# 工作栏实现与验证进度
## 2026-09-19 问答位置持久化
- Main 在收到问题时保存消息位置块,而不是等回答成功才追加;前台及重启恢复的实时待答
快照、带来源的语义事件投影共用同一去重函数。答案写入不移动位置块,旧消息不补造历史
顺序;规则见[Runtime 交互边界](./runtime-interactions.md#运行与失败)。未改变 schema。
- `npm exec -- vitest run src/main/assistant/assistant-database.test.ts src/main/ipc.test.ts`
通过 227 项,覆盖真实 SQLite 的问题/正文/工具交错、重复和重放、回答/跳过、完成及
重新打开,以及三个设置重载入口的并行远程问题恢复。
`npm exec -- tsc --noEmit -p tsconfig.node.json` 通过。
- 共享 Linux x64 Host 使用已保存凭据与固定 Host Key,经 LAN 路由运行当前源码 Agent、
Desktop Runtime 适配器和 Main SQLite 投影,使用真实 OpenCode `1.18.29`。首轮暴露实时
问题没有语义来源的实际分支,使用 1 次真实文本模型请求后停止;补齐 Main 接收入口后,
最终一轮 2 次请求,验证回答前位置块已经落库,回答后为 `tool → question → text`,
完成重开后消息完全一致。合计真实文本模型调用 **3 次**,每次最多 1024 输出 token,
每轮有限调用预算与 120 秒请求超时;图片模型调用 **0 次**。
- 临时复验脚本为既有批准临时目录中的 `question-order-host-build.cjs`、
`question-order-host-run.cjs`,最终日志为 `question-order-host-live.log`。
两轮均停止测试 daemon,所属进程剩余 0,移除本轮专属 Host 目录及上传文件。
该记录只覆盖 Main/Agent 路径,不代替 Renderer 视觉验收或最终全量验证。
## 2026-09-19 远程 CN 完整桌面验证
默认联合开发包已包含 OC/CN,并通过桌面导入、验签、传输至共享 Linux x64、安装及
@@ -29,6 +29,10 @@ Host 环境。2026-09-14 的已发布 Desktop `0.13.2` / Agent `0.11.25` 已包
- 回答或跳过成功后,会话保留只读的“问题与回答”,显示原问题及对应的选项答案、
自定义文本或“已跳过”。同一任务的多轮问答逐次保留,随本地会话保存,重新打开后仍可查看。
提交失败时保留输入与重试入口,不生成已回答记录;取消未回答的问题不记为主动跳过。
- 新消息在提问到达时,将只含 `questionId` 的问题位置块插入当时的消息块序列;
待答和回答后的卡片使用同一位置,后续正文、工具输出不再排到问题前面。重复问题不追加
或移动位置块。位置块不保存待答表单;旧会话没有位置块时保留原有问答展示,不推测或
回填历史顺序。该变更复用既有消息元数据,不升级数据库 schema。
- 提交响应晚于任务结束时仍保存已提交的问答,但不覆盖完成或失败状态;晚于下一轮提问时
不清除新的待答卡片。旧版会话未保存的问题与答案无法从“已提交”状态文案恢复。
- 待答队列仅保存在当前桌面会话内存中,不写入持久会话快照。刷新仍在运行的消息时保留整个
@@ -38,6 +42,8 @@ Host 环境。2026-09-14 的已发布 Desktop `0.13.2` / Agent `0.11.25` 已包
- 未发布的进程复用源码在 Desktop 重启后由 Main 并行附加同项目的存活任务,将待答
列表和 Stop 所需的请求 ID 投影到实时 `activeRequest`,不保存该字段或重新发送任务。
回答/跳过成功由 Main 写回原远程助理消息的既有问答历史,Renderer 不覆盖远程正文或终态。
Main 在前台与恢复请求收到实时问题时立即保存位置块;实时待答快照没有语义事件来源,
不伪造来源或追加 transcript。带来源的提问事件仍通过既有事务投影并按问题 ID 去重。
Runtime 设置、定制和能力更新让旧请求在原配置上结束,已有问题仍可回答;新请求使用
新配置。专家团队例外:既有专家调度器在设置替换时取消子任务,团队父请求也随之停止,
不使用替换后的模型汇总旧结果。详细实现见
+8
View File
@@ -16,6 +16,14 @@
## 验证证据
### 2026-09-20 清理孤立的内存图谱搜索
- 删除仅剩测试调用的 `searchGraph`、专属评分/遍历辅助函数、搜索上限及测试 fixture。
实际检索仍通过 `KnowledgeDatabase.hybridSearchWithDiagnostics` 与 `graphSearchScored`;
图谱抽取、归一化、合并、数据库结构和已发布迁移均保持不变。
- `graph-extractor.test.ts` 与 `knowledge-database.test.ts` 合计 55 项通过,保留合并时
丢弃失去端点关系的回归;没有调用外部模型。
### 2026-09-13 知识库布局与自动名称修复
- 创建类型的共享分段控件被长表单压缩,修复共享不收缩规则,不添加页面专属高度。
+35
View File
@@ -1,5 +1,40 @@
# Magic Notes Progress
## 2026-09-20: Shared Inline Help
The canvas page-count question mark now uses `InlineHelp`, superseding the native
`title` mechanism recorded below. The overview description, comment-direction
help and new text-entry hints also use the shared component. Interaction rules
are maintained in [the UI design system](../../../UI-DESIGN.md#614-inlinehelp-同行帮助).
The final verification ran `npm test -- --reporter=default --reporter=json
--outputFile.json=<temporary-report>`: **412 files passed, 9 skipped; 4,858 tests
passed, 67 skipped, no failures**, in 1,016.17 seconds. The JSON report confirms
`success: true`. `npm run typecheck` and `npm run lint` passed. The focused help,
application, SSH, Skills and MCP run also passed **6 files / 54 tests**. SSH password
help now keeps authentication and encrypted-storage consequences visible; Skills
and MCP headers no longer retain an empty description paragraph. Pin help and
disable consequences use separate Chinese and English translation keys.
`tests/inline-help.electron.test.ts` renders production `ApplicationCenter` /
`ApplicationSettingsView`, `SettingsPanel`, retrieval and activity components with
fixture data. Native Electron input verified hover, focus, click pinning, Escape
isolation, outside dismissal and Modal ownership. Chromium AX checks confirmed
unique description IDs and accessible text before, during and after expansion.
Light/dark checks cover 1280x800 and 640x480 consumer views, plus 1000x700 and
360x320 shared-component views. Computed styles and captured screenshots confirm
that canvas-count and pin help match model settings: 28px buttons, 14px icons,
4px label gaps, zero center offset, identical button colors/margins and tooltip
typography/padding/borders in each theme. No CSS difference was reproduced, so
this pass adds comparison assertions without changing styles.
The focused run retained 28 screenshots and `evidence.json` under the temporary
`inline-help-final` artifact directory selected by `GOODBUDDY_HELP_ARTIFACTS`.
This validates real Electron rendering with fixture services, not a packaged
full App or live provider. Help actions triggered zero consumer operations and
zero model calls. The full suite also passed both production canvas-analysis
Electron cases with substituted model output; live-provider checks remain opt-in.
## 2026-09-19: Compact Page Count Setting
- The page-count select now uses the existing `.field` settings control styling.
+4 -2
View File
@@ -24,6 +24,8 @@
该值。请求体说明明确列出直连、Continue 和受管远程 OpenCode 支持,并说明本地
OpenCode 与 DeepSeek Harness 不使用该值。
两项说明使用标签同行的 `InlineHelp`,交互遵循[同行帮助规范](../../../UI-DESIGN.md#614-inlinehelp-同行帮助)。下列警告及字段错误保持常显。
同一区域还必须说明:
- Runtime、协议和认证生成的字段优先。
@@ -32,7 +34,7 @@ OpenCode 与 DeepSeek Harness 不使用该值。
## 无障碍与键盘
- 每个文本域有稳定的可访问名称,并通过 `aria-describedby` 关联兼容性说明。
- 每个文本域有稳定的可访问名称,并通过 `aria-describedby` 关联兼容性说明。帮助关闭时保留隐藏说明,展开时替换为同 ID 的浮层,避免关联丢失或 ID 重复。
- 无效状态不能只依赖颜色,必须同时提供错误文字和 `aria-invalid`。
- 文本域遵循标准键盘编辑、选择、复制和粘贴行为;保存继续使用设置页唯一的主保存操作。
- 焦点边框、字体、间距、颜色和深浅主题全部复用全局语义令牌。
@@ -49,7 +51,7 @@ Runtime 入口恢复跟随。该展示规则不改变模型解析、远程 Agent
DeepSeek Harness 的 `platform` 选项命名为“管理员环境优先,回退 GoodBuddy 兼容连接”,
不能沿用 OpenCode/Continue 的“Runtime 自有配置”标签。来源规则以
[Harness 模型配置](../deepseek-harness/technical-design.md#121-配置来源)为准。
帮助文字与选择器通过 `aria-describedby` 关联,并明确此选项不加载用户 profile 或
帮助文字收进标签同行的 `InlineHelp`,与选择器通过 `aria-describedby` 持续关联,并明确此选项不加载用户 profile 或
配置文件;无兼容 GoodBuddy 连接时仍可选择管理员环境来源。
概览使用 Main 提供的[平台来源投影](./technical-design.md#9-harness-平台来源公开投影),
@@ -359,6 +359,10 @@ Runtime 包。2026-09-19 完整桌面验证覆盖联合包安装、CN 项目创
未发布进程复用源码补齐 Desktop 重启后的多任务并行附加、实时待答快照及 Main 答案
持久化,详见[恢复与终态投影](../assistant-workbar/runtime-process-reuse-technical-design.md#63-恢复与终态投影);
不把该待答投影当作 durable transcript 或旧版本已经支持的行为。
Desktop Main 接收实时问题时保存其消息位置,回答后不移动到后续输出之后;实时待答
快照不伪造语义来源。位置去重、旧会话边界见
[Runtime 交互边界](../assistant-workbar/runtime-interactions.md#运行与失败),
当前源码的真实 Host 证据见[问答位置持久化](../assistant-workbar/progress.md#2026-09-19-问答位置持久化)。
- ACP 工具结果同时支持文本 `content` 和 `rawOutput.output`,移除 OpenCode 的
`<task><task_result>` 外层包装后渲染正文。恢复已有子代理时使用 ACP 所带的所属
`toolCallId` 继续路由,不等待新的父 Task metadata,也不重放模型请求。
@@ -851,6 +855,23 @@ goodbuddy-agent diagnostics --installation-id <installationId>
信任条件。上传到 Host 前重新序列化为确定性 LF JSON。签名目录、描述符、manifest 和
payload 仍按原始签名字节及 SHA-256 验证。
## 2026-09-20 冗余代码清理验证
- 删除没有生产调用的结构化命令 runner、两个进程身份辅助函数、占位 peer provider、
平台查询辅助函数和五个旧 Runtime 请求构造/摘要辅助函数。保留实际 CLI、进程检查器、
请求 schema、原生 peer 校验及包签名验证,不改变 Ask/Execute 或协议行为。
- 清理后的当前源码 Agent、Main attach transport 和 protocol client 在共享 Linux x64
Host 上通过固定 Host Key 连接,完成启动、状态/能力读取、只读工作区打开及真实文件读取,
断开后再次连接并重复读取。验证没有使用模拟 Agent 或旧安装包的 Agent 实现。
- 本轮测试进程剩余 0;专属 Host 目录、上传文件及本地隔离 profile 已删除。
文本和图片模型请求均为 **0 次**。这是未使用代码删除后的启动/连接验证,不是新增的
Runtime 模型调用、安装更新或其他架构验收。
- 临时证据为 `redundancy-cleanup-host-{build,run}.cjs` 与
`redundancy-cleanup-host-live.log`;定向回归 230 项通过,typecheck、lint 通过。
- 同期全量 `npm test` 为 4,844 通过、67 跳过、11 失败;失败来自并行修改中的五个
Renderer 帮助提示/焦点测试套件。更新后的五个套件连同更新设置大小展示回归共 64 项
定向复跑全部通过;未把这次复跑记为又一轮全量通过。
## 发布前完整回归(不能替代开发验证)
以下清单只用于复核开发期间已经在真实 Host 上通过的链路,不得作为 Agent 改动的首次