feat: compact cover template actions

This commit is contained in:
chengma
2026-07-02 11:26:03 +08:00
parent 86b931b26d
commit 4c7d4fc624
6 changed files with 54 additions and 23 deletions
+12
View File
@@ -980,3 +980,15 @@
- 代码:`app/gui.py` 将「Shopee 更新安全 / 执行模式」前置为独立分区,将「基础设施(路径与端口)」后置;移除 `test_item_id_edit`、`dry_run_checkbox` 这类用户入口,加载时只记录 `test_item_id` 内部兼容值,保存时保留该值并固定 `dry_run=false`。
- 测试:`tests/test_gui.py` 更新设置页断言,覆盖分区顺序、旧入口不存在、保存设置仍同步 ApplyTab 安全配置且兼容字段不丢。
- 验证:`python -m py_compile app\gui.py tests\test_gui.py` 通过;`python -m unittest discover -s tests -p "test_gui.py"` 通过(68 tests);`python -m compileall app main.py` 通过;`python -m unittest discover -s tests` 通过(156 tests);`git diff --check` 无空白错误,仅 LF/CRLF 提示。
## 【2026-07-02】T-518 文档启动 · ②左栏提示词区组件密度优化
- 背景:Claude Code review T-511~T-517 未发现问题;下一步从 `docs/06-tasks.md` Backlog 和 `docs/ux-review.md` P2 提升②左栏组件密度优化为正式任务。
- 文档:`docs/06-tasks.md` 新增 T-518 并标记 DOING,明确只收敛②AI生成左栏封面模板低频操作「另存为/重命名/删除」,第一版不移入⑤,不改 prompts 数据结构、AI生成、DB、Excel、Shopee/CDP 流程;同步 `docs/current-state.md` 与 `docs/ux-review.md`。
- 验证:文档-only 更新,未运行单元测试。
- 下一步:按 T-518 文档更新 `app/gui.py` 和 `tests/test_gui.py`。
## 【2026-07-02】T-518 完成 · ②左栏提示词区组件密度优化
- 代码:`app/gui.py` 将②AI生成左栏封面模板低频操作「另存为 / 重命名 / 删除」从平铺按钮收敛进「模板操作」菜单;「新建」「保存」继续作为可见按钮,菜单 action 仍调用原有模板保存/重命名/删除方法,删除二次确认和错误处理不变。
- 范围控制:不迁移到⑤设置,不改 prompts 数据结构,不改 AI 生成 HTTP、DB schema、Excel 或 Shopee/CDP 流程。
- 测试:`tests/test_gui.py` 覆盖「模板操作」菜单入口、菜单 action 触发原有行为,以及旧低频按钮不再平铺。
- 验证:`python -m py_compile app\gui.py tests\test_gui.py` 通过;`python -m unittest discover -s tests -p "test_gui.py"` 通过(68 tests);`python -m compileall app main.py` 通过;`python -m unittest discover -s tests` 通过(156 tests)。Qt 仍有本机字体目录提示,不影响测试结果。