feat(ai-studio): streamline project workspace
This commit is contained in:
+21
-2
@@ -3,7 +3,7 @@ id: T-606
|
||||
title: AI工场项目入口、商品列表与安全删除优化
|
||||
phase: 7
|
||||
deps: [T-605]
|
||||
status: TODO
|
||||
status: DONE
|
||||
created: 2026-07-11
|
||||
---
|
||||
|
||||
@@ -99,4 +99,23 @@ git diff --check
|
||||
|
||||
## 执行记录
|
||||
|
||||
- 待执行。
|
||||
- 2026-07-11:已完成。
|
||||
- 代码:
|
||||
- `app/gui/tabs/image_studio.py`:移除可见的「打开商品项目」入口;顶部改为店铺/商品ID输入、当前「店铺名 · 商品ID」、紧邻的「拉取蝦皮主图」以及「打开项目文件夹」「删除项目」操作组。
|
||||
- `app/gui/tabs/image_studio.py`:左侧改为「商品列表」,展示店铺、商品ID、更新时间三列;当前项目标题优先显示店铺名,账号别名仅作为 tooltip。
|
||||
- `app/gui/tabs/image_studio.py`:新增「删除项目」确认和软删除入口,明确不删除蝦皮商品或本地图片;删除前拦截 `pending/submitted/running` 任务,删除后显式清理当前项目 UI 并切换到剩余项目或空状态。
|
||||
- `app/gui/tabs/image_studio.py`:统一未选择项目时的中文提示,移除旧按钮依赖,并让项目文件夹/删除按钮随当前项目和后台运行状态正确启用或禁用。
|
||||
- 测试:
|
||||
- `tests/test_gui.py`:更新 AI工场构建测试,覆盖去除旧入口、三列商品列表、顶部中文空状态和项目操作按钮状态。
|
||||
- `tests/test_gui.py`:新增确认取消/确认软删除后切换项目测试,以及未完成图片任务阻止删除测试。
|
||||
- 验证:
|
||||
- 主工作区定向验证通过:
|
||||
- `py -3.10 -m unittest tests.test_gui.GuiTests.test_image_studio_tab_builds_project_pool_and_template_controls tests.test_gui.GuiTests.test_image_studio_deletes_selected_project_only_after_safe_confirmation tests.test_gui.GuiTests.test_image_studio_blocks_deletion_with_active_remote_job tests.test_gui.GuiTests.test_image_studio_pull_main_images_uses_current_item_input tests.test_gui.GuiTests.test_image_studio_worker_thread_is_kept_until_thread_finished`
|
||||
- `python -m ruff check app tests main.py`
|
||||
- `py -3.10 -m compileall app main.py`
|
||||
- `git diff --check -- app/gui/tabs/image_studio.py tests/test_gui.py docs/tasks/T-606.md`
|
||||
- 主工作区存在未提交默认提示词文件改动;为隔离无关改动,在临时干净 worktree `D:\chengma\cmshopee-t606-verify` 应用本任务 diff 后通过:
|
||||
- `python -m ruff check app tests main.py`
|
||||
- `py -3.10 -m compileall app main.py`
|
||||
- `py -3.10 -m unittest discover -s tests`(380 tests)
|
||||
- `git diff --check`
|
||||
|
||||
Reference in New Issue
Block a user