Serendipity
|
be04b7d0da
|
fix: 修复 ESLint 错误 — path-manager 测试去 as any、search-clean 未用参数
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 14:26:56 +08:00 |
|
Serendipity
|
6d711d0f8e
|
test: 修复所有测试适配 PathEntry,全部通过
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 13:59:40 +08:00 |
|
Serendipity
|
914b25f236
|
test: 所有测试适配 PathEntry[] 类型,新增 TOGGLE undo/redo 测试
- undo-redo.test.ts: 所有 11 项测试通过(含新增 TOGGLE 撤销/重做)
- app-store.test.ts: 断言改用 .map(e => e.path),待 Task 5 修复
- import-export.test.ts: sampleData 改用 pe(),导出断言适配
- path-manager.test.ts: 测试数据用 pe() 包裹,待 Task 3 修复
- validation.test.ts: 无需变更(纯 string 接口)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 13:42:21 +08:00 |
|
Serendipity
|
8ff02fd88b
|
fix: 修复 ESLint 错误 — PathEditDialog/use-keyboard/test 添加规则豁免注释
这些是正当的 React 模式(对话框状态重置、ref 同步避免重复注册、测试 mock)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 01:07:57 +08:00 |
|
Serendipity
|
605105da09
|
test: 移除 _markDirty 测试(函数已私有化,行为由 CRUD 测试间接覆盖)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-26 22:48:03 +08:00 |
|
Serendipity
|
1ce3ebfd9e
|
refactor: 代码清理 — 删除 AppError、重命名 replacePaths、修正 detectExportFormat、统一 PATH 长度、优化 BOM 检查、添加同步注释
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-26 22:14:13 +08:00 |
|
Serendipity
|
2775a3a588
|
fix: 非连续删除 undo 恢复到错误位置 — OpRecord 新增 indices 精确记录原始位置
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-26 21:57:21 +08:00 |
|
Serendipity
|
775a570d31
|
feat: 导入改用原生对话框、新增 app-store 单元测试、修复窗口滚动
- handleImport 从 DOM <input> hack 改为 @tauri-apps/plugin-dialog 原生文件选择
- 新增 Rust read_text_file 命令读取文件内容,零外部依赖
- 新增 tests/unit/app-store.test.ts,25 个测试覆盖 CRUD/undo-redo/loadPaths/savePaths
- 修复 AppShell overflow-hidden 导致无法滚动窗口的问题
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-26 19:01:56 +08:00 |
|
Serendipity
|
bfd114d80f
|
refactor: 全面代码质量提升 — StringList→string[], strict 模式, 死代码清理
架构重构:
- StringList 类替换为不可变 string[](消除 dataVersion hack,Zustand 自然检测变化)
- UndoRedoManager.undo/redo 返回新数组而非原地修改
- 删除 dataVersion 字段和 _bumpVersion()
- 启用 TypeScript strict 模式
死代码清理:
- 删除 string-list.ts, string-list.test.ts, use-path-validation.ts
- Rust AppError 保留供未来使用
功能修复:
- importFromJson 添加 try/catch
- handleClean 使用真实格式验证替代 () => true
- savePaths 保存前调用 backup_registry,处理部分保存失败
- importFromJson 校验非 object 类型输入
i18n 完善:
- MergePreview/StatusBar 硬编码中文 → t() 调用
- 新增 merge.* 和 status.* 翻译键
Rust 改进:
- registry.rs 抽取 load_paths/save_paths 通用函数,消除重复
- registry 新增 6 个单元测试(split/join/roundtrip)
- backup.rs 时间戳加毫秒防覆盖,回退路径改为 home_dir
元数据:
- package.json 名称→patheditor, 版本→4.0.0
- 新增 CHANGELOG.md
- 移除 UndoRedoButtons 废弃注释
- tsconfig 添加 strict:true
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-26 00:26:27 +08:00 |
|
Serendipity
|
48129a8908
|
feat: 重写为 Tauri + React + TypeScript (v4.0)
完全移除旧 C+IUP 代码,改用 Tauri 2.x + React 19 + TypeScript + Rust 技术栈重写。
功能与 v3.1 完全等价:
- React 前端:Tailwind CSS 4、Zustand 状态管理、i18next 国际化
- Rust 后端:winreg 注册表读写、Win32 API FFI 调用
- 核心逻辑:StringList、UndoRedoManager、PathManager、Import/Export
- 深色模式、中英文切换、键盘快捷键、合并预览
- 66 个 Vitest 单元测试
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-25 18:33:04 +08:00 |
|
Serendipity
|
cdcfd8e0a7
|
feat: CSV 导入导出、导入撤销支持及多项 bug 修复
功能:
- 新增 CSV 格式导入导出支持(含 BOM 处理、引号转义、智能标题行检测)
- 导入操作支持撤销/重做
- 保存时 PATH 长度检查与警告
- 深色模式状态持久化(darkmode.txt)
- 提取 get_current_target/push_record 为共享函数,消除控制器层重复代码
- 新增 string_list_insert_at,修复撤销删除时的索引恢复
- 新增 undo_redo、error_code、import_export 单元测试
Bug 修复:
- 修复备份目录对话框和失败原因的硬编码中文字符串
- 提取 get_exe_dir 到 os_env 消除 i18n.c/ui_utils.c 重复定义
- 修复导入撤销 old_sys/old_user 内存管理(push 后置 NULL 防止重复释放)
- 修复 CSV 导出转义与导入解析不一致(移除反斜杠转义,依赖 CSV 引号机制)
- 修正 PATH 长度 8191 限制描述为 "command line safe limit"
|
2026-05-03 01:52:06 +08:00 |
|
Serendipity
|
cf19a37a97
|
feat(test): 添加单元测试框架并完善国际化支持
- 新增 CMake 测试框架配置,支持 safe_string、string_ext 和 path_manager 模块的单元测试
- 实现 Windows API Mock 机制,便于测试编码转换函数
- 添加 error_code 模块的字符串表示函数,支持英文错误日志
- 在 UI 回调函数中集成国际化翻译,覆盖新建、编辑、导入导出等操作提示
- 扩展 string_list 功能,新增重复路径检查函数
- 更新翻译文件,同步所有用户界面的中英文文本
|
2026-04-30 11:38:05 +08:00 |
|