Files
PathEditor/CHANGELOG.md
T
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

39 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Changelog
## v4.0.0 (2026-05-26)
### 重大变更
完全重写为 Tauri 2.x + React 19 + TypeScript + Rust 技术栈,替代原有的 C + IUP GUI。
### 新增
- 现代 Web UIReact + Tailwind CSS 4 + Zustand
- 深色/浅色模式切换
- 中英文界面即时切换
- 路径有效性颜色编码(红色无效、橙色重复)
- 环境变量展开悬停提示
- 文件夹拖拽添加路径
- 保存前 PATH 长度检查
- 66 个前端单元测试 + 10 个 Rust 单元测试
### 改进
- 安装包体积从 ~3MB 降至 ~8MB(含 WebView2 运行时)
- 完整撤销/重做支持(8 种操作类型,50 步历史)
- JSON/CSV/TXT 三种格式导入导出
- 合并预览查看系统+用户路径
- 类型安全:TypeScript strict 模式 + Rust 编译期检查
### 移除
- 旧 C + IUP + Lua + gettext 代码库
- Lua 配置引擎 → JSON 配置文件
- gettext 国际化 → i18next
### 已知限制
- 需要 Windows 10+ 系统预装的 WebView2 运行时
- 内存占用约 50MB(旧版约 15MB)
- 文件系统路径验证在清理功能中为同步检查(不含实际目录存在性验证)