feat(apply): open product page on left double click

This commit is contained in:
chengma
2026-07-20 11:22:26 +08:00
parent 9f43e5547a
commit 7dbfcb5a24
11 changed files with 445 additions and 5 deletions
+5 -2
View File
@@ -1,7 +1,7 @@
---
id: T-675
title: 更新蝦皮左键双击打开或聚焦商品详情页
status: TODO
status: DONE
phase: 7
deps: [T-672]
created: 2026-07-20
@@ -58,4 +58,7 @@ git diff --check
## 执行记录
- 待实现。
- 新增 `editor.open_or_focus_product_tab()`:按账号区域域名与 `/portal/product/<商品ID>` 精确匹配已有 page target;命中时仅聚焦,不导航或刷新;缺失时前台新建并复用既有就绪/toast 失败处理。完成后始终断开 CDP WebSocket,成功页与用户既有页均保留;失败时仅清理本轮新建 target。
- 新增 `ProductTabOpenWorker` 与③任务表左键双击入口:只检查已存在账号与已运行 Chrome/CDP,不自动启动或登录,不读写任务、Excel、图片、AI、运行日志或线上商品;右键双击不触发,更新或结果回写期间给出中文状态提示。
- 已更新 `docs/04-architecture.md`、`docs/api.md`、`docs/routes.md` 的人工查看页面约定。
- 验证通过:`py -3.10 -m unittest discover -s tests -p "test_editor_login.py"`(64 项)、`test_workers.py`(16 项)、`test_gui.py`(209 项)、全量 `py -3.10 -m unittest discover -s tests`(633 项)、`py -3.10 -m ruff check app tests main.py`、`py -3.10 -m compileall app main.py`、`git diff --check`。