Resolve 15 shared-control, overlay and responsive-layout issues plus the MCP editor being hidden behind settings. Restore theme contrast, danger and disabled states, visible keyboard focus, and consistent Continue fields. Keep the workbar add button reachable and model protocol values readable in narrow containers.
Make nested MCP and image dialogs usable above their parents with focus restoration, keep project Escape handling within the active modal, release native browser views for overlapping help, and restore keyboard access and Escape in sandboxed HTML previews without relaxing sandbox permissions. Add unit and real Electron regression coverage and update design and validation documentation.
Release note: 修复深浅主题下控件边框、危险操作、禁用状态和键盘焦点显示不一致的问题。MCP 编辑器与图片预览可在父弹窗上正常操作,HTML 全屏预览支持键盘进入和 Escape 返回;窄工作栏的添加按钮保持可用,模型连接协议文字完整可读。
Validation: the full suite recorded 5309 passed, 3 failed and 83 skipped. The ProjectSwitcher initial-focus regression was then fixed, and App, ProjectSwitcher and overlay Electron tests passed all 331 cases. The other two HeartbeatCenter failures were reproduced on isolated HEAD 11facf0 and remain pre-existing. Typecheck and lint passed after the fix; staged whitespace checks passed. The full suite was not rerun after the focused fix.
Limits: Electron evidence is from Windows development runs, with fixtures for unrelated services and native occlusion throttling disabled in some drivers. No production build, packaging, macOS/Linux, remote Agent host or external MCP connection validation; skipped tests and the documented scaling and native-select coverage gaps remain.
2.4 KiB
2.4 KiB
会话 HTML 渲染实现进度
2026-09-27 浮层审查修复:全屏 iframe 已纳入共享焦点循环,跨文档 Escape 通过受限 Main/Preload 通知返回外层。真实 App 中的带链接及纯正文预览均已验证键盘进入和 Escape, 带链接预览另验证正反向 Tab 返回;没有开放 sandbox 权限或执行预览脚本。 实现与测试范围见浮层审查修复记录。
已实现
- 应用级持久开关,默认开启,并提供旧设置迁移。
- 平台功能通用设置中的共享 Switch。
- 已完成 Agent 回复和子 Agent 输出中的完整 HTML 与 fenced HTML 识别。
- 隔离静态预览、持续安全说明和源码切换。
- 预览保留作者
<style>与style属性,样式不再被整块丢弃。 - 与 Mermaid 一致的图标按钮组:源码切换与全屏预览 Modal。
- 嵌入预览固定 480px 高度,源码面板同值上限。
- 用户消息、推理、流式回复和关闭状态的源码边界。
- 设置变更后当前会话立即重新渲染。
验证记录
2026-09-05:
npm run typecheck:通过。- 聚焦测试(应用设置、Markdown、会话时间线、设置中心、App 集成):306 项通过。
- 全量
npm test:3493 passed, 55 skipped。 npm run lint:通过。npm run build:Main、Preload、Renderer 与控制面安装器均成功构建。
修复样式丢失后复验:
- 原实现只要
<style>或style属性中出现@import/url()就整块删除,带渐变或 背景图的回复因此完全失去样式;现改为保留作者样式,外部资源加载仍由 iframe CSP 拒绝。 npx vitest run src/renderer/src/MarkdownRenderer.test.tsx:19 passed。- 聚焦测试(会话时间线、App 集成、设置中心):
260 passed。 npm run typecheck、npm run lint:通过。
新增全屏预览与图标化源码按钮后复验:
- 源码按钮改为代码图标并暴露
aria-expanded;新增放大图标打开全屏 Modal。 - 嵌入预览高度由
min-height: 320px改为固定height: 480px,源码面板上限同步为 480px。 - 新增回归测试覆盖全屏 Modal 的初始焦点、背景 inert、Sandbox/CSP 与 Escape 焦点恢复。
- 聚焦测试(Markdown、会话时间线、App 集成、设置中心):
280 passed。 npm run typecheck、npm run lint:通过。