From f6462dbccc20f49a14cecb3fd7d18c54e51d64c0 Mon Sep 17 00:00:00 2001 From: kris Date: Sat, 21 Mar 2026 00:52:23 +0800 Subject: [PATCH] feat: add douyin workbench results ui --- README.md | 5 + docs/LAN_E2E_GUIDE_2026-03-18.md | 1 + .../douyin-browser-capture/control_panel.mjs | 851 +++++++++++++++++- 3 files changed, 855 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d6d657a..8777eab 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,11 @@ npm run control-panel http://127.0.0.1:3618 ``` +这个本地页面现在包含两部分: + +- 上半部分是浏览器辅助采集控制台 +- 下半部分是 `Douyin Workbench`,可直接查看账号列表、Agent 分析结论、快照详情、相似账号和对标关系 + 或者继续用命令行: ```bash diff --git a/docs/LAN_E2E_GUIDE_2026-03-18.md b/docs/LAN_E2E_GUIDE_2026-03-18.md index bcc053c..0b31fcb 100644 --- a/docs/LAN_E2E_GUIDE_2026-03-18.md +++ b/docs/LAN_E2E_GUIDE_2026-03-18.md @@ -176,6 +176,7 @@ http://127.0.0.1:3618 控制台步骤: 1. 填写抖音主页链接和 StoryForge 账号 +2. 如需查看采集结果,不用离开这个页面;下半部分 `Douyin Workbench` 会展示账号列表、Agent 结论、快照详情和对标结果 2. 点击 `开始采集` 3. 在弹出的 Chromium 里登录或通过挑战页 4. 回到控制台点击 `已完成登录,继续采集` diff --git a/scripts/douyin-browser-capture/control_panel.mjs b/scripts/douyin-browser-capture/control_panel.mjs index 8df1dce..d1ed0ef 100644 --- a/scripts/douyin-browser-capture/control_panel.mjs +++ b/scripts/douyin-browser-capture/control_panel.mjs @@ -509,8 +509,149 @@ function renderPage() { font-size: 13px; line-height: 1.55; } + .subpanel { + border: 1px solid rgba(22, 49, 61, 0.1); + border-radius: 18px; + padding: 16px; + background: rgba(255, 255, 255, 0.72); + } + .workbench-layout { + display: grid; + grid-template-columns: 320px 1fr; + gap: 18px; + margin-top: 18px; + } + .account-list, + .snapshot-list, + .similar-list { + display: grid; + gap: 10px; + } + .account-item, + .snapshot-item, + .similar-item, + .link-item, + .video-item, + .report-item { + border: 1px solid rgba(22, 49, 61, 0.1); + border-radius: 16px; + padding: 14px; + background: rgba(255, 255, 255, 0.8); + } + .account-item { + cursor: pointer; + transition: transform 0.15s ease, border-color 0.15s ease; + width: 100%; + text-align: left; + } + .account-item:hover { + transform: translateY(-1px); + border-color: rgba(31, 110, 95, 0.28); + } + .account-item.active, + .snapshot-item.active, + .similar-item.active { + border-color: rgba(31, 110, 95, 0.55); + background: rgba(31, 110, 95, 0.08); + } + .profile-hero { + display: grid; + grid-template-columns: 86px 1fr; + gap: 16px; + align-items: center; + } + .avatar { + width: 86px; + height: 86px; + border-radius: 22px; + object-fit: cover; + background: rgba(22, 49, 61, 0.08); + border: 1px solid rgba(22, 49, 61, 0.12); + } + .metric-grid { + display: grid; + grid-template-columns: repeat(4, minmax(0, 1fr)); + gap: 12px; + } + .metric-card { + border: 1px solid rgba(22, 49, 61, 0.1); + border-radius: 16px; + padding: 14px; + background: rgba(255, 255, 255, 0.84); + } + .metric-label { + color: var(--muted); + font-size: 12px; + margin-bottom: 6px; + } + .metric-value { + font-size: 18px; + font-weight: 700; + } + .chips { + display: flex; + flex-wrap: wrap; + gap: 8px; + } + .chip { + display: inline-flex; + align-items: center; + padding: 6px 10px; + border-radius: 999px; + background: rgba(22, 49, 61, 0.08); + color: var(--ink); + font-size: 12px; + } + .two-col { + display: grid; + grid-template-columns: 0.9fr 1.1fr; + gap: 16px; + } + .detail-box { + border: 1px solid rgba(22, 49, 61, 0.1); + border-radius: 16px; + padding: 14px; + background: rgba(255, 255, 255, 0.78); + min-height: 180px; + } + .inline-actions { + display: flex; + gap: 8px; + flex-wrap: wrap; + } + .mono { + font-family: "SF Mono", ui-monospace, monospace; + font-size: 12px; + word-break: break-all; + } + select { + width: 100%; + border-radius: 14px; + border: 1px solid rgba(22, 49, 61, 0.12); + padding: 12px 14px; + font: inherit; + background: rgba(255, 255, 255, 0.96); + color: var(--ink); + } + .report-suggestion { + border-left: 3px solid rgba(31, 110, 95, 0.55); + padding-left: 12px; + margin-top: 12px; + white-space: pre-wrap; + line-height: 1.6; + } + .empty-state { + color: var(--muted); + font-size: 14px; + line-height: 1.6; + } + .section-divider { + height: 1px; + background: rgba(22, 49, 61, 0.1); + margin: 4px 0; + } @media (max-width: 900px) { - .grid, .row, .checks { grid-template-columns: 1fr; } + .grid, .row, .checks, .workbench-layout, .metric-grid, .two-col { grid-template-columns: 1fr; } } @@ -602,6 +743,117 @@ function renderPage() {
+ +
+
+
+

Douyin Workbench

+

采集完成后的结构化数据、Agent 结论、快照与对标结果,都在这块工作台里查看。

+
+
+ + + +
+
+ +
+

登录 StoryForge 后,这里会展示抖音账号列表和分析工作台。

+
+ +
+
+
+

账号列表

+ 0 个账号 +
+ + +
+ +
+
+

先登录并在左侧选择一个账号,或者从“最近运行”里直接打开同步成功的账号。

+
+ + +
+
+