Skip to content

修复订阅下载假进度与安装中断 - #304

Draft
wnlen wants to merge 1 commit into
masterfrom
agent/fix-subscription-download-feedback
Draft

修复订阅下载假进度与安装中断#304
wnlen wants to merge 1 commit into
masterfrom
agent/fix-subscription-download-feedback

Conversation

@wnlen

@wnlen wnlen commented Aug 13, 2026

Copy link
Copy Markdown
Owner

修改内容

  • 移除固定增长并封顶 94% 的模拟下载进度,改为单行显示已等待时间和 Ctrl+C 可跳过
  • 下载成功保留原有 100% 完成提示
  • 按 curl 返回码归类失败原因,正常输出只显示一行,原始错误保留在构建诊断信息中
  • 安装期下载失败或用户取消时跳过订阅配置并继续核心安装;clash sub update 等日常更新仍返回失败
  • 增加慢请求、超时、取消、安装继续的回归测试

根因

下载 UI 使用与真实字节无关的定时模拟进度,约 4 秒后固定在 94%;后台 curl 仍可能长时间等待外部网络或订阅服务器响应,因此用户会误以为程序卡死。

验证

  • bash -n install.sh scripts/core/common.sh scripts/core/config.sh scripts/core/clashctl.sh scripts/dev/check-subscription-download-feedback.sh
  • bash scripts/dev/check-subscription-download-feedback.sh
  • 全部 scripts/dev/check-*.sh 通过;zsh 检查因测试环境未安装 zsh 按自身规则跳过
  • PTY 手工验证 Ctrl+C:后台下载终止,控制流程继续并返回 130

Refs #298

Replace the timer-based progress capped at 94% with an elapsed wait indicator and concise curl failure reasons. Allow install-time download failures and Ctrl+C cancellation to skip subscription setup while preserving normal update failures.

Root cause: the UI displayed synthetic progress while curl could wait much longer for an external response.

Refs #298
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant