Commit Graph

71 Commits (a47b8922a5ce3819ed2f913b03a9e58045867414)

Author SHA1 Message Date
lijunjie a47b8922a5 0.1.13 重新打包:H3C 套件归组(安装包哈希更新)
- 安装包新 sha256 7139af4d4c11c6e380cdef344d5a7eef821b5155d99d80467039a62e90db948d(3867405 字节),便携包同步
- 本机真机单测确认六项 H3C 服务全部折叠为 H3C Workspace 一组
- 已静默覆盖安装(11:06)并冒烟:主窗口 [Squid] responding=True
2026-11-25 11:07:52 +08:00
lijunjie 8ca15d5760 启动项套件归组:H3C 家族服务合并为 H3C Workspace 一组
- H3C Workspace/SpaceAgent/Device Redirect 的每个服务桩程序都不带版本字符串
  (FileDescription/ProductName 全空),此前散成一堆单行组和其他软件;
  新规则 attribute_vendor_suites:Program Files 下一家厂商拥有 ≥2 个产品
  子目录即视为套件,弱归因(无名/名字回显技术键/纯英文标签)的行折叠进
  「厂商 Workspace」组(存在 Workspace 子目录时用它命名套件产品);
  带真实人话产品名的 PE(含中文名)绝不误并
- 前端零改动:named+displayName 驱动的分组自动生效,H3C 六项服务进同一组
- 单测×3:suite_path 边界(Common Files/裸文件不算套件)、合成 H3C 布局
  折叠断言、本机真机扫描断言(无 H3C 目录的环境自动跳过)
2026-11-25 11:04:37 +08:00
lijunjie 2390b1d09a 0.1.13 重新打包:空间清理三页签扫描按钮统一(安装包哈希更新)
- 安装包新 sha256 c6bbf65fb7c98909b771f76fa25aabe544f45da51b8177704d2481b08e3995fa(3865422 字节),便携包同步
- 更新说明补「三页签统一扫描交互」条目
- 本机已静默覆盖安装(10:45)并冒烟:主窗口 [Squid] responding=True
2026-11-25 10:47:20 +08:00
lijunjie f163858344 空间清理三页签统一扫描交互语言:大号主按钮钉配置栏右侧,文案/状态机一致
- 垃圾清理:embedded 下孤悬在配置栏上方的开始/重新扫描按钮移除,主按钮
  并入配置栏右侧(与大文件/重复文件同一位置同一尺寸);扫描中按钮显示
  扫描中…;空态文案改为指向右侧按钮,去掉空态里的重复入口
- 重复文件:主按钮文案 开始查找 → 开始扫描,升级为大号 + 扫描图标,
  扫描过之后变 重新扫描(与另两页同一状态机)
- 大文件:主按钮升级大号 + 图标并钉右;补上"还没有扫描过大文件"空态
  (原先扫描前整页空白,与另两页语言不一致)
- 新共享样式:.scan-cta(flex 钉右)+.config-items(配置项左侧换行区)
  +.space-config-spacer;三页配置栏同一骨架:配置项在左、一颗大主按钮在右
- demo 10 断言全过:三页 CTA 类名/尺寸/图标/文案一致、几何同高同右缘、
  垃圾页点击真实触发两阶段扫描
2026-11-25 10:44:49 +08:00
lijunjie f66d5e3d6f 0.1.13 重新打包:概览页改版 + ChatGPT 归组 + 中性图标(安装包哈希更新)
- 安装包新 sha256 5868fa6867ef8648ac86ef09531f4242238f0006e998636d2ebf75e1a4d4e7f2(3865091 字节),便携包同步
- 更新说明整体重写(新增/调整/移除/修复 四类,含概览 30/42/28 改版与智能扫描跳转)
- 本机已静默覆盖安装(10:29)并冒烟:主窗口 [Squid]、responding=True
2026-11-25 10:30:35 +08:00
lijunjie 5cb6b79d04 概览页改版:指标行 30/42/28 三列、右上角智能扫描按钮移除、开始扫描跳转空间清理执行
- 处理器与内存合并进同一卡片上下分布(虚线分隔、各占一半垂直空间);
  存储空间卡加宽到 42%,每个盘符收成一行的表格感排版(盘符 | 进度条拉满 |
  百分比+总/可用),不再盘符与进度条上下两行;日常维护三个入口取消独立
  区块,改为竖排三卡放进指标行右列(28%),与左两卡等高均分;窄屏回退为
  横向三卡占满一行
- 页头右上角「智能扫描」大按钮移除(与 hero 的开始智能扫描重复)
- 「开始智能扫描」/「空间清理」快捷卡不再在本页起扫描:先跳转空间清理页,
  两阶段扫描(缓存垃圾 → 构建残留)在目标页继续跑(工作区是应用级共享的);
  扫描中重复点击不再触发第三轮;扫描中/已扫完按钮语义不变
- 区块间距 14 → 26px,卡片描边对齐暖色主题,整页更透气
- demo 断言 12 项全过(列宽比例实测 30.0/42.0/28.0、单行盘符几何、右列竖排、
  头部按钮移除、点击触发两阶段且重复点击无效)
2026-11-25 10:28:20 +08:00
lijunjie 26ec54a4e8 启动项商店应用归组(ChatGPT 从其他软件独立成组)+ 其他软件换中性图标
- 商店应用(MSIX)的程序文件对普通用户读不到版本信息,全部掉进其他软件;
  新增 windows_store_product:从 WindowsApps\发布者.产品_版本_架构_包哈希\
  包目录名提取产品名(取原路径保留大小写,OpenAI.ChatGPT_… → ChatGPT),
  认出的行归入 ChatGPT 组并带上原图标;带两个单测(含大小写、非商店路径)
- 其他软件组头不再借用组内第一个成员的图标(ChatGPT 蓝图标配"其他软件"
  误导):改用中性九宫格图标(启动项与右键菜单两处共用 GroupIcon 组件)
2026-11-25 09:35:35 +08:00
lijunjie 5cc86269ed 0.1.13 重新打包:右键菜单软件分组 + 闪窗修复(安装包哈希更新)
- 安装包新 sha256 98a3704ef9efcc318b3ec7ed2b5f54138b6efde4eb5f52cd7a338de60d739404(3866015 字节),便携包同步
- 更新说明补「右键菜单按软件分组」;squid-update.json 同步
- 本机已静默覆盖安装(09:27)并冒烟:进程存活、responding=True、小工具与主窗口均在
2026-11-25 09:29:05 +08:00
lijunjie 0cfd360d31 右键菜单按软件分组:同软件的多条菜单项合并为一张卡片
- 与开机启动项同款样式:组头 = 软件图标 + 软件名 + 开启状态(全部开启/
  部分开启 x/y/已全部关闭)+ 共 N 个菜单位置 + 组级总开关(一键开/关该
  软件在本类别的全部处理器);展开见每行的作用面(文件/文件夹/桌面/
  驱动器/所有对象)、创建者与模块路径
- 归组规则与启动项一致:模块带真实产品字符串或能认出安装目录的归入该
  软件组,认不出的落入其他软件(排最后);搜索词命中时自动展开
- 归属标记由后端给出:ShellExtEntry 新增 named 字段(serde default,旧
  manage.json 备份可正常反序列化),manage.rs 的 ExtensionView 透传
- 菜单位置类别页签与计数不变;demo 点击测试 9 断言全过(分组、计数、
  其他软件兜底、总开关批量调用、类别计数联动、搜索展开)
2026-11-25 09:26: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 ca84ea3b66 一键安装.bat 修复:前台同步安装、先退出运行中的 Squid、每步输出与错误可见
旧版用 start 把安装器甩到后台:窗口从头到尾没有任何输出,且未先结束
正在运行的 squid-desktop——1.7MB 主程序被进程锁住时静默安装的 NSIS
会卡在替换文件一步,现象即"双击后只剩一个空命令行提示符"。新版:
1) taskkill 先退出 Squid 并留 2 秒等句柄释放;2) 复制安装包到 %TEMP%
(绕开管家对非系统盘安装器的拦截);3) 直接前台等待安装器退出并按
errorlevel 报告成败;4) 找不到安装包时给出明确错误。已端到端验证。
2026-11-24 22:29:46 +08:00
lijunjie 6689138c9a Cargo.lock 同步 0.1.13 2026-11-24 21:41:11 +08:00
lijunjie ccc3cefe0b Squid 0.1.13 发布:启动项残留清理(MangoDisk 化)+ 重复文件完全删除 + 按钮配色修复
- 版本升至 0.1.13;release/0.1.13 全套发布物(安装包/便携包/校验和/更新清单/一键安装)
- 安装包 SHA256 7ae115a5cd0746c1ab62195686e0c0de53b3767d23a90f0f78231629ad2477e2(3868869 字节)
- 已在本机静默覆盖安装并冒烟通过(标题 [Squid],responding=True)
2026-11-24 21:40:50 +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 2f0f09c238 Squid 0.1.12 发布:导航三页签整合 + 小组件归位彻底修复
- release/0.1.12 全套发布文件(安装包/便携包/SHA256/更新清单/README/一键安装.bat)
- 已在本机静默覆盖安装并真机验证:
  · 迁移生效:widget.json 旧 position 作废、dockV2 落位
  · 物理坐标 3291,24 = 3840(4K 屏真实宽)-525(组件真实宽)-24 边距,右上角严丝合缝
  · 守护实测:外部把组件挪到屏幕中央,9 秒内被拉回角落
- 备注:真机为 3840x2160@150%(此前 2560 读数全部来自 DPI 虚拟化视图),
  旧 position=1369 是 RDP 会话留下的坐标,旧 clamp 判其有效 → 卡在屏幕 36% 处
2026-11-24 17:58:13 +08:00
lijunjie db18bb3b3e 小组件归位彻底修复:位置守护改纯 Win32 比对,旧 DPI 空间记忆位置一次性作废
- 真机取证定根因:150% 缩放下 Tauri 的 outer_position/set_position/primary_monitor
  与 Win32 GetWindowRect/MonitorFromWindow/SetWindowPos 处在不同 DPI 空间;
  旧 position=(1369,18) 是 RDP 小屏会话里存下的数字,回本机 2560 宽大屏后被
  旧 clamp 判为「有效」原样保留——组件永远停在离右缘 660px 的半空,且上一版
  守护用同一套失真坐标系自测「已就位」,所以修不动
- 心跳守护全部改用纯 Win32(GetWindowRect/MonitorFromWindow/SetWindowPos 同
  一虚拟化):每拍比对实际矩形与 dock_point 应有位置,>2px 即拉回;拖动 3.5
  秒宽限逻辑不变
- WidgetPrefs 增加 dock_v2 代际标记:首启丢弃旧空间存下的 position(角位停靠
  恢复确定性),此后前端拖拽记忆与本守护同空间,永久被尊重
- 前端拖动记忆补洞:mount 播种真实位置、位移 <5px 的纯点击不再把(RDP 漂移
  后的)现位置钉成用户记忆;尺寸自适应后 redock 不再依赖 lastPos 判角位
- dock_position → dock_point(monitor 矩形版,24px 物理边距≈原 16 逻辑边距),
  单测更新并新增非原点副屏断言
2026-11-24 17:53:52 +08:00
lijunjie c660443613 导航合并:空间清理/系统维护改三页签 hub,存储空间整页移除;小工具改位置守护心跳
- 方案①:空间清理 = 垃圾清理 / 重复文件 / 大文件 三页签(页签带实时计数徽标,面板保活切换不丢状态;懒扫描:进入哪个页签才扫哪个)
- 方案②:系统维护 = 一键修复 / 隐私清理 / 系统优化 三页签;隐私、优化从桌面组并入,桌面组只剩桌面小工具
- 一级目录「存储空间」整页删除(用户判定与大文件重叠):StoragePage/useStorageWorkspace/Treemap 组件移除,概览快速卡片改跳「大文件」页签;后端 storage_* 命令暂保留(前端已无调用方)
- 快捷键重排:1概览 2空间清理 3应用卸载 4权限管理 5系统维护 6实时监控 7小工具 8历史 9设置,0小工具开关
- 方案③(小组件居中问题的对因修复):上一版只监听主屏分辨率变化,但 RDP 接入→本机断会话→回本机登录全程分辨率不变,Windows 会话重连时按旧几何重摆窗口没人察觉;心跳改为每秒比对「实际位置 vs 应在位置」,不一致即归位并压回桌面层,拖动中 3.5 秒宽限不与手打架
- demo 点击测试重写为 hub 场景 26 项全过(含页签徽标、面板保活、内联确认、隐私锁定、恢复默认)
- 修 squid-tui 稀疏文件测试的宿主环境 flake:断言从「全屏无 TB」改为「不出现 1.0 TB/1 TiB/1024 GB」(本机 6TB NAS 盘会在磁盘面板合法显示 TB)
2026-11-24 17:34:00 +08:00
lijunjie 79b2e1df49 0.1.11 重新打包:修复「定位」在含空格路径上跳错文件夹
- reveal_path 给 explorer.exe 的 /select 参数改用 raw_arg 原样传参:此前 Rust 会把整个 /select,<path> 参数包成一对引号,explorer 解析失败后打开默认目录(实测 Package Cache 路径跳到了 D:\Documents);explorer 要求引号只包住路径部分(/select,"C:\…"),修正后经 Shell COM 实测正确打开目标文件夹并选中文件
- 不含空格的路径(如 C:\hiberfil.sys)此前行为本来就正确,本次只修空格路径
- 便携包与安装 exe 同步重建,release/0.1.11 全套产物刷新(安装包/便携包/SHA256/更新清单)
2026-11-24 15:46:25 +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 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 3fc4bda77f 桌面小组件跟随分辨率变化重新归位(远程桌面后不再跑到桌面中间)
- 心跳里跟踪主屏尺寸:RDP 连接/断开、热插拔、切分辨率都会重建控制台显示设备,
  Windows 按旧的小虚拟屏几何重排顶层窗口,小组件于是脱离右上角、落在桌面中间
- 尺寸一旦变化即按 corner 偏好重新停靠并压回桌面层(dock_position 抽出为纯函数,含单测)
- shell 主动收起窗口后恢复时也顺手重新归位
2026-11-24 10:46:48 +08:00
lijunjie 3a5d641dc0 0.1.10 重新打包:启动项软件分组总开关 + 深度扫描自动发现 + Git 保护常开 2026-11-21 11:20:14 +08:00
lijunjie 7f464e7a19 开机启动项对齐电脑管家:软件分组总开关 + 默认折叠 + 其他软件兜底组
- 后端为每个启动项标注 named(能否归属到真实软件产品:二进制带可用的
  FileDescription/ProductName 才算),无法归属的进「其他软件」组(排最后),
  与管家的归类依据一致。
- 每个软件组标题行:图标、组名、状态(全部开启/部分开启/已全部关闭,橙/绿
  着色)、「共N项」与总开关;总开关一次开/关该组全部细项,点标题行展开细项
  单独控制;默认折叠,搜索时自动全部展开。
- 新增 toggleStartupGroup(逐项调用同一后端开关,失败汇总红色气泡)。
- 无头浏览器 9 项点击断言全过(折叠/计数/其他软件兜底与排序/组展开/总开关
  两连发/状态文案/搜索展开);fmt/test/clippy×2/pnpm check+build 全绿。
2026-11-21 11:16:02 +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 a246f2aa87 0.1.10 重新打包:深度扫描目录可检视清单 + Git 保护常开 + 启动项开关修复与 Mole 交互批次(同构建产物刷新) 2026-11-21 10:31:45 +08:00
lijunjie 3bb3aeca42 深度扫描目录改为可检视清单(对齐 Mole);Git 保护开关移除
- 深度扫描目录:点击不再只弹文件夹框,展开清单逐行显示每个目录(✓ 存在 /
  ⌀ 不存在已跳过),支持移除、添加、恢复默认;折叠态文案改为
  「N 处有效 · M 处不存在已跳过」;所有增删即时写入配置文件(原先只存内存,
  重启即丢)。
- 默认清单 Windows 化:桌面 / 文档 / source\repos(VS 默认)等惯例目录前置。
- 界面移除「Git 保护」开关:它本来就是默认安全兜底,现在永远开启;
  需要绕过走 CLI --all。
- 新增 roots_status 命令与 settings 持久化 purgeRoots;无头浏览器 10 项
  点击断言全过;cargo fmt/test/clippy、pnpm check/build 全绿。
2026-11-21 10:16:32 +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 dccbe9b60a 空间清理对齐电脑管家「清理点」粒度;受保护项折叠隐藏
- 规则类分类展开后先按清理点(= 一条规则的全部命中)聚合展示,中文名
  映射 RULE_NAMES(系统临时文件/Windows 更新下载缓存/预读取文件…),
  点开清理点才列具体路径;升级安装包按应用聚合(微信 升级包 / WPS 升级包)。
- 悬停清理点出现「忽略 / 查看路径」:忽略 = 该清理点全部路径加入保护名单
  (白名单,可在设置撤销),toast 确认;分类头部改「N 个清理点」。
- 受安全策略保护项默认隐藏,分类底部一行「已自动隐藏 N 个…」+「仍然显示」;
  应用正在运行/需要管理员等可操作锁定照常显示原因。回收站/项目产物/开发
  文件保持平铺。大小与数量口径同步排除隐藏项。
- useScanWorkspace 新增 setIndexes(indexes,on) 供整簇勾选;无头浏览器
  17 项点击断言全过;tsc/build 绿;0.1.10 重新打包。
2026-11-19 21:51:22 +08:00
lijunjie d305cb0b01 空间清理改版为电脑管家式手风琴布局;启动项图标只在分组标题显示
- 空间清理:取消「分类卡片 + 大列表」双层结构,分类即列表一屏一层;
  分「已为你默认勾选 / 需要你手动勾选」两区;点击分类行展开子项
  (再点收起,首扫自动展开最大分类),点子项整行 = 资源管理器定位,
  只有小方框改勾选;顶部常驻汇总条(已选大小 / 取消全选 / 立即清理)。
- 权限管理:启动项子行去图标、缩进 30px 与组标题文字对齐,图标每软件
  只显示一次;组图标 20→22px。
- 无头浏览器 14 项点击断言全过;tsc/build/测试全绿;0.1.10 重新打包。
2026-11-19 20:57:42 +08:00
lijunjie 3b76a35e4d 修复空间清理点击无效与权限管理图标缺失
- 空间清理:勾选状态未纳入结果列表的派生缓存(useMemo 依赖缺 selected 集合),
  点击卡片后视图停留在扫描瞬间,看起来全部按钮失灵;现已并入依赖并加注释。
  「可选」角标 pointer-events:none,不再遮挡复选框命中区。
- 权限管理:服务壳程序(Edge elevation_service、电脑管家 qmbsrv、H3C
  SpaceAgent 等)PE 内不含图标资源,ExtractAssociatedIconW 回退成通用瓦片。
  新增 software_icon 回退链:App Paths 注册表 → 卸载信息 DisplayIcon 目录
  映射 → 同目录 .ico/主 exe(带真实图标资源校验),找不到宁可留占位符。
- 已用无头浏览器对演示页执行真实点击断言(8 项全过)后打包 0.1.10。
2026-11-19 17:18:56 +08:00
lijunjie 5f6112f877 空间清理:默认勾选改为页面策略一次播种;修复扫描后卡片互锁不可点
- 根因:浏览器缓存/部分系统垃圾规则 select_by_default=false,而项目产物/开发文件默认 true,方向与页面设计相反;页面用级联 setState 事后纠正时相互覆盖(后生效的只保留自己的类别)——默认态改由 useScanWorkspace 的 selectionPolicy 在扫描落地时一次 seedSelection 播种(日常类全勾、可选类全不勾)
- 卡片 disabled 原为「无已选项目」,用户取消勾选后立刻灰死且全选后反向死锁;改为「全部条目锁定」才禁用,勾选状态判定改用 removable 计数
- 「N 项」按钮接通 focus 过滤(显示全部 / 按类过滤)
- 重新打包(sha256 ce99d51d…)
2026-11-19 15:52:07 +08:00
lijunjie ad1b70fe13 日常清理+深度清理合并为「空间清理」:一次扫描、分层默认勾选、全程进度
- SpacePage 合并双工作区:扫描先缓存后项目目录(步骤条 A),两类结果按体积并入同一分类卡片与清单;升级安装包/项目产物/开发文件三类默认不勾选(虚线卡+可选角标),勾选后一次确认、两引擎顺序删除、结果合并(删除中步骤条 B)
- 深度扫描设置收进页顶设置栏(目录点击编辑+浏览多选、3/7/30 天、Git 保护)
- 侧边栏删「深度清理」项、日常清理更名空间清理;Ctrl 快捷键重排;托盘菜单同步合并;概览页智能扫描同时触发两阶段并跳转
- useScanWorkspace 新增 setCategorySelection(确定性取消可选类默认勾选)
- 删除 CleanupPage/PurgePage;确认弹窗保留升级包「跳过/只清」双逃逸按钮
- 重新打包(sha256 9ccb814e…)
2026-11-19 15:22:03 +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 c15ee623c1 小工具 Win+D 常驻改用cloak看门狗:SetParent 进桌面会被 shell 数秒内弹出
- 实测 Progman/WorkerW 收养在本机不成立:shell 会在几秒内把窗口弹出桌面层,且 WebView2 跨父级会断导航(错误页)或断合成(空白)
- 学 Pulsar 的思路取其 watchdog 弃其 SetParent:1.5s 心跳检测最小化/DWM cloak/被隐藏三种「被 shell 收起」形态,unminimize+show+重排桌面层,主动收起时补一次 reload 重合成
- 用户自己关掉的(总开关/全部面板)不复活;release/0.1.10 重新打包(sha256 6a6c3369…)
2026-11-19 12:00:37 +08:00
lijunjie 9e613042bf 桌面小工具挂入 Progman 常驻:Win+D 显示桌面不再隐藏小工具
- SetParent 进 Progman 子窗口栈顶:显示桌面/最小化所有窗口只作用于顶层窗口,收养后小工具幸免(Wallpaper Engine 同款);仍位于其他应用窗口之下
- 5 秒看门狗:explorer 重启或子级被重新排布时自动重新收养,收养失败退回 HWND_BOTTOM 桌面层
- 本机验证:MinimizeAll(Win+D 等价)后窗口 visible=true 未最小化
- 重新打包 0.1.10(sha256 见 SHA256SUMS),release 文件同步刷新
2026-11-19 10:03: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 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 b129c6bc43 The README was the last file still describing the old project
Twenty-six commits went into main this week and not one of them touched
README.md, which sounds like restraint and is actually a bug: every commit made
the code more honest about Windows while the first file a stranger reads kept
saying the opposite. It opened with "macOS 磁盘清理与系统监控工具" as if the
platform layer shipped last month were a fork, and the crate map still described
squid-platform as "macOS 实现(App 清单、残留匹配、卷);Linux/Windows 占位" —
the same document that two sections later listed a working Windows registry
adapter, an IFileOperation recycle bin, thirty cleaning rules and a real machine
that had deleted files into it and restored them. A README that contradicts
itself is worse than a thin one, because the reader has to guess which half is
out of date, and the confident-looking half (the crate map, the feature table)
is exactly the half that is stale.

So this rewrites the stale claims and leaves the author's structure and tone
alone. squid-platform now says three implementations, and names what only
Windows has: the shell's recycle bin, console size and glyph-width probing,
process termination. The cleaning-rule count stops implying one number for every
platform — thirty-nine is macOS, thirty is windows.toml, and printing 39 above a
Windows install is a promise the rules directory does not keep. Uninstall says
where an app comes from on each platform, because "bundle id" means nothing to a
reader whose machine answers with a registry key, and the paths section now says
that on Windows config, rules and ledger all live under %APPDATA%\squid and that
the ledger records no physical path there — the Recycle Bin keeps the files, so
undo hands the restore to Explorer rather than renaming anything itself. Item 7
of the safety model got the same correction from the other direction, since it
used to promise "记录每条的废纸篓目标路径" unconditionally.

Two features the interface grew and the README never learned about. `x` joins
the key table: on the three file panels it is `d`, on the system panel it stops
the process under the cursor behind a dialog that repeats the sample rather than
the pid. That deserves a safety-model line as much as a key-table line, because
"the cleaner can also stop things" is the sentence a reader should meet next to
the list of processes it refuses to touch — squid itself, pid 0/1, Windows'
System Idle and pid 4, and csrss/smss/wininit/services/lsass/winlogon, an
elevated squid genuinely can open those for termination, which is the entire
reason for six names. svchost stays off the list on purpose, and the message now
says so rather than leaving the omission to be rediscovered as a bug report.
The Windows console paragraph records what the last two days of frame captures
taught: legacy conhost hands the process a window wider than the buffer behind
it, cp936 charges two cells for glyphs ratatui budgets one, and both lies arrive
as the same 花屏 — so the interface re-measures the size every beat and prices
each glyph before drawing it, and the command line deliberately buys the
pessimistic code-page answer instead of measuring, because measuring writes a
character onto whatever is on screen. SQUID_SYMBOL_CELLS and SQUID_CONSOLE_TRACE
join the environment table; they existed, they saved the port, they were
undocumented.

On the verification claim I did the opposite of what the week's momentum
suggested. The old line read "已在 Windows 10(1909)真机验证", and the machine at
192.168.2.92 was set up as a Windows 11 box, so the tempting edit was to write
"Windows 10 与 11 均已真机验证". Nothing in the repo supports that. Every
hardware check ever captured from that machine prints
`Windows 10 Pro (build 18363)`, and os_version reads ProductName,
DisplayVersion and CurrentBuildNumber straight out of the registry — there is no
code path by which a Windows 11 install produces 18363. Either the box is not
Windows 11 or its registry disagrees with whoever installed it; the README states
what the instrument reported and the roadmap carries "Windows 11 真机复验" as
pending, so the claim will be earned by a doctor run on a machine that says
22000 or newer, not asserted because it is plausible.

The remaining edits are smaller truths: release artifacts are Apple-only, so the
download section now says Windows builds from source rather than sending readers
after a nonexistent .tar.gz; the roadmap's Windows row picks up process
stopping, the highlight-that-survives-paging and the menu-that-stops-being-
overpainted fixes, and the "顶住 512 字节写入不变" settle condition that replaced
"seen twice" as the definition of a finished frame; "Linux/Windows 冒烟测试"
narrows to Linux, since Windows has a better instrument than a smoke test now —
capture on the real ConPTY, replay through pyte, measure the borders — and the
开发与测试 section shows how to run it, including --selftest, which is what keeps
the judge honest.
2026-10-16 12:56:48 +08:00
mula.liu 5515bab2d9 A half-drawn frame can be seen twice, so being seen twice is not evidence
The Windows box came back with a ghost: the process card of the system panel
standing on top of the history panel, in a frame our own checker had certified as
a settled interface. No such layout exists in the code — the two panels are two
rectangles of one `Layout`, and one of them is cleared before the other is drawn —
so the honest reading was that `squid-tui` was painting something nobody had ever
seen on a screen. It took a round of measurement over the archived captures to
find out that the thing lying about the interface was not the interface. It was
the sentence in `tui-frame-check.py` that decides which frames are allowed to be
judged at all, and it had been lying quietly for every capture since the checker
was written.

The sentence was: a picture counts as settled once the same screen has been
sampled a second time. It reads well — crossterm patches a diff cell by cell, so
an unfinished paint keeps changing and cannot possibly be seen twice; the moment
it stops changing, the paint must be over. What it forgets is that the sampler
walks the stream every 64 bytes while one row of this interface costs about 190
bytes of it, so three samples land inside a single row; and that a paint which
has stopped is a paint whose next bytes belong to the next paint, not a verdict.
A frame cut in half is therefore guaranteed to be sampled two or three times in a
row — the same half picture, again, with nothing drawn in between. Being seen
twice was never evidence that the paint had finished. It was arithmetic, and it
cost a round spent chasing a rendering bug that cannot be written down.

Grouping the samples by how long each screen survives says it plainly. Switching
panels is one continuous write, offset 34688 to 37376, 2.7 KB without a pause;
inside that burst the screen passes through 33 states that carry both the process
card and the history card, and every one of them survives between 64 and 192
bytes of writes. The frames a human being stood in front of survive 1024 to 3840
bytes, because an idle interface repaints the same words every tick and nothing on
screen moves — which is exactly what "the user saw that" means. Lifetime is the
measurement, and it is the only one on offer: a captured stream carries no clock,
so "for a moment" has to be spelled out in bytes.

`analyze()` now cuts its samples into runs of consecutive identical screens, where
a run's length is how many bytes of stream passed while that screen sat there
unchanged, and only screens that survived `SETTLE`, 512 bytes, are judged. 512 is
not a magic number: it is comfortably above the 192 bytes that the longest-lived
half frame in that capture managed, and comfortably below the 1024 that the
shortest real one did, on the same stream, in the same second. The report says all
of it out loud — pictures painted, pictures that rested, pictures measured —
because the ratio between those numbers is the one piece of information that tells
the next reader whether the capture was worth anything at all. A stream where
nothing rests is now reported as unanswerable, with the three reasons a stream can
be unanswerable named next to it (a screen that animates forever, a capture cut
short, a screen with no borders at all) rather than being read as a clean pass.

Both new selftest cases were also run against the previous criterion, so that this
commit can be seen to bite rather than merely to look tidy. `半张画不许下判词`
paints a clean 140-column card, lets it rest, then begins a second paint mixing a
100-column card with a 70-column one and stops there, followed by 200 bytes of SGR
and cursor movement that change not one glyph. It is the same content as
`窄框和宽框叠着` above it — which is a fault, and still reported as one, because
that one rests — and under the old criterion the invisible padding is enough to
admit it and convict the capture of two frames stacked on each other. It lived 192
bytes, and under the new criterion it is not allowed to speak. `整条流没有一幅画
站得住` points the same machinery the other way: two clean pictures, neither of
them ever resting. The old criterion certified that stream as free of problems,
which is the more dangerous direction to be wrong in, since it files a measurement
that proved nothing as a pass; the new one refuses to answer. Under the old code
both cases are judged wrongly, under the new one all twelve are right.

On the archived real captures the filter is not cosmetic. The system-panel capture
went from 82 "settled" interfaces measured to 8, out of 327 screens painted; the
long kill capture from 291 to 36, out of 1198; the 140-column clean capture from
101 to 8, out of 376. All of them still come back with zero failures, which is the
point: not one verdict got worse, and every screen that no user ever saw is gone
from the docket. Sweeping every capture left in /tmp turned up one more fact worth
writing down — of the screens that the geometry rule has ever convicted, not one
survived more than 320 bytes. Every conviction this tool has ever handed down came
from a frame caught mid-sentence, which is why the overlap class of bug now has its
regression case in the selftest, where the picture is written twice on purpose and
therefore rests.

What the change gives up, named rather than glossed: a panel that animates for as
long as it is open — a scan progress line is the obvious one — never rests, so a
capture of it is now "cannot judge" instead of a verdict, and the handful of 10 KB
start-and-quit captures in /tmp moved to that verdict. That is a real narrowing.
The way through it is a marker inside the stream, since the interface knows when a
draw ended and the checker cannot infer it from bytes alone, and that belongs to a
round allowed to touch `squid-tui` and `win-tui-capture.sh`; this one only stops the
checker from inventing screens. No Rust changed: 190 tests, `cargo fmt --check`
clean.
2026-10-16 12:02:21 +08:00
mula.liu b2460d506f The system panel may stop a process, once it has asked who is sitting at that number
The system panel has listed processes for a while, and a list of what is running
gets one question asked of it more than any other: this one is wedged, make it
stop. A panel that can name the hung app and then shrugs is scenery, so the
answer here is yes — spent through the machinery the interface already has for
irreversible things, a dialog that names what it is about to do and a log line
afterwards that says what it did.

The *how* is two lines and not very interesting: `kill(2)` with `SIGKILL`, or
`OpenProcess(PROCESS_TERMINATE)` followed by `TerminateProcess`. Both are the
same promise, which is why `squid_platform::process::force_stop` is called a
forced stop on every platform and the dialog says 强制结束 rather than anything
about saving. There is no TERM-then-KILL handshake in here, because there is no
polite promise to keep: the second line of the dialog is 它不会有机会保存任何内容.

`squid_stats::Sampler::stop` does not use `sysinfo`'s own `Process::kill`, and
the reason is the shape of its answer. It returns `false` for every way a stop
can fail, and two of those ways want opposite things from the reader. `ESRCH`
means the process left on its own and nothing is owed but a redraw; `EPERM`
means it is alive and the reader should go find an elevated terminal. Windows
serves the same pair up as `ERROR_INVALID_PARAMETER` and `ERROR_ACCESS_DENIED`.
A bool cannot carry that difference, so squid makes the call itself and keeps
the words the OS gave, quoted inside a sentence this program owns — the OS's
sentence arrives in the language of the OS, and translates no further than its
own frame.

The *whether* is where the damage is, so it is answered twice. First by rule, in
`squid-platform`: never this squid, never the first process of the machine, and
on Windows never one of the six names a boot rests on. Those rules exist because
the operating system does not enforce all of them. An unelevated squid on macOS
cannot reach `WindowServer` whatever it tries; an elevated squid on Windows
*can* open `csrss.exe` for termination, and the reward for one misplaced Enter
is a machine that reboots without asking. Six names is the whole cost of that
guard. `svchost` is deliberately absent from it, because it hosts services a
user may genuinely need to restart and the machine survives losing one — which
is the test a name has to pass before it belongs on that list.

Then by the operating system, whose answer is the only one with any authority
over this user, this token, this moment. Between the two sits the question the
platform module cannot answer, because it is a question about a sample rather
than about a pid: is the process holding this number still the process whose
name the user read? Pids are seat numbers, handed out again, and a process table
is drawn the moment the panel opens and read from seconds later. So
`squid_stats::Sampler::stop` reads the pid again through the new `sample_of`,
applies the rules to the process that is really there, and calls a name that no
longer matches *gone* — the thing that was pointed at really is gone, whichever
direction the pid moved. `shown_name` is why that comparison means anything:
macOS hands over a path and Windows a bare name, and the process table had been
trimming with `split('/')`, which does nothing at all to a Windows path. Nothing
was wrong on screen, because the name was already short there; it became
evidence, and evidence has to be spelled one way.

`x` is the same verb it has always been. On the three file panels it makes the
row under the cursor go away; the system panel has nothing to delete and does
have a process, so the same finger reaches the same meaning, and
`x_is_still_the_delete_key_on_a_list_of_files` pins the old meaning down so that
this one cannot push it aside. `d` still deletes everywhere. The rules are
applied in `ask_stop_process` *before* the dialog rather than after the answer:
a dialog that can only be answered "no" teaches the user that the dialog is
theatre, and the toast that names the rule says the same thing in less time.

Three crates now each hold a `sleeper()`, which is a duplication worth keeping
on purpose. The thing under test has to be a process — `sleep 60`, or
`ping -n 60 127.0.0.1` where `sleep` is not — and a kill feature tested against
a struct is a kill feature that has never killed anything. Twelve tests come
with this: five in the platform module, including the boot list and a vacant pid
reporting itself as gone; three in the sampler, one of which hands a pid to
`stop` under the wrong name and then checks that the innocent process is still
running; four in the interface, walking `x`, `y`, and a refusal from the key
press to the corpse being reaped. 190 tests green across the workspace, with
`cargo fmt --check` and `cargo clippy --workspace --all-targets` clean for the
host and for `x86_64-pc-windows-msvc` — the target where the boot list,
`TerminateProcess` and the parameter-is-incorrect mapping compile at all, which
is also where `the_processes_a_boot_rests_on_are_named_not_guessed` exists.

The Windows 10/11 box carries the part a mac can only compile. `squid.exe`
there builds with `Win32_System_Threading`, clippy clean under `-D warnings`,
185 tests green; and the dialog was read off the screen rather than off the
buffer — `TUI_COLS=140 TUI_ROWS=35 TUI_CP=936`, 2604 samples of the raw ConPTY
stream, 291 settled frames, 0 of them failing the layout judge, including the
confirm itself: `╭ 结束 iNodeCmn.exe? ╮` / `pid 9080 · 1.2% · 15.4 MB` /
`它不会有机会保存任何内容` / `回车 / y 确认 · n / esc 取消`, and 「已取消」 after `n`.
`docs/ARCHITECTURE.md` gains the module and the key, and one of its diagrams
finally admits that `squid-stats` has depended on `squid-platform` for weeks.
2026-10-16 11:49:10 +08:00
mula.liu f9f86f6103 The app list counted its own header as a row, and the cursor paid for it
Uninstall came back from the Windows box saying the thing it had already said
on macOS: once there are more apps than a page, paging down leaves the list
with no highlight anywhere. Two consoles that have spent this branch being
taught what a `█` costs agree with each other about nothing, so a complaint
that survives both of them is not standing in the console. It was standing in
`draw_uninstall`, and it had been there since the panel was written.

The panel pushes its column header — `size name version source`, plus a filter
chip while a filter is standing — into the same `List` widget that holds the
apps, and paints the highlight by asking whether `row == cursor`, where `row`
counts the apps that `visible()` returned. `ListState::selected` is handed that
same `app.uninstall.cursor`: a number in the space of visible apps, in a widget
whose rows are that space plus one, plus two with the chip. ratatui spends
`selected` on exactly one thing in this configuration, because `highlight_style`
is empty on purpose — the row paints its own highlight so that a cursor survives
a terminal with no colour at all — so the disagreement cannot mispaint a row.
What it can do is decide which rows exist on screen: the scroll window is
positioned around the row one above the cursor. While the list fits in the card,
or while the cursor is high enough in a list that does not, the cursor is inside
the window either way and the header costs nothing. That is why this needed a
machine with more installed apps than a fixture has, and why the same binary
lied the same way on both platforms.

`ScanPanel::lines` has never shown the symptom, and the reason is worth naming
rather than admiring: it holds entries and nothing else, because the heading of
that card lives on the `Block`. One widget, one index space, nothing to drift.
The uninstall *plan* was taught the same lesson from the other direction — it
used to swap item zero for a bundle heading, which held only while the `.app`
was the largest thing in the plan, until a container outgrew it and every row
under the heading sat one line away from its cursor. The app list was the third
place a header had been allowed to spend a row, and the only one nobody had
asked about.

The fix declines to count anything. `chrome` and the entries are two constraints
of one vertical `Layout`: the `Paragraph` takes the first rectangle, the `List`
gets a rectangle holding entries only, and `selected` and `band()` are back to
describing the same rows. Nowhere in the file is `cursor + header_lines` written
down, because an offset is the thing that just went wrong, and the next line of
chrome added to this header would need one of its own.

`the_app_under_the_cursor_is_the_row_that_is_on_screen` is the regression test,
and it loops over every cursor position rather than picking a deep one, because
whether one deep cursor fails depends on how tall the card happens to be where
the test is running — which is a measurement of a machine, not an invariant. For
each position it draws 140x34 and asks the buffer two questions: is the app under
the cursor on the screen at all, and is the cell it landed on wearing the accent
background and the bold that a highlight paints. The series runs twice, once with
the filter chip on screen, because the chip is the second row of the two index
spaces that were drifting apart. Before the fix it stops at cursor 25 with "the
app under the cursor is off screen". Nothing on the screen had been drawn
wrongly, which is the shape of this bug: every row was correct, and the only
thing missing was the cursor.

68 tests in the interface crate, one of them this one, green; `cargo fmt
--check` and `cargo clippy --workspace --all-targets` clean for the host.
2026-10-16 11:17:18 +08:00
mula.liu bf04f2c105 The command line pays for its chrome at the same counter
Three rounds were spent on a TUI that drew several frames over each other on
a cp936 console, and the fix worked: the interface asks the console what it
charges, per character, and draws ASCII where the console charges more than
the layout paid. Meanwhile `squid status`, printed in the same window on the
same machine, still produced a Storage table whose rows were each a screen
and a half long. Nothing in `main.rs` had ever asked what a `█` costs. It
repeats that character twenty-eight times for a gauge and lets the console
do the arithmetic, and the console's arithmetic is different.

`priced` is where a line stops being text and starts being cells, and `row!`
is the one door the body of every report prints through: the eleven places
that draw this program's chrome — the status key/value rows, the volume
gauges, the process table, the tree, the history rows, the whitelist
bullets, the rule headings and their `●`, the doctor's table — all of them
now go through it. It is a macro rather than a helper so the format
arguments stay where they were written, and one door rather than twelve
`println!`s of which eleven remember the console, because the twelfth is the
bug this whole thing is about.

Two refusals are the interesting part.

Nobody is stopped from seeing what a report actually says. Point the output
at a file or a pipe and the text comes back exactly as it was, because a
file is not a console: whatever glass reads the archive tomorrow may well
afford the `█`, and an archive of `#` is a worse record for the sake of a
screen that was never looking. The gate is the same tty question the live
progress line already asked — may this line overwrite a line — so
`live_stream_is_tty` is now `human_stream_is_tty`, since the two questions
have the same answer and deserve one function that says what it is asked.
And `--json` prints data, never through this: rewriting a person's report to
flatter their terminal is a different bug with the same fingerprint.

The price is not measured, even though measuring is what the interface does,
for the reason in `console::prices_unasked`: measurement spends characters,
and a command line is a guest on the screen it is printed to, sitting in a
pipeline or in front of a shell waiting for its next prompt. So it takes the
pessimistic answer the code page implies, which costs it a plainer gauge on
a console whose code page overcharges characters its font could have
carried. `█` becomes `#` there. A table that fits is worth more than a
prettier one that does not.

`no_line_of_chrome_escapes_the_counter` reads the file, with strings,
character literals and comments blanked, and demands that every `print!`,
`println!` and `eprintln!` either go through `priced` or print JSON or print
nothing. The scan exists because this mistake cannot be seen from the
machine it was made on: `println!(" {}", plan)` standing among eleven `row!`
calls is correct on every terminal that charges one cell for everything,
including the one it was typed on, and arrives folded over in front of
somebody else. It reads character literals as literals only when they close
again promptly, because `'static` is not the start of a character literal
and blanking from a lifetime to the next quote hides half a file from an
audit whose entire job is to look at all of it.

On the box, same pseudo-console, same 100x30 window, three reports per
capture and every one of them complete to `MARK_QUIT 0`. On cp936 — the code
page the user's own window is on — the decoded stream contains no `█`, no
`░`, no `─`, no `·`, no `…`, no arrow: the gauge reads
`[#######################.....]` and the headings are underlined with `-`.
On 65001 the same report keeps 104 `█`, 120 `░`, 236 `─`, 32 `·` and both
arrows. Same bytes of intent, two currencies, and the receipt is now in
both.

`win-tui-capture.sh` takes `TUI_ARGS=` so this evidence is repeatable rather
than hand-built: the default still captures the interface and judges it
frame by frame, and `TUI_ARGS="status"` captures a report, where the judge
is simply how many `█` survived.

The architecture document tells the story as one paragraph now, because it
is one story: `console::prices` measures and hands the answers to the
interface, `console::prices_unasked` guesses from the code page and hands
them to the command line, and each side has a test that keeps the characters
it draws and the characters it priced the same list.

178 tests here, two of them this commit's, clean under clippy for the host
and for `x86_64-pc-windows-msvc`, `cargo doc -D warnings` quiet over the
platform and the command line.
2026-10-16 10:32:05 +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 687f9c6959 Say which console a frame was judged on, and stop blaming the interface for the shell
Three ways this pipeline produced a verdict that was not about the TUI.

The frame judge required every right border on a screen to land in the same
column. That was written when the widest window anyone captured was 100 columns
and the interface drew one card. At 140 columns the menu column and the panel
are two frames side by side — the menu ends at column 31, the panel at 140 — and
the rows where the panel has already finished genuinely do end at 31. A tidy
140-column screen was therefore garbled on every single capture, which is a
mistake the judge makes rather than the console, and mistakes the judge makes
should not have to be re-litigated on real hardware. The rule is now the one that
survives both layouts: the border columns of the widest rows are the picture, and
a row with a border column that appears nowhere in that picture means two
pictures of different sizes are stacked on one screen. `side_by_side` and the
narrow-card-under-wide-card case are both in `--selftest`, so whoever tightens
that rule again finds out there, in a millisecond, rather than on the box.

`win-tui-run.ps1` always ran `chcp 65001`, because UTF-8 comes back through the
capture with no decoding guess involved. It also means the probe always measured
a UTF-8 console, while the window being complained about sits on cp936 — and
which code page a console is on is exactly what decides what an unasked-for
character costs. `$SQUID_TUI_CP` picks the code page now, the runner reports it
as `MARK_CODEPAGE`, and the judge prints it on the first line of every report,
because a frame is only evidence for the console it was taken from. Both routes
are green on the box with the price list as it now stands: 140x35 on 65001, 101
settled frames, none of them overflowing, box-drawing intact; 100x32 on 936, 54
frames, same. The comments that claimed the ConPTY measures one cell because
UTF-8 is forgiving have been corrected too — it measures one cell on 936 as
well, which is a fact about a console with no font, not about a code page.

And when the runner itself fails to parse, the stream still contains a console:
a PowerShell error block, and then nothing. The judge said "no settled frame with
a border was ever drawn", which is true and useless, and it read like a rendering
regression badly enough that drawing code got changed because of it. A
`CategoryInfo` in the stream is now reported as what it is — the capture script
never started the interface — and it is a selftest case, so the excuse is on
record as belonging to the harness.
2026-10-15 22:28:49 +08:00
mula.liu 345f8391ed The probe measured the distance from a cell nobody moved
`symbol_cells` asked the console one question — what does a box-drawing bar
cost — and spent the answer on sixty characters. That was already the wrong
shape of answer: what decides a price is the code page and the font the console
was left on, and nothing promises the box-drawing set and the block-shading set
land on the same side of it. But the measurement was worse than the shape, and
this is the part worth writing down.

To price a character the probe asked the console to move the cursor to an
anchor, wrote the character, read the cursor back, and computed `after.X -
at.X`: the distance from the anchor it had *requested*. On the console this was
chased on, `SetConsoleCursorPosition` returns success without moving anything.
Every read therefore returned the same cursor, and the "cost" of the nth
character was n. The temporary trace said it plainly: 1, 2, 3, and on up to 60.
`match cost { 0 => None, 1 => Single, _ => Double }` then read every character
from the third onwards as two cells wide, which is how a UTF-8 console that
charges one cell for the lot ended up with its rounded card downgraded to
ASCII, and how the earlier "this console prices bars one cell and blocks two"
found its evidence. That split was never measured. It was a counter.

The distance between two reads is the only number here that means what it looks
like, so that is what is read now: ask where the cursor is, write, ask again,
and the step is the price. A step that cannot be a price is no answer at all —
`price_from_step` accepts one cell and two cells and refuses zero, negatives,
three, and sixty, so a cursor that never moved produces a code page's guess
rather than a layout believing a number with no cells behind it. A read that
changed rows is no answer either, and neither is a row with fewer than two
columns left to answer in, and `SetConsoleCursorPosition` is still called but
its return value is deliberately ignored: a ruler that is obeyed asks all sixty
questions of the same cell, and a ruler that is ignored walks one row, which the
characters get wiped out of either way.

Because a ruler can lie in ways that still produce plausible numbers, `prices`
asks for `A` first. `A` costs one cell in every table that measures characters,
so an answer of anything else means the probe is not reading cells, and it says
"symbols unreadable: A does not cost one cell" and takes the code page's answer
instead of laying a screen out against the lie.

The answers are kept as a price list, not a verdict, and `squid-tui` asks it
only about the characters it means to draw (`witnesses`), so a console that
overcharges the shading but not the rules keeps its rounded card and gives up
only the gauges inside it. The module documentation no longer claims a split
price was measured on cp936: what the ConPTY measured there, as on 65001, is one
cell for all sixty. What remains from the real window is the symptom — a card
that fit and a gauge inside it that did not — which is the reason for the list,
not evidence about that box.

Tests: the fair-priced-and-dishonestly-priced console still downgrades only the
disputed set, and `a_step_that_cannot_be_a_price_is_not_an_answer` keeps sixty
from ever being a price again.
2026-10-15 22:28:35 +08:00