fix: restore destructive dialog buttons and document recent updates

Destructive confirmation buttons lost their styling outside the notes page, including the draft-discard Portal. Share button sizing, typography, disabled feedback and theme-aware hover colors across callers, with Electron and contrast regression coverage and design documentation.

Include the update article draft covering v0.13.8 through v0.13.16 and the separately identified 5116613 follow-up, its verification record and article index. The article remains unpublished with screenshots and release details pending.

Validation: 37 focused tests passed, including real Electron capture; typecheck, lint and staged whitespace checks passed. No model calls. The previously documented unrelated HeartbeatCenter full-suite failure was not rerun.

Release note: Destructive confirmation buttons, including the discard-note-draft dialog, now display consistent styling, keyboard focus and disabled feedback in light and dark themes.
This commit is contained in:
mesalogo
2026-09-27 15:34:01 +08:00
parent 0f0b6ac21d
commit 11facf0392
10 changed files with 427 additions and 19 deletions
+17
View File
@@ -63,6 +63,23 @@ AI 列 280。测试同步原生输入与实际状态后独立复跑通过,保
**历史**:`e9679fe`、`ca4a58c` 各修了一部分被人工点到的弹窗,同一批改动又新增了两个未覆盖
的遮罩;后续复查改为共享规则加自动发现测试。
## 共享控件样式依赖页面祖先
**症状**:放弃笔记草稿弹窗中的危险按钮显示为原生按钮,其他页面的危险确认也缺少样式。
**原因**:唯一的 `.danger-solid` 定义限定在 `.magic-notes-page` 下;Portal 挂到 `body`
后失去该祖先,心跳、监督者、工作区文件删除和工具环境设置也无法命中。
**规则**:共享按钮在全局定义并复用基础控件规则,不向每个调用处补页面类。
具体状态和令牌见 [UI 设计系统](../../UI-DESIGN.md#66-危险操作)。
**防复发**:`magic-notes-capture.electron.test.ts` 在真实 App 中触发草稿确认,检查
按钮不属于页面祖先时的浅深主题 computed style、尺寸、字体、禁用及原生 Tab 焦点;
悬停通过 Chromium 调试协议强制伪状态检查,不作为原生鼠标命中验证。
共享令牌测试检查默认和悬停危险背景上的文字对比度。
**历史**:2026-09-27 同次检查确认草稿确认及上述四处调用均受同一作用域错误影响。
## 网页浮层遗漏原生浏览器视图
**症状**:知识库实例、项目设置等 Modal 的右侧被浏览器网页覆盖,通知或菜单也可能