Commit Graph

21 Commits (e9280208317e80c5baa6ae2002de2a260a8a49c5)

Author SHA1 Message Date
mula.liu 16914f29d8 发布 0.1.15:Windows 卸载调用系统卸载程序并修复应用图标
- Windows 卸载改用应用注册的卸载命令,MSI 使用 msiexec /x,并在完成后清理残留注册表记录
- 从 InstallLocation、MSI、DisplayIcon 与卸载程序路径推断安装目录,修复 0 B 与无法卸载
- Program Files 应用不再被误判为无权限,卸载后自动刷新列表并保留结果摘要
- Windows 与 macOS 应用列表优先显示真实图标,条目键回退到注册表键
- 版本与发布文档更新到 0.1.15
2026-11-30 15:49:56 +08:00
mula.liu 51f9fdb085 Merge dev: consolidate navigation and absorb 0.1.13 features
- Space cleaning becomes one hub with junk / duplicates / large files tabs.
- System maintenance becomes one hub with repair / privacy / optimisation tabs.
- Permissions gains grouped startup entries, leftovers, advanced entries and
  grouped context-menu handlers.
- Desktop widget gets its own page and the desktop watch loop.
- Keep the security scan, quarantine and allowlist stack from main, and keep
  the tabbed settings page with its security section.
- Navigation: 维护 / 安全 / 洞察 / 桌面, with history and settings pinned at
  the bottom. Legacy cleanup/purge/storage/startup deep links map to the new
  pages.
- Remove second-level descriptions under page titles and trailing periods.
- Version 0.1.13 to match the merged feature set.
2026-11-25 17:30:48 +08:00
lijunjie 56ee563dee 重复文件扫描跳过 .workbuddy\workspace\sessions 子树
智能体会话快照整棵目录不参与查重,任意盘符、忽略大小写,按连续路径
段匹配;新测试覆盖命中与不误伤两种形状。0.1.13 重新打包同步哈希。
2026-11-25 14:24:35 +08:00
lijunjie 507b81f74a 修复权限管理扫描闪出黑色命令行窗口 + 精简开机启动项芯片标签
- 批量签名核验(signature_grades)调用 powershell.exe 漏了 CREATE_NO_WINDOW:
  Squid 是无控制台 GUI,拉起控制台程序 Windows 会新建窗口——即用户看到的
  "打开权限管理就弹一个黑窗口"。加 0x0800_0000 静默(该函数被开机启动项
  与进阶启动项共用,一处修复两处生效)
- 同类漏网堵上:清理扫描的 git 状态探测(purge.rs run_git/run_git_raw)
  同加隐藏窗口标志;全仓 Command::new 审计其余调用点均已带标志或平台无害
- 开机启动项软件组标题精简:删除来源(注册表/启动文件夹/计划任务/服务×N)、
  触发时机(开机后/登录后/后台常驻)、签名等级(微软/签名有效/未签名/无效)
  芯片与行内签名芯片;仅保留红色「N 个残留」警示与行内 已启用/已禁用/残留
  状态标签——来源与路径明细每行本来就有
2026-11-25 09:18:22 +08:00
lijunjie eca5c836b5 启动项残留检测与 MangoDisk 化改造、重复文件保留副本可删、大文件隐藏页面文件、清理按钮配色修复
- 权限管理·开机启动项:状态筛选段(全部/已启用/已禁用/残留,带实时计数)、「显示系统项」开关(微软签名或 %SystemRoot% 项折进系统组件组)、每组来源芯片(注册表/启动文件夹/计划任务/服务 ×N)与触发时机芯片(开机后/登录后/后台常驻)、签名等级芯片;残留项红框分组 + 行内「删除启动项」+「打开所在文件夹」,展开行显示完整命令行,删除前二次确认说明只删配置不动文件
- 平台层:StartupEntry 新增 target/targetExists/trigger/systemItem/signature/signer;lnk 解析复用同一遍缓存判定程序是否仍在磁盘(相对路径不误报);计划任务按 BootTrigger/LogonTrigger 判定开机后/登录后,服务按 Start 判定;签名核验抽成 advanced::windows::signature_grades 批量共享(一次 PowerShell 进程覆盖整页),启动扫描复用之
- 删除启动项:注册表值/启动文件夹快捷方式/计划任务删除(拒绝访问时走一次性 UAC 并复核),残留服务改为禁用而非卸载;新命令 startup_remove_entry + 前端 removeStartup(ids)
- 重复文件:保留副本复选框开放勾选,勾选后行与芯片转琥珀警示、组头「本组将一份不剩」、汇总条计数、确认条变红并要求「确认完全删除」;锁定的个人文件仍不可选
- 大文件:卷根的 pagefile.sys/swapfile.sys 不再列出(系统持有、删不掉),hiberfil.sys 保留并在说明里提示关闭休眠可释放;新增单测
- 样式:移除 .dup-clean 深红字覆盖(红底压深红字不可读),回归全局 is-danger 白字渐变;页面级按钮配色覆盖列为禁止项

Demo 点击测试 34 断言全过(保留勾选→后端 selection、残留筛选/删除调用、系统项开关、筛选计数)
2026-11-24 21:36:45 +08:00
lijunjie cdc60fbe6d 卸载增强:来源徽章、安装不完整检测与残留记录清理(G2 完成 C 批)
- AppInfo 新增 uninstall_string/reg_key/dead 字段(serde default,全平台默认值)
- Windows 卸载扫描:MsiQueryProductStateW 探测 MSI 产品状态,安装目录与卸载器双缺失 → 「安装不完整」
- 包管理器来源徽章:winget/scoop/Chocolatey/JetBrains Toolbox/Microsoft Store 按路径指纹识别
- 死应用卸载方案:幽灵 bundle 行改为锁定说明,新增 app_remove_record 命令删除孤儿注册表记录(HKLM 走一次 UAC 提权 reg.exe,HKCU 进程内直删)
- 应用页 UI:安装不完整红色徽章 + 包管理器来源徽章 + 清理残留引导卡
- AI 模型体积诚实化:manifest 行只带自身字节,cluster 总额写入 note,杜绝 清理点 求和双计
- 修正 squid-engine Cargo.toml 误置的 libc 依赖段
- demo 点击测试扩至 53 项全过(隐私锁定/永久删除、优化开关与恢复默认、进阶启动项签名徽章与开关、卸载徽章与残留清理)
2026-11-24 11:43:17 +08:00
lijunjie 337f309c2a C 批(上):隐私清理独立页 + 系统优化 tweaks 目录 + 进阶启动项页签
隐私清理(F1,新一级页面,与空间清理动机不同):
- 新引擎 privacy.rs:Edge/Chrome 浏览记录与 Cookie(含 sqlite journal/WAL 侧文件、
  Session Storage)、最近使用/跳转列表、剪贴板历史(Win+V)、活动历史(ConnectedDevices)
- 浏览器在运行时整条打 🔒 锁(扫描期判定,删除期复校);删除有意绕过回收站
  (profile 半恢复更糟),但逐条写入历史 ledger 供审计;全部默认不勾选

系统优化(F2,新一级页面):
- 新引擎 tweaks.rs:声明式可逆目录 5 项(透明效果/显示扩展名/小组件Web/位置/最近文件),
  每项注册表 key+value+on 值数据化;首次修改前记录原值到 tweaks.json,「恢复全部默认」逐字节还原
- 仅 HKCU、仅真机验证过的低争议项;已是目标值时不写不记录(不谎报更改)
- tweaks_states/set/restore_all 命令 + OptimizationPage

进阶启动项(G1,权限管理新页签):
- 新 squid-platform::advanced:Winlogon Shell/Userinit、AppInit_DLLs、IFEO Debugger、
  BHO 扫描;每项带数字签名信任(批量 Get-AuthenticodeSignature:微软/厂商/未签名/失效)
  与位置说明、风险警示
- 禁用记录原值到 advanced-backup.json 可恢复;自动服务复用现有 startup_set_enabled
- 懒加载:签名批量核验仅在打开该页签时跑一次
2026-11-24 11:17:35 +08:00
lijunjie e6a1c037a9 B 批:AI 工具与模型清理分类 + 系统维护一键修复页
AI 工具与模型(E1,空间清理新分类):
- 新引擎 ai.rs:Ollama 逐模型一行(解析 manifest 精确归属 blob,共享层不重复计费、
  注明被谁占用),HuggingFace hub 缓存逐仓库一行,Codex/Claude/ChatGPT 桌面缓存与更新包
- 铁律:模型永不默认勾选(note 带最近使用时间 + 重新下载提示),缓存类正常默认勾选
- Category ai-tools 走 clean::scan 流;空间清理按模型/仓库拆清理点

系统维护(E2,新一级页面):
- 新引擎 maintenance.rs:受控命令白名单 6 项(重建搜索索引/图标缓存/网络栈+DNS/
  音频服务/Win更新组件/SFC+DISM),固定 argv 永不拼 shell,每项带风险与预计耗时
- 提权命令走 Start-Process -Verb RunAs 代理;直接命令流式输出 + 超时预算熔断
- 同类任务全局互斥(maintenance_run 锁),运行中实时日志、完成逐步骤汇报
- maintenance_tasks/maintenance_run 命令 + MaintenancePage 页面 + 侧栏入口

demo 点击测试扩到 29 条断言全过;引擎测试 44 条全过
2026-11-24 11:00:13 +08:00
lijunjie ef15297e4d A 批:重复文件三级漏斗 + 大文件独立页 + 存储空间矩形图(学习 MangoDisk,保留回收站护城河)
重复文件(D1/D2):
- 新引擎 duplicates.rs:大小分组 → 头中尾 16KiB 采样哈希 → 全量 SHA-256 三级漏斗,
  哈希按 路径+大小+mtime 落盘缓存(hash-cache.json),重扫只算变化的文件
- 每组确认即流式推入结果(Event::Group),扫描不再是不透明转圈;漏斗各级淘汰数实时计数
- 智能选择每组保留一份(路径最短/最早两种策略),微信 FileStorage 副本自动标个人文件、不默认勾选
- 删除走唯一 delete::execute:安全复校 + 回收站 + 历史撤销;全卷安全放宽(with_volume_wide_safety)
- squid dupes CLI 子命令;真机 34k 文件冷扫约 1s,正确识别 23 组重复

大文件(D3):
- analyze::large_files 多盘阈值+类型过滤扫描;休眠标记、网盘可能有副本提示、镜像占用锁定、隐藏系统关键文件
- large_files_scan/delete 命令 + 独立页面,删除同样进回收站

矩形图(D4):
- 纯前端 squarify treemap(~130 行,无新依赖),与列表共用 storage_explore 缓存,秒开、点块下钻

共享改动:Category 新增 duplicates/ai-tools/privacy + Event::Group 流式事件;进度事件带 bigfiles/duplicates 文案
2026-11-24 10:46:58 +08:00
lijunjie 6a664515b3 深度扫描目录改为全自动发现,界面撤掉目录配置(学习 Mole 零配置)
- 引擎自动发现项目容器:各固定磁盘根下一层的 repos/code/dev/projects/
  work/src/documents 等目录(大小写不敏感、去重),主目录本体浅层兜底;
  不存在的目录概念从此消失,settings.toml 里手写 purge_roots 仍作追加生效。
- 空间清理页「深度扫描目录」从按钮+弹层改为一行说明「自动发现:桌面、
  文档、各磁盘根目录下的项目目录(无需设置)」;概览页智能扫描同步传空。
- 移除 roots_status 命令与前端弹层组件;内置默认 purge_roots 清空。
- 实测本机 dry-run:自动发现 4 处根、命中 21.36 GB 构建产物(此前配置清单
  15 处里 14 处不存在)。无头断言:静态说明渲染、弹层入口消失、
  purge_scan 收到空 roots。fmt/test/clippy×2/pnpm check+build 全绿。
2026-11-21 10:51:53 +08:00
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
mula.liu cea60cc6c1 Release Squid 0.1.9 with low-CPU desktop monitor
Merge the dev monitor optimizations on top of the unreleased 0.1.8 desktop work: shared light snapshots, visibility-aware polling, CPU history/per-core panel, and a resize/redock guard that stops the widget IPC loop.

Also carries the desktop widget, permissions/security, storage-volume fixes, update-installer cleanup category, tray template icon, and Windows Recycle Bin wording.
2026-11-19 10:21:43 +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 8490f9213c Release Squid 0.1.7 with redesigned overview and corrected system metrics 2026-11-08 10:09:13 +08:00
mula.liu eb8f899fe0 Release Squid 0.1.6 with malware scanning and startup management
Adds the Protection half of the app: a Security page (quick / full / custom
scans, findings by confidence, quarantine and restore) and a Startup items
page (LaunchAgents, login items, registry Run, scheduled tasks, services),
plus a Processes tab on the real-time monitor that joins a running process to
the entry that launched it. XProtect and Defender stay the real-time
protection — Squid only reads what they report, uploads nothing, and installs
no daemon, kext or privileged helper.

On the interface, the two new screens reuse the vocabulary the older screens
already had instead of starting a second one: `.panel`, `.status-chip`,
`.search-field`, `.icon-button`, `.text-button`, `.metric-icon` with `tone-*`,
`.settings-row`. Findings, startup entries and quarantined files share one row
shape, so a row is one definition for three screens. Explanatory copy was cut to
one sentence per screen and per control, and a count now sits on the filter that
produces it rather than also in a summary line above.

Two defects fixed on the way:

- `src-tauri` is excluded from the root workspace and had no `[profile.release]`
  of its own, so no desktop build had ever been stripped; the universal binary
  is 20.6 MiB smaller now. `panic` stays unwind — turning a failed request into
  a dead app is not a change this release should be making.
- The schedule note was built in Rust as an English string, so a Chinese
  interface showed "squid only scans when you ask." beside everything else in
  Chinese. The schedule is now described once, in the frontend, in both
  languages.
2026-11-07 11:09:37 +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