Files
cmshoppe/docs/tasks/T-662d.md
T
chengmaandClaude Fable 5 3777f84ce0 docs(tasks): finalize status dropdown placement and terminology in T-662b/c/d
- dropdown sits left of the renamed 任务状态 label in all three tabs
- option wording aligned with platform text: 审核中 not 未审核,
  未知 not 其他
- clarify the status filter scopes collection candidates in ① (the
  existing model.tasks mechanism), default 全部 so first-round
  collection of unknown-status imports still works
- reinforce composite defaults 可生成/可更新 include unknown so
  legacy batches are not blocked

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-18 15:37:43 +08:00

62 lines
3.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
id: T-662d
title: 更新蝦皮异常商品过滤与T-659预检整合
status: TODO
phase: 7
deps: [T-662a, T-659]
created: 2026-07-18
---
# T-662d 更新蝦皮异常商品过滤与T-659预检整合
## 问题 / 背景
③需要在更新内容预检之外处理商品状态。商品状态是采集快照,不能取代 Shopee 执行时校验;同时「显示全部」只是查看范围,不能被误当成更新异常商品的授权。
## 方案
- 现有「状态」标签改为「任务状态」,新增独立「商品状态」下拉,**放在「任务状态」label 左边**(需求定稿位置):
- `可更新(默认)`:`normal/unknown`;
- `全部`;
- `正常/未上架/审核中/未知`。
- 选项术语与平台原文对齐:「审核中」不用「未审核」、「未知」不用「其他」;默认档为复合的「可更新」而非单选「正常」,未知默认放行,避免历史批次被整批拦住。
- 保留商品状态筛选前的基础范围快照,显示默认排除数量;即使表格隐藏异常记录,也能在摘要/确认中说明。
- 无论商品状态筛选选择什么,`unlisted/reviewing` 都不得传入 `ApplyWorker`;「全部」只用于查看,不构成强制线上更新授权。
- 扩展 T-659 结构化预检结果,分别保存:可执行、缺标题、缺封面、未上架、审核中;同一任务只计一次总跳过,但各原因统计可分别展示。
- 确认框、状态栏与本轮日志显示异常状态排除数量、分类和示例商品ID。预检排除记录不计入 worker 的成功/略过/失败,不改 stage/status/Excel。
- 内容缺失和商品异常全部剔除后没有可执行任务时,按真实主因显示中文中止文案;全部异常时不得误报「更新内容未生成」。
- 「检查本轮更新」与正式更新使用同一计划;用户确认期间筛选或数据变化时废弃旧计划。
- `unknown` 默认允许更新;现有商品失效 toast、页面校验、账号预检和 T-659 内容校验继续作为执行层防线。
## 验收标准
- [ ] 默认可更新模式排除未上架/审核中,正常和未知可进入内容预检。
- [ ] 切换「全部」能查看异常记录,但开始更新和 dry-run 仍剔除异常商品。
- [ ] 确认框正确合并内容缺失与商品状态原因,同一任务总数不重复。
- [ ] 全异常时显示商品状态中止原因;全缺内容时仍保持 T-659 文案。
- [ ] 被排除记录不进入 `ApplyWorker`,DB、Excel 和本轮 worker 统计不变。
- [ ] T-659 三种更新模式、账号就绪、分批、停止和真实更新确认不回归。
## 测试与文档
- `tests/test_gui.py` 覆盖默认排除、显示全部、原因去重、全异常中止、dry-run 一致性和 T-659 回归。
- 更新 `docs/routes.md`、`docs/04-architecture.md` 和 `docs/api.md`。
## 验证
```bash
py -3.10 -m unittest tests.test_gui
py -3.10 -m unittest discover -s tests
py -3.10 -m ruff check app tests main.py
py -3.10 -m compileall app main.py
git diff --check
```
## 非目标
- 不根据采集快照自动修改蝦皮商品状态,不提供异常商品强制更新入口,不做实时状态刷新。
## 执行记录
- 待实现。