feat: color ai outfit detail statuses

This commit is contained in:
2026-07-04 17:59:25 +08:00
parent 8522032b06
commit 4d4347e50e
3 changed files with 59 additions and 2 deletions
+25
View File
@@ -1725,3 +1725,28 @@
- [x] 文档明确异步任务、表格状态、低对比、配置错误可用状态色
- [x] 文档明确颜色不能作为唯一信息来源,必须配合文字状态
- [x] 文档检查:`rg -n "状态色|处理明细状态|标题生成等待计时|10.1" docs/07-ui-design.md docs/11-ai-outfit.md tasks.md`、`git diff --check -- docs/07-ui-design.md docs/11-ai-outfit.md tasks.md`
### 19.37 AI 穿搭处理明细表状态色 — docs/07 §10.1 / docs/11 §10
前置阅读:
- `docs/07-ui-design.md`(§10.1 状态色使用规则)
- `docs/11-ai-outfit.md`(§10 状态色应用)
- `src/app/widgets/ai_outfit_panel.py`(处理明细表 `_set_cell`)
- `tests/test_ai_outfit_panel.py`(AI 穿搭面板离屏测试)
背景:
§19.36 已明确 AI 穿搭页只给状态、风险和结果上色。标题等待计时已实现颜色,但处理中间的明细表「状态」列仍是默认黑色;生成多行标题或图片时,用户需要更快区分待处理、完成、失败和停止类状态。
任务:
- [x] `ai_outfit_panel.py`:新增处理明细表状态色映射,沿用 `docs/07` §10.1 的灰 / 蓝 / 绿 / 红规则
- [x] `ai_outfit_panel.py`:只在处理明细表「状态」列应用颜色,不给普通列、label、按钮、输入框装饰性上色
- [x] `tests/test_ai_outfit_panel.py`:离屏断言 `待处理`、`生成中`、`完成`、`失败`、`跳过`、`停止` 使用对应颜色
验收:
- [x] 明细表状态列可用颜色快速区分状态,同时保留文字作为主要信息
- [x] 普通 UI 文本仍保持黑灰体系,不扩大颜色使用范围
- [x] 验证:`python -m py_compile src/app/widgets/ai_outfit_panel.py tests/test_ai_outfit_panel.py`、`python tests/test_ai_outfit_panel.py`