feat: retry failed tasks
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 buildgit diff --check- locale JSON parse check for
renderer/public/locales/en/home.jsonandrenderer/public/locales/zh/home.json
Closes #222
@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 preview requires authorization from a buxuku Vercel team member. Local build passed with npm run build.
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.handleTaskfilters viaisFileDone - retry failed:
CompletionBanner"Retry Failed" →handleRetryFailed, plus per-file retry - shared step logic:
renderer/components/tasks/stageUtils.ts(equivalent of yourtaskWorkflow.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 没关系,理解你的考虑,也感谢你详细说明当前 feat/multi-engine 重构里的实现情况。
既然 #222 已经由重构分支覆盖解决了,我这边会先关闭这个 PR,避免继续占用 review 和冲突处理成本。
另外想确认一下:#222 是否也可以同步关闭一下?这样可以避免后续看起来像是这个问题还未解决。