Commit Graph

8 Commits (dev)

Author SHA1 Message Date
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