feat(ai-outfit): clear 'no pending rows' message + keep preview on generate (§19.10)

- _on_finished(total==0) now shows _show_no_pending_message: counts 完成/失败
  via read_all_rows and tells the user how to redo (clear E column / retry
  failed), instead of the silent '完成 0,失败 0'.
- _on_tasks_loaded no longer calls _fill_sample_combo(tasks), so generating on
  an all-完成 sheet no longer empties the preview dropdown (read_all_rows owns it).
- Offscreen-verified both paths; full suite (12 files) green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-22 15:17:43 +08:00
co-authored by Claude Opus 4.8
parent 2643b19686
commit d962b60816
2 changed files with 36 additions and 4 deletions
+3 -3
View File
@@ -1131,6 +1131,6 @@
背景:整表都「完成」后点「开始生成」,当前只显示「已加载 0 行待处理任务 / 完成 0,失败 0」,看不懂;且 `_on_tasks_loaded([])` 会把预览样本下拉清空(破坏 §10.3)。
- [ ] 改进 1:检测 0 行待处理时弹明确提示「该表没有待处理的行:已完成 N 行会跳过;失败 M 行可勾『重试失败行』;要重做已完成行请清空对应行状态(E)列」(N/M 由 `read_all_rows` 统计);在 `tasks_loaded` 为空或 `_on_finished(total==0)` 时弹 `QMessageBox.information`
- [ ] 改进 2:`_on_tasks_loaded` 去掉 `_fill_sample_combo(tasks)`,预览样本下拉只由 `read_all_rows`/`_reload_sample_rows` 维护,与运行解耦
- [ ] 离屏验证:全表完成点生成 → 弹"无待处理行"提示、预览下拉仍有样本行;正常有待处理行时不弹该提示
- [x] 改进 1:`_on_finished(total==0)` 弹 `_show_no_pending_message`——统计 `read_all_rows` 的「完成 N / 失败 M」,提示「已完成 N 跳过;失败 M 可勾『重试上次失败的行』;重做已完成请清空状态(E)列」(无有效行时另提示)
- [x] 改进 2:`_on_tasks_loaded` 去掉 `_fill_sample_combo(tasks)`,预览样本下拉只由 `read_all_rows`/`_reload_sample_rows` 维护,与运行解耦
- [x] 离屏验证:全表完成 → `tasks_loaded([])` 后预览下拉仍 2 行、`_on_finished(total=0)` 弹"没有待处理的行"(含已完成1/失败1);`total>0` 仍弹常规"AI 穿搭"结束框;全套 12 文件绿