feat(product-suite): add grouped generation history

This commit is contained in:
chengma
2026-07-16 23:47:47 +08:00
parent f3defdeb95
commit cd150ef6c7
8 changed files with 879 additions and 35 deletions
+11 -2
View File
@@ -3,7 +3,7 @@ id: T-644
title: 商品套图历史生成按轮次弹窗展示
phase: 7
deps: [T-643]
status: TODO
status: DONE
created: 2026-07-16
---
@@ -140,4 +140,13 @@ git diff --check
## 执行记录
- 待执行。
- 2026-07-16:将⑥顶部「历史生成」从可选中切换按钮改为普通按钮;主结果区移除 `show_history` 分支,始终按项目持久化的当前轮次展示。
- 2026-07-16:新增 `ProductSuiteHistoryDialog` 和只读缩略图卡片。窗口按当前 `project_id` 分页读取最近20轮 SQLite 记录,按轮次时间倒序展示当前/旧版标签、状态统计、稳定槽位图片、重试次数和本地文件缺失占位;只提供预览、复制路径和打开所在文件夹。
- 2026-07-16:任务关闭时关闭对应历史窗口;同一商品重复点击复用已打开窗口。生成 worker、当前轮和主结果区不受历史窗口影响。
- 2026-07-16:`list_generation_rounds()` 增加创建时间倒序作为轮次排序主键,并保留 ID 作为同时间的稳定次序。
- 2026-07-16:补充轮次分页、跨项目隔离、单槽位重试去重、缺失资产、只读操作、窗口复用、关闭任务和无历史空态测试。
- 验证通过:
- `py -3.10 -m unittest discover -s tests`(558 项通过;Qt 离屏环境仅输出字体/窗口插件提示)
- `py -3.10 -m ruff check app tests main.py`
- `py -3.10 -m compileall app main.py`
- `git diff --check`