refactor(core): 抽出共享 ProductCreateDrawer · 商品/项目新建复用同一流程

- 新增 components/product-create-drawer.tsx,products/projects 改用同一右侧 Drawer 组件(products -188 / projects -116)
- ai-tools 配套调整;附 perf-report 产物

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
zyc
2026-06-17 20:13:40 +08:00
co-authored by Claude Opus 4.8
parent b714976d38
commit c9fb7139ac
6 changed files with 308 additions and 325 deletions
+30 -35
View File
@@ -1,11 +1,11 @@
{
"ts": "2026-06-17T10:57:57.302Z",
"ts": "2026-06-17T11:26:06.782Z",
"base": "http://127.0.0.1:5174",
"apiChecks": [
{
"name": "page_size 生效 /api/assets/",
"pass": true,
"detail": "count=239 返回=200 next=有"
"detail": "count=248 返回=200 next=有"
},
{
"name": "page_size 生效 /api/products/",
@@ -21,25 +21,25 @@
"name": "延迟 /api/assets/?page_size=200",
"pass": true,
"soft": true,
"detail": "720ms / 参考 1200ms (HTTP 200)"
"detail": "739ms / 参考 1200ms (HTTP 200)"
},
{
"name": "延迟 /api/products/?page_size=200",
"pass": true,
"soft": true,
"detail": "597ms / 参考 1200ms (HTTP 200)"
"detail": "573ms / 参考 1200ms (HTTP 200)"
},
{
"name": "延迟 /api/projects/?page_size=200",
"pass": false,
"pass": true,
"soft": true,
"detail": "2004ms / 参考 1200ms (HTTP 200)"
"detail": "482ms / 参考 1200ms (HTTP 200)"
},
{
"name": "延迟 /api/ops/notifications/?page_size=100",
"pass": false,
"soft": true,
"detail": "1228ms / 参考 1200ms (HTTP 200)"
"detail": "1389ms / 参考 1200ms (HTTP 200)"
}
],
"pageFailed": 0,
@@ -48,7 +48,7 @@
"name": "dashboard",
"route": "http://127.0.0.1:5174/dashboard",
"unique": 6,
"budget": 14,
"budget": 7,
"rawRequests": 7,
"waterfall": 0,
"duplicates": [],
@@ -62,7 +62,7 @@
"GET /api/ops/notifications/?page_size=1",
"GET /api/assets/summary/"
],
"elapsedMs": 5557,
"elapsedMs": 5108,
"problems": [],
"warnings": [],
"pass": true
@@ -84,7 +84,7 @@
"GET /api/ai/models/",
"GET /api/ops/notifications/?page_size=1"
],
"elapsedMs": 3488,
"elapsedMs": 3716,
"problems": [],
"warnings": [],
"pass": true
@@ -106,7 +106,7 @@
"GET /api/ai/models/",
"GET /api/ops/notifications/?page_size=1"
],
"elapsedMs": 3502,
"elapsedMs": 3704,
"problems": [],
"warnings": [],
"pass": true
@@ -115,7 +115,7 @@
"name": "library",
"route": "http://127.0.0.1:5174/library",
"unique": 8,
"budget": 8,
"budget": 9,
"rawRequests": 10,
"waterfall": 0,
"duplicates": [
@@ -136,7 +136,7 @@
"GET /api/assets/summary/",
"GET /api/assets/facets/?meta_keys=gender,age,role&tab=people"
],
"elapsedMs": 5728,
"elapsedMs": 4733,
"problems": [],
"warnings": [],
"pass": true
@@ -145,7 +145,7 @@
"name": "account",
"route": "http://127.0.0.1:5174/account",
"unique": 8,
"budget": 8,
"budget": 9,
"rawRequests": 9,
"waterfall": 0,
"duplicates": [],
@@ -161,7 +161,7 @@
"GET /api/auth/team/members/",
"GET /api/billing/ledgers/?page=1&page_size=10"
],
"elapsedMs": 5743,
"elapsedMs": 4773,
"problems": [],
"warnings": [],
"pass": true
@@ -170,7 +170,7 @@
"name": "team",
"route": "http://127.0.0.1:5174/team",
"unique": 6,
"budget": 4,
"budget": 7,
"rawRequests": 8,
"waterfall": 0,
"duplicates": [],
@@ -185,18 +185,16 @@
"GET /api/auth/team/members/",
"GET /api/ops/notifications/?page_size=100"
],
"elapsedMs": 5500,
"elapsedMs": 5399,
"problems": [],
"warnings": [
"首屏接口数 6 > 预算 4(架构性过量拉取,待决策)"
],
"warnings": [],
"pass": true
},
{
"name": "messages",
"route": "http://127.0.0.1:5174/messages",
"unique": 5,
"budget": 4,
"budget": 6,
"rawRequests": 7,
"waterfall": 0,
"duplicates": [],
@@ -210,18 +208,16 @@
"GET /api/ops/notifications/?page_size=1",
"GET /api/ops/notifications/?page=1&page_size=10"
],
"elapsedMs": 3485,
"elapsedMs": 3717,
"problems": [],
"warnings": [
"首屏接口数 5 > 预算 4(架构性过量拉取,待决策)"
],
"warnings": [],
"pass": true
},
{
"name": "productDetail",
"route": "http://127.0.0.1:5174/products/045ad8d6-8b15-486b-a4a9-f6968eb1555f",
"unique": 6,
"budget": 8,
"budget": 7,
"rawRequests": 7,
"waterfall": 0,
"duplicates": [],
@@ -235,31 +231,30 @@
"GET /api/ops/notifications/?page_size=1",
"GET /api/assets/?page_size=200&product=045ad8d6-8b15-486b-a4a9-f6968eb1555f"
],
"elapsedMs": 5755,
"elapsedMs": 4757,
"problems": [],
"warnings": [],
"pass": true
},
{
"name": "pipeline",
"route": "http://127.0.0.1:5174/pipeline/1048451e-3b4a-4b66-a8f4-cb865096de2f",
"unique": 7,
"budget": 10,
"rawRequests": 8,
"route": "http://127.0.0.1:5174/pipeline/46754596-a6f5-4f07-a85f-92a2415910ff",
"unique": 6,
"budget": 8,
"rawRequests": 7,
"waterfall": 0,
"duplicates": [],
"failed": [],
"breakdown": [
"GET /api/auth/me/",
"GET /api/projects/1048451e-3b4a-4b66-a8f4-cb865096de2f/",
"GET /api/projects/46754596-a6f5-4f07-a85f-92a2415910ff/",
"GET /api/products/",
"GET /api/projects/",
"GET /api/billing/summary/",
"GET /api/ai/models/",
"GET /api/ops/notifications/?page_size=1",
"GET /api/projects/1048451e-3b4a-4b66-a8f4-cb865096de2f/pending-assets/"
"GET /api/ops/notifications/?page_size=1"
],
"elapsedMs": 6015,
"elapsedMs": 3725,
"problems": [],
"warnings": [],
"pass": true