SmartSub icon indicating copy to clipboard operation
SmartSub copied to clipboard

feat: retry failed tasks

Open nightt5879 opened this issue 5 months ago • 3 comments

Summary

  • add shared task workflow helpers to determine required steps and task completion/failure states
  • make the normal Start Task flow skip completed files and queue only unfinished runnable files
  • add a Retry Failed Tasks action that queues only failed files and clears stale step state before retrying
  • type task status/progress/error fields explicitly and add English/Chinese labels for the retry action

Testing

  • npm run build
  • git diff --check
  • locale JSON parse check for renderer/public/locales/en/home.json and renderer/public/locales/zh/home.json

Closes #222

nightt5879 avatar Jun 11 '26 13:06 nightt5879

@nightt5879 is attempting to deploy a commit to the buxuku's projects Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jun 11 '26 13:06 vercel[bot]

Vercel preview requires authorization from a buxuku Vercel team member. Local build passed with npm run build.

nightt5879 avatar Jun 11 '26 13:06 nightt5879

Hi @nightt5879, thank you so much for this PR and for tackling #222 — "retry failed tasks" is a real pain point and your design (skip completed on start + retry only failed + shared workflow helpers) is exactly the right direction. 🙏

Heads-up on status: the task module has since been refactored on feat/multi-engine (project-based tasks + multi-engine). That refactor already includes the same capabilities your PR adds:

  • skip-completed-on-start: TaskControls.handleTask filters via isFileDone
  • retry failed: CompletionBanner "Retry Failed" → handleRetryFailed, plus per-file retry
  • shared step logic: renderer/components/tasks/stageUtils.ts (equivalent of your taskWorkflow.ts)

Because of that, this PR (built on the pre-refactor TaskControls/home.tsx and the IFiles boolean→status type change) would conflict heavily and duplicate existing behavior, so I won't be able to merge it as-is. #222 is resolved by the refactor.

Your contribution still had real impact — it confirmed the need and the UX. I'd love to credit you, and would warmly welcome follow-up PRs on the new architecture (e.g. failed-row filtering / one-click retry-all polish). Thanks again! 🙌


非常感谢这个 PR 以及你对 #222 的推进——「重试失败任务」确实是高频痛点,你的设计方向完全正确。需要同步的是:任务模块已在 feat/multi-engine 分支完成重构(工程化 + 多引擎),其中已经包含了你这个 PR 的能力(开始时跳过已完成、仅重试失败、共享步骤判断 stageUtils.ts 等同于你的 taskWorkflow.ts)。因此基于旧 TaskControls/home.tsx 与 IFiles 类型改动的这个 PR 会产生较大冲突且功能重复,无法按原样合并,#222 已由重构闭环。你的贡献依然很有价值(验证了需求与交互),我很乐意为你署名致谢,也非常欢迎你在新架构上继续提交后续优化(例如失败行筛选 / 一键全部重试的打磨)。再次感谢!

buxuku avatar Jun 13 '26 18:06 buxuku

@buxuku 没关系,理解你的考虑,也感谢你详细说明当前 feat/multi-engine 重构里的实现情况。

既然 #222 已经由重构分支覆盖解决了,我这边会先关闭这个 PR,避免继续占用 review 和冲突处理成本。

另外想确认一下:#222 是否也可以同步关闭一下?这样可以避免后续看起来像是这个问题还未解决。

nightt5879 avatar Jun 15 '26 01:06 nightt5879