fix: adjust outfit detail table widths
This commit is contained in:
@@ -1438,4 +1438,22 @@
|
||||
- [x] `core/ai_outfit.py`:`generate_outfit_image(..., should_stop=None)` 透传;`_generate_directory_outfit` 改**有界提交**——始终最多 `image_concurrency` 张在飞,每张完成后、提交下一张前检查 `should_stop()`,已停止则停止提交剩余、让在飞收尾返回;结果 error 注明「已停止,N 张未生成」,`output_paths` 带已生成的;单文件行进入前检查一次 `should_stop()`(已停止→跳过结果)
|
||||
- [x] `ai_outfit_panel.py`:`_OutfitWorker.gen(task, should_stop)` 闭包接新参并透传 `generate_outfit_image`;`_stop()` 把 `停止生成` 文案改「停止中…」(保持禁用);`_set_running(False)` 复位文案为「停止生成」
|
||||
- [x] 测试:`test_ai_outfit.py` —— 目录行设 `should_stop` 在第 k 张后置真 → 之后不再新增生成、返回「已停止」结果且已生成的在 `output_paths`;`test_outfit_batch.py` —— 停止后不起新行、当前行提前返回、`finished` 及时;既有用例保持绿(注意 `generate_func` 新签名向后兼容/同步改 mock)
|
||||
- [x] 验证:相关单测 + 全套 py37 通过;离屏冒烟:mock 计数/慢 `generate`,开跑后置 stop → 总调用被 `should_stop` 截断、`finished` 及时、`_set_running(False)` 恢复「开始生成」、停止按钮文案回「停止生成」
|
||||
- [x] 验证:相关单测 + 全套 py37 通过;离屏冒烟:mock 计数/慢 `generate`,开跑后置 stop → 总调用被 `should_stop` 截断、`finished` 及时、`_set_running(False)` 恢复「开始生成」、停止按钮文案回「停止生成」
|
||||
|
||||
### 19.25 AI 穿搭处理明细表列宽微调 — docs/11 §10
|
||||
|
||||
前置阅读:
|
||||
|
||||
- `docs/11-ai-outfit.md`(§10 界面)
|
||||
- `docs/07-ui-design.md`(表格与工具型布局原则)
|
||||
- `src/app/widgets/ai_outfit_panel.py`(`_build_center` / 处理明细表)
|
||||
|
||||
背景:
|
||||
|
||||
处理明细表中「行」「货号」「状态」等字段内容短,却占用过多横向空间;「标题」字段更长、更需要可读宽度。应缩小短字段列,把主要剩余宽度给「标题」。
|
||||
|
||||
任务:
|
||||
|
||||
- [x] `ai_outfit_panel.py`:新增处理明细表列宽配置;「行」「货号」「状态」固定窄列,「衣服图」「结果 / 原因」给可拖动默认宽度,「标题」使用 Stretch 占用剩余空间
|
||||
- [x] `test_ai_outfit_panel.py`:补离屏测试,断言短字段列固定、标题列 Stretch
|
||||
- [~] 验证:`python -m py_compile src/app/widgets/ai_outfit_panel.py`、`python tests/test_ai_outfit_panel.py`、离屏启动主窗口通过;全套 `python -m unittest discover -s tests` 当前被工作区未提交的 `packaging/default_config/ai_models.json` 改动阻塞(模型顺序/额外条目与出厂模板规范不一致),待清理该文件后重跑
|
||||
|
||||
Reference in New Issue
Block a user