Serendipity
|
a9b36a6f47
|
重构(应用状态存储): 调整savePaths返回结构化结果并更新所有调用处
- 新增SaveResult类型统一标准化保存操作的结果状态
- 修改savePaths函数返回结构化结果而非布尔值,完善长路径超限、部分失败等场景的处理逻辑,部分失败时重新加载路径避免状态偏移
- 更新useAppActions与ProfileDialog的保存逻辑,适配新API并添加长路径确认弹窗
- 补充相关测试用例,修正导入导出测试的版本号预期
|
2026-05-31 14:48:03 +08:00 |
|
Serendipity
|
21af2683ac
|
chore: 全面代码审查修复 + 开源标配完善
## 审查修复 (18 项)
- TitleBar 版本号改为动态 import package.json
- CLI profile_apply 加 verify_and_save 原子性保护
- CLI 新增 profile rename 子命令
- cmd_clean 默认清理 system+user 两个 hive
- Rust import_csv 加 BOM/header 处理
- exportToJson/exportToCsv 保留 enabled 状态
- CLI version 使用 env!("CARGO_PKG_VERSION")
- export_paths 返回 Result, 未知格式报错
- importFromContent 未知扩展名 throw Error
- profile 文件名加路径遍历/Win保留字校验
- 数据路径统一到 ~/.patheditor/
## clippy (18 处修复)
- backup/scanner/system/profiles: empty_line_after_doc_comments
- profiles: needless_borrow ×5, unnecessary_map_or
- scanner: collapsible_if
- cli: nonminimal_bool ×6, implicit_saturating_sub, to_string_in_format_args
- 零警告通过
## 测试 (33 条新增)
- Rust: backup(3) + disabled(1) + fs(13) + scanner(4) + profiles(1) = 25 条
- 前端: merge-preview(2) + analyze-dialog(1) + import-parity(5) = 8 条
- Rust 10→35, 前端 72→80
## Scanner 并行化
- std::thread::scope 多线程并行扫描目录,N 倍性能提升
## expand_env_vars UTF-16 修复
- 非法码点编码为 \u{XXXX} 而非静默丢弃
## 开源标配
- CODE_OF_CONDUCT.md (Contributor Covenant 2.1)
- SECURITY.md (漏洞报告流程)
- .github/PULL_REQUEST_TEMPLATE.md
- CONTRIBUTING.md (贡献指南)
- CHANGELOG.md (v4.0~v5.0)
## E2E 测试 (4 条新增)
- keyboard / analyze / profiles / import-export
- IPC mock 扩展 scan/profiles 命令
## CI
- Rust job 目录调整为 workspace 根
## 其他
- rustdoc: 8 个 pub fn 补文档注释
- 帮助文本 v4.0→v5.0
- 前后端导入逻辑加交叉引用注释
- .gitignore 添加 target/
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-29 01:13:21 +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
|
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
|
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 |
|