25 Commits
Author SHA1 Message Date
xiyidaiwa 7bad39a796 fix(security/robustness): 清理 update-center 调试日志 + cancel-install id 校验
- update-center/index.ts: 引入 pino logger,将约 30 处 console.log(含 [DEBUG] 前缀及敏感路径)
  替换为 logger.debug(生产默认 info 级不打印,消除敏感信息泄露)
- install-manager.ts: cancel-install 增加 id 整数类型校验(typeof number && isInteger),防御非法输入
- PR 审查其余 5 项经代码实证为误报:JSON.parse 已有 try-catch、activeDownloadCount 的 mkdir/axios
  均在 try 内且 finally 必执行、check/remove-installed 已用 parseAppPayload 做 PKGNAME_PATTERN 校验、
  origin 已枚举归一化、initializeUpdateCenter 已有单例守卫;async handler 顶层 try-catch 因 Electron
  主进程默认 unhandledRejection 不崩溃且改动面大(19 handler)风险高,未改
2026-08-13 23:37:03 +08:00
xiyidaiwa 0f62a7e36a feat(update-center): 支持被系统锁定(hold)包的强制安装与更新中心体验优化
- 标记 apt-mark hold 的 spark(aptss) 源包,默认禁用勾选并提示开启强制安装
- 更新中心发起更新时透传 forceHeld,后端 Spark 本地 deb 走 shell-caller
  force-ssinstall 分支(单次免密 pkexec:unhold→ssinstall→hold),避免二次提权
- 无可选项时禁用全选并提示"无可更新项";更新选中后从列表中移除已启动项
- DownloadDetail 紧凑布局避免整页滚动;Toolbar 全选与更新选中按钮同行
- 继承 PKGNAME_PATTERN 与 metalinkUrl 白名单(https+*.spark-app.store+拒..)纵深防御
- apm 源无 hold 概念,forceHeld 在 apm 分支忽略(正确行为)
2026-08-13 16:42:21 +08:00
xiyidaiwa b5c5ab04b5 fix(update-center): 修复更新中心点击更新后卡在"开始更新..."不动
- 根因:service.ts 用 webContents.send("queue-install") 向主下载队列发任务,
  但 webContents.send 的目标对象是渲染进程,主进程 ipcMain 监听不到自己发出的消息,
  导致任务从未进入 install-manager 的下载队列,UI 永远卡在 queued。
- 将 install-manager.ts 的 queue-install 处理逻辑抽为导出的 addInstallTask(payload, sender),
  新增 QueueInstallPayload 类型,避免 any。
- 更新中心 service.ts 的 start() 改为直接 await addInstallTask(...),任务真正入队。
- 文档 docs/app-list-cache-analysis.md 新增第 9 节记录本修复。
2026-08-13 09:37:17 +08:00
xiyidaiwa 30e1bc4840 refactor(更新中心): E方案重设计更新条目 + 已忽略沉底 + 复用app.update显示更新时间 + 安全加固
- UpdateCenterItem.vue: 改为单行紧凑卡片,显示 包名·当前→新版本、来源标签、更新时间(品牌色)、大小;已忽略项淡化
- updateCenter.ts: filteredItems 将已忽略项沉底到列表末尾
- UpdateCenterList/Modal + App.vue: 透传全局 apps,用 app.json 的 Update 字段(Date.parse)推算 updateTime,零额外网络请求
- typedefinition.ts + update-center/types.ts: 新增可选 updateTime 字段
- install-manager.ts: launch-app 补 pkgname.length > 256 长度限制(防 DoS)
- index.ts: close 事件先 clearTimeout 防抖定时器再同步保存窗口状态(消除竞态)
- App.vue: fetchWithRetry 重试 3→2、延迟 1000→500ms(体验优化)
- 7维审计通过;AI审查2阻断项(getIconUrl防护/fetchWithRetry泛型)经核实为误报
2026-08-11 23:54:00 +08:00
xiyidaiwa 5bd0a367c4 refactor(update-center): 消除刷新重试代码重复并加对称设计注释
- updateCenter.ts: 提取 getBackoffDelay,补充与主进程预刷新为对称设计的说明
- index.ts: 提取 getPreRefreshBackoffDelay,对齐命名与注释
- 仅消除重复拼写、补注释,刷新重试功能行为不变
- 超时保护仍只作用于刷新源路径,不波及列表加载与其他 IPC

验证: eslint + vue-tsc 通过,test-build 5.2.1.14-test 通过
2026-08-10 23:14:18 +08:00
xiyidaiwa 3f22207505 fix/refactor: 更新中心扫描与多项安全加固(经专业审计)
更新中心扫描修复:
- updateCenter.ts: 抽出 runSystemUpdateThenLoad, open/refresh 共用,
  打开时即刷新双源(aptss ssupdate + apm update), 失败仅告警不阻断扫描
- shell-caller.sh: ssupdate 分支 exit $? 恒 0 吞掉刷新失败, 改为 exit $exit_code
- update-center/query.ts: 移除 nextVersion===currentVersion 误删真实更新项逻辑,
  信任 aptss 上游 upgradable 判断

安全加固:
- AppDetailModal.vue: 新增 sanitizeMoreContent 剥除 HTML 标签后再 v-html, 防 XSS
- InstalledAppsModal.vue: ALLOWED_LOCAL_ICON_PREFIXES 收紧为具体子目录, 缩小
  本地文件读取面
- install-manager.ts: filename 用 path.basename 防路径遍历; 包名/文件名 PKGNAME_PATTERN 校验
- index.ts: 临时目录改用 spark-store-${pid} 隔离, will-quit 清理对应目录

经 7 维度专业审计(安全/功能/类型/可维护/资源/性能/兼容)通过。
2026-08-10 21:42:36 +08:00
shenmo7192 7420466d92 style: 统一代码格式与字符串引号风格
1.  替换单引号为双引号统一字符串格式
2.  拆分过长的函数调用与条件判断行提升可读性
3.  简化多行console.log调用为单行格式
4.  为侧边栏添加条目计数标签展示功能
2026-07-14 13:59:55 +08:00
shenmo7192 7c6bdf0e55 feat(submitter,update-center): add multiple features and optimize submission flow
1. add shell caller ssupdate command support
2. add pre-update system refresh for update center
3. add get-git-email IPC handler and auto-fill email
4. optimize deb submission UI and category handling
5. disable and auto-fill package name/version fields
6. add loading and error states for category list
7. fix category value matching for history data
2026-07-13 22:07:01 +08:00
Elysia 6a9091b2ec feat(build): add loong64
- Downgrad electron for the sake of loong64
- Add my project to CREDIT.md

Signed-off-by: Elysia <a.elysia@proton.me>
2026-04-19 09:37:21 +08:00
shenmo7192 42046caf2c feat(update-center): 添加加载状态处理及UI优化
为更新中心添加加载状态管理,包括:
- 在打开和刷新操作时显示加载状态
- 禁用刷新按钮防止重复操作
- 添加加载中的动画效果和提示文本
- 优化加载时的UI显示
2026-04-16 14:00:33 +08:00
shenmo7192 e72553d570 feat(update-center): 添加详细日志记录以帮助调试更新中心服务
在更新中心服务的关键路径添加console.log和console.error输出
包括服务刷新、包解析、命令执行等环节的输入输出和中间状态
便于排查更新中心相关的问题
2026-04-16 13:48:08 +08:00
momen 309b9bc003 fix(update-center): load aptss updates reliably 2026-04-16 13:32:23 +08:00
momen 0b784af3d7 fix(sources): hide unavailable update and management entries 2026-04-16 13:04:54 +08:00
momen e1ec526cb9 fix(update-center): handle missing apm and restore scrolling 2026-04-16 11:11:06 +08:00
shenmo7192 68dd6a0a26 perf(spark): 优化已安装应用检查逻辑
- 对于 Spark 应用,使用 dpkg-query 替代自定义脚本检查安装状态
- 在 list-installed 接口中支持传入包名列表进行批量检查,避免全量扫描
- 添加 aptss 可用性检查,避免在不可用时执行相关命令
- 移除冗余的 check-installed 二次验证步骤
2026-04-16 00:10:14 +08:00
momen 44587e299a fix(lint): 清理未使用的安装器符号 2026-04-15 14:11:46 +08:00
momen 36f5d3831e fix(update): 统一忽略更新配置到用户目录 2026-04-15 11:44:18 +08:00
momen f044c6c3df 修复更新中心发送的下载项和普通下载故障覆盖的问题 2026-04-13 13:29:58 +08:00
momen 67aa83fe26 update 修复更新工具缺少软件名检查的问题 2026-04-12 19:39:17 +08:00
shenmo7192 e2f59b3cdf 复用下载中心(1/2) 2026-04-12 17:53:16 +08:00
shenmo7192 6fcfa438d9 feat(update-center): 统一使用下载包文件进行安装
- 移除 buildLegacySparkUpgradeCommand,所有更新现在需要先下载 deb 包
- 为 APTSS 添加元数据查询功能
- 优化 aria2c 下载参数,使用 metalink URL
- 版本号更新至 5.0.0beta4
2026-04-12 16:44:55 +08:00
momen 180b88b5c0 fix(update-center): cascade local and remote icon fallbacks
Keep update list icons from dropping straight to placeholders by retrying the remote store icon after local load failures. Align the update-center IPC and renderer types with the split local/remote icon contract.
2026-04-11 11:41:01 +08:00
momen c16ba5536f feat(update-center): add update list icons 2026-04-10 21:15:43 +08:00
momen 4a2cbe1f2a fix(update-center): 将apm命令从ssaudit改为ssinstall并优化打印URI命令
更新apm安装命令,使用ssinstall替代ssaudit以正确执行安装操作。同时优化获取包URI的命令,使用更可靠的bash调用方式。
2026-04-10 15:34:33 +08:00
momen 0b17ada45a feat(update-center): 实现集中式软件更新中心功能
新增更新中心模块,支持管理 APM 和传统 deb 软件更新任务
- 添加更新任务队列管理、状态跟踪和日志记录功能
- 实现更新项忽略配置持久化存储
- 新增更新确认对话框和迁移提示
- 优化主窗口关闭时的任务保护机制
- 添加单元测试覆盖核心逻辑
2026-04-09 08:19:51 +08:00