Commit Graph

13 Commits (56ee563deec583baf64a2eff11bba91ee8a9f6cb)

Author SHA1 Message Date
lijunjie 6689138c9a Cargo.lock 同步 0.1.13 2026-11-24 21:41:11 +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 e802f7a231 Squid 0.1.11:洞察与维护双扩展包(重复文件/大文件/矩形图/AI 模型/系统维护/隐私/优化/进阶启动项/卸载增强 + 小工具 RDP 归位)
- 版本升至 0.1.11(4 处同步)
- release/0.1.11 全套发布文件(安装包/便携包/SHA256/更新清单/README/一键安装.bat)
- 安装包已在本机静默覆盖安装并冒烟通过(窗口标题 Squid、responding=True)
2026-11-24 14:34:26 +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 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 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 20c20128e1 Release Squid 0.1.4 with restored navigation
- Restore Deep Clean, Storage, and Real-time monitor menu entries
- Group the full sidebar navigation under Maintenance and Insights
- Reorganize README around the current desktop, CLI, architecture, and release model
- Package macOS and Windows 0.1.4 installers and update manifest
2026-11-05 14:05:21 +08:00
mula.liu 09ba6c6b36 Release Squid 0.1.3 with tray support
- Hide up-to-date messaging in the update panel
- Simplify primary navigation to Overview, Cleanup, and Applications
- Keep Squid running in the tray with cleanup and purge actions
- Package macOS, Windows, and update manifest artifacts
2026-11-05 11:40:42 +08:00
mula.liu cc678dee21 Put the price list beside the console, since both programs pay it there
The exchange that stops the TUI overflowing lived in `squid-tui`, next to
the renderer, because that is where the bug was found: several copies of one
frame left on a cp936 console, because `─│█░·…↑↓✓` cost two cells there and
one cell in the layout. But the thing that was wrong was never specific to a
renderer. It is a fact about a console — what this glass charges for a
character whose price Unicode left unsettled — and a fact about a console is
worth exactly as much to the next program that draws on it. `squid status`
draws a volume gauge by repeating `█` twenty-eight times and rules a heading
with `─`. Same price. The difference is that the command line had nobody
asking it.

So `currency` now lives in `squid-platform`, beside `console`, and says in
its own documentation why it is there rather than beside the interface: the
command line and the interface buy the same screen at the same counter.
`Exchange` is the table — indexed by code point, holding the replacement
rather than a bit saying *this one is wrong* because the character is what
the caller needs, and built only when this console actually overcharges,
which is what makes `afford` free on the terminals where there is nothing to
repair. `disputed` says which characters are worth asking about, `cheaper`
what each is worth in characters the console accepts, `witnesses` turns
pieces of chrome into the list of questions to ask. `squid_tui::glyphs`
keeps the half that cannot travel: the walk over a finished ratatui
`Buffer`, which is a question about somebody else's library, now a `Carry`
trait implemented for `Exchange` so that the table and its spending still
read as one motion.

The tests went with their subject rather than staying where the code used to
be: what a shading block costs, and what it is worth in `.`, is a question
about prices, so those seven are in `currency` now, and what is left here is
about frames — three that draw a `Buffer` and check where the borders land,
one that reproduces the original overflow, and the two that hold the
invariant worth defending, that the glyphs this interface draws and the
glyphs it asks the price of are one list. A glyph drawn but never priced
looks correct on every terminal that charges one cell for everything,
including the one it was typed on.

176 tests here — the same number as before the move, which is what a move
ought to leave behind — clean under clippy for the host and for
`x86_64-pc-windows-msvc`, and `cargo doc -D warnings` quiet over both crates.
On the box, with only this commit applied: `RESULT: OK`, and the interface
regression at 140x35 on the code page the complaint came from — 890 samples,
90 settled frames, every one measured and none rejected, box-drawing intact.

One drive-by: `Prices::implied` documented itself by linking to a private
function, which `cargo doc -D warnings` refuses, so the link names the
function instead of promising a URL to something nobody outside the module
can reach.
2026-10-16 10:31:42 +08:00
mula.liu ca53d1d140 Ask the console what it holds, and what it charges per cell
Both numbers an interface is laid out against used to be taken on trust: the
size the terminal reported, and the one column per glyph that a layout measured
in columns pays for. On the Windows console in front of us, both were wrong,
and both failures arrive at the same place — cells written past the end of a row
reappear at the start of the next one, so the screen becomes several copies of
itself at several offsets and looks like a renderer that cannot count.

`squid-platform::console` measures instead of trusting. It asks three questions
because a console has three ways to be too optimistic — the window, the buffer
behind it, and the largest window it could show at all — and it asks them of the
buffer being *shown*, because entering the alternate screen on a legacy console
activates a second buffer while the process keeps holding the handle it started
with, which then describes a screen nobody is looking at. A window wider than
the cells that exist is where the wrapping starts, so `repair` asks the console
for the cells it does have; a window that slid down its own scrollback moves the
picture without moving the size, which is why the renderer watches the offset too
and wipes rather than diffs when the screen moved under it.

The second measurement is what makes a whole screen break at once. East Asian
Ambiguous characters have no agreed price, and a console left on a Far-Eastern
code page charges two cells for exactly the class of characters an interface is
built out of: the rules, the shading, the arrows, the ticks, the middot. ratatui
charges one, so every row of the layout is longer than the glass by the symbols
it contains. `symbol_cells` writes one box-drawing bar and reads how far the
cursor moved, because the two things that decide the price — code page and
font — are both set outside this program, and `chcp 65001` moves the same bar
back to one cell on the box that charges two.

`squid-tui::glyphs` then rewrites the finished frame one column for one column:
the rules become `|-+`, the gauges `#`, the arrows `<^>v`, so the rows fit
without the layout moving at all. Chinese text and ordinary letters are left
alone — neither is ambiguous, so neither caused the overflow, and a person's
paths and process names are not what an alignment bug should be allowed to
rewrite. `SQUID_SYMBOL_CELLS` overrides the measurement for the case the
measurement cannot reach: over ssh this program measures the console sshd made
for it, not the one on the glass. `SQUID_CONSOLE_TRACE` writes the two buffer
answers side by side, since a hand-made resize leaves no other evidence.
2026-10-15 21:20:14 +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