Commit Graph

8 Commits (dev)

Author SHA1 Message Date
lijunjie e3eba338a7 借鉴 Mole 的 12 项安全架构与交互全部落地;修复启动项开关失效
- 空间清理:扫描实时计数(已统计 N 文件 · X,进度封顶 99%);分类算完一个亮一个;
  清理点/文件行「X 未使用」休眠标签;node_modules 可删依据面板(锁文件/安装记录/
  手改检测/Git/年龄);低风险走底部绿色内联确认条(Esc 取消),对话框新增
  「刚刚逐路径复核过」审计面板;结果页按原因分组展示未处理项并给下一步按钮;
  清理清单导出 Markdown(含依据与受保护项)。
- 存储空间:新增「隐藏的吃空间大户」(更新缓存/休眠/页面文件/WinSxS/手机备份/旧下载);
  文件夹测量缓存 10 分钟 + 新鲜度标注 + 重新测量,删除后缓存自动作废。
- 引擎:微信/QQ 聊天文件、浏览器 IndexedDB 离线数据、搜狗词库等个人文件在扫描结果
  以待解锁行呈现且删除层强制拒删;preflight 删除前逐路径复核;白名单消费审计
  (设置页标注每条规则最近是否命中)。
- 修复:权限管理开机启动项开关点击无效/弹回——StartupApproved 标记改用最小注册表
  权限写入(原 KEY_ALL_ACCESS 在安全软件驻留的机器上直接被拒),拒绝访问时自动
  UAC 提权重试并回读核实;计划任务/服务同样支持提权通道;开关失败新增红色气泡。
- 无头浏览器 29 项点击断言全过;cargo test/clippy/fmt、pnpm check/build 全绿;0.1.10 重新打包。
2026-11-20 18:54:02 +08:00
lijunjie d32d4f64f2 深度清理死目录回退主目录、错误横幅可见;托盘左键/双击直达主界面
- purge resolve_roots:所选目录全不存在时回退 settings+home,不再 NothingToDo;PurgePage 增加「浏览…」多选与 error-banner(此前扫描错误被吞)
- 托盘 show_menu_on_left_click(false)+TrayIconEvent:左键单击/双击打开主界面,右键弹菜单
- CLI 实测死根回退:找到 8 个构建目录 632MB;重新打包(sha256 f259188d…)
2026-11-19 14:37:21 +08:00
lijunjie a3253ad38f Squid 0.1.10:升级安装包清理、CPU 面板、回收站文案与桌面小工具降占用
- 清理新增「升级安装包」分类:已知应用精确规则(微信/企微/WPS/网易邮箱等)+ AppData 启发式扫描;只匹配安装包形态、≥7 天、1MiB 起,运行中应用锁定;删除确认弹条「跳过升级包,只删其余」
- 桌面小工具新增 CPU 面板:总占用曲线 + 整行逻辑核心渐变柱(绿→黄→橙→红连续插值,悬停显示核心 N 百分比,0 起编号,柱宽随核心数自适应)
- Windows 上「废纸篓」文案全链路改为「回收站」(bootstrap.binNoun 驱动,macOS 不变)
- 常驻 CPU 优化:轻/全两档采样(system_snapshot(full))、双窗口共享 2s 采样缓存、主窗口收托盘与小工具折叠时完全停止轮询
- 修复小工具自适应尺寸→重锚定 IPC 死循环(主进程+渲染进程空转、每循环写一次 widget.json);同时修复由此摘除 prefs 依赖引入的面板高度不自适应回归
- 版本升至 0.1.10(4 处同步),release/0.1.10 全套发布文件(安装包/便携包/SHA256/更新清单/一键安装.bat)
2026-11-19 00:08:56 +08:00
lijunjie 67a68b4fbb Squid 0.1.6-0.1.9: 权限管理、桌面小工具、概览/卸载修复
权限管理(新增页):开机启动项按软件分组 + 中文软件名 + 每行图标;
右键菜单对齐电脑管家颗粒度(文件/文件夹/桌面/驱动器/所有对象 横向
分类导航、创建者列、模块图标、占位名回退安装目录名、系统内置过滤、
模块去重);弹窗拦截(窗口/规则图标、一键建规则、常驻观察者)。
数据源 crates/squid-platform/src/permissions.rs + src-tauri manage.rs。

桌面小工具(新增,仿飞牛):桌面层无边框窗口(HWND_BOTTOM,压在
壁纸上、其他窗口下),运行状态圆环 / 网络与磁盘曲线 / 存储空间条,
独立面板开关、不透明度(90-100)、频率、停靠角、折叠记忆、拖拽位置
持久化;主界面「桌面小工具」管理页 + 托盘开关;widget.json 持久化。
src-tauri/src/widget.rs、src/pages/Widget{Window,Page}.tsx、
src/components/WidgetPanels.tsx。

概览页:本机配置面板(主板/CPU/内存条/硬盘型号/显卡,原生 API 读取)、
Windows 11 版本识别修复(构建号规则)、盘符百分比、无滚动的紧凑布局。
squid-platform hardware_info + squid-stats gpu_usage 字段。

卸载应用:EstimatedSize/实测目录修复 0 B;应用图标(DisplayIcon 解析、
老图标 AND 掩码、.lnk 目标跟踪)。

安装:NSIS 自定义模板静默覆盖升级(不弹卸载旧版页,继承安装位置与
%APPDATA% 配置);管家环境发布必带 一键安装.bat(复制到 C 盘 %TEMP%
再启动,docs/RELEASE.md 记录);release/0.1.6-0.1.9 归档。

测试:scracth 目录写入被端点防护拒绝时优雅跳过(core/engine/rules/tui);
widget 序列化契约 3 个新单测;工作区 199 测试全绿。
2026-11-18 11:52:36 +08:00
mula.liu 69dd3b5456 Stop matching path separators in suffixes
The purge test compared rendered path strings against `demo/node_modules` and
friends, so on Windows every positive assertion failed and the negative one —
`loose/dist` must not be offered — passed for the wrong reason. Assertions now
compare trailing components, which is what they meant all along and holds on
both separators.

`category_index` made the same assumption in production: it lowercased the path
and looked for `/library/caches`, so a leftover root was only ever reclassified
on the OS whose separator it was written for.
2026-10-15 16:51:00 +08:00
mula.liu 13dfcce22f Windows-friendly elevation hints
- new squid_core::elevation_hint(): sudo on Unix, elevated Administrator
  terminal on Windows; used by the locked-item notes in clean/uninstall
  and the user-only safety refusal.
- the Permission error no longer tells Windows users to grant Full Disk
  Access (a macOS-only concept).
2026-10-15 15:26:12 +08:00
mula.liu 122e81cb4d Windows: real platform layer, recycle-bin trash backend, cross-compile CI
- squid-core: trash moves behind a platform seam — Windows recycles via
  IFileOperation (shell owns $Recycle.Bin bookkeeping; ledger records no
  physical path there), Unix keeps the rename/copy path untouched
- squid-core: default cleanup anchors per platform; Unix-only helpers
  (getuid, statvfs-style trash dirs, symlink copy) gated
- squid-platform: windows.rs rewritten — installed apps from the uninstall
  registry (HKLM 64/32-bit views + HKCU, SystemComponent/patch filtering),
  BIOS/NT version keys for hardware/OS strings, sysinfo for volumes and
  running processes; winreg replaces the PowerShell stub
- squid-stats: COMPUTERNAME hostname off-unix; battery parsers gated
- CI: .gitlab-ci.yml with a Linux job that cross-checks the whole workspace
  against x86_64-pc-windows-msvc, plus a manual tagged Windows job driven by
  scripts/ci-windows.ps1 (build + test on a real machine)
- host (macOS) tests, clippy -D warnings and fmt stay green
2026-10-15 14:56:55 +08:00
mula.liu 54585ffc40 squid 0.1.0: macOS 磁盘清理(CLI + TUI) 2026-10-13 17:00:50 +08:00