Serendipity
|
21da3b2930
|
fix: v5.1 代码审查修复 — ESLint/CSV/测试隔离/CLI 去重
- ESLint: 迁移到 flat config ignores,删除已废弃的 .eslintignore
- CSV: Rust/TS 格式对齐,统一 type,path,enabled 3 列
- JSON: 导入导出统一为 {path, enabled} 对象格式
- scanner: 移除未使用的 max_threads 死代码 + TempDirGuard 测试清理
- profiles: rename_profile 添加目标存在检查
- CLI: 抽取 load_operate_save helper,简化 cmd_remove/cmd_edit
- PathTable: 抽取 usePathValidation hook,消除 set-state-in-effect
- 测试隔离: disabled/profiles 通过 #[cfg(test)] 重定向到 temp dir
- toolchain: 新增 rust-toolchain.toml 固定 stable-x86_64-pc-windows-gnu
- docs: 更新 CLAUDE.md/README.md 测试计数 + 架构树
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-30 17:31:04 +08:00 |
|
Serendipity
|
bce2dc8641
|
fix: E2E mock 统一 + CSV 引号字段解析
E2E:
- createIpcMock 支持 overrides 参数,保持 default: throw 行为
- search-clean.spec.ts 删除 30 行内联 mock,改用 createIpcMock(overrides)
Rust:
- 新增 parse_csv_line: 支持引号包裹字段 + 双引号转义 (RFC 4180 子集)
- import_csv 改用 parse_csv_line 替代 split(',')
- 与 TS 端 parseCsvLine 逻辑对称
测试: Rust 48 → 52 (+4), Frontend 100
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-29 23:51:28 +08:00 |
|
Serendipity
|
461ef231e4
|
test: useAppActions 15 个测试用例 — 覆盖全部导出函数
handleNew / handleEdit / handleDelete / handleMoveUp / handleMoveDown
/ handleClean / handleImportSelect / handleNewConfirm / handleEditConfirm
/ handleSave (正常 + 超长确认)
前端测试: 85 → 100
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-29 23:38:38 +08:00 |
|
Serendipity
|
e5b348bb9b
|
fix: e2e 类型声明 + ESLint 覆盖 e2e + backup 路径校验 + DX 脚本
- e2e/global.d.ts: Window.__TAURI_INTERNALS__ 类型声明
- e2e search-clean: 未使用参数 _args 前缀
- tsconfig.test.json: include e2e/
- CI: ESLint 扫描范围扩展到 e2e/
- backup_registry: 拒绝写入系统目录 (C:\Windows\, C:\Program Files\)
- package.json: 新增 lint:fix / format 脚本
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-29 23:23:51 +08:00 |
|
Serendipity
|
cbf99f12fd
|
v5.1: 全面代码审查修复 — 安全加固 + 功能修复 + 测试补全 + 工程化
安全修复 (CRITICAL):
- 启用 CSP (default-src 'self')
- read_text_file 限制文件扩展名白名单 (.json/.csv/.txt)
- capabilities 显式声明窗口权限
- profile 名校验增强 (null 字节/控制字符/长度限制)
功能修复 (HIGH):
- AnalyzeDialog 重新打开时正确刷新数据
- UndoRedoButtons 订阅路径长度变化确保响应性
- 禁用状态持久化错误处理 (.catch → console.warn)
- 硬编码中文全部迁移到 i18n (6 处)
- PATH 长度检查改用 UTF-16 字符计数
- PATH 写入前 null 字节校验
- CLI export 拒绝写入系统目录
- savePaths 职责分离: window.confirm → Tauri ask() 对话框
代码质量 (MEDIUM):
- 导入路径统一过滤 (sanitize_paths: null 字节/分号/空白)
- 原子写入 (atomic_write: disabled.json + profiles)
- 验证缓存自动清理 (PathTable useEffect)
- Scanner 线程错误处理改进 (.unwrap → .map_err)
- Ctrl+F 去重 (移除 use-keyboard 重复处理)
- Profile 路径列表 key 修复 (index → path)
- 生产构建启用日志插件 (Warn 级别)
- export_paths JSON 序列化改 expect
测试:
- Rust: 35 → 48 测试 (+13)
- Frontend: 80 → 85 测试 (+5)
- Vitest 全局 jsdom + 覆盖率阈值 (80%)
- 安装 @vitest/coverage-v8 + test:coverage 脚本
- 移除未使用的 @testing-library/jest-dom
工程化:
- CI 添加 Cargo 缓存 (Swatinem/rust-cache@v2)
- CI 添加 cargo fmt --check
- tsconfig.test.json 覆盖测试文件类型检查
- cargo fmt 全量格式化
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-29 23:17:27 +08:00 |
|
Serendipity
|
5c73321ce6
|
fix: 修复 ESLint set-state-in-effect 错误 — useEffect 加 prevOpen 守卫
CI / Rust 检查 (Check + Clippy + Test) (push) Has been cancelled
CI / 前端检查 (TypeScript + Lint + Test) (push) Has been cancelled
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-29 17:02:55 +08:00 |
|
Serendipity
|
44cd6c6595
|
fix: CI 修复 tsc 项目引用 + ESLint 限制扫描范围 + 新增 .eslintignore
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-29 16:53:52 +08:00 |
|
Serendipity
|
44a4a4ccf3
|
docs: CLI 命令从 17 增到 18,profile rename 补入参考文档
CI / 前端检查 (TypeScript + Lint + Test) (push) Has been cancelled
CI / Rust 检查 (Check + Clippy + Test) (push) Has been cancelled
Release / 构建 NSIS 安装包并发布 (push) Has been cancelled
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
v5.0.0
|
2026-05-29 11:27:22 +08:00 |
|
Serendipity
|
dc36d63302
|
refactor: CLI 二进制名从 patheditor-cli 改为 patheditor
添加 [[bin]] name = "patheditor",安装后即可直接使用 patheditor 命令。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-29 11:21:18 +08:00 |
|
Serendipity
|
6822ab9f3e
|
docs: 架构图补充 CLI 流程 — 总览图加 clap/原子性 + 新增 CLI 操作时序图
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-29 08:17:35 +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
|
7aa5dcd832
|
docs: 更新 README 反映 v5.0 workspace 架构 + CLI 命令行
CI / 前端检查 (TypeScript + Lint + Test) (push) Has been cancelled
CI / Rust 检查 (Check + Clippy + Test) (push) Has been cancelled
- 项目结构改为 core / gui / cli 三 crate
- 新增 CLI 命令行使用说明
- 更新构建命令和技术栈
- 修正安装包名称
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-28 23:59:14 +08:00 |
|
Serendipity
|
9b5b57a3ac
|
fix: CLI 写操作加原子性保护 — 保存前重新读取注册表对比
所有修改命令(add/remove/edit/move/clean/import)在保存前重新读取
注册表,与操作前加载的值对比,不一致则报错退出,防止覆盖其他进程的修改。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-28 23:56:50 +08:00 |
|
Serendipity
|
1320aa57a8
|
fix: 架构审查修复 — broadcast、目标校验、import_csv 警告、workspace 元数据统一
- HIGH: CLI 所有修改命令补 broadcast_env_change()
- HIGH: --system/--user 互斥校验,不再静默忽略
- MEDIUM: gui/Cargo.toml 删冗余 serde_json(log 保留,lib.rs 实际使用)
- MEDIUM: import_csv 对跳过行输出 log::warn
- MEDIUM: ProfilePathEntry 从 core 重导出
- LOW: Cargo workspace.package 统一元数据
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-28 23:52:31 +08:00 |
|
Serendipity
|
a553a16a64
|
feat: CLI 补全至 GUI 功能 100% 对等 — 新增 9 条命令
新增: edit, move-up, move-down, clean, enable, disable, import, export, backup
core: registry.rs +clean_paths, fs.rs +import_paths +export_paths
CLI 特有增强: move-up/move-down 支持 --steps N 一次移动多格
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-28 23:43:05 +08:00 |
|
Serendipity
|
c181fe15d4
|
fix: 删除残留的 src-tauri 目录(已重命名为 gui)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-28 23:30:22 +08:00 |
|
Serendipity
|
36e1c89b2e
|
fix: 审查修复 — save_profile 保留原始 created、&str 参数、clippy 清理
- CRITICAL: save_profile 覆盖已有配置时保留原始创建时间
- HIGH: profiles.rs 函数参数 String → &str(减少不必要的克隆)
- MEDIUM: 修复 18 个 clippy警告(空行 + map_or + collapsible-if)
- CLI: 移除不必要的 name.clone() 调用
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-28 23:26:54 +08:00 |
|
Serendipity
|
812f39b159
|
refactor: src-tauri 重命名为 gui
Tauri CLI 自动检测 workspace 成员,构建不受影响。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-28 23:19:14 +08:00 |
|
Serendipity
|
cd896d389b
|
refactor: 提取 core 库 + 新增 CLI 版本
- 创建 Cargo workspace(core / src-tauri / cli 三 crate)
- core: 纯 Rust 库,零 Tauri 依赖,包含所有业务逻辑
- src-tauri/commands: 改为薄包装,调用 core 函数
- cli: 基于 clap 的命令行工具,支持 JSON 输出
- CLI 命令: list, add, remove, conflicts, scan, profile, check-admin
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-28 23:13:28 +08:00 |
|
Serendipity
|
5a864c41b2
|
chore: 版本号统一升级至 5.0.0
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-28 22:46:14 +08:00 |
|
Serendipity
|
986fe7f0d9
|
docs: README 用 Mermaid 流程图替换截图占位符 — 架构图、组件树、操作流程
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-28 21:54:53 +08:00 |
|
Serendipity
|
9c74c61d64
|
chore: 版本号统一升级至 4.3.0
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-28 21:35:45 +08:00 |
|
Serendipity
|
26f6953919
|
fix: ProfileDialog 标题栏添加 ✕ 关闭按钮
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
v4.3.0
|
2026-05-28 21:29:50 +08:00 |
|
Serendipity
|
5ed15535e7
|
fix: 深色模式下选中行对比度不足 — 新增 CSS 变量分别适配浅色/深色主题
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-28 21:25:54 +08:00 |
|
Serendipity
|
230fb5d741
|
fix: 配置文件目录从 %APPDATA% 改为 %USERPROFILE%/.patheditor/profiles
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-28 21:20:38 +08:00 |
|
Serendipity
|
d7d11480b8
|
feat: PATH 配置文件/预设切换 — 保存、加载、一键应用不同场景的 PATH 配置
- 新增 profiles.rs: list/save/load/delete/rename 五个 Rust 命令
- 配置文件存储在 %APPDATA%/.patheditor/profiles/<name>.json
- ProfileDialog: 保存当前 PATH、加载预览、一键应用到注册表
- 工具栏新增「配置」按钮
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-28 21:02:29 +08:00 |
|
Serendipity
|
7869886670
|
feat: 新增 PATH 智能分析功能 — 冲突检测 + 工具清单
CI / 前端检查 (TypeScript + Lint + Test) (push) Has been cancelled
CI / Rust 检查 (Check + Clippy + Test) (push) Has been cancelled
- scan_conflicts: 检测不同目录中的同名可执行文件(遮蔽冲突)
- scan_tools: 扫描各目录提供的可执行文件,支持关键词搜索
- Rust scanner.rs 后端,前端 AnalyzeDialog 弹窗
- 工具栏新增「分析」按钮
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-28 10:02:12 +08:00 |
|
Serendipity
|
49ef9c0cff
|
chore: 添加 Issue 模板、CI 徽章、修复仓库描述
CI / 前端检查 (TypeScript + Lint + Test) (push) Has been cancelled
CI / Rust 检查 (Check + Clippy + Test) (push) Has been cancelled
- 新增 bug_report 和 feature_request Issue 模板
- README 添加 GitHub Actions CI 状态徽章
- 修复仓库描述(去重,更新至 v4.2)
- 默认分支改为 main
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-28 00:46:56 +08:00 |
|
Serendipity
|
344011a02c
|
chore: 整理仓库 — 版本号统一、README 徽章更新、新增 CHANGELOG 和 CONTRIBUTING
- 版本号 4.0.0 → 4.2.0(tauri.conf.json, Cargo.toml, 窗口标题)
- README 徽章更新(tests 55→72, version 4.0.0→4.2.0)
- CHANGELOG.md 补充 v4.1 和 v4.2 变更记录
- 新增 CONTRIBUTING.md 贡献指南
- GitHub Release: v4.2.0 补充说明,旧 C 版本标记为 pre-release
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-28 00:43:36 +08:00 |
|
Serendipity
|
3aed03f599
|
fix: 修复 5 个 bug + 备份警告丢失
- BUG 1: undo/redo 后持久化 disabled 状态到 disabled.json
- BUG 2: expand_env_vars 增加缓冲区不足检测(result > required)
- BUG 3: E2E mock load_disabled_state 返回格式从对象改为数组
- BUG 4: 双 hive 保存失败时同时显示两个错误原因
- BUG 5: 导入 both 合并为单条 undo 记录(新增 IMPORT_BOTH 操作类型)
- 备份失败后保存成功时显示"保存成功(备份失败)"而非覆盖警告
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-28 00:38:32 +08:00 |
|
Serendipity
|
d7bc752b84
|
fix: release workflow 兼容已存在的 release + 版本号升到 4.2.0
CI / 前端检查 (TypeScript + Lint + Test) (push) Has been cancelled
CI / Rust 检查 (Check + Clippy + Test) (push) Has been cancelled
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 14:54:52 +08:00 |
|
Serendipity
|
c1975e836c
|
chore: 移除调试文件,更新 .gitignore
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
v4.2.0
|
2026-05-27 14:34:23 +08:00 |
|
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
|
2b372cbf89
|
chore: 添加 vitest.config.ts — 排除 e2e 测试目录,配置 @/ 路径别名
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 14:18:42 +08:00 |
|
Serendipity
|
45e2a4e584
|
test: 新增 4 条 E2E 测试 — 启动加载、CRUD撤销、禁用保存、搜索清理
|
2026-05-27 14:16:24 +08:00 |
|
Serendipity
|
ff343185c9
|
chore: 安装 Playwright + 配置 E2E 基础框架
- 安装 @playwright/test 1.60.0
- 创建 e2e/playwright.config.ts(webServer 自动启动 vite dev)
- 创建 e2e/mocks/ipc.ts(Tauri IPC mock)
- 新增 npm run test:e2e 脚本
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 14:01:47 +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
|
d6e535aa98
|
feat: UI 组件适配 PathEntry — 复选框列、禁用行灰显删除线
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 13:56:52 +08:00 |
|
Serendipity
|
e646a84291
|
feat: app-store 适配 PathEntry — 新增 togglePath、loadPaths 合并禁用状态、savePaths 过滤 disabled
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 13:49:26 +08:00 |
|
Serendipity
|
611a36fb98
|
refactor: core 模块适配 PathEntry — path-manager、import-export 类型迁移
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 13:45:05 +08:00 |
|
Serendipity
|
ab2d0da20c
|
feat: 新增 disabled.rs — 禁用路径 JSON 文件读写
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 13:44:24 +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
|
32287c0e4b
|
feat: 新增 PathEntry 类型 + TOGGLE 操作类型,undo-redo 用 PathEntry[] 替代 string[]
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 13:32:35 +08:00 |
|
Serendipity
|
71b98e308a
|
docs: 添加 v4.3 路径启用/禁用 + E2E 测试实现计划(10 个 Task)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 13:21:35 +08:00 |
|
Serendipity
|
fcd4796fee
|
docs: 添加 v4.3 路径启用/禁用 + E2E 测试设计文档
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 13:19:02 +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
|
39a95cc50d
|
fix: CI 切换到 MSVC 工具链、添加 eslint.config.js
- Rust: windows-latest 默认 MSVC,无需额外安装 GNU/MinGW
- ESLint: 添加 eslint flat config(js + tseslint + react-hooks)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 00:58:30 +08:00 |
|
Serendipity
|
44fdc2eec6
|
fix: release 改用 gh release create、ci 添加 permissions: contents: read
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 00:54:07 +08:00 |
|
Serendipity
|
6dc32dca93
|
ci: 添加 CI workflow — push 自动检查 TypeScript + Rust
前端: tsc --noEmit + ESLint + Vitest (ubuntu)
Rust: cargo check + clippy + test (windows + GNU toolchain)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 00:52:13 +08:00 |
|
Serendipity
|
a2b66d087f
|
ci: 添加 Release workflow — tag 推送自动构建 NSIS 安装包并发布
tag v* 触发 npx tauri build,NSIS 安装包上传到 GitHub Release
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 00:52:12 +08:00 |
|