Skip to content

Updates: ask before downloading an update, then show a real progress bar #245

Open

Description

@bubbleptr

背景:PRD 见 .scratch/auto-update/PRD.md(ADR-0033)。今天 0.0.2 通过更新器发现 0.0.3 后立刻开始下载,About & Updates 只显示一行 Downloading update… 86% 文字(见截图描述)。用户没有机会决定要不要现在下载,进度也只有百分比文本。

要做的事

  1. 发现新版本后停在 available 状态,不自动下载:apps/desktop/electron/updater.ts 将 autoUpdater.autoDownload 改为 false,新增一个显式的下载命令(与现有 checkForUpdates / quitAndInstall 同一套 pace:invoke 通道),由渲染层触发 autoUpdater.downloadUpdate()。
  2. About & Updates(apps/desktop/src/pages/settings.tsx,available 分支)显示版本号与 GitHub Release 链接,加 Download and install 主按钮和 Later 次按钮;用户确认后才进入 downloading。
  3. downloading 状态用进度条而不是纯文本:优先用 Astryx 的进度组件(先 bunx astryx build "download progress" 确认有无对应物),没有再在 shared/ui/ 自建并登记到 /design。进度条旁保留百分比与已下载 / 总大小(download-progress 事件带 transferred / total / bytesPerSecond)。
  4. ready 状态保留现有 Restart to install 流程;侧栏徽标与应用菜单入口语义不变,但徽标在 available 阶段就应出现,提示有版本可装。
  5. 更新 docs/design/ 中 Settings 相关说明与 CONTEXT.md 里 About & Updates 的词条(若有),同一 PR 内完成。

验收标准

  • 检查更新发现新版本后,不发生网络下载,界面停在 available 并给出两个按钮
  • 点击 Download and install 后进入 downloading,进度条随 download-progress 事件推进,显示百分比与大小
  • 下载完成进入 ready,Restart to install 行为与现在一致
  • updater.ts 单元测试覆盖:available 不触发 download、显式命令触发 download、progress 事件映射
  • settings 页测试覆盖三种状态的渲染与按钮
  • 进度条组件(若自建)登记到 /design

阻塞:无。

Activity

  1. added
    needs-triage
    on Sep 9, 2026
  2. added
    ready-for-agent
    future
    and removed
    needs-triage
    ready-for-agent
    on Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    future

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions