- 已完成窗口去系统标题栏(
decorations: false)与无阴影(shadow: false)配置。 - 已完成自绘 TopBar、拖拽区、最小化/最大化/关闭按钮交互。
- 已补齐窗口 ACL(
allow-start-dragging、allow-minimize、allow-toggle-maximize、allow-close、allow-destroy)。
TopBar.tsx使用React.MouseEvent,但仅从 React 解构导入 hooks,可能触发Cannot find namespace 'React'。- 关闭按钮是否退出取决于脏状态保护流与 ACL 配置协同,需要通过本地运行验证。
- TypeScript 编译是否通过。
- 关闭按钮在无未保存改动时是否直接退出。
- 有未保存改动时是否正确弹出确认并按选择处理。
pnpm lint:通过。pnpm test:通过(5/5)。pnpm build:通过。pnpm tauri:build:通过,NSIS 安装包成功生成。
- Tauri 构建给出警告:
identifier以.app结尾(com.mdpad.app),建议后续改为不以.app结尾的反向域名标识,避免与 macOS bundle 扩展名语义冲突。
- 标题栏已改为 icon-only 左工具栏(Open/Save/Save As/Theme),并使用 hover tooltip。
- 标题栏中心仅显示文档名,不再展示品牌、Logo、路径。
- 右侧保留最小化/最大化/关闭按钮,且保留拖拽与双击最大化能力。
- 窗口背景与编辑页统一为纯平同色,去除渐变/阴影装饰。
- 标题栏与编辑页同宽同圆角,编辑页视觉覆盖标题栏底部,达到单页连续效果。
- Implemented transparent host window and moved depth cues to custom card shadows.
- Realized 20px larger window requirement by applying 10px frame padding around the content container.
- Locked titlebar alignment rule: left icon tools, center document title, right-aligned window controls.
- 报错
invalid args defaultName ... missing required key defaultName的根因是前端invoke传参使用了snake_case(default_name),与 Tauri 命令期望的camelCase(defaultName)不一致。 - 同类风险点在
rename_file,原先传参为new_base_name,应为newBaseName。
- 已在
src/features/file/fileService.ts中修复上述两个参数名。 - 已在
src-tauri/src/lib.rs增加缺省参数兜底:defaultName缺失时回退到untitled.md。 - 新增
src/features/file/fileService.test.ts,覆盖两个命令的参数命名断言。 - 回归验证通过:
pnpm test(5 files / 32 tests)、pnpm build、cargo check。
- 将
/images/x.png视为“相对文档目录”而非磁盘根路径;当documentPath可用时解析为<docDir>/images/x.png。 - 当
documentPath缺失时保持根相对字符串原样,避免错误拼接。
- 新增 Tauri 命令:
pick/get/set_attachment_library_dir与save_image_bytes_to_library。 - 编辑器粘贴位图时:
- 未保存文档先触发保存;
- 附件库目录首次选择并持久化;
- 图片以
日期+随机后缀命名后落盘; - 插入
file://绝对 URL。
pnpm test:通过(6 files / 41 tests)。pnpm build:通过。cargo check:通过。
- User feedback confirmed that save-md dialog before image-directory selection is the wrong UX for this workflow.
- Removed forced document-save precondition from clipboard image paste; unsaved docs can now paste directly into global attachment library.
- Revalidated with
pnpm testandpnpm build.
- Replaced in-layout error banner with BaseUI toast notifications.
- Unified error paths (
runBusyTask, editor callback, startup initial file read) through onenotifyErrorhelper. - Removed obsolete banner CSS to avoid dead style drift.