From a839d23e129e14c65c4d216c238414b47cd9ad63 Mon Sep 17 00:00:00 2001 From: Codex Date: Wed, 21 Oct 2026 14:21:03 +0900 Subject: [PATCH] chore(tests): prune obsolete probes and define truthful offline test gates --- AGENTS.md | 2 +- README.md | 4 + package.json | 5 +- scripts/README.md | 59 +++++ scripts/enable-wb-cdp.ps1 | 105 -------- .../rea/probe-add-skill-options-20261016.json | 1 - ...robe-capability-restore-home-20261016.json | 1 - .../rea/probe-connector-detail-20261016.json | 1 - .../rea/probe-custom-connectors-20261016.json | 1 - scripts/rea/probe-expert-entry-20261016.json | 1 - ...odules-install-open-settings-20261017.json | 39 --- .../rea/probe-installed-skills-20261016.json | 1 - .../probe-library-open-local-20261017.json | 25 -- .../probe-library-parity-open-20261017.json | 6 - ...probe-library-parity-restore-20261017.json | 6 - .../probe-library-share-more-20261017.json | 64 ----- .../rea/probe-market-connectors-20261016.json | 1 - scripts/rea/probe-market-skills-20261016.json | 1 - .../probe-model-select-model-20261016.json | 11 - ...e-model-select-open-settings-20261016.json | 10 - .../probe-model-select-provider-20261016.json | 9 - .../probe-model-select-restore-20261016.json | 11 - scripts/rea/probe-my-experts-20261016.json | 1 - scripts/rea/probe-new-task-send-20261017.json | 17 -- ...obe-open-target-conversation-20261017.json | 15 -- .../rea/probe-quote-table-add-20261017.json | 11 - .../probe-select-search-chinese-20261016.json | 1 - ...be-select-search-clear-model-20261016.json | 1 - .../probe-select-search-empty-20261016.json | 1 - .../rea/probe-todo10-general-reset-top.json | 11 - scripts/rea/probe-todo10-general-scroll.json | 17 -- scripts/rea/probe-todo10-open-general.json | 14 - scripts/rea/probe-todo10-open-settings.json | 16 -- scripts/rea/probe-todo11-appearance.json | 17 -- scripts/rea/probe-todo11-general-dark.json | 21 -- scripts/rea/probe-todo11-general-light.json | 21 -- .../probe-todo11-open-appearance-dark.json | 16 -- scripts/rea/probe-todo11-restore-light.json | 8 - scripts/rea/probe-todo11-theme-dark-only.json | 8 - .../rea/probe-todo11-theme-dark-sample.json | 21 -- .../rea/probe-todo11-theme-light-sample.json | 21 -- scripts/rea/probe-todo11-theme-switch.json | 24 -- .../probe-todo12-appearance-for-theme.json | 13 - .../probe-todo12-open-appearance-dark.json | 13 - .../rea/probe-todo12-open-shortcuts-dark.json | 15 -- .../probe-todo12-open-shortcuts-light.json | 16 -- scripts/rea/probe-todo12-restore-light.json | 8 - scripts/rea/probe-todo12-select-dark.json | 8 - .../probe-todo12-shortcuts-interactions.json | 22 -- scripts/rea/probe-todo12-shortcuts.json | 22 -- scripts/rea/probe-todo13-dark-stable.json | 12 - scripts/rea/probe-todo13-light-stable.json | 12 - .../rea/probe-todo13-memory-edit-button.json | 16 -- .../probe-todo13-memory-editor-cancel.json | 15 -- .../probe-todo13-open-appearance-dark.json | 14 - scripts/rea/probe-todo13-open-appearance.json | 14 - ...robe-todo13-open-personalization-dark.json | 14 - ...obe-todo13-open-personalization-light.json | 14 - ...robe-todo13-persona-edit-button-retry.json | 15 -- .../rea/probe-todo13-persona-edit-button.json | 16 -- .../probe-todo13-persona-editor-cancel.json | 20 -- .../probe-todo13-persona-editor-close.json | 16 -- .../probe-todo13-persona-preview-click.json | 13 - ...todo13-personalization-ai-name-cancel.json | 16 -- ...-personalization-custom-prompt-cancel.json | 12 - ...-personalization-custom-prompt-editor.json | 13 - ...sonalization-custom-prompt-save-empty.json | 15 -- .../probe-todo13-personalization-editors.json | 16 -- ...be-todo13-personalization-full-scroll.json | 22 -- ...-todo13-personalization-identity-blur.json | 15 -- ...sonalization-identity-cancel-existing.json | 14 - ...-personalization-identity-close-empty.json | 13 - ...todo13-personalization-identity-hover.json | 11 - ...do13-personalization-identity-restore.json | 15 -- ...-todo13-personalization-identity-save.json | 15 -- ...e-todo13-personalization-interactions.json | 19 -- ...13-personalization-open-custom-prompt.json | 11 - .../probe-todo13-personalization-open.json | 14 - ...obe-todo13-personalization-return-top.json | 14 - .../probe-todo13-personalization-scroll.json | 17 -- .../rea/probe-todo13-preview-open-close.json | 25 -- .../probe-todo13-restore-call-name-space.json | 15 -- scripts/rea/probe-todo13-restore-light.json | 8 - scripts/rea/probe-todo13-select-dark.json | 8 - .../probe-todo13-tone-dropdown-scroll.json | 17 -- scripts/rea/probe-todo15-navigation.json | 14 - .../rea/probe-todo15-open-agents-dark.json | 14 - .../rea/probe-todo15-open-agents-light.json | 14 - .../probe-todo15-open-appearance-dark.json | 14 - .../probe-todo15-open-appearance-light.json | 14 - scripts/rea/probe-todo15-restore-light.json | 13 - .../probe-todo15-scroll-and-return-top.json | 16 -- scripts/rea/probe-todo15-select-dark.json | 14 - .../probe-todo15-team-management-menu.json | 15 -- scripts/rea/probe-todo18-discover-apps.json | 16 -- .../rea/probe-todo19-about-check-updates.json | 14 - scripts/rea/probe-todo19-about-dark.json | 14 - .../rea/probe-todo19-appearance-stable.json | 12 - scripts/rea/probe-todo19-help-dark.json | 14 - scripts/rea/probe-todo19-help-light.json | 15 -- scripts/rea/probe-todo19-navigation.json | 14 - .../probe-todo19-open-appearance-dark.json | 14 - scripts/rea/probe-todo19-open-appearance.json | 14 - scripts/rea/probe-todo19-select-dark.json | 12 - scripts/rea/probe-todo19-select-light.json | 12 - .../rea/probe-user-message-edit-20261017.json | 26 -- ...obe-user-message-edit-cancel-20261017.json | 13 - ...probe-user-message-edit-open-20261017.json | 24 -- .../probe-user-message-revert-20261017.json | 17 -- ...be-user-message-revert-hover-20261017.json | 23 -- .../recommended-skills-backend-regression.ts | 14 +- scripts/regression-reporting.test.mjs | 84 ++++++ scripts/run-alignment-regression.mjs | 25 +- scripts/wb-capture.mjs | 240 ------------------ scripts/wb-home-layout.mjs | 170 ------------- scripts/wb-home-parts.mjs | 140 ---------- scripts/wb-home.mjs | 152 ----------- scripts/wb-icons.mjs | 118 --------- scripts/wb-legacy-disabled.mjs | 3 - scripts/wb-probe.mjs | 171 ------------- scripts/wb-shell.mjs | 151 ----------- scripts/wb-tree.mjs | 153 ----------- 122 files changed, 186 insertions(+), 2876 deletions(-) create mode 100644 scripts/README.md delete mode 100644 scripts/enable-wb-cdp.ps1 delete mode 100644 scripts/rea/probe-add-skill-options-20261016.json delete mode 100644 scripts/rea/probe-capability-restore-home-20261016.json delete mode 100644 scripts/rea/probe-connector-detail-20261016.json delete mode 100644 scripts/rea/probe-custom-connectors-20261016.json delete mode 100644 scripts/rea/probe-expert-entry-20261016.json delete mode 100644 scripts/rea/probe-four-modules-install-open-settings-20261017.json delete mode 100644 scripts/rea/probe-installed-skills-20261016.json delete mode 100644 scripts/rea/probe-library-open-local-20261017.json delete mode 100644 scripts/rea/probe-library-parity-open-20261017.json delete mode 100644 scripts/rea/probe-library-parity-restore-20261017.json delete mode 100644 scripts/rea/probe-library-share-more-20261017.json delete mode 100644 scripts/rea/probe-market-connectors-20261016.json delete mode 100644 scripts/rea/probe-market-skills-20261016.json delete mode 100644 scripts/rea/probe-model-select-model-20261016.json delete mode 100644 scripts/rea/probe-model-select-open-settings-20261016.json delete mode 100644 scripts/rea/probe-model-select-provider-20261016.json delete mode 100644 scripts/rea/probe-model-select-restore-20261016.json delete mode 100644 scripts/rea/probe-my-experts-20261016.json delete mode 100644 scripts/rea/probe-new-task-send-20261017.json delete mode 100644 scripts/rea/probe-open-target-conversation-20261017.json delete mode 100644 scripts/rea/probe-quote-table-add-20261017.json delete mode 100644 scripts/rea/probe-select-search-chinese-20261016.json delete mode 100644 scripts/rea/probe-select-search-clear-model-20261016.json delete mode 100644 scripts/rea/probe-select-search-empty-20261016.json delete mode 100644 scripts/rea/probe-todo10-general-reset-top.json delete mode 100644 scripts/rea/probe-todo10-general-scroll.json delete mode 100644 scripts/rea/probe-todo10-open-general.json delete mode 100644 scripts/rea/probe-todo10-open-settings.json delete mode 100644 scripts/rea/probe-todo11-appearance.json delete mode 100644 scripts/rea/probe-todo11-general-dark.json delete mode 100644 scripts/rea/probe-todo11-general-light.json delete mode 100644 scripts/rea/probe-todo11-open-appearance-dark.json delete mode 100644 scripts/rea/probe-todo11-restore-light.json delete mode 100644 scripts/rea/probe-todo11-theme-dark-only.json delete mode 100644 scripts/rea/probe-todo11-theme-dark-sample.json delete mode 100644 scripts/rea/probe-todo11-theme-light-sample.json delete mode 100644 scripts/rea/probe-todo11-theme-switch.json delete mode 100644 scripts/rea/probe-todo12-appearance-for-theme.json delete mode 100644 scripts/rea/probe-todo12-open-appearance-dark.json delete mode 100644 scripts/rea/probe-todo12-open-shortcuts-dark.json delete mode 100644 scripts/rea/probe-todo12-open-shortcuts-light.json delete mode 100644 scripts/rea/probe-todo12-restore-light.json delete mode 100644 scripts/rea/probe-todo12-select-dark.json delete mode 100644 scripts/rea/probe-todo12-shortcuts-interactions.json delete mode 100644 scripts/rea/probe-todo12-shortcuts.json delete mode 100644 scripts/rea/probe-todo13-dark-stable.json delete mode 100644 scripts/rea/probe-todo13-light-stable.json delete mode 100644 scripts/rea/probe-todo13-memory-edit-button.json delete mode 100644 scripts/rea/probe-todo13-memory-editor-cancel.json delete mode 100644 scripts/rea/probe-todo13-open-appearance-dark.json delete mode 100644 scripts/rea/probe-todo13-open-appearance.json delete mode 100644 scripts/rea/probe-todo13-open-personalization-dark.json delete mode 100644 scripts/rea/probe-todo13-open-personalization-light.json delete mode 100644 scripts/rea/probe-todo13-persona-edit-button-retry.json delete mode 100644 scripts/rea/probe-todo13-persona-edit-button.json delete mode 100644 scripts/rea/probe-todo13-persona-editor-cancel.json delete mode 100644 scripts/rea/probe-todo13-persona-editor-close.json delete mode 100644 scripts/rea/probe-todo13-persona-preview-click.json delete mode 100644 scripts/rea/probe-todo13-personalization-ai-name-cancel.json delete mode 100644 scripts/rea/probe-todo13-personalization-custom-prompt-cancel.json delete mode 100644 scripts/rea/probe-todo13-personalization-custom-prompt-editor.json delete mode 100644 scripts/rea/probe-todo13-personalization-custom-prompt-save-empty.json delete mode 100644 scripts/rea/probe-todo13-personalization-editors.json delete mode 100644 scripts/rea/probe-todo13-personalization-full-scroll.json delete mode 100644 scripts/rea/probe-todo13-personalization-identity-blur.json delete mode 100644 scripts/rea/probe-todo13-personalization-identity-cancel-existing.json delete mode 100644 scripts/rea/probe-todo13-personalization-identity-close-empty.json delete mode 100644 scripts/rea/probe-todo13-personalization-identity-hover.json delete mode 100644 scripts/rea/probe-todo13-personalization-identity-restore.json delete mode 100644 scripts/rea/probe-todo13-personalization-identity-save.json delete mode 100644 scripts/rea/probe-todo13-personalization-interactions.json delete mode 100644 scripts/rea/probe-todo13-personalization-open-custom-prompt.json delete mode 100644 scripts/rea/probe-todo13-personalization-open.json delete mode 100644 scripts/rea/probe-todo13-personalization-return-top.json delete mode 100644 scripts/rea/probe-todo13-personalization-scroll.json delete mode 100644 scripts/rea/probe-todo13-preview-open-close.json delete mode 100644 scripts/rea/probe-todo13-restore-call-name-space.json delete mode 100644 scripts/rea/probe-todo13-restore-light.json delete mode 100644 scripts/rea/probe-todo13-select-dark.json delete mode 100644 scripts/rea/probe-todo13-tone-dropdown-scroll.json delete mode 100644 scripts/rea/probe-todo15-navigation.json delete mode 100644 scripts/rea/probe-todo15-open-agents-dark.json delete mode 100644 scripts/rea/probe-todo15-open-agents-light.json delete mode 100644 scripts/rea/probe-todo15-open-appearance-dark.json delete mode 100644 scripts/rea/probe-todo15-open-appearance-light.json delete mode 100644 scripts/rea/probe-todo15-restore-light.json delete mode 100644 scripts/rea/probe-todo15-scroll-and-return-top.json delete mode 100644 scripts/rea/probe-todo15-select-dark.json delete mode 100644 scripts/rea/probe-todo15-team-management-menu.json delete mode 100644 scripts/rea/probe-todo18-discover-apps.json delete mode 100644 scripts/rea/probe-todo19-about-check-updates.json delete mode 100644 scripts/rea/probe-todo19-about-dark.json delete mode 100644 scripts/rea/probe-todo19-appearance-stable.json delete mode 100644 scripts/rea/probe-todo19-help-dark.json delete mode 100644 scripts/rea/probe-todo19-help-light.json delete mode 100644 scripts/rea/probe-todo19-navigation.json delete mode 100644 scripts/rea/probe-todo19-open-appearance-dark.json delete mode 100644 scripts/rea/probe-todo19-open-appearance.json delete mode 100644 scripts/rea/probe-todo19-select-dark.json delete mode 100644 scripts/rea/probe-todo19-select-light.json delete mode 100644 scripts/rea/probe-user-message-edit-20261017.json delete mode 100644 scripts/rea/probe-user-message-edit-cancel-20261017.json delete mode 100644 scripts/rea/probe-user-message-edit-open-20261017.json delete mode 100644 scripts/rea/probe-user-message-revert-20261017.json delete mode 100644 scripts/rea/probe-user-message-revert-hover-20261017.json create mode 100644 scripts/regression-reporting.test.mjs delete mode 100644 scripts/wb-capture.mjs delete mode 100644 scripts/wb-home-layout.mjs delete mode 100644 scripts/wb-home-parts.mjs delete mode 100644 scripts/wb-home.mjs delete mode 100644 scripts/wb-icons.mjs delete mode 100644 scripts/wb-legacy-disabled.mjs delete mode 100644 scripts/wb-probe.mjs delete mode 100644 scripts/wb-shell.mjs delete mode 100644 scripts/wb-tree.mjs diff --git a/AGENTS.md b/AGENTS.md index 7360b3b..d3ab3e3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -11,7 +11,7 @@ - 借助 REA,按 WorkBuddy 的视觉、交互和功能进行 1:1 复刻。 - 所有查看 WorkBuddy 实现的工作必须通过 REA:安装包、脚本、样式、资源、运行时页面和行为采集均包含在内。 -- 禁止用直接 CDP / WebSocket、手写提取器、浏览器 evaluate、computer-use 或其他渠道绕过 REA 查看原版实现。`scripts/wb-*`、`scripts/enable-wb-cdp.ps1` 是历史工具,不作为现行采集入口。 +- 禁止用直接 CDP / WebSocket、手写提取器、浏览器 evaluate、computer-use 或其他渠道绕过 REA 查看原版实现。旧 `scripts/wb-*`、`scripts/enable-wb-cdp.ps1` 直接采集工具已清理,仅可在 Git 历史中查看,不作为现行采集入口。 - REA 能力不足时记录具体未知项及所需证据;不得自行改用其他采集渠道。 - YCode 自身的源码编辑、构建、测试不受上述原版采集限制。 - 历史文档中的缩减范围、不实现、改用其他采集渠道等决定,若与上述目标冲突,以本约定为准。 diff --git a/README.md b/README.md index f43f172..f8b6cf1 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,10 @@ npm run test:persistence # 实际 IPC → 会话 JSON 的顺序与终态 npm run test:sessions # 并发读写、原子替换与冷加载 ``` +## 测试组织 + +默认离线基线使用 `npm test`;按改动选择专项,不遍历执行整个脚本目录。测试、真实窗口验收、REA 恢复和历史工具的边界见 [脚本入口与测试范围](scripts/README.md)。`test:alignment:dom` 明确要求 DOM 依赖,不允许无声跳过后当成交互通过。 + ## Windows 打包 使用 Windows x64、Node.js 24.x 和 npm。当前源码构建与本次验收边界见 [十项对齐实现与验收](docs/对话输入统一对齐实现与验收-2026-10-21.md)。[旧打包 SOP](docs/打包流程SOP-2026-10-18.md) 中 OMP 与旧版本信息仅作历史参照。 diff --git a/package.json b/package.json index 50da7cb..b89eb9a 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,11 @@ "author": "YCode", "main": "./out/main/index.mjs", "scripts": { + "test": "npm run test:core", + "test:core": "npm run typecheck && npm run test:chat && npm run test:sessions && npm run test:persistence && npm run test:conversation", "test:alignment": "node scripts/run-alignment-regression.mjs", + "test:alignment:dom": "node scripts/run-alignment-regression.mjs --require-dom", + "test:reporting": "node --test scripts/regression-reporting.test.mjs", "test:capability-slash:ui": "node scripts/test-capability-slash-ui.mjs", "test:recommended-skills": "esbuild scripts/recommended-skills-backend-regression.ts --bundle --platform=node --format=esm --external:esbuild --outfile=.tmp/recommended-skills-backend-regression.mjs --log-level=warning && node .tmp/recommended-skills-backend-regression.mjs", "test:recommended-skills:ui": "node scripts/test-recommended-skills-ui.mjs", @@ -46,7 +50,6 @@ "updates:prepare": "node scripts/updates/prepare-release.mjs", "updates:deploy": "node scripts/updates/deploy.mjs", "verify:ui": "node scripts/verify-ui.mjs", - "wb:capture": "node scripts/wb-capture.mjs 9223 .tmp/wb-capture", "test:media": "esbuild scripts/mermaid-regression.ts --bundle --platform=node --format=esm --packages=external --jsx=automatic --loader:.css=empty --outfile=.tmp/media-tests/mermaid-regression.mjs --log-level=warning && node .tmp/media-tests/mermaid-regression.mjs && esbuild scripts/image-renderer-regression.tsx scripts/path-renderer-regression.tsx --bundle --platform=node --format=cjs --jsx=automatic --loader:.css=empty --out-extension:.js=.cjs --outdir=.tmp/media-tests --log-level=warning && node .tmp/media-tests/image-renderer-regression.cjs && node .tmp/media-tests/path-renderer-regression.cjs", "test:resources": "esbuild scripts/resource-bridge-regression.ts --bundle --platform=node --format=esm --external:esbuild --outfile=.tmp/resource-bridge-regression.mjs --log-level=warning && node .tmp/resource-bridge-regression.mjs", "recover:typography": "node scripts/rea/recover-typography-reference.mjs", diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 0000000..6dd3be1 --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,59 @@ +# 脚本入口与测试范围 + +`scripts/` 同时包含回归测试、构建/发布工具和 REA 恢复工具;文件数量不等于测试覆盖数量。**不要遍历目录逐个执行脚本。** 某些工具会连接窗口、调用模型、下载包或发布产物,必须先阅读其用途、参数和隔离要求。 + +## 默认离线基线 + +```sh +npm test +# 等同于 npm run test:core +``` + +包含类型检查、聊天状态/消息顺序、会话存储、持久化和会话渲染回归。使用模拟宿主或临时目录,不启动真实模型或桌面应用。这个入口是跨模块基础检查,**不是全产品、SDK 或 UI 验收**,也不替代构建。 + +## 按改动选择专项 + +| 改动范围 | 应选入口 | 重要边界 | +| --- | --- | --- | +| 对话/模型/权限/折叠 | `test:alignment`、`test:conversation`;交互变更加 `test:alignment:dom` | 普通 alignment 无 DOM 依赖时明确 SKIP;严格 DOM 入口缺依赖会失败。授权回归含 mock,非真实 SDK 证明 | +| 推荐技能/安装状态 | `test:recommended-skills`、`test:recommended-skills:dom` | 前者受控安装归档;真实发布包为单列可选检查,不能把 SKIP 算通过 | +| 能力选择/使用草稿 | `test:composer-capabilities` | 不启动真实模型;完整应用事件链另验 | +| 正文/代码/数学/媒体 | `test:markdown`、`test:recovered`、`test:media` | 根据实际变更选取,不代表像素一致 | +| 文件/会话持久化 | `test:resources`、`test:persistence`、`test:sessions` | 先核对脚本临时目录与宿主隔离 | +| 升级/发布 | `test:updates`、`test:release` | 不等于执行 `release` 或 `updates:deploy`;发布命令单独授权 | +| 设计 token/恢复闭包 | `check:tokens`、`test:fold-summary` 等 | 非零退出必须保留;已有失败不能刷新 baseline 掩盖 | + +需要 jsdom 的测试使用已安装模块,不自动下载依赖: + +```sh +# Unix 示例;替换为实际已安装 jsdom 路径 +YCODE_TEST_DOM_MODULE=/absolute/path/to/node_modules/jsdom npm run test:alignment:dom +YCODE_TEST_DOM_MODULE=/absolute/path/to/node_modules/jsdom npm run test:recommended-skills:dom +``` + +PowerShell 使用 `$env:YCODE_TEST_DOM_MODULE = <绝对路径>`,再运行相同 npm 命令。依赖安装与锁文件变更按项目约定单独处理。 + +## Windows / 真实窗口验证 + +例如 `test:recommended-skills:ui`、`node scripts/verify-task-menu.cjs`、`node scripts/test-mode-chip-native.mjs`。这些是特定场景,不是统一全量 UI 集。先读脚本并确认临时 userData/工作目录、受控宿主、是否访问模型/网络;不得连接生产数据或原版 WorkBuddy 进行未经允许的操作。 + +`test:recommended-skills:app`、SDK smoke、网络包验证等可能需要额外资源或有外部行为,不纳入默认离线入口。无 DISPLAY、native 模块或权限导致启动失败,应标为**环境阻塞**,不是通过。`--build-only`、SSR、jsdom、静态 CSS 断言都不等于真实布局或像素验收。 + +真实 dev 启动遵循 [Dev 启动 SOP](../docs/协作/Dev启动SOP.md),测试应用另用隔离数据,不能以启动测试窗口代替用户要求的 dev。 + +## 维护工具,不是产品测试 + +- `scripts/rea/`:REA 证据解析、源码/样式恢复、可复用采集配置及相应工具自测。必须保留生成物来源与重建依赖;只通过 REA 查看原版。 +- `scripts/updates/`:发布、签名和更新维护。自测与实际发布命令分开。 +- `shot` 及保留的现场探针:人工诊断工具,不在默认测试中运行;先确认目标应用/端口/数据。 +- `scripts/fixtures/`:受测试引用的夹具,不因没有 npm 入口而删除。 + +历史一次性探针和停用的直接 WorkBuddy CDP 工具已按本次清理清单删除,不复制到另一目录制造第二份。旧文档中的路径可能属于历史提交,请按清单的基线 SHA 从 Git 恢复或查看;不能据此复活已禁用的采集通道。 + +## 新增与删除规则 + +1. 优先扩展同模块测试,不为每个 UI 小修复制完整 Electron 启动器。 +2. 新脚本注明需求/模块、运行环境、是否联网/模型/真实数据,以及明确的 PASS/FAIL/SKIP;跳过不能冒充通过。 +3. 必要断言不能为变绿删除;失败区分产品缺陷与环境缺失。 +4. 删除前检查 npm 入口、import/require、runner 动态文件列表、夹具、恢复链及当前文档;仅历史记录引用不等于运行依赖,但须给恢复路径。 +5. 提交测试证据时写明受测代码 SHA、实际命令和未验证范围。默认基线通过不自动关闭需求验收。 diff --git a/scripts/enable-wb-cdp.ps1 b/scripts/enable-wb-cdp.ps1 deleted file mode 100644 index c933983..0000000 --- a/scripts/enable-wb-cdp.ps1 +++ /dev/null @@ -1,105 +0,0 @@ -# Enable WorkBuddy CDP and capture UI styles. -# -# Purpose: make the real WorkBuddy expose DevTools Protocol on port 9223, then -# capture element rects + computed styles for the sidebar, conversation -# area and input area, as the basis for YCode visual alignment. -# -# NOTE: WorkBuddy has a single-instance lock, so it must be fully exited and -# restarted with the env var set. Running this script therefore CLOSES the -# current WorkBuddy window (including any conversation in progress). -# -# Usage (run in a PowerShell window OUTSIDE WorkBuddy): -# powershell -NoProfile -ExecutionPolicy Bypass -File C:\Users\Administrator\code\YCode\scripts\enable-wb-cdp.ps1 -# -# This file is intentionally ASCII-only: Windows PowerShell 5.1 reads .ps1 as -# ANSI, so non-ASCII text would be corrupted and break the parser. - -$ErrorActionPreference = 'Stop' - -$WorkBuddyExe = Join-Path $env:LOCALAPPDATA 'Programs\WorkBuddy\WorkBuddy.exe' -$ProjectRoot = 'C:\Users\Administrator\code\YCode' -$DebugPort = 9223 -# Captures contain real conversation content, so they are kept in a private -# user directory instead of the repository. -$OutDir = Join-Path $env:USERPROFILE '.ycode\captures' - -Write-Host '=== YCode: enable WorkBuddy CDP and capture ===' -ForegroundColor Cyan - -if (-not (Test-Path $WorkBuddyExe)) { - Write-Host "[FAIL] WorkBuddy not found: $WorkBuddyExe" -ForegroundColor Red - exit 1 -} - -# ---------- 1. stop existing instances ---------- -Write-Host '[1/5] Stopping running WorkBuddy processes...' -Get-Process -Name WorkBuddy -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue -Start-Sleep -Seconds 4 -$left = Get-Process -Name WorkBuddy -ErrorAction SilentlyContinue -if ($left) { - Write-Host "[WARN] still alive: $($left.Id -join ',') ; waiting 4s more..." -ForegroundColor Yellow - Start-Sleep -Seconds 4 -} - -# ---------- 2. launch with debug port ---------- -Write-Host '[2/5] Starting with WORKBUDDY_REMOTE_DEBUGGING_PORT...' -$previous = $env:WORKBUDDY_REMOTE_DEBUGGING_PORT -try { - $env:WORKBUDDY_REMOTE_DEBUGGING_PORT = "$DebugPort" - Start-Process -FilePath $WorkBuddyExe -} finally { - if ($null -eq $previous) { - Remove-Item Env:WORKBUDDY_REMOTE_DEBUGGING_PORT -ErrorAction SilentlyContinue - } else { - $env:WORKBUDDY_REMOTE_DEBUGGING_PORT = $previous - } -} - -# ---------- 3. wait for the debug port ---------- -Write-Host '[3/5] Waiting for debug port (up to 90s)...' -$ready = $false -for ($i = 1; $i -le 45; $i++) { - Start-Sleep -Seconds 2 - try { - $null = Invoke-RestMethod "http://127.0.0.1:$DebugPort/json/version" -TimeoutSec 3 - $ready = $true - break - } catch { - if (($i % 5) -eq 0) { - $waited = $i * 2 - Write-Host " ...waited $waited s" - } - } -} - -if (-not $ready) { - Write-Host '[FAIL] Debug port did not open. WorkBuddy is running normally, but without CDP.' -ForegroundColor Red - Write-Host 'Possible causes: the switch was removed in this version, or the port is taken.' -ForegroundColor Yellow - Write-Host 'Please send this window output back to the assistant.' -ForegroundColor Yellow - exit 2 -} -Write-Host ' Port is ready.' -ForegroundColor Green - -# ---------- 4. capture ---------- -Write-Host '[4/5] Capturing UI styles...' -$stamp = Get-Date -Format 'yyyyMMdd-HHmmss' -$target = Join-Path $OutDir $stamp -New-Item -ItemType Directory -Force -Path $target | Out-Null - -Push-Location $ProjectRoot -try { - node scripts\wb-capture.mjs $DebugPort $target -} finally { - Pop-Location -} - -# ---------- 5. summary ---------- -Write-Host '[5/5] Done.' -Get-ChildItem -LiteralPath $target | Select-Object Name, Length | Format-Table -AutoSize - -Write-Host '' -Write-Host 'Output directory:' -NoNewline -Write-Host " $target" -ForegroundColor Green -Write-Host '' -Write-Host 'Next steps:' -ForegroundColor Cyan -Write-Host ' 1) Go back to WorkBuddy, reopen the conversation, and send the directory path above to the assistant.' -Write-Host ' 2) To disable CDP later: exit WorkBuddy, then start it again WITHOUT the env var.' diff --git a/scripts/rea/probe-add-skill-options-20261016.json b/scripts/rea/probe-add-skill-options-20261016.json deleted file mode 100644 index 32343a4..0000000 --- a/scripts/rea/probe-add-skill-options-20261016.json +++ /dev/null @@ -1 +0,0 @@ -{"actions":[{"kind":"click","step_id":"back-to-skills-market","selector":".sm-installed-topbar-nav","frames":0},{"kind":"wait","step_id":"market-ready","duration_ms":200,"frames":0},{"kind":"click","step_id":"open-add-skill-options","selector":".sm-topbar-action-btn[aria-label='添加技能']","frames":0},{"kind":"wait","step_id":"add-skill-options-ready","duration_ms":300,"frames":1},{"kind":"key","step_id":"dismiss-add-skill-options","key":"Escape","frames":0}]} diff --git a/scripts/rea/probe-capability-restore-home-20261016.json b/scripts/rea/probe-capability-restore-home-20261016.json deleted file mode 100644 index 6d2b463..0000000 --- a/scripts/rea/probe-capability-restore-home-20261016.json +++ /dev/null @@ -1 +0,0 @@ -{"actions":[{"kind":"click","step_id":"restore-home","selector":".conversation-list-tabs button[role=tab]","index":0,"frames":0}]} diff --git a/scripts/rea/probe-connector-detail-20261016.json b/scripts/rea/probe-connector-detail-20261016.json deleted file mode 100644 index b45aaee..0000000 --- a/scripts/rea/probe-connector-detail-20261016.json +++ /dev/null @@ -1 +0,0 @@ -{"actions":[{"kind":"click","step_id":"open-qq-mail-detail","selector":".connector-card-name","index":2,"frames":0},{"kind":"wait","step_id":"connector-detail-ready","duration_ms":500,"frames":1},{"kind":"key","step_id":"close-detail","key":"Escape","frames":0},{"kind":"wait","step_id":"detail-close-result","duration_ms":150,"frames":1}]} diff --git a/scripts/rea/probe-custom-connectors-20261016.json b/scripts/rea/probe-custom-connectors-20261016.json deleted file mode 100644 index 576811e..0000000 --- a/scripts/rea/probe-custom-connectors-20261016.json +++ /dev/null @@ -1 +0,0 @@ -{"actions":[{"kind":"click","step_id":"close-qq-mail-detail","selector":".connector-detail-close","frames":0},{"kind":"click","step_id":"open-custom-connectors","selector":".connector-topbar-action-btn","frames":0},{"kind":"wait","step_id":"custom-connectors-ready","duration_ms":500,"frames":1}]} diff --git a/scripts/rea/probe-expert-entry-20261016.json b/scripts/rea/probe-expert-entry-20261016.json deleted file mode 100644 index a414bdc..0000000 --- a/scripts/rea/probe-expert-entry-20261016.json +++ /dev/null @@ -1 +0,0 @@ -{"track_selectors":[".conversation-list-tabs"],"actions":[{"kind":"click","step_id":"open-expert-entry","selector":".conversation-list-tabs button[role=tab]","index":2,"frames":0},{"kind":"wait","step_id":"expert-entry-ready","duration_ms":500,"frames":1}]} diff --git a/scripts/rea/probe-four-modules-install-open-settings-20261017.json b/scripts/rea/probe-four-modules-install-open-settings-20261017.json deleted file mode 100644 index 38caabf..0000000 --- a/scripts/rea/probe-four-modules-install-open-settings-20261017.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".user-menu-popover", - ".user-menu-items", - "[data-settings-tab=\"buddyApps\"]", - ".settings-navigation__item--active[data-settings-tab=\"buddyApps\"]", - ".settings-modal__panel" - ], - "actions": [ - { - "kind": "click", - "step_id": "open-account-menu", - "selector": ".user-menu-trigger--workbuddy", - "index": 0, - "frames": 0 - }, - { - "kind": "wait", - "step_id": "account-menu-ready", - "duration_ms": 500, - "frames": 0 - }, - { - "kind": "click", - "step_id": "open-settings-window", - "selector": ".user-menu-items .user-menu-item", - "index": 3, - "frames": 0 - }, - { - "kind": "wait", - "step_id": "settings-window-ready", - "duration_ms": 1200, - "frames": 0 - } - ] -} diff --git a/scripts/rea/probe-installed-skills-20261016.json b/scripts/rea/probe-installed-skills-20261016.json deleted file mode 100644 index d625c2e..0000000 --- a/scripts/rea/probe-installed-skills-20261016.json +++ /dev/null @@ -1 +0,0 @@ -{"actions":[{"kind":"click","step_id":"close-mcp-manager","selector":".mcp-modal-close","frames":0},{"kind":"click","step_id":"skills-tab","selector":".um-header__tabs [role=tab]","index":1,"frames":0},{"kind":"wait","step_id":"skills-tab-ready","duration_ms":350,"frames":0},{"kind":"click","step_id":"show-installed-skills","selector":"button[data-track-id=skill_market_my_installed_open]","frames":0},{"kind":"wait","step_id":"installed-skills-ready","duration_ms":600,"frames":1}]} diff --git a/scripts/rea/probe-library-open-local-20261017.json b/scripts/rea/probe-library-open-local-20261017.json deleted file mode 100644 index 748d323..0000000 --- a/scripts/rea/probe-library-open-local-20261017.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "include_fonts": false, - "track_selectors": [ - ".conversation-list-tab-button", - ".library-page", - ".library-nav-item", - ".my-files-flat-row--file", - ".my-files-flat-col-actions" - ], - "actions": [ - { - "kind": "click", - "step_id": "open-library", - "selector": ".conversation-list-tab-button", - "index": 4, - "frames": 1 - }, - { - "kind": "wait", - "step_id": "library-ready", - "duration_ms": 450, - "frames": 1 - } - ] -} diff --git a/scripts/rea/probe-library-parity-open-20261017.json b/scripts/rea/probe-library-parity-open-20261017.json deleted file mode 100644 index 609054e..0000000 --- a/scripts/rea/probe-library-parity-open-20261017.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "actions": [ - { "kind": "click", "step_id": "library-assets-open", "selector": ".conversation-list-tab-button:nth-child(5)", "frames": 0 }, - { "kind": "wait", "step_id": "library-assets-ready", "duration_ms": 1000, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-library-parity-restore-20261017.json b/scripts/rea/probe-library-parity-restore-20261017.json deleted file mode 100644 index fd41755..0000000 --- a/scripts/rea/probe-library-parity-restore-20261017.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "actions": [ - { "kind": "click", "step_id": "restore-current-task", "selector": ".conversation-agent-card", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "restored-current-task", "duration_ms": 600, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-library-share-more-20261017.json b/scripts/rea/probe-library-share-more-20261017.json deleted file mode 100644 index 5ee7b51..0000000 --- a/scripts/rea/probe-library-share-more-20261017.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "include_fonts": false, - "track_selectors": [ - ".my-files-flat-col-actions", - ".my-files-list-action-wrapper", - ".my-files-list-action-btn", - "[role=dialog]", - "[role=menu]", - ".wb-popover", - ".wb-dropdown" - ], - "actions": [ - { - "kind": "click", - "step_id": "open-local-share", - "selector": ".my-files-flat-row--file .my-files-list-action-btn", - "index": 0, - "frames": 1 - }, - { - "kind": "wait", - "step_id": "local-share-open-stable", - "duration_ms": 350, - "frames": 1 - }, - { - "kind": "key", - "step_id": "close-local-share", - "key": "Escape", - "frames": 0 - }, - { - "kind": "wait", - "step_id": "local-share-close-stable", - "duration_ms": 180, - "frames": 1 - }, - { - "kind": "click", - "step_id": "open-local-more", - "selector": ".my-files-flat-row--file .my-files-list-action-btn", - "index": 1, - "frames": 1 - }, - { - "kind": "wait", - "step_id": "local-more-open-stable", - "duration_ms": 350, - "frames": 1 - }, - { - "kind": "key", - "step_id": "close-local-more", - "key": "Escape", - "frames": 0 - }, - { - "kind": "wait", - "step_id": "local-more-close-stable", - "duration_ms": 180, - "frames": 1 - } - ] -} diff --git a/scripts/rea/probe-market-connectors-20261016.json b/scripts/rea/probe-market-connectors-20261016.json deleted file mode 100644 index 7a3dec2..0000000 --- a/scripts/rea/probe-market-connectors-20261016.json +++ /dev/null @@ -1 +0,0 @@ -{"actions":[{"kind":"click","step_id":"open-connectors-tab","selector":".um-header__tabs [role=tab]","index":2,"frames":0},{"kind":"wait","step_id":"connectors-ready","duration_ms":600,"frames":1}]} diff --git a/scripts/rea/probe-market-skills-20261016.json b/scripts/rea/probe-market-skills-20261016.json deleted file mode 100644 index de7c3fa..0000000 --- a/scripts/rea/probe-market-skills-20261016.json +++ /dev/null @@ -1 +0,0 @@ -{"actions":[{"kind":"key","step_id":"dismiss-nav-menu","key":"Escape","frames":0},{"kind":"click","step_id":"open-skills-tab","selector":".um-header__tabs [role=tab]","index":1,"frames":0},{"kind":"wait","step_id":"skills-ready","duration_ms":600,"frames":1}]} diff --git a/scripts/rea/probe-model-select-model-20261016.json b/scripts/rea/probe-model-select-model-20261016.json deleted file mode 100644 index a3e3c0e..0000000 --- a/scripts/rea/probe-model-select-model-20261016.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [".models-settings-panel__model-select", ".wb-select-popover", ".wb-select__panel", ".wb-select__search", ".wb-select__list"], - "actions": [ - { "kind": "click", "step_id": "close-provider-dropdown", "selector": ".models-settings-panel__provider-select", "frames": 0 }, - { "kind": "wait", "step_id": "provider-dropdown-closed", "duration_ms": 180, "frames": 0 }, - { "kind": "click", "step_id": "open-default-model-dropdown", "selector": ".models-settings-panel__model-select", "frames": 0 }, - { "kind": "wait", "step_id": "default-model-dropdown-ready", "duration_ms": 250, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-model-select-open-settings-20261016.json b/scripts/rea/probe-model-select-open-settings-20261016.json deleted file mode 100644 index f518e35..0000000 --- a/scripts/rea/probe-model-select-open-settings-20261016.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "actions": [ - { "kind": "click", "step_id": "open-home-model-picker", "selector": ".cr-model-selector__trigger", "frames": 0 }, - { "kind": "wait", "step_id": "home-model-picker-ready", "duration_ms": 180, "frames": 1 }, - { "kind": "click", "step_id": "open-custom-model-settings", "selector": ".cr-model-selector__menu > .cr-menu-item:last-child", "frames": 0 }, - { "kind": "wait", "step_id": "custom-model-settings-opening", "duration_ms": 300, "frames": 0 } - ] -} diff --git a/scripts/rea/probe-model-select-provider-20261016.json b/scripts/rea/probe-model-select-provider-20261016.json deleted file mode 100644 index 485118c..0000000 --- a/scripts/rea/probe-model-select-provider-20261016.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [".models-settings-panel__provider-select", ".wb-select-popover", ".wb-select__panel", ".wb-select__search", ".wb-select__list"], - "actions": [ - { "kind": "click", "step_id": "open-provider-dropdown", "selector": ".models-settings-panel__provider-select", "frames": 0 }, - { "kind": "wait", "step_id": "provider-dropdown-ready", "duration_ms": 250, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-model-select-restore-20261016.json b/scripts/rea/probe-model-select-restore-20261016.json deleted file mode 100644 index 8052138..0000000 --- a/scripts/rea/probe-model-select-restore-20261016.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "actions": [ - { "kind": "click", "step_id": "close-model-dropdown", "selector": ".models-settings-panel__model-select", "frames": 0 }, - { "kind": "wait", "step_id": "dropdown-closed", "duration_ms": 180, "frames": 0 }, - { "kind": "click", "step_id": "cancel-unsaved-model-editor", "selector": ".models-settings-panel__editor-close", "frames": 0 }, - { "kind": "wait", "step_id": "unsaved-editor-closed", "duration_ms": 180, "frames": 1 }, - { "kind": "click", "step_id": "close-settings-window", "selector": ".settings-window-close", "frames": 0 } - ] -} diff --git a/scripts/rea/probe-my-experts-20261016.json b/scripts/rea/probe-my-experts-20261016.json deleted file mode 100644 index cd36bc7..0000000 --- a/scripts/rea/probe-my-experts-20261016.json +++ /dev/null @@ -1 +0,0 @@ -{"actions":[{"kind":"click","step_id":"expert-tab","selector":".um-header__tabs [role=tab]","index":0,"frames":0},{"kind":"wait","step_id":"expert-tab-ready","duration_ms":350,"frames":0},{"kind":"click","step_id":"show-my-experts","selector":"button[class*='_topbarActionBtn_']","frames":0},{"kind":"wait","step_id":"my-experts-ready","duration_ms":600,"frames":1}]} diff --git a/scripts/rea/probe-new-task-send-20261017.json b/scripts/rea/probe-new-task-send-20261017.json deleted file mode 100644 index a236ff5..0000000 --- a/scripts/rea/probe-new-task-send-20261017.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": true, - "track_selectors": [ - ".conversation-page-chrome__content", - ".conversation-input", - ".cr-input-editor-host", - ".cr-send-button" - ], - "actions": [ - { "kind": "wait", "step_id": "wait-100ms", "duration_ms": 0, "frames": 1 }, - { "kind": "wait", "step_id": "wait-300ms", "duration_ms": 200, "frames": 1 }, - { "kind": "wait", "step_id": "wait-500ms", "duration_ms": 100, "frames": 1 }, - { "kind": "wait", "step_id": "wait-1000ms", "duration_ms": 400, "frames": 1 }, - { "kind": "wait", "step_id": "wait-2000ms", "duration_ms": 1000, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-open-target-conversation-20261017.json b/scripts/rea/probe-open-target-conversation-20261017.json deleted file mode 100644 index a0f88bf..0000000 --- a/scripts/rea/probe-open-target-conversation-20261017.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": true, - "track_selectors": [ - ".cr-self-bubble", - ".cr-frame--right", - ".cr-toolbar" - ], - "actions": [ - { "kind": "click", "step_id": "open-first-space-task", "selector": ".conversation-item", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "conversation-loaded", "duration_ms": 1500, "frames": 1 }, - { "kind": "hover", "step_id": "hover-user-message", "selector": ".cr-self-bubble", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "toolbar-visible", "duration_ms": 400, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-quote-table-add-20261017.json b/scripts/rea/probe-quote-table-add-20261017.json deleted file mode 100644 index bcf29c6..0000000 --- a/scripts/rea/probe-quote-table-add-20261017.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": true, - "track_selectors": [".cr-table-block", ".cr-message-quote-table-menu", ".cr-message-quote-table-action", ".cr-input-banner-rail", ".cr-input-quote-card"], - "actions": [ - { "kind": "hover", "step_id": "hover-table", "selector": ".cr-table-block", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "menu-visible", "duration_ms": 250, "frames": 1 }, - { "kind": "click", "step_id": "add-table-to-conversation", "selector": ".cr-message-quote-table-action", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "quote-card-rendered", "duration_ms": 600, "frames": 2 } - ] -} diff --git a/scripts/rea/probe-select-search-chinese-20261016.json b/scripts/rea/probe-select-search-chinese-20261016.json deleted file mode 100644 index a337b0b..0000000 --- a/scripts/rea/probe-select-search-chinese-20261016.json +++ /dev/null @@ -1 +0,0 @@ -{"include_fonts":false,"include_message_content":true,"track_selectors":[".wb-select-popover",".wb-select__list",".wb-select__option"],"actions":[{"kind":"text","step_id":"query-tencent-chinese","selector":".wb-select__search input","text":"腾讯","frames":0},{"kind":"wait","step_id":"query-tencent-result","duration_ms":180,"frames":1}]} diff --git a/scripts/rea/probe-select-search-clear-model-20261016.json b/scripts/rea/probe-select-search-clear-model-20261016.json deleted file mode 100644 index 13e161f..0000000 --- a/scripts/rea/probe-select-search-clear-model-20261016.json +++ /dev/null @@ -1 +0,0 @@ -{"include_fonts":false,"include_message_content":true,"track_selectors":[".wb-select-popover",".wb-select__list",".wb-select__option"],"actions":[{"kind":"text","step_id":"clear-provider-query","selector":".wb-select__search input","text":"","frames":0},{"kind":"wait","step_id":"provider-query-cleared","duration_ms":180,"frames":1},{"kind":"click","step_id":"close-provider","selector":".models-settings-panel__provider-select","frames":0},{"kind":"wait","step_id":"provider-closed","duration_ms":180,"frames":0},{"kind":"click","step_id":"open-model","selector":".models-settings-panel__model-select","frames":0},{"kind":"wait","step_id":"model-open","duration_ms":180,"frames":0},{"kind":"text","step_id":"query-model-case-insensitive","selector":".wb-select__search input","text":"minimax","frames":0},{"kind":"wait","step_id":"model-query-results","duration_ms":180,"frames":1}]} diff --git a/scripts/rea/probe-select-search-empty-20261016.json b/scripts/rea/probe-select-search-empty-20261016.json deleted file mode 100644 index 2cda2c3..0000000 --- a/scripts/rea/probe-select-search-empty-20261016.json +++ /dev/null @@ -1 +0,0 @@ -{"include_fonts":false,"include_message_content":true,"track_selectors":[".wb-select-popover",".wb-select__list",".wb-select__empty"],"actions":[{"kind":"text","step_id":"query-no-provider","selector":".wb-select__search input","text":"NO_SUCH_PROVIDER_1","frames":0},{"kind":"wait","step_id":"query-empty-result","duration_ms":180,"frames":1}]} diff --git a/scripts/rea/probe-todo10-general-reset-top.json b/scripts/rea/probe-todo10-general-reset-top.json deleted file mode 100644 index 3d1a026..0000000 --- a/scripts/rea/probe-todo10-general-reset-top.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".general-settings-panel" - ], - "actions": [ - { "kind": "scroll", "step_id": "return-general-top", "selector": ".settings-modal__panel", "delta_y": -1000, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo10-general-scroll.json b/scripts/rea/probe-todo10-general-scroll.json deleted file mode 100644 index a60316c..0000000 --- a/scripts/rea/probe-todo10-general-scroll.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".general-settings-panel", - ".general-settings-panel__group", - ".general-settings-panel__group-card", - ".general-settings-panel__section" - ], - "actions": [ - { "kind": "wait", "step_id": "general-top", "duration_ms": 250, "frames": 1 }, - { "kind": "scroll", "step_id": "general-scroll-1", "selector": ".settings-modal__panel", "delta_y": 400, "frames": 1 }, - { "kind": "scroll", "step_id": "general-scroll-2-to-bottom", "selector": ".settings-modal__panel", "delta_y": 400, "frames": 1 }, - { "kind": "scroll", "step_id": "return-general-top", "selector": ".settings-modal__panel", "delta_y": -1000, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo10-open-general.json b/scripts/rea/probe-todo10-open-general.json deleted file mode 100644 index 641040c..0000000 --- a/scripts/rea/probe-todo10-open-general.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".general-settings-panel", - ".general-settings-panel__group", - ".general-settings-panel__section" - ], - "actions": [ - { "kind": "click", "step_id": "select-general-tab", "selector": ".settings-navigation__item", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "general-ready", "duration_ms": 500, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo10-open-settings.json b/scripts/rea/probe-todo10-open-settings.json deleted file mode 100644 index 3441be5..0000000 --- a/scripts/rea/probe-todo10-open-settings.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".user-menu-popover", - ".user-menu-items", - ".settings-modal__panel", - ".general-settings-panel" - ], - "actions": [ - { "kind": "click", "step_id": "open-account-menu", "selector": ".user-menu-trigger--workbuddy", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "account-menu-ready", "duration_ms": 500, "frames": 0 }, - { "kind": "click", "step_id": "open-settings", "selector": ".user-menu-items .user-menu-item", "index": 3, "frames": 0 }, - { "kind": "wait", "step_id": "settings-ready", "duration_ms": 800, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo11-appearance.json b/scripts/rea/probe-todo11-appearance.json deleted file mode 100644 index 66463d5..0000000 --- a/scripts/rea/probe-todo11-appearance.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - "html", - "body", - ".settings-modal", - ".settings-navigation", - ".settings-navigation__item", - ".settings-modal__panel", - "[class*=appearance]" - ], - "actions": [ - { "kind": "click", "step_id": "select-appearance-tab", "selector": ".settings-navigation__item[data-settings-tab=\"appearance\"]", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "appearance-ready", "duration_ms": 600, "frames": 2 } - ] -} diff --git a/scripts/rea/probe-todo11-general-dark.json b/scripts/rea/probe-todo11-general-dark.json deleted file mode 100644 index 356d3ee..0000000 --- a/scripts/rea/probe-todo11-general-dark.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - "html", - "body", - ".settings-window-root", - ".settings-navigation__item--active", - ".settings-modal__panel", - ".general-settings-panel", - ".general-settings-panel__group-card", - ".general-settings-panel__section-title", - ".general-settings-panel__section-desc", - ".wb-select", - ".wb-switch" - ], - "actions": [ - { "kind": "click", "step_id": "select-general-dark", "selector": ".settings-navigation__item", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "general-dark-ready", "duration_ms": 500, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo11-general-light.json b/scripts/rea/probe-todo11-general-light.json deleted file mode 100644 index ffb47fc..0000000 --- a/scripts/rea/probe-todo11-general-light.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - "html", - "body", - ".settings-window-root", - ".settings-navigation__item--active", - ".settings-modal__panel", - ".general-settings-panel", - ".general-settings-panel__group-card", - ".general-settings-panel__section-title", - ".general-settings-panel__section-desc", - ".wb-select", - ".wb-switch" - ], - "actions": [ - { "kind": "click", "step_id": "select-general-light", "selector": ".settings-navigation__item", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "general-light-ready", "duration_ms": 500, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo11-open-appearance-dark.json b/scripts/rea/probe-todo11-open-appearance-dark.json deleted file mode 100644 index 33f57fd..0000000 --- a/scripts/rea/probe-todo11-open-appearance-dark.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - "html", - "body", - ".settings-window-root", - ".settings-navigation__item--active", - ".settings-modal__panel", - ".appearance-panel" - ], - "actions": [ - { "kind": "click", "step_id": "select-appearance-dark", "selector": ".settings-navigation__item[data-settings-tab=\"appearance\"]", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "appearance-dark-ready", "duration_ms": 500, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo11-restore-light.json b/scripts/rea/probe-todo11-restore-light.json deleted file mode 100644 index ed021c0..0000000 --- a/scripts/rea/probe-todo11-restore-light.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [], - "actions": [ - { "kind": "click", "step_id": "restore-light-theme", "selector": ".appearance-card--light", "index": 0, "frames": 0 } - ] -} diff --git a/scripts/rea/probe-todo11-theme-dark-only.json b/scripts/rea/probe-todo11-theme-dark-only.json deleted file mode 100644 index 9795a3e..0000000 --- a/scripts/rea/probe-todo11-theme-dark-only.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [], - "actions": [ - { "kind": "click", "step_id": "select-dark-theme", "selector": ".appearance-card--dark", "index": 0, "frames": 0 } - ] -} diff --git a/scripts/rea/probe-todo11-theme-dark-sample.json b/scripts/rea/probe-todo11-theme-dark-sample.json deleted file mode 100644 index 41ddc26..0000000 --- a/scripts/rea/probe-todo11-theme-dark-sample.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - "html", - "body", - ".settings-window-root", - ".settings-window-chrome", - ".settings-modal", - ".settings-navigation", - ".settings-navigation__item--active", - ".settings-modal__panel", - ".appearance-preview", - ".appearance-badge", - ".appearance-list__title", - ".appearance-card--selected" - ], - "actions": [ - { "kind": "wait", "step_id": "dark-theme-stable", "duration_ms": 800, "frames": 4 } - ] -} diff --git a/scripts/rea/probe-todo11-theme-light-sample.json b/scripts/rea/probe-todo11-theme-light-sample.json deleted file mode 100644 index 13c18ef..0000000 --- a/scripts/rea/probe-todo11-theme-light-sample.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - "html", - "body", - ".settings-window-root", - ".settings-window-chrome", - ".settings-modal", - ".settings-navigation", - ".settings-navigation__item--active", - ".settings-modal__panel", - ".appearance-preview", - ".appearance-badge", - ".appearance-list__title", - ".appearance-card--selected" - ], - "actions": [ - { "kind": "wait", "step_id": "light-theme-restored", "duration_ms": 500, "frames": 2 } - ] -} diff --git a/scripts/rea/probe-todo11-theme-switch.json b/scripts/rea/probe-todo11-theme-switch.json deleted file mode 100644 index 16e8646..0000000 --- a/scripts/rea/probe-todo11-theme-switch.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - "html", - "body", - ".settings-window-root", - ".settings-window-chrome", - ".settings-modal", - ".settings-navigation", - ".settings-navigation__item--active", - ".settings-modal__panel", - ".appearance-preview", - ".appearance-badge", - ".appearance-list__title", - ".appearance-card--selected" - ], - "actions": [ - { "kind": "click", "step_id": "select-dark-theme", "selector": ".appearance-card--dark", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "dark-theme-settled", "duration_ms": 800, "frames": 4 }, - { "kind": "click", "step_id": "restore-light-theme", "selector": ".appearance-card--light", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "light-theme-restored", "duration_ms": 500, "frames": 2 } - ] -} diff --git a/scripts/rea/probe-todo12-appearance-for-theme.json b/scripts/rea/probe-todo12-appearance-for-theme.json deleted file mode 100644 index ae4bbc3..0000000 --- a/scripts/rea/probe-todo12-appearance-for-theme.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-navigation__item", - ".appearance-panel", - ".appearance-card" - ], - "actions": [ - { "kind": "click", "step_id": "open-appearance-for-theme-sample", "selector": ".settings-navigation__item[data-settings-tab=\"appearance\"]", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "appearance-theme-control-ready", "duration_ms": 400, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo12-open-appearance-dark.json b/scripts/rea/probe-todo12-open-appearance-dark.json deleted file mode 100644 index b836e2f..0000000 --- a/scripts/rea/probe-todo12-open-appearance-dark.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-navigation__item", - ".appearance-panel", - ".appearance-card" - ], - "actions": [ - { "kind": "click", "step_id": "open-appearance-to-restore-light", "selector": ".settings-navigation__item", "index": 3, "frames": 0 }, - { "kind": "wait", "step_id": "appearance-dark-ready-to-restore", "duration_ms": 400, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo12-open-shortcuts-dark.json b/scripts/rea/probe-todo12-open-shortcuts-dark.json deleted file mode 100644 index 906ac42..0000000 --- a/scripts/rea/probe-todo12-open-shortcuts-dark.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".keyboard-shortcuts-panel", - ".keyboard-shortcuts-panel__list-scroll", - ".shortcut-item", - ".shortcut-item__key" - ], - "actions": [ - { "kind": "click", "step_id": "open-shortcuts-in-dark-theme", "selector": ".settings-navigation__item", "index": 4, "frames": 0 }, - { "kind": "wait", "step_id": "shortcuts-dark-ready", "duration_ms": 400, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo12-open-shortcuts-light.json b/scripts/rea/probe-todo12-open-shortcuts-light.json deleted file mode 100644 index b418f88..0000000 --- a/scripts/rea/probe-todo12-open-shortcuts-light.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-navigation__item", - ".settings-modal__panel", - ".keyboard-shortcuts-panel", - ".keyboard-shortcuts-panel__list-scroll", - ".shortcut-item", - ".shortcut-item__key" - ], - "actions": [ - { "kind": "click", "step_id": "return-to-shortcuts-light", "selector": ".settings-navigation__item", "index": 4, "frames": 0 }, - { "kind": "wait", "step_id": "shortcuts-light-restored", "duration_ms": 400, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo12-restore-light.json b/scripts/rea/probe-todo12-restore-light.json deleted file mode 100644 index ed021c0..0000000 --- a/scripts/rea/probe-todo12-restore-light.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [], - "actions": [ - { "kind": "click", "step_id": "restore-light-theme", "selector": ".appearance-card--light", "index": 0, "frames": 0 } - ] -} diff --git a/scripts/rea/probe-todo12-select-dark.json b/scripts/rea/probe-todo12-select-dark.json deleted file mode 100644 index 9795a3e..0000000 --- a/scripts/rea/probe-todo12-select-dark.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [], - "actions": [ - { "kind": "click", "step_id": "select-dark-theme", "selector": ".appearance-card--dark", "index": 0, "frames": 0 } - ] -} diff --git a/scripts/rea/probe-todo12-shortcuts-interactions.json b/scripts/rea/probe-todo12-shortcuts-interactions.json deleted file mode 100644 index f5fc937..0000000 --- a/scripts/rea/probe-todo12-shortcuts-interactions.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".keyboard-shortcuts-panel__toolbar", - ".keyboard-shortcuts-panel__search", - ".keyboard-shortcuts-panel__list", - ".shortcut-item", - ".shortcut-item__binding-tooltip-anchor", - ".wb-button" - ], - "actions": [ - { "kind": "wait", "step_id": "shortcuts-interaction-baseline", "duration_ms": 200, "frames": 1 }, - { "kind": "text", "step_id": "search-voice-shortcut", "selector": ".keyboard-shortcuts-panel__search input", "text": "语音", "frames": 0 }, - { "kind": "wait", "step_id": "search-voice-result", "duration_ms": 200, "frames": 1 }, - { "kind": "text", "step_id": "clear-shortcut-search", "selector": ".keyboard-shortcuts-panel__search input", "text": "", "frames": 0 }, - { "kind": "wait", "step_id": "search-cleared", "duration_ms": 200, "frames": 1 }, - { "kind": "click", "step_id": "click-disabled-restore-defaults", "selector": ".keyboard-shortcuts-panel__toolbar .wb-button--disabled", "index": 0, "frames": 1 }, - { "kind": "click", "step_id": "open-shortcut-key-editor", "selector": "#settings-keyboard-shortcut-open-global-search .shortcut-item__binding-tooltip-anchor", "index": 0, "frames": 1 }, - { "kind": "key", "step_id": "cancel-shortcut-key-editor", "key": "Escape", "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo12-shortcuts.json b/scripts/rea/probe-todo12-shortcuts.json deleted file mode 100644 index 846127e..0000000 --- a/scripts/rea/probe-todo12-shortcuts.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - "html", - "body", - ".settings-modal__panel", - ".settings-navigation", - ".settings-navigation__item", - ".keyboard-shortcuts-panel", - ".keyboard-shortcuts-panel__list-scroll", - ".shortcut-item", - ".shortcut-item__label", - ".shortcut-item__key" - ], - "actions": [ - { "kind": "wait", "step_id": "shortcuts-top", "duration_ms": 300, "frames": 1 }, - { "kind": "scroll", "step_id": "shortcuts-scroll-middle", "selector": ".keyboard-shortcuts-panel__list-scroll", "delta_y": 250, "frames": 1 }, - { "kind": "scroll", "step_id": "shortcuts-scroll-bottom", "selector": ".keyboard-shortcuts-panel__list-scroll", "delta_y": 250, "frames": 1 }, - { "kind": "scroll", "step_id": "shortcuts-return-top", "selector": ".keyboard-shortcuts-panel__list-scroll", "delta_y": -1000, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-dark-stable.json b/scripts/rea/probe-todo13-dark-stable.json deleted file mode 100644 index 16b8c05..0000000 --- a/scripts/rea/probe-todo13-dark-stable.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".appearance-card--light", - ".appearance-card--dark" - ], - "actions": [ - { "kind": "wait", "step_id": "dark-theme-stable-after-target-rediscovery", "duration_ms": 800, "frames": 4 } - ] -} diff --git a/scripts/rea/probe-todo13-light-stable.json b/scripts/rea/probe-todo13-light-stable.json deleted file mode 100644 index 9a392f7..0000000 --- a/scripts/rea/probe-todo13-light-stable.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".appearance-card--light", - ".appearance-card--dark" - ], - "actions": [ - { "kind": "wait", "step_id": "light-theme-stable-after-target-rediscovery", "duration_ms": 800, "frames": 4 } - ] -} diff --git a/scripts/rea/probe-todo13-memory-edit-button.json b/scripts/rea/probe-todo13-memory-edit-button.json deleted file mode 100644 index bc1b373..0000000 --- a/scripts/rea/probe-todo13-memory-edit-button.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".local-memory-edit-modal", - "#settings-local-memory-body .general-settings-panel__section-title", - "#settings-local-memory-body .general-settings-panel__section-action button", - "#settings-local-memory-body .local-memory-long__preview" - ], - "actions": [ - { "kind": "click", "step_id": "cancel-persona-editor-before-memory-test", "selector": ".local-memory-edit-modal .wb-modal__footer button", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "persona-editor-closed-for-memory-test", "duration_ms": 350, "frames": 0 }, - { "kind": "click", "step_id": "open-long-memory-editor", "selector": "#settings-local-memory-body .general-settings-panel__section-action button", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "long-memory-editor-settled", "duration_ms": 350, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-memory-editor-cancel.json b/scripts/rea/probe-todo13-memory-editor-cancel.json deleted file mode 100644 index ef8a640..0000000 --- a/scripts/rea/probe-todo13-memory-editor-cancel.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".local-memory-edit-modal", - ".local-memory-edit-modal .wb-modal__footer button", - "#settings-local-memory-body .general-settings-panel__section-title" - ], - "actions": [ - { "kind": "click", "step_id": "cancel-empty-long-memory-editor", "selector": ".local-memory-edit-modal .wb-modal__footer button", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "long-memory-editor-cancel-settled", "duration_ms": 350, "frames": 1 }, - { "kind": "scroll", "step_id": "return-panel-top-from-long-memory", "selector": "#settings-local-memory-body .general-settings-panel__section-title", "delta_y": -1200, "frames": 1 }, - { "kind": "wait", "step_id": "personalization-top-confirmed-after-memory", "duration_ms": 200, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-open-appearance-dark.json b/scripts/rea/probe-todo13-open-appearance-dark.json deleted file mode 100644 index 32bd36f..0000000 --- a/scripts/rea/probe-todo13-open-appearance-dark.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".settings-navigation__item", - ".appearance-card--light", - ".appearance-card--dark" - ], - "actions": [ - { "kind": "click", "step_id": "open-appearance-to-restore-light-by-index-3", "selector": ".settings-navigation__item", "index": 3, "frames": 0 }, - { "kind": "wait", "step_id": "appearance-dark-before-restore-confirmed", "duration_ms": 450, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-open-appearance.json b/scripts/rea/probe-todo13-open-appearance.json deleted file mode 100644 index 92cb924..0000000 --- a/scripts/rea/probe-todo13-open-appearance.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".settings-navigation__item", - ".appearance-card--light", - ".appearance-card--dark" - ], - "actions": [ - { "kind": "click", "step_id": "open-appearance-by-observed-nav-index-3", "selector": ".settings-navigation__item", "index": 3, "frames": 0 }, - { "kind": "wait", "step_id": "appearance-page-confirmed-before-dark-theme", "duration_ms": 450, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-open-personalization-dark.json b/scripts/rea/probe-todo13-open-personalization-dark.json deleted file mode 100644 index a2f8c29..0000000 --- a/scripts/rea/probe-todo13-open-personalization-dark.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".settings-navigation__item", - ".general-settings-panel.personalization-panel", - ".local-memory-identity-card" - ], - "actions": [ - { "kind": "click", "step_id": "open-personalization-in-dark-theme-by-observed-nav-index-5", "selector": ".settings-navigation__item", "index": 5, "frames": 0 }, - { "kind": "wait", "step_id": "personalization-dark-navigation-confirmed", "duration_ms": 500, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-open-personalization-light.json b/scripts/rea/probe-todo13-open-personalization-light.json deleted file mode 100644 index d81c7c7..0000000 --- a/scripts/rea/probe-todo13-open-personalization-light.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".settings-navigation__item", - ".general-settings-panel.personalization-panel", - ".local-memory-identity-card" - ], - "actions": [ - { "kind": "click", "step_id": "return-to-personalization-in-light-theme-by-nav-index-5", "selector": ".settings-navigation__item", "index": 5, "frames": 0 }, - { "kind": "wait", "step_id": "personalization-light-final-state-confirmed", "duration_ms": 500, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-persona-edit-button-retry.json b/scripts/rea/probe-todo13-persona-edit-button-retry.json deleted file mode 100644 index 47674d5..0000000 --- a/scripts/rea/probe-todo13-persona-edit-button-retry.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - "#settings-local-memory-soul .general-settings-panel__section-title", - "#settings-local-memory-soul .general-settings-panel__section-action button", - "#settings-local-memory-soul .local-memory-long__preview", - ".local-memory-edit-modal" - ], - "actions": [ - { "kind": "scroll", "step_id": "scroll-persona-heading-to-bottom", "selector": "#settings-local-memory-soul .general-settings-panel__section-title", "delta_y": 300, "frames": 1 }, - { "kind": "click", "step_id": "retry-persona-edit-button", "selector": "#settings-local-memory-soul .general-settings-panel__section-action button", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "persona-edit-button-retry-settled", "duration_ms": 350, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-persona-edit-button.json b/scripts/rea/probe-todo13-persona-edit-button.json deleted file mode 100644 index 657c174..0000000 --- a/scripts/rea/probe-todo13-persona-edit-button.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - "#settings-local-memory-soul .general-settings-panel__section-title", - "#settings-local-memory-soul .general-settings-panel__section-action button", - "#settings-local-memory-soul .local-memory-long__preview", - ".local-memory-edit-modal" - ], - "actions": [ - { "kind": "scroll", "step_id": "scroll-to-persona-button", "selector": ".settings-modal__panel", "delta_y": 300, "frames": 0 }, - { "kind": "scroll", "step_id": "scroll-persona-button-visible", "selector": "#settings-local-memory-soul .general-settings-panel__section-title", "delta_y": 300, "frames": 0 }, - { "kind": "click", "step_id": "activate-persona-edit-button", "selector": "#settings-local-memory-soul .general-settings-panel__section-action button", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "persona-edit-button-settled", "duration_ms": 350, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-persona-editor-cancel.json b/scripts/rea/probe-todo13-persona-editor-cancel.json deleted file mode 100644 index ad07b5b..0000000 --- a/scripts/rea/probe-todo13-persona-editor-cancel.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - "#settings-local-memory-soul .general-settings-panel__section-title", - "#settings-local-memory-soul .general-settings-panel__section-action button", - ".local-memory-edit-modal .wb-modal__footer button" - ], - "actions": [ - { "kind": "scroll", "step_id": "scroll-to-persona-editor", "selector": ".settings-modal__panel", "delta_y": 300, "frames": 0 }, - { "kind": "scroll", "step_id": "scroll-persona-section-into-view", "selector": "#settings-local-memory-soul .general-settings-panel__section-title", "delta_y": 300, "frames": 0 }, - { "kind": "click", "step_id": "open-persona-editor", "selector": "#settings-local-memory-soul .general-settings-panel__section-action button", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "persona-editor-open", "duration_ms": 350, "frames": 1 }, - { "kind": "click", "step_id": "cancel-persona-editor-without-change", "selector": ".local-memory-edit-modal .wb-modal__footer button", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "persona-editor-cancelled", "duration_ms": 350, "frames": 1 }, - { "kind": "scroll", "step_id": "return-personalization-top-after-editor", "selector": "#settings-local-memory-soul .general-settings-panel__section-title", "delta_y": -1200, "frames": 1 }, - { "kind": "wait", "step_id": "personalization-top-confirmed", "duration_ms": 200, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-persona-editor-close.json b/scripts/rea/probe-todo13-persona-editor-close.json deleted file mode 100644 index 3564531..0000000 --- a/scripts/rea/probe-todo13-persona-editor-close.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".local-memory-edit-modal", - ".local-memory-edit-modal .wb-modal__footer", - ".local-memory-edit-modal .wb-modal__footer button", - "#settings-local-memory-soul .general-settings-panel__section-title" - ], - "actions": [ - { "kind": "click", "step_id": "cancel-persona-editor", "selector": ".local-memory-edit-modal .wb-modal__footer button", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "persona-editor-cancel-settled", "duration_ms": 300, "frames": 1 }, - { "kind": "scroll", "step_id": "restore-personalization-panel-top", "selector": "#settings-local-memory-soul .general-settings-panel__section-title", "delta_y": -1200, "frames": 1 }, - { "kind": "wait", "step_id": "personalization-panel-top-after-persona-editor", "duration_ms": 200, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-persona-preview-click.json b/scripts/rea/probe-todo13-persona-preview-click.json deleted file mode 100644 index bc1d71d..0000000 --- a/scripts/rea/probe-todo13-persona-preview-click.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - "#settings-local-memory-soul .local-memory-long__preview", - "#settings-local-memory-soul .general-settings-panel__section-action button" - ], - "actions": [ - { "kind": "click", "step_id": "click-persona-preview-role-button", "selector": "#settings-local-memory-soul .local-memory-long__preview", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "persona-preview-click-settled", "duration_ms": 350, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-personalization-ai-name-cancel.json b/scripts/rea/probe-todo13-personalization-ai-name-cancel.json deleted file mode 100644 index e03567f..0000000 --- a/scripts/rea/probe-todo13-personalization-ai-name-cancel.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - "#settings-local-memory-ai-name", - "#settings-local-memory-ai-name input", - "#settings-local-memory-ai-name .local-memory-identity-row__actions" - ], - "actions": [ - { "kind": "click", "step_id": "open-ai-name-inline-editor", "selector": "#settings-local-memory-ai-name .local-memory-pill", "index": 0, "frames": 1 }, - { "kind": "text", "step_id": "enter-temporary-ai-name-draft", "selector": "#settings-local-memory-ai-name input", "text": "CodexTmp", "frames": 1 }, - { "kind": "click", "step_id": "cancel-ai-name-draft", "selector": "#settings-local-memory-ai-name .local-memory-identity-row__actions button", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "confirm-ai-name-remains-original-empty", "duration_ms": 200, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-personalization-custom-prompt-cancel.json b/scripts/rea/probe-todo13-personalization-custom-prompt-cancel.json deleted file mode 100644 index 9afc297..0000000 --- a/scripts/rea/probe-todo13-personalization-custom-prompt-cancel.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".local-memory-edit-modal", - ".local-memory-edit-modal .wb-modal__footer", - ".local-memory-edit-modal .wb-modal__footer button" - ], - "actions": [ - { "kind": "click", "step_id": "cancel-workbuddy-instructions-editor", "selector": ".local-memory-edit-modal .wb-modal__footer button", "index": 0, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-personalization-custom-prompt-editor.json b/scripts/rea/probe-todo13-personalization-custom-prompt-editor.json deleted file mode 100644 index b2bee75..0000000 --- a/scripts/rea/probe-todo13-personalization-custom-prompt-editor.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - "#settings-custom-prompt", - "#settings-custom-prompt .general-settings-panel__section-action button" - ], - "actions": [ - { "kind": "click", "step_id": "open-workbuddy-instructions-editor", "selector": "#settings-custom-prompt .general-settings-panel__section-action button", "index": 0, "frames": 1 }, - { "kind": "key", "step_id": "close-workbuddy-instructions-editor-with-escape", "key": "Escape", "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-personalization-custom-prompt-save-empty.json b/scripts/rea/probe-todo13-personalization-custom-prompt-save-empty.json deleted file mode 100644 index f9b6cfe..0000000 --- a/scripts/rea/probe-todo13-personalization-custom-prompt-save-empty.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".local-memory-edit-modal", - ".local-memory-edit-modal .local-memory-editor-host", - ".local-memory-edit-modal .wb-modal__footer button" - ], - "actions": [ - { "kind": "click", "step_id": "open-empty-workbuddy-instructions-editor", "selector": "#settings-custom-prompt .general-settings-panel__section-action button", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "empty-instructions-editor-ready", "duration_ms": 300, "frames": 1 }, - { "kind": "click", "step_id": "save-unchanged-empty-instructions", "selector": ".local-memory-edit-modal .wb-modal__footer button", "index": 1, "frames": 1 }, - { "kind": "wait", "step_id": "instructions-save-result", "duration_ms": 300, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-personalization-editors.json b/scripts/rea/probe-todo13-personalization-editors.json deleted file mode 100644 index 248c638..0000000 --- a/scripts/rea/probe-todo13-personalization-editors.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".local-memory-pill", - "#settings-local-memory-user-call-name .local-memory-pill", - "#settings-local-memory-ai-name .local-memory-pill" - ], - "actions": [ - { "kind": "click", "step_id": "open-user-call-name-editor", "selector": "#settings-local-memory-user-call-name .local-memory-pill", "index": 0, "frames": 1 }, - { "kind": "key", "step_id": "close-user-call-name-editor-with-escape", "key": "Escape", "frames": 1 }, - { "kind": "click", "step_id": "open-ai-name-editor", "selector": "#settings-local-memory-ai-name .local-memory-pill", "index": 0, "frames": 1 }, - { "kind": "key", "step_id": "close-ai-name-editor-with-escape", "key": "Escape", "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-personalization-full-scroll.json b/scripts/rea/probe-todo13-personalization-full-scroll.json deleted file mode 100644 index 551480c..0000000 --- a/scripts/rea/probe-todo13-personalization-full-scroll.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".general-settings-panel.personalization-panel", - "#settings-local-memory-soul .general-settings-panel__section-title", - "#settings-local-memory-soul .local-memory-long__preview" - ], - "actions": [ - { "kind": "wait", "step_id": "personalization-full-page-top", "duration_ms": 200, "frames": 1 }, - { "kind": "scroll", "step_id": "scroll-page-to-persona-section", "selector": ".settings-modal__panel", "delta_y": 300, "frames": 1 }, - { "kind": "scroll", "step_id": "scroll-page-to-bottom-on-visible-title", "selector": "#settings-local-memory-soul .general-settings-panel__section-title", "delta_y": 300, "frames": 1 }, - { "kind": "scroll", "step_id": "persona-preview-text-1", "selector": "#settings-local-memory-soul .local-memory-long__preview", "delta_y": 200, "frames": 1 }, - { "kind": "scroll", "step_id": "persona-preview-text-2", "selector": "#settings-local-memory-soul .local-memory-long__preview", "delta_y": 200, "frames": 1 }, - { "kind": "scroll", "step_id": "persona-preview-text-3", "selector": "#settings-local-memory-soul .local-memory-long__preview", "delta_y": 200, "frames": 1 }, - { "kind": "scroll", "step_id": "persona-preview-text-4-bottom", "selector": "#settings-local-memory-soul .local-memory-long__preview", "delta_y": 200, "frames": 1 }, - { "kind": "scroll", "step_id": "persona-preview-return-top", "selector": "#settings-local-memory-soul .local-memory-long__preview", "delta_y": -1600, "frames": 1 }, - { "kind": "scroll", "step_id": "return-page-to-top-from-visible-title", "selector": "#settings-local-memory-soul .general-settings-panel__section-title", "delta_y": -1200, "frames": 1 }, - { "kind": "wait", "step_id": "personalization-full-page-returned-top", "duration_ms": 200, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-personalization-identity-blur.json b/scripts/rea/probe-todo13-personalization-identity-blur.json deleted file mode 100644 index 03e23fd..0000000 --- a/scripts/rea/probe-todo13-personalization-identity-blur.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - "#settings-local-memory-user-call-name", - "#settings-local-memory-user-call-name .local-memory-identity-row__actions", - "#settings-tone-style" - ], - "actions": [ - { "kind": "click", "step_id": "open-user-call-name-inline-editor", "selector": "#settings-local-memory-user-call-name .local-memory-pill", "index": 0, "frames": 1 }, - { "kind": "text", "step_id": "enter-temporary-call-name", "selector": "#settings-local-memory-user-call-name input", "text": "CodexTmp", "frames": 1 }, - { "kind": "click", "step_id": "blur-call-name-editor", "selector": "#settings-tone-style .general-settings-panel__section-title", "index": 0, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-personalization-identity-cancel-existing.json b/scripts/rea/probe-todo13-personalization-identity-cancel-existing.json deleted file mode 100644 index 6090c24..0000000 --- a/scripts/rea/probe-todo13-personalization-identity-cancel-existing.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - "#settings-local-memory-user-call-name", - "#settings-local-memory-user-call-name input", - "#settings-local-memory-user-call-name .local-memory-identity-row__actions" - ], - "actions": [ - { "kind": "click", "step_id": "edit-saved-user-call-name", "selector": "#settings-local-memory-user-call-name .local-memory-pill", "index": 0, "frames": 1 }, - { "kind": "click", "step_id": "test-first-identity-action", "selector": "#settings-local-memory-user-call-name .local-memory-identity-row__actions button", "index": 0, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-personalization-identity-close-empty.json b/scripts/rea/probe-todo13-personalization-identity-close-empty.json deleted file mode 100644 index 8c7565c..0000000 --- a/scripts/rea/probe-todo13-personalization-identity-close-empty.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - "#settings-local-memory-user-call-name", - "#settings-local-memory-user-call-name .local-memory-pill", - "#settings-local-memory-user-call-name .local-memory-identity-row__actions" - ], - "actions": [ - { "kind": "click", "step_id": "close-empty-identity-editor", "selector": "#settings-local-memory-user-call-name .local-memory-identity-row__actions button", "index": 0, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-personalization-identity-hover.json b/scripts/rea/probe-todo13-personalization-identity-hover.json deleted file mode 100644 index 7ad77b1..0000000 --- a/scripts/rea/probe-todo13-personalization-identity-hover.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - "#settings-local-memory-user-call-name .local-memory-pill" - ], - "actions": [ - { "kind": "hover", "step_id": "inspect-saved-identity-hover-actions", "selector": "#settings-local-memory-user-call-name .local-memory-pill", "index": 0, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-personalization-identity-restore.json b/scripts/rea/probe-todo13-personalization-identity-restore.json deleted file mode 100644 index 5ab6d85..0000000 --- a/scripts/rea/probe-todo13-personalization-identity-restore.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - "#settings-local-memory-user-call-name", - "#settings-local-memory-user-call-name input", - "#settings-local-memory-user-call-name .local-memory-identity-row__actions" - ], - "actions": [ - { "kind": "click", "step_id": "reopen-saved-user-call-name", "selector": "#settings-local-memory-user-call-name .local-memory-pill", "index": 0, "frames": 1 }, - { "kind": "text", "step_id": "clear-user-call-name-to-original-empty", "selector": "#settings-local-memory-user-call-name input", "text": "", "frames": 1 }, - { "kind": "click", "step_id": "save-original-empty-user-call-name", "selector": "#settings-local-memory-user-call-name .local-memory-identity-row__actions button", "index": 1, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-personalization-identity-save.json b/scripts/rea/probe-todo13-personalization-identity-save.json deleted file mode 100644 index a05f8ca..0000000 --- a/scripts/rea/probe-todo13-personalization-identity-save.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - "#settings-local-memory-user-call-name", - "#settings-local-memory-user-call-name input", - "#settings-local-memory-user-call-name .local-memory-identity-row__actions" - ], - "actions": [ - { "kind": "click", "step_id": "reopen-user-call-name-editor", "selector": "#settings-local-memory-user-call-name .local-memory-pill", "index": 0, "frames": 1 }, - { "kind": "text", "step_id": "set-temporary-user-call-name", "selector": "#settings-local-memory-user-call-name input", "text": "CodexTmp", "frames": 1 }, - { "kind": "click", "step_id": "save-temporary-user-call-name", "selector": "#settings-local-memory-user-call-name .local-memory-identity-row__actions button", "index": 1, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-personalization-interactions.json b/scripts/rea/probe-todo13-personalization-interactions.json deleted file mode 100644 index 46a3516..0000000 --- a/scripts/rea/probe-todo13-personalization-interactions.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".personalization-panel__tone-trigger", - "#settings-loading-tips .wb-switch__control", - "#settings-file-changes .wb-switch__control" - ], - "actions": [ - { "kind": "wait", "step_id": "control-baseline", "duration_ms": 200, "frames": 1 }, - { "kind": "click", "step_id": "open-reply-style-dropdown", "selector": ".personalization-panel__tone-trigger", "index": 0, "frames": 1 }, - { "kind": "key", "step_id": "close-reply-style-dropdown", "key": "Escape", "frames": 1 }, - { "kind": "click", "step_id": "toggle-welcome-off", "selector": "#settings-loading-tips .wb-switch__control", "index": 0, "frames": 1 }, - { "kind": "click", "step_id": "restore-welcome-on", "selector": "#settings-loading-tips .wb-switch__control", "index": 0, "frames": 1 }, - { "kind": "click", "step_id": "toggle-file-changes-on", "selector": "#settings-file-changes .wb-switch__control", "index": 0, "frames": 1 }, - { "kind": "click", "step_id": "restore-file-changes-off", "selector": "#settings-file-changes .wb-switch__control", "index": 0, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-personalization-open-custom-prompt.json b/scripts/rea/probe-todo13-personalization-open-custom-prompt.json deleted file mode 100644 index ace0256..0000000 --- a/scripts/rea/probe-todo13-personalization-open-custom-prompt.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - "#settings-custom-prompt .general-settings-panel__section-action button" - ], - "actions": [ - { "kind": "click", "step_id": "open-custom-prompt-editor-for-layout", "selector": "#settings-custom-prompt .general-settings-panel__section-action button", "index": 0, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-personalization-open.json b/scripts/rea/probe-todo13-personalization-open.json deleted file mode 100644 index 3dd4e5f..0000000 --- a/scripts/rea/probe-todo13-personalization-open.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - "html", - ".settings-modal__panel", - ".settings-navigation__item", - ".personalization-settings-panel" - ], - "actions": [ - { "kind": "click", "step_id": "select-personalization-by-observed-nav-order", "selector": ".settings-navigation__item", "index": 5, "frames": 0 }, - { "kind": "wait", "step_id": "personalization-navigation-confirmation", "duration_ms": 500, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-personalization-return-top.json b/scripts/rea/probe-todo13-personalization-return-top.json deleted file mode 100644 index f630fef..0000000 --- a/scripts/rea/probe-todo13-personalization-return-top.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".general-settings-panel__section-title", - "#settings-local-memory-soul .general-settings-panel__section-title", - "#settings-local-memory-body .general-settings-panel__section-title" - ], - "actions": [ - { "kind": "scroll", "step_id": "return-panel-to-top-from-visible-heading", "selector": "#settings-local-memory-soul .general-settings-panel__section-title", "delta_y": -1200, "frames": 1 }, - { "kind": "wait", "step_id": "confirm-personalization-top", "duration_ms": 200, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-personalization-scroll.json b/scripts/rea/probe-todo13-personalization-scroll.json deleted file mode 100644 index 301ecc8..0000000 --- a/scripts/rea/probe-todo13-personalization-scroll.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".general-settings-panel.personalization-panel", - ".general-settings-panel__group", - ".local-memory-long-card" - ], - "actions": [ - { "kind": "wait", "step_id": "personalization-top", "duration_ms": 250, "frames": 1 }, - { "kind": "scroll", "step_id": "personalization-scroll-1", "selector": ".settings-modal__panel", "delta_y": 300, "frames": 1 }, - { "kind": "scroll", "step_id": "personalization-scroll-2", "selector": ".settings-modal__panel", "delta_y": 300, "frames": 1 }, - { "kind": "scroll", "step_id": "personalization-scroll-3-bottom", "selector": ".settings-modal__panel", "delta_y": 300, "frames": 1 }, - { "kind": "scroll", "step_id": "personalization-return-top", "selector": ".settings-modal__panel", "delta_y": -1200, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-preview-open-close.json b/scripts/rea/probe-todo13-preview-open-close.json deleted file mode 100644 index 84de38f..0000000 --- a/scripts/rea/probe-todo13-preview-open-close.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - "#settings-custom-prompt .local-memory-long__preview", - "#settings-local-memory-soul .general-settings-panel__section-title", - "#settings-local-memory-body .local-memory-long__preview", - ".local-memory-edit-modal" - ], - "actions": [ - { "kind": "click", "step_id": "click-instructions-preview-role-button", "selector": "#settings-custom-prompt .local-memory-long__preview", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "instructions-preview-editor-open", "duration_ms": 300, "frames": 1 }, - { "kind": "click", "step_id": "cancel-instructions-preview-editor", "selector": ".local-memory-edit-modal .wb-modal__footer button", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "instructions-preview-editor-closed", "duration_ms": 350, "frames": 1 }, - { "kind": "scroll", "step_id": "scroll-to-bottom-memory-card-1", "selector": ".settings-modal__panel", "delta_y": 300, "frames": 1 }, - { "kind": "scroll", "step_id": "scroll-to-bottom-memory-card-2", "selector": "#settings-local-memory-soul .general-settings-panel__section-title", "delta_y": 300, "frames": 1 }, - { "kind": "click", "step_id": "click-long-memory-preview-role-button", "selector": "#settings-local-memory-body .local-memory-long__preview", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "long-memory-preview-editor-open", "duration_ms": 300, "frames": 1 }, - { "kind": "click", "step_id": "cancel-long-memory-preview-editor", "selector": ".local-memory-edit-modal .wb-modal__footer button", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "long-memory-preview-editor-closed", "duration_ms": 350, "frames": 1 }, - { "kind": "scroll", "step_id": "return-panel-top-after-preview-checks", "selector": "#settings-local-memory-body .general-settings-panel__section-title", "delta_y": -1200, "frames": 1 }, - { "kind": "wait", "step_id": "top-after-preview-checks-confirmed", "duration_ms": 200, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo13-restore-call-name-space.json b/scripts/rea/probe-todo13-restore-call-name-space.json deleted file mode 100644 index da3756f..0000000 --- a/scripts/rea/probe-todo13-restore-call-name-space.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - "#settings-local-memory-user-call-name", - "#settings-local-memory-user-call-name input", - "#settings-local-memory-user-call-name .local-memory-pill" - ], - "actions": [ - { "kind": "click", "step_id": "open-saved-call-name", "selector": "#settings-local-memory-user-call-name .local-memory-pill", "index": 0, "frames": 1 }, - { "kind": "text", "step_id": "replace-with-single-space", "selector": "#settings-local-memory-user-call-name input", "text": " ", "frames": 1 }, - { "kind": "click", "step_id": "confirm-space-value", "selector": "#settings-local-memory-user-call-name .local-memory-identity-row__actions button", "index": 1, "frames": 2 } - ] -} diff --git a/scripts/rea/probe-todo13-restore-light.json b/scripts/rea/probe-todo13-restore-light.json deleted file mode 100644 index 637dcd7..0000000 --- a/scripts/rea/probe-todo13-restore-light.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [], - "actions": [ - { "kind": "click", "step_id": "restore-light-theme-for-final-state", "selector": ".appearance-card--light", "index": 0, "frames": 0 } - ] -} diff --git a/scripts/rea/probe-todo13-select-dark.json b/scripts/rea/probe-todo13-select-dark.json deleted file mode 100644 index cc44b12..0000000 --- a/scripts/rea/probe-todo13-select-dark.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [], - "actions": [ - { "kind": "click", "step_id": "select-dark-theme-for-personalization-sample", "selector": ".appearance-card--dark", "index": 0, "frames": 0 } - ] -} diff --git a/scripts/rea/probe-todo13-tone-dropdown-scroll.json b/scripts/rea/probe-todo13-tone-dropdown-scroll.json deleted file mode 100644 index 3fd02f9..0000000 --- a/scripts/rea/probe-todo13-tone-dropdown-scroll.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".personalization-panel__tone-trigger", - ".personalization-panel__tone-popover", - ".wb-select__option", - ".personalization-panel__option-name", - ".personalization-panel__option-hint" - ], - "actions": [ - { "kind": "click", "step_id": "open-reply-style-dropdown-for-all-options", "selector": ".personalization-panel__tone-trigger", "index": 0, "frames": 1 }, - { "kind": "scroll", "step_id": "reply-style-dropdown-lower-options", "selector": ".personalization-panel__tone-popover", "delta_y": 300, "frames": 1 }, - { "kind": "scroll", "step_id": "reply-style-dropdown-return-to-top", "selector": ".personalization-panel__tone-popover", "delta_y": -300, "frames": 1 }, - { "kind": "key", "step_id": "close-reply-style-dropdown-after-sampling", "key": "Escape", "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo15-navigation.json b/scripts/rea/probe-todo15-navigation.json deleted file mode 100644 index 4734d45..0000000 --- a/scripts/rea/probe-todo15-navigation.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-navigation", - ".settings-navigation__item", - ".settings-navigation__item--active", - ".settings-modal__panel" - ], - "actions": [ - { "kind": "scroll", "step_id": "reveal-function-group-navigation-labels", "selector": ".settings-navigation", "delta_y": 500, "frames": 1 }, - { "kind": "wait", "step_id": "confirm-agents-navigation-label-and-order", "duration_ms": 400, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo15-open-agents-dark.json b/scripts/rea/probe-todo15-open-agents-dark.json deleted file mode 100644 index 651a902..0000000 --- a/scripts/rea/probe-todo15-open-agents-dark.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-navigation__item--active", - ".settings-modal__panel", - ".settings-navigation", - ".settings-navigation__item" - ], - "actions": [ - { "kind": "click", "step_id": "open-agents-by-observed-nav-index-7-in-dark-theme", "selector": ".settings-navigation__item", "index": 7, "frames": 1 }, - { "kind": "wait", "step_id": "verify-agents-dark-page-stable", "duration_ms": 800, "frames": 2 } - ] -} diff --git a/scripts/rea/probe-todo15-open-agents-light.json b/scripts/rea/probe-todo15-open-agents-light.json deleted file mode 100644 index e26c3aa..0000000 --- a/scripts/rea/probe-todo15-open-agents-light.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-navigation__item--active", - ".settings-modal__panel", - ".settings-navigation", - ".settings-navigation__item" - ], - "actions": [ - { "kind": "click", "step_id": "open-agents-by-observed-nav-index-7", "selector": ".settings-navigation__item", "index": 7, "frames": 1 }, - { "kind": "wait", "step_id": "verify-agents-page-stable", "duration_ms": 800, "frames": 4 } - ] -} diff --git a/scripts/rea/probe-todo15-open-appearance-dark.json b/scripts/rea/probe-todo15-open-appearance-dark.json deleted file mode 100644 index 76b2322..0000000 --- a/scripts/rea/probe-todo15-open-appearance-dark.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".settings-navigation__item--active", - ".appearance-card--light", - ".appearance-card--dark" - ], - "actions": [ - { "kind": "click", "step_id": "open-appearance-by-observed-nav-index-3-in-dark-theme", "selector": ".settings-navigation__item", "index": 3, "frames": 1 }, - { "kind": "wait", "step_id": "verify-dark-appearance-before-restoring-light", "duration_ms": 500, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo15-open-appearance-light.json b/scripts/rea/probe-todo15-open-appearance-light.json deleted file mode 100644 index 5a05e20..0000000 --- a/scripts/rea/probe-todo15-open-appearance-light.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".settings-navigation__item--active", - ".appearance-card--light", - ".appearance-card--dark" - ], - "actions": [ - { "kind": "click", "step_id": "open-appearance-by-observed-nav-index-3", "selector": ".settings-navigation__item", "index": 3, "frames": 1 }, - { "kind": "wait", "step_id": "confirm-light-appearance-state", "duration_ms": 500, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo15-restore-light.json b/scripts/rea/probe-todo15-restore-light.json deleted file mode 100644 index ac5ffd7..0000000 --- a/scripts/rea/probe-todo15-restore-light.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".appearance-card--light", - ".appearance-card--dark" - ], - "actions": [ - { "kind": "click", "step_id": "restore-light-theme-after-agent-settings-sample", "selector": ".appearance-card--light", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "wait-for-light-theme-render", "duration_ms": 800, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo15-scroll-and-return-top.json b/scripts/rea/probe-todo15-scroll-and-return-top.json deleted file mode 100644 index 7c0aaf9..0000000 --- a/scripts/rea/probe-todo15-scroll-and-return-top.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".general-settings-panel.extensions-settings-panel", - "#settings-agent-teams", - "#settings-browser-control" - ], - "actions": [ - { "kind": "scroll", "step_id": "check-for-lower-agent-settings-content", "selector": ".settings-modal__panel", "delta_y": 700, "frames": 1 }, - { "kind": "wait", "step_id": "confirm-panel-content-end", "duration_ms": 250, "frames": 1 }, - { "kind": "scroll", "step_id": "return-agent-settings-to-top", "selector": ".settings-modal__panel", "delta_y": -700, "frames": 1 }, - { "kind": "wait", "step_id": "confirm-agent-settings-top", "duration_ms": 250, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo15-select-dark.json b/scripts/rea/probe-todo15-select-dark.json deleted file mode 100644 index db9c3c3..0000000 --- a/scripts/rea/probe-todo15-select-dark.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".settings-navigation__item--active", - ".appearance-card--light", - ".appearance-card--dark" - ], - "actions": [ - { "kind": "click", "step_id": "select-dark-theme-for-agent-settings-sample", "selector": ".appearance-card--dark", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "wait-for-dark-theme-render", "duration_ms": 800, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo15-team-management-menu.json b/scripts/rea/probe-todo15-team-management-menu.json deleted file mode 100644 index 11bbb05..0000000 --- a/scripts/rea/probe-todo15-team-management-menu.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".wb-select", - ".wb-select__value", - ".wb-select__option" - ], - "actions": [ - { "kind": "click", "step_id": "open-agent-team-setting-options-without-changing-value", "selector": ".wb-select", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "observe-agent-team-setting-options", "duration_ms": 250, "frames": 1 }, - { "kind": "key", "step_id": "close-agent-team-setting-options-with-escape", "key": "Escape", "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo18-discover-apps.json b/scripts/rea/probe-todo18-discover-apps.json deleted file mode 100644 index 76caaf8..0000000 --- a/scripts/rea/probe-todo18-discover-apps.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "actions": [ - { - "kind": "click", - "step_id": "open-discover-apps", - "selector": ".industry-template-switcher__trigger", - "frames": 0 - }, - { - "kind": "wait", - "step_id": "discover-apps-ready", - "duration_ms": 500, - "frames": 1 - } - ] -} diff --git a/scripts/rea/probe-todo19-about-check-updates.json b/scripts/rea/probe-todo19-about-check-updates.json deleted file mode 100644 index 1a8d30f..0000000 --- a/scripts/rea/probe-todo19-about-check-updates.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".help-feedback-panel__card", - ".help-feedback-panel__action-button", - ".help-feedback-panel__footer" - ], - "actions": [ - { "kind": "click", "step_id": "check-for-updates-without-installing", "selector": ".help-feedback-panel__action-button", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "observe-update-check-result", "duration_ms": 1200, "frames": 4 } - ] -} diff --git a/scripts/rea/probe-todo19-about-dark.json b/scripts/rea/probe-todo19-about-dark.json deleted file mode 100644 index 2d76dca..0000000 --- a/scripts/rea/probe-todo19-about-dark.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-navigation__item--active", - ".settings-navigation__group--about", - ".settings-modal__panel", - ".help-feedback-panel" - ], - "actions": [ - { "kind": "click", "step_id": "open-about-by-observed-nav-index-14-in-dark-theme", "selector": ".settings-navigation__item", "index": 14, "frames": 1 }, - { "kind": "wait", "step_id": "verify-about-dark-page-stable", "duration_ms": 800, "frames": 4 } - ] -} diff --git a/scripts/rea/probe-todo19-appearance-stable.json b/scripts/rea/probe-todo19-appearance-stable.json deleted file mode 100644 index 2ad58dd..0000000 --- a/scripts/rea/probe-todo19-appearance-stable.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".appearance-card--light", - ".appearance-card--dark" - ], - "actions": [ - { "kind": "wait", "step_id": "wait-for-theme-renderer-to-stabilize-after-target-change", "duration_ms": 800, "frames": 4 } - ] -} diff --git a/scripts/rea/probe-todo19-help-dark.json b/scripts/rea/probe-todo19-help-dark.json deleted file mode 100644 index 7554c3e..0000000 --- a/scripts/rea/probe-todo19-help-dark.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-navigation__item--active", - ".settings-navigation__group--about", - ".settings-modal__panel", - ".help-feedback-panel" - ], - "actions": [ - { "kind": "click", "step_id": "open-get-help-by-observed-nav-index-15-in-dark-theme", "selector": ".settings-navigation__item", "index": 15, "frames": 1 }, - { "kind": "wait", "step_id": "verify-get-help-dark-page-stable", "duration_ms": 800, "frames": 4 } - ] -} diff --git a/scripts/rea/probe-todo19-help-light.json b/scripts/rea/probe-todo19-help-light.json deleted file mode 100644 index 5c45d3b..0000000 --- a/scripts/rea/probe-todo19-help-light.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-navigation", - ".settings-navigation__item--active", - ".settings-navigation__group--about", - ".settings-modal__panel" - ], - "actions": [ - { "kind": "scroll", "step_id": "reveal-bottom-about-us-navigation-group", "selector": ".settings-navigation", "delta_y": 500, "frames": 1 }, - { "kind": "click", "step_id": "open-get-help-by-screenshot-confirmed-nav-index-15", "selector": ".settings-navigation__item", "index": 15, "frames": 1 }, - { "kind": "wait", "step_id": "verify-get-help-page-stable", "duration_ms": 800, "frames": 4 } - ] -} diff --git a/scripts/rea/probe-todo19-navigation.json b/scripts/rea/probe-todo19-navigation.json deleted file mode 100644 index 2ffc62d..0000000 --- a/scripts/rea/probe-todo19-navigation.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-navigation", - ".settings-navigation__item", - ".settings-navigation__group--about", - ".settings-modal__panel" - ], - "actions": [ - { "kind": "scroll", "step_id": "reveal-bottom-about-us-navigation-group", "selector": ".settings-navigation", "delta_y": 500, "frames": 1 }, - { "kind": "wait", "step_id": "verify-about-and-get-help-labels", "duration_ms": 400, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo19-open-appearance-dark.json b/scripts/rea/probe-todo19-open-appearance-dark.json deleted file mode 100644 index 6d3cae1..0000000 --- a/scripts/rea/probe-todo19-open-appearance-dark.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".settings-navigation__item--active", - ".appearance-card--light", - ".appearance-card--dark" - ], - "actions": [ - { "kind": "click", "step_id": "open-appearance-by-observed-nav-index-3-in-dark-theme", "selector": ".settings-navigation__item", "index": 3, "frames": 0 }, - { "kind": "wait", "step_id": "verify-dark-theme-before-restoring-light", "duration_ms": 500, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo19-open-appearance.json b/scripts/rea/probe-todo19-open-appearance.json deleted file mode 100644 index b806acc..0000000 --- a/scripts/rea/probe-todo19-open-appearance.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".settings-navigation__item--active", - ".appearance-card--light", - ".appearance-card--dark" - ], - "actions": [ - { "kind": "click", "step_id": "open-appearance-by-observed-nav-index-3", "selector": ".settings-navigation__item", "index": 3, "frames": 0 }, - { "kind": "wait", "step_id": "confirm-light-appearance-before-dark-sample", "duration_ms": 500, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo19-select-dark.json b/scripts/rea/probe-todo19-select-dark.json deleted file mode 100644 index c15ec84..0000000 --- a/scripts/rea/probe-todo19-select-dark.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".appearance-card--light", - ".appearance-card--dark" - ], - "actions": [ - { "kind": "click", "step_id": "select-dark-theme-for-about-help-sample", "selector": ".appearance-card--dark", "index": 0, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-todo19-select-light.json b/scripts/rea/probe-todo19-select-light.json deleted file mode 100644 index bbf4adb..0000000 --- a/scripts/rea/probe-todo19-select-light.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".settings-modal__panel", - ".appearance-card--light", - ".appearance-card--dark" - ], - "actions": [ - { "kind": "click", "step_id": "restore-light-theme-after-about-help-samples", "selector": ".appearance-card--light", "index": 0, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-user-message-edit-20261017.json b/scripts/rea/probe-user-message-edit-20261017.json deleted file mode 100644 index e9a0f73..0000000 --- a/scripts/rea/probe-user-message-edit-20261017.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": true, - "track_selectors": [ - ".cr-frame--right", - ".cr-toolbar", - ".cr-toolbar__time", - ".cr-toolbar .cr-icon-button[data-action='copy']", - ".cr-toolbar .cr-icon-button[data-action='revert']", - ".cr-toolbar .cr-icon-button[data-action='edit']", - ".cr-self-bubble--editing", - ".cr-user-message-editor", - ".cr-user-message-editor .cr-input-editor-host", - ".cr-user-message-editor__hint", - ".cr-user-message-editor__cancel", - ".cr-user-message-editor__send" - ], - "actions": [ - { "kind": "hover", "step_id": "hover-user-message", "selector": ".cr-self-bubble", "index": 0, "frames": 1, "interval_ms": 50 }, - { "kind": "wait", "step_id": "toolbar-visible", "duration_ms": 350, "frames": 1 }, - { "kind": "click", "step_id": "open-editor", "selector": ".cr-toolbar .cr-icon-button[data-action='edit']", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "editor-visible", "duration_ms": 700, "frames": 1, "interval_ms": 50 }, - { "kind": "click", "step_id": "cancel-editor", "selector": ".cr-user-message-editor__cancel", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "editor-closed", "duration_ms": 500, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-user-message-edit-cancel-20261017.json b/scripts/rea/probe-user-message-edit-cancel-20261017.json deleted file mode 100644 index 19033dc..0000000 --- a/scripts/rea/probe-user-message-edit-cancel-20261017.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".cr-self-bubble", - ".cr-toolbar", - ".cr-user-message-editor" - ], - "actions": [ - { "kind": "click", "step_id": "cancel-editor", "selector": ".cr-user-message-editor__cancel", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "editor-closed", "duration_ms": 500, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-user-message-edit-open-20261017.json b/scripts/rea/probe-user-message-edit-open-20261017.json deleted file mode 100644 index f356d5f..0000000 --- a/scripts/rea/probe-user-message-edit-open-20261017.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": true, - "track_selectors": [ - ".cr-self-bubble--editing", - ".cr-user-message-editor", - ".cr-user-message-editor .cr-input-container", - ".cr-user-message-editor .cr-input-editor-host", - ".cr-user-message-editor__error", - ".cr-user-message-editor__hint", - ".cr-user-message-editor__hint-icon", - ".cr-user-message-editor__actions", - ".cr-user-message-editor__cancel", - ".cr-user-message-editor__send", - ".cr-user-message-editor__resume", - ".cr-user-message-editor__send svg" - ], - "actions": [ - { "kind": "hover", "step_id": "hover-user-message", "selector": ".cr-self-bubble", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "toolbar-visible", "duration_ms": 300, "frames": 0 }, - { "kind": "click", "step_id": "open-editor", "selector": ".cr-toolbar .cr-icon-button[data-action='edit']", "index": 0, "frames": 0 }, - { "kind": "wait", "step_id": "editor-open", "duration_ms": 800, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-user-message-revert-20261017.json b/scripts/rea/probe-user-message-revert-20261017.json deleted file mode 100644 index c1538c7..0000000 --- a/scripts/rea/probe-user-message-revert-20261017.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".cr-frame--right", - ".cr-toolbar", - ".cr-toolbar__time" - ], - "actions": [ - { "kind": "click", "step_id": "open-research-task", "selector": ".conversation-item", "index": 2, "frames": 0 }, - { "kind": "wait", "step_id": "loaded", "duration_ms": 1500, "frames": 1 }, - { "kind": "hover", "step_id": "hover-user-0", "selector": ".cr-self-bubble", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "toolbar-0", "duration_ms": 350, "frames": 1 }, - { "kind": "hover", "step_id": "hover-user-1", "selector": ".cr-self-bubble", "index": 1, "frames": 1 }, - { "kind": "wait", "step_id": "toolbar-1", "duration_ms": 350, "frames": 1 } - ] -} diff --git a/scripts/rea/probe-user-message-revert-hover-20261017.json b/scripts/rea/probe-user-message-revert-hover-20261017.json deleted file mode 100644 index 9ecf29d..0000000 --- a/scripts/rea/probe-user-message-revert-hover-20261017.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "include_fonts": false, - "include_message_content": false, - "track_selectors": [ - ".cr-message-list", - ".cr-frame--right", - ".cr-toolbar", - ".cr-toolbar__time", - ".cr-toolbar .cr-icon-button[data-action='copy']", - ".cr-toolbar .cr-icon-button[data-action='revert']", - ".cr-toolbar .cr-icon-button[data-action='edit']", - ".cr-tooltip", - ".wb-tooltip" - ], - "actions": [ - { "kind": "viewport", "step_id": "tall-viewport", "width": 1336, "height": 2160, "frames": 1 }, - { "kind": "wait", "step_id": "relayout", "duration_ms": 500, "frames": 1 }, - { "kind": "hover", "step_id": "hover-user-message", "selector": ".cr-self-bubble", "index": 1, "frames": 1 }, - { "kind": "wait", "step_id": "toolbar-visible", "duration_ms": 350, "frames": 0 }, - { "kind": "hover", "step_id": "hover-revert-button", "selector": ".cr-toolbar .cr-icon-button[data-action='revert']", "index": 0, "frames": 1 }, - { "kind": "wait", "step_id": "tooltip-visible", "duration_ms": 700, "frames": 1 } - ] -} diff --git a/scripts/recommended-skills-backend-regression.ts b/scripts/recommended-skills-backend-regression.ts index 7a678d3..fbd265f 100644 --- a/scripts/recommended-skills-backend-regression.ts +++ b/scripts/recommended-skills-backend-regression.ts @@ -457,6 +457,8 @@ console.log(JSON.stringify({ result: 'PASS', checks: checks.length, phase: 'arch check('initialize restores installs after a stop', restored.origin?.recommendationId, 'archify') } +console.log(JSON.stringify({ result: 'PASS', checks: checks.length, phase: 'required-offline' })) + // ---- the shipped catalog entry must match the real published package --------- { const cached = path.resolve('.tmp/recommended-audit/archify.zip') @@ -465,11 +467,16 @@ console.log(JSON.stringify({ result: 'PASS', checks: checks.length, phase: 'arch let bytes: Uint8Array | undefined try { bytes = await fs.readFile(override ?? cached) - } catch { + } catch (error) { + // Only an absent default cache is optional. Explicit inputs and other I/O errors must fail. + if (override || (error as NodeJS.ErrnoException).code !== 'ENOENT') { + throw new Error(`Cannot read real-package fixture ${override ?? cached}: ${String(error)}`) + } // Offline by default: the published package is audited by a separate network test. available = false } if (available) { + const checksBeforeRealPackage = checks.length const catalogModule = await import(pathToFileURL(await compile('src/main/capabilities/skill-recommendations.ts', 'catalog.mjs')).href) const entry = catalogModule.SKILL_RECOMMENDATIONS.find((item: { id: string }) => item.id === 'archify') check('the shipped catalog contains the archify recommendation', !!entry, true) @@ -485,9 +492,8 @@ console.log(JSON.stringify({ result: 'PASS', checks: checks.length, phase: 'arch check('the published package keeps its recommendation origin', installed.origin?.recommendationId, 'archify') const document = await skills.readSkill(installed.id) check('the published package keeps its resource files', document.files.length > 100, true) + console.log(JSON.stringify({ result: 'PASS', checks: checks.length - checksBeforeRealPackage, phase: 'real-package' })) } else { - console.log(JSON.stringify({ result: 'SKIP', phase: 'real-package', reason: 'published package not present in .tmp' })) + console.log(JSON.stringify({ result: 'SKIP', phase: 'real-package', checks: 0, reason: 'published package is unavailable; optional package checks were not run', path: override ?? cached })) } } - -console.log(JSON.stringify({ result: 'PASS', checks: checks.length, phase: 'real-package' })) diff --git a/scripts/regression-reporting.test.mjs b/scripts/regression-reporting.test.mjs new file mode 100644 index 0000000..7caf9b6 --- /dev/null +++ b/scripts/regression-reporting.test.mjs @@ -0,0 +1,84 @@ +/** Reporting contracts only; all subprocess fixtures are offline, without model services. */ +import assert from 'node:assert/strict' +import { spawnSync } from 'node:child_process' +import { mkdir, mkdtemp, rm, symlink, writeFile } from 'node:fs/promises' +import path from 'node:path' +import test from 'node:test' +import { build } from 'esbuild' + +const env = { ...process.env } +delete env.YCODE_TEST_DOM_MODULE +delete env.YCODE_TEST_REQUIRE_DOM +delete env.YCODE_ARCHIFY_ZIP +const run = (args, overrides = {}, cwd = process.cwd()) => { + const result = spawnSync(process.execPath, args, { cwd, env: { ...env, ...overrides }, encoding: 'utf8', timeout: 180000 }) + assert.ifError(result.error) + return result +} +const reports = (stdout) => stdout.split('\n').filter(line => line.startsWith('{')).flatMap(line => { + try { return [JSON.parse(line)] } catch { return [] } +}) + +test('alignment reports absent optional DOM coverage explicitly', () => { + const result = run(['scripts/run-alignment-regression.mjs']) + assert.equal(result.status, 0, result.stdout + result.stderr) + const summary = reports(result.stdout) + assert.ok(summary.some(item => item.phase === 'alignment-offline' && item.result === 'PASS')) + assert.deepEqual(summary.filter(item => item.phase === 'alignment-dom').map(item => item.result), ['SKIP']) + assert.match(summary.find(item => item.phase === 'alignment-dom').reason, /YCODE_TEST_DOM_MODULE/) +}) + +for (const strict of ['flag', 'environment']) { + test(`alignment requires DOM when requested by ${strict}`, () => { + const result = run(['scripts/run-alignment-regression.mjs', ...(strict === 'flag' ? ['--require-dom'] : [])], + strict === 'environment' ? { YCODE_TEST_REQUIRE_DOM: '1' } : {}) + assert.equal(result.status, 1) + assert.match(result.stderr, /FAIL alignment DOM: set YCODE_TEST_DOM_MODULE/) + assert.equal(reports(result.stdout).length, 0) + }) +} + +test('alignment rejects an unloadable configured DOM module instead of skipping', () => { + const result = run(['scripts/run-alignment-regression.mjs'], { YCODE_TEST_DOM_MODULE: 'ycode-deliberately-missing-dom-fixture' }) + assert.equal(result.status, 1) + assert.match(result.stderr, /FAIL alignment DOM: cannot load YCODE_TEST_DOM_MODULE/) +}) + +test('backend never reports a skipped real package as PASS', async () => { + await mkdir('.tmp', { recursive: true }) + const temp = await mkdtemp(path.resolve('.tmp/reporting-test-')) + try { + const outfile = path.join(temp, 'backend.mjs') + await build({ entryPoints: ['scripts/recommended-skills-backend-regression.ts'], outfile, + bundle: true, platform: 'node', format: 'esm', external: ['esbuild'], logLevel: 'warning' }) + // Isolate the default cache without changing a developer's optional package. + await mkdir(path.join(temp, '.tmp')) + await symlink(path.resolve('src'), path.join(temp, 'src'), 'junction') + const result = run([outfile], {}, temp) + assert.equal(result.status, 0, result.stdout + result.stderr) + const summary = reports(result.stdout) + assert.ok(summary.some(item => item.phase === 'required-offline' && item.result === 'PASS' && item.checks > 0)) + assert.deepEqual(summary.filter(item => item.phase === 'real-package').map(item => item.result), ['SKIP']) + assert.equal(summary.find(item => item.phase === 'real-package').checks, 0) + const badOverride = run([outfile], { YCODE_ARCHIFY_ZIP: path.join(temp, 'absent.zip') }, temp) + assert.equal(badOverride.status, 1) + assert.match(badOverride.stderr, /Cannot read real-package fixture/) + assert.equal(reports(badOverride.stdout).filter(item => item.phase === 'real-package').length, 0) + } finally { + await rm(temp, { recursive: true, force: true }) + } +}) + +test('alignment rejects a configured module without a JSDOM export', async () => { + await mkdir('.tmp', { recursive: true }) + const temp = await mkdtemp(path.resolve('.tmp/reporting-dom-test-')) + try { + const module = path.join(temp, 'not-jsdom.cjs') + await writeFile(module, 'module.exports = {}\n') + const result = run(['scripts/run-alignment-regression.mjs', '--require-dom'], { YCODE_TEST_DOM_MODULE: module }) + assert.equal(result.status, 1) + assert.match(result.stderr, /module does not export JSDOM/) + } finally { + await rm(temp, { recursive: true, force: true }) + } +}) diff --git a/scripts/run-alignment-regression.mjs b/scripts/run-alignment-regression.mjs index 1ec50cc..2665b18 100644 --- a/scripts/run-alignment-regression.mjs +++ b/scripts/run-alignment-regression.mjs @@ -1,6 +1,24 @@ /** Offline alignment regression: never starts a model service or Claude CLI. */ import { build } from 'esbuild' import { spawnSync } from 'node:child_process' +import { createRequire } from 'node:module' + +const requireDom = process.argv.includes('--require-dom') || process.env.YCODE_TEST_REQUIRE_DOM === '1' +const domModule = process.env.YCODE_TEST_DOM_MODULE +if (requireDom && !domModule) { + console.error('FAIL alignment DOM: set YCODE_TEST_DOM_MODULE to an installed jsdom module path; --require-dom / YCODE_TEST_REQUIRE_DOM=1 forbids skipping DOM tests.') + process.exit(1) +} +if (domModule) { + try { + const { JSDOM } = createRequire(process.cwd() + '/package.json')(domModule) + if (typeof JSDOM !== 'function') throw new Error('module does not export JSDOM') + } catch (error) { + console.error(`FAIL alignment DOM: cannot load YCODE_TEST_DOM_MODULE=${domModule}: ${error.message}`) + process.exit(1) + } +} + const tests = [ 'model-selection-alignment-regression.ts', 'model-settings-alignment-regression.ts', 'session-factory-alignment-regression.ts', 'session-composer-alignment-regression.tsx', 'alignment-conversation-regression.tsx', 'question-answer-shell-regression.tsx', @@ -23,7 +41,7 @@ for (const file of ['scripts/build-runtime-regressions.mjs', '.tmp/claude-approv } // Optional DOM tests use separately installed jsdom, not Electron/CLI or an upstream model. -if (process.env.YCODE_TEST_DOM_MODULE) { +if (domModule) { for (const file of ['task-popconfirm-regression', 'question-interaction-regression', 'question-identity-regression', 'completed-fold-nested-regression', 'completed-fold-native-identity-regression', 'permission-intercept-dom-regression']) { const outfile = `.tmp/alignment-tests/${file}.cjs` await build({ entryPoints: [`scripts/${file}.tsx`], outfile, bundle: true, platform: 'node', format: 'cjs', jsx: 'automatic', loader: { '.css': 'empty' }, logLevel: 'warning' }) @@ -35,3 +53,8 @@ if (process.env.YCODE_TEST_DOM_MODULE) { if (modeChip.error) throw modeChip.error if (modeChip.status !== 0) process.exit(modeChip.status ?? 1) } + +console.log(JSON.stringify({ result: 'PASS', phase: 'alignment-offline', suites: tests.length + 2 })) +console.log(JSON.stringify(domModule + ? { result: 'PASS', phase: 'alignment-dom', suites: 7 } + : { result: 'SKIP', phase: 'alignment-dom', suites: 7, reason: 'YCODE_TEST_DOM_MODULE is not set; DOM coverage was not run. Use --require-dom to forbid this skip.' })) diff --git a/scripts/wb-capture.mjs b/scripts/wb-capture.mjs deleted file mode 100644 index 27399f4..0000000 --- a/scripts/wb-capture.mjs +++ /dev/null @@ -1,240 +0,0 @@ -import './wb-legacy-disabled.mjs' - -/** - * WorkBuddy 运行时样式采集(CDP)。 - * - * 用途:拉取真实 WorkBuddy 界面的元素矩形与 computed style,作为 YCode 视觉对齐依据。 - * 只读页面,不发送消息、不执行工具、不读取 cookies / localStorage。 - * - * 用法:node scripts/wb-capture.mjs - */ - -import { mkdir, writeFile } from 'node:fs/promises' -import { join } from 'node:path' - -const port = Number(process.argv[2] ?? 9223) -const outDir = process.argv[3] ?? 'docs/workbuddy-capture' - -/** 要采集的元素:侧栏、对话区、输入区 */ -const SELECTORS = [ - // 布局骨架 - 'body', - '#root', - 'body > div', - '[class*="app-shell"]', - '[class*="workbench"]', - '[class*="layout"]', - // 左侧栏 - '.cb-sidebar-nav', - '.cb-sidebar-nav__header', - '.cb-sidebar-nav__header-title', - '.cb-sidebar-nav__header-subtitle', - '.cb-sidebar-nav__content', - '.cb-sidebar-nav__section', - '.cb-sidebar-nav__section-title', - '.cb-sidebar-nav__item', - '.cb-sidebar-nav__item--selected', - '.cb-sidebar-nav__item-icon', - '.cb-sidebar-nav__item-title', - '.cb-sidebar-nav__item-subtitle', - '.cb-sidebar-nav__item-badge', - '.cb-sidebar-nav__footer', - '[class*="sidebar"]', - // 对话区 - '[class*="conversation"]', - '[class*="message-list"]', - '.cr-message-list', - '.cr-message-list__content', - '.cr-agent', - '.cr-agent__header', - '.cr-self-message', - '.cr-self-bubble', - '.cr-markdown', - '.cr-markdown p', - '.cr-collapse', - '.cr-collapse__header', - // 输入区 - '.cr-input-box', - '.cr-input-box__main', - '.cr-input-container', - '.cr-input-editor-host', - '.cr-input-toolbar', - '.cr-input-toolbar__right', - '.cr-input-footer', - '.cr-send-button', - '[class*="input-container"]', - '[class*="input-area-container"]', - // 右栏 / 面板 - '.detail-sidebar', - '[class*="detail-panel"]', - '[class*="artifact"]' -] - -/** 精选属性,避免一次性导出 300+ 属性难以阅读 */ -const PROPS = [ - 'display', - 'position', - 'flex-direction', - 'flex-grow', - 'flex-shrink', - 'align-items', - 'justify-content', - 'width', - 'min-width', - 'max-width', - 'height', - 'min-height', - 'max-height', - 'padding-top', - 'padding-right', - 'padding-bottom', - 'padding-left', - 'margin-top', - 'margin-bottom', - 'margin-left', - 'margin-right', - 'gap', - 'row-gap', - 'column-gap', - 'background-color', - 'background-image', - 'color', - 'border-top-width', - 'border-top-color', - 'border-radius', - 'box-shadow', - 'font-family', - 'font-size', - 'font-weight', - 'line-height', - 'letter-spacing', - 'text-transform', - 'opacity', - 'overflow-y', - 'z-index' -] - -async function main() { - const listRes = await fetch(`http://127.0.0.1:${port}/json/list`) - const targets = await listRes.json() - const pages = targets.filter((t) => t.type === 'page') - if (pages.length === 0) { - console.error('未找到 page 目标:', targets.map((t) => `${t.type}`).join(', ')) - process.exit(1) - } - console.log('页面目标:') - for (const p of pages) console.log(` - ${p.title} | ${p.url.split('?')[0].slice(0, 90)}`) - - // 优先主对话窗口(排除 search 等辅助窗口) - const main = pages.find((p) => !/windowKind=/.test(p.url)) ?? pages[0] - console.log('选定目标:', main.title) - - const ws = new WebSocket(main.webSocketDebuggerUrl) - let id = 0 - const pending = new Map() - const send = (method, params = {}) => - new Promise((resolve, reject) => { - const msgId = ++id - const timer = setTimeout(() => { - pending.delete(msgId) - reject(new Error(`CDP 超时: ${method}`)) - }, 20000) - pending.set(msgId, (v) => { - clearTimeout(timer) - resolve(v) - }) - ws.send(JSON.stringify({ id: msgId, method, params })) - }) - - await new Promise((resolve, reject) => { - const timer = setTimeout(() => reject(new Error('WebSocket 连接超时')), 10000) - ws.addEventListener('open', () => { - clearTimeout(timer) - resolve() - }) - ws.addEventListener('error', (e) => { - clearTimeout(timer) - reject(new Error(`WebSocket 错误: ${e?.message ?? 'unknown'}`)) - }) - }) - ws.addEventListener('message', (ev) => { - const msg = JSON.parse(ev.data) - if (msg.id && pending.has(msg.id)) { - pending.get(msg.id)(msg.result) - pending.delete(msg.id) - } - }) - console.log('CDP 已连接') - - const expression = `(() => { - const SELECTORS = ${JSON.stringify(SELECTORS)}; - const PROPS = ${JSON.stringify(PROPS)}; - const clean = (v) => (v == null ? null : String(v).replace(/\\s+/g, ' ').trim().slice(0, 220)); - const pick = (el) => { - const cs = getComputedStyle(el); - const out = {}; - for (const p of PROPS) { - const v = clean(cs.getPropertyValue(p)); - if (v && v !== 'none' && v !== 'normal' && v !== 'auto' && v !== '0px' && v !== 'rgba(0, 0, 0, 0)') out[p] = v; - } - return out; - }; - const rect = (el) => { - const r = el.getBoundingClientRect(); - return { x: Math.round(r.x), y: Math.round(r.y), w: Math.round(r.width), h: Math.round(r.height) }; - }; - const result = {}; - for (const sel of SELECTORS) { - let nodes = []; - try { nodes = [...document.querySelectorAll(sel)]; } catch { nodes = []; } - if (nodes.length === 0) continue; - result[sel] = { - count: nodes.length, - samples: nodes.slice(0, 3).map((el) => ({ - tag: el.tagName.toLowerCase(), - cls: clean(el.className).slice(0, 160), - text: clean(el.textContent).slice(0, 120), - rect: rect(el), - styles: pick(el) - })) - }; - } - // 顶层结构:从 body 往下三层,输出带尺寸的容器 - const tree = []; - const walk = (el, depth) => { - if (depth > 4 || tree.length > 120) return; - const r = el.getBoundingClientRect(); - if (r.width < 8 || r.height < 8) return; - tree.push({ depth, tag: el.tagName.toLowerCase(), cls: clean(el.className).slice(0, 90), rect: rect(el) }); - for (const c of el.children) walk(c, depth + 1); - }; - for (const c of document.body.children) walk(c, 0); - return JSON.stringify({ - title: document.title, - viewport: { w: innerWidth, h: innerHeight, dpr: devicePixelRatio, zoom: (window.outerWidth / innerWidth).toFixed(3) }, - htmlAttrs: { theme: document.documentElement.dataset.theme || null, class: clean(document.documentElement.className) }, - bodyBg: getComputedStyle(document.body).backgroundColor, - selectors: result, - layoutTree: tree - }); - })()` - - const evaluated = await send('Runtime.evaluate', { expression, returnByValue: true }) - const data = JSON.parse(evaluated.result.value) - - await mkdir(outDir, { recursive: true }) - await writeFile(join(outDir, 'styles.json'), JSON.stringify(data, null, 2), 'utf8') - console.log('已写出 styles.json,命中选择器', Object.keys(data.selectors).length, '个') - - const shot = await send('Page.captureScreenshot', { format: 'png' }) - if (shot?.data) { - await writeFile(join(outDir, 'page.png'), Buffer.from(shot.data, 'base64')) - console.log('已写出 page.png') - } - ws.close() -} - -main().catch((err) => { - console.error('采集失败:', err.message) - process.exit(1) -}) diff --git a/scripts/wb-home-layout.mjs b/scripts/wb-home-layout.mjs deleted file mode 100644 index dc21052..0000000 --- a/scripts/wb-home-layout.mjs +++ /dev/null @@ -1,170 +0,0 @@ -import './wb-legacy-disabled.mjs' - -/** - * 采集首页的垂直结构(各区块 y 坐标与尺寸)。 - * - * 用法:node scripts/wb-home-layout.mjs [outJson] - */ - -import { writeFile } from 'node:fs/promises' - -const port = Number(process.argv[2] ?? 9223) -const outJson = process.argv[3] ?? null - -async function main() { - const list = await (await fetch(`http://127.0.0.1:${port}/json/list`)).json() - const page = list.filter((t) => t.type === 'page')[0] - if (!page) throw new Error('未找到页面') - - const ws = new WebSocket(page.webSocketDebuggerUrl) - await new Promise((r, j) => { - const t = setTimeout(() => j(new Error('连接超时')), 8000) - ws.addEventListener('open', () => { - clearTimeout(t) - r() - }) - ws.addEventListener('error', () => { - clearTimeout(t) - j(new Error('连接失败')) - }) - }) - - const send = (method, params = {}) => - new Promise((res, rej) => { - const id = Math.floor(Math.random() * 1e9) - const timer = setTimeout(() => rej(new Error(`超时 ${method}`)), 25000) - const h = (ev) => { - const m = JSON.parse(ev.data) - if (m.id === id) { - clearTimeout(timer) - ws.removeEventListener('message', h) - res(m.result) - } - } - ws.addEventListener('message', h) - ws.send(JSON.stringify({ id, method, params })) - }) - - // 逐类名精确取矩形;找不到就跳过 - const expr = `(() => { - const SEL = [ - '.workbuddy-topbar', - '.conversation-sidebar', - '[class*="welcome"]', - '[class*="greeting"]', - '.wb-segmented', - '.quick-actions', - '.quick-actions__list', - '[class*="input-box"]', - '[class*="cr-input"]', - '.cr-input-container', - '.cr-input-editor-host', - '[class*="permission-setting"]', - '.cr-input-footer', - '[class*="suggestion"]', - '[class*="quick-prompt"]', - 'img[class*="mascot"]', - '[class*="mascot"]', - '[class*="empty"]', - '[class*="scene"]' - ]; - const clean = (v) => (v == null ? '' : String(v).replace(/\\s+/g, ' ').trim()); - const out = []; - for (const sel of SEL) { - let nodes = []; - try { nodes = [...document.querySelectorAll(sel)]; } catch { continue; } - if (!nodes.length) continue; - out.push({ - sel, - count: nodes.length, - items: nodes.slice(0, 6).map((el) => { - const r = el.getBoundingClientRect(); - const cs = getComputedStyle(el); - return { - cls: clean(el.className).slice(0, 90), - rect: [Math.round(r.x), Math.round(r.y), Math.round(r.width), Math.round(r.height)], - display: cs.display, - flexDirection: cs.flexDirection, - alignItems: cs.alignItems, - justifyContent: cs.justifyContent, - gap: cs.gap, - padding: cs.padding, - margin: cs.margin, - radius: cs.borderRadius, - bg: cs.backgroundColor, - shadow: cs.boxShadow === 'none' ? '' : cs.boxShadow, - fontSize: cs.fontSize, - fontWeight: cs.fontWeight - }; - }) - }); - } - - // 主内容容器的直接子元素序列(看垂直堆叠顺序) - const side = document.querySelector('.conversation-sidebar'); - const sideRight = side ? side.getBoundingClientRect().right : 240; - let best = null, bestArea = 0; - document.querySelectorAll('div').forEach((el) => { - const r = el.getBoundingClientRect(); - if (r.x >= sideRight - 4 && r.width > 500 && r.height > 300) { - const a = r.width * r.height; - if (a > bestArea) { bestArea = a; best = el; } - } - }); - let stack = []; - if (best) { - const walk = (el, depth, path) => { - if (depth > 4 || stack.length > 60) return; - [...el.children].forEach((c, i) => { - const r = c.getBoundingClientRect(); - if (r.width < 60 || r.height < 8) return; - stack.push({ - depth, - path: path + '/' + i, - tag: c.tagName.toLowerCase(), - cls: clean(c.className).slice(0, 70), - rect: [Math.round(r.x), Math.round(r.y), Math.round(r.width), Math.round(r.height)], - text: clean(c.textContent).slice(0, 40) - }); - walk(c, depth + 1, path + '/' + i); - }); - }; - walk(best, 0, ''); - } - - return JSON.stringify({ viewport: { w: innerWidth, h: innerHeight }, out, stack }); - })()` - - const r = await send('Runtime.evaluate', { expression: expr, returnByValue: true }) - const data = JSON.parse(r.result.value) - - console.log(`viewport ${data.viewport.w}x${data.viewport.h}\n`) - for (const entry of data.out) { - console.log(`### ${entry.sel} (${entry.count})`) - for (const it of entry.items) { - console.log(` .${it.cls}`) - console.log(` rect ${JSON.stringify(it.rect)} display=${it.display}/${it.flexDirection} align=${it.alignItems} justify=${it.justifyContent} gap=${it.gap}`) - console.log(` pad=${it.padding} margin=${it.margin}`) - console.log(` radius=${it.radius} bg=${it.bg} fs=${it.fontSize}/${it.fontWeight}`) - if (it.shadow) console.log(` shadow=${it.shadow}`) - } - console.log('') - } - - console.log('### 垂直堆叠(y 升序)') - const sorted = [...data.stack].sort((a, b) => a.rect[1] - b.rect[1]) - for (const s of sorted) { - console.log(` y=${String(s.rect[1]).padStart(4)} h=${String(s.rect[3]).padStart(4)} x=${String(s.rect[0]).padStart(4)} w=${String(s.rect[2]).padStart(4)} ${' '.repeat(s.depth)}${s.tag}.${s.cls.split(/\s+/)[0]} "${s.text}"`) - } - - if (outJson) { - await writeFile(outJson, JSON.stringify(data, null, 2), 'utf8') - console.log(`\n已写出 ${outJson}`) - } - ws.close() -} - -main().catch((e) => { - console.error('失败:', e.message) - process.exit(1) -}) diff --git a/scripts/wb-home-parts.mjs b/scripts/wb-home-parts.mjs deleted file mode 100644 index ce2d1b3..0000000 --- a/scripts/wb-home-parts.mjs +++ /dev/null @@ -1,140 +0,0 @@ -import './wb-legacy-disabled.mjs' - -/** - * 首页补充探测:大标题、输入框下方行、建议列表。 - * - * 用法:node scripts/wb-home-parts.mjs - */ - -const port = Number(process.argv[2] ?? 9223) - -async function main() { - const list = await (await fetch(`http://127.0.0.1:${port}/json/list`)).json() - const page = list.filter((t) => t.type === 'page')[0] - const ws = new WebSocket(page.webSocketDebuggerUrl) - await new Promise((r, j) => { - const t = setTimeout(() => j(new Error('连接超时')), 8000) - ws.addEventListener('open', () => { - clearTimeout(t) - r() - }) - ws.addEventListener('error', () => { - clearTimeout(t) - j(new Error('连接失败')) - }) - }) - - const send = (method, params = {}) => - new Promise((res, rej) => { - const id = Math.floor(Math.random() * 1e9) - const timer = setTimeout(() => rej(new Error(`超时 ${method}`)), 25000) - const h = (ev) => { - const m = JSON.parse(ev.data) - if (m.id === id) { - clearTimeout(timer) - ws.removeEventListener('message', h) - res(m.result) - } - } - ws.addEventListener('message', h) - ws.send(JSON.stringify({ id, method, params })) - }) - - const expr = `(() => { - const clean = (v) => (v == null ? '' : String(v).replace(/\\s+/g, ' ').trim()); - const R = (el) => { const r = el.getBoundingClientRect(); return [Math.round(r.x), Math.round(r.y), Math.round(r.width), Math.round(r.height)]; }; - const info = (el) => { - if (!el) return null; - const cs = getComputedStyle(el); - return { - tag: el.tagName.toLowerCase(), - cls: clean(el.className).slice(0, 80), - rect: R(el), - fontSize: cs.fontSize, - fontWeight: cs.fontWeight, - lineHeight: cs.lineHeight, - color: cs.color, - display: cs.display, - flexDirection: cs.flexDirection, - alignItems: cs.alignItems, - justifyContent: cs.justifyContent, - gap: cs.gap, - padding: cs.padding, - margin: cs.margin, - radius: cs.borderRadius, - bg: cs.backgroundColor, - border: cs.borderTopWidth + ' ' + cs.borderTopColor - }; - }; - - // 1) 最大字号元素(标题) - let heading = null, maxFs = 0; - document.querySelectorAll('body *').forEach((el) => { - const r = el.getBoundingClientRect(); - if (r.y < 30 || r.y > 350 || r.width < 40 || r.height < 10) return; - if (el.children.length > 2) return; - const cs = getComputedStyle(el); - const fs = parseFloat(cs.fontSize); - if (fs > maxFs) { maxFs = fs; heading = el; } - }); - - // 2) 输入框外层容器的全部子元素(含下方那行) - const box = document.querySelector('[class*="home-route__input-box"]') || document.querySelector('.cr-input-box'); - const boxKids = box ? [...box.children].map((c) => ({ ...info(c), text: clean(c.textContent).slice(0, 50) })) : []; - - // 3) 建议列表:找 y > 520 且高度 32 左右的成组元素 - const suggCandidates = []; - document.querySelectorAll('button, [role="button"], div, li').forEach((el) => { - const r = el.getBoundingClientRect(); - if (r.y < 500 || r.y > 800 || r.height < 24 || r.height > 44 || r.width < 120 || r.width > 700) return; - const cs = getComputedStyle(el); - if (cs.borderRadius === '0px' && cs.backgroundColor === 'rgba(0, 0, 0, 0)') return; - const t = clean(el.textContent); - if (!t || t.length > 50) return; - suggCandidates.push({ ...info(el), text: t }); - }); - - return JSON.stringify({ - viewport: { w: innerWidth, h: innerHeight }, - heading: info(heading), - box: info(box), - boxKids, - sugg: suggCandidates.slice(0, 12), - suggParent: suggCandidates[0] ? info(suggCandidates[0].parentElement) : null, - suggGrand: suggCandidates[0] ? info(suggCandidates[0].parentElement?.parentElement) : null - }); - })()` - - const r = await send('Runtime.evaluate', { expression: expr, returnByValue: true }) - const d = JSON.parse(r.result.value) - - console.log(`viewport ${d.viewport.w}x${d.viewport.h}`) - const show = (label, o) => { - if (!o) return console.log(`\n### ${label}\n (无)`) - console.log(`\n### ${label}`) - console.log(` ${o.tag}.${o.cls} rect ${JSON.stringify(o.rect)}`) - console.log(` fs=${o.fontSize}/${o.fontWeight} lh=${o.lineHeight} color=${o.color}`) - console.log(` display=${o.display}/${o.flexDirection} align=${o.alignItems} justify=${o.justifyContent} gap=${o.gap}`) - console.log(` pad=${o.padding} margin=${o.margin} radius=${o.radius} bg=${o.bg} border=${o.border}`) - if (o.text) console.log(` text="${o.text}"`) - } - show('大标题', d.heading) - show('输入框外层 .cr-input-box', d.box) - console.log(`\n### 输入框外层的子元素(${d.boxKids.length})`) - for (const k of d.boxKids) { - console.log(` ${k.tag}.${k.cls} ${JSON.stringify(k.rect)} gap=${k.gap} pad=${k.padding} radius=${k.radius} bg=${k.bg}`) - if (k.text) console.log(` "${k.text}"`) - } - show('建议项父级', d.suggParent) - show('建议项祖父', d.suggGrand) - console.log(`\n### 建议项候选(${d.sugg.length})`) - for (const s of d.sugg) { - console.log(` ${s.tag}.${s.cls} ${JSON.stringify(s.rect)} radius=${s.radius} bg=${s.bg} border=${s.border} fs=${s.fontSize} "${s.text}"`) - } - ws.close() -} - -main().catch((e) => { - console.error('失败:', e.message) - process.exit(1) -}) diff --git a/scripts/wb-home.mjs b/scripts/wb-home.mjs deleted file mode 100644 index 5890c26..0000000 --- a/scripts/wb-home.mjs +++ /dev/null @@ -1,152 +0,0 @@ -import './wb-legacy-disabled.mjs' - -/** - * 采集 WorkBuddy 首页/新建任务页(空态)结构与样式。 - * - * 用法:node scripts/wb-home.mjs [outJson] - */ - -import { writeFile } from 'node:fs/promises' - -const port = Number(process.argv[2] ?? 9223) -const outJson = process.argv[3] ?? null - -const PROPS = [ - 'display', - 'flex-direction', - 'flex-wrap', - 'align-items', - 'justify-content', - 'width', - 'height', - 'min-height', - 'padding-top', - 'padding-right', - 'padding-bottom', - 'padding-left', - 'margin-top', - 'margin-bottom', - 'gap', - 'background-color', - 'color', - 'border-top-width', - 'border-top-color', - 'border-radius', - 'font-size', - 'font-weight', - 'line-height', - 'box-shadow', - 'position' -] - -async function main() { - const list = await (await fetch(`http://127.0.0.1:${port}/json/list`)).json() - const page = list.filter((t) => t.type === 'page')[0] - if (!page) throw new Error('未找到页面') - - const ws = new WebSocket(page.webSocketDebuggerUrl) - await new Promise((r, j) => { - const t = setTimeout(() => j(new Error('连接超时')), 8000) - ws.addEventListener('open', () => { - clearTimeout(t) - r() - }) - ws.addEventListener('error', () => { - clearTimeout(t) - j(new Error('连接失败')) - }) - }) - - const send = (method, params = {}) => - new Promise((res, rej) => { - const id = Math.floor(Math.random() * 1e9) - const timer = setTimeout(() => rej(new Error(`超时 ${method}`)), 25000) - const h = (ev) => { - const m = JSON.parse(ev.data) - if (m.id === id) { - clearTimeout(timer) - ws.removeEventListener('message', h) - res(m.result) - } - } - ws.addEventListener('message', h) - ws.send(JSON.stringify({ id, method, params })) - }) - - const expr = `(() => { - const PROPS = ${JSON.stringify(PROPS)}; - const clean = (v) => (v == null ? '' : String(v).replace(/\\s+/g, ' ').trim()); - const picked = (el) => { - const cs = getComputedStyle(el); - const o = {}; - for (const p of PROPS) { - const v = clean(cs.getPropertyValue(p)); - if (v && v !== 'normal' && v !== 'auto' && v !== 'none' && v !== '0px' && v !== 'rgba(0, 0, 0, 0)') o[p] = v; - } - return o; - }; - const rect = (el) => { const r = el.getBoundingClientRect(); return [Math.round(r.x), Math.round(r.y), Math.round(r.width), Math.round(r.height)]; }; - - // 主内容区:从侧栏右侧开始、宽度最大的顶层容器 - const side = document.querySelector('.conversation-sidebar'); - const sideRight = side ? side.getBoundingClientRect().right : 240; - let root = null; - document.querySelectorAll('body *').forEach((el) => { - const r = el.getBoundingClientRect(); - if (r.x >= sideRight - 2 && r.width > 400 && r.height > 400 && r.y < 100) { - if (!root || r.width * r.height > root.getBoundingClientRect().width * root.getBoundingClientRect().height) root = el; - } - }); - if (!root) return JSON.stringify({ error: '未找到主内容区' }); - - const rows = []; - const walk = (el, depth) => { - if (depth > 10 || rows.length > 160) return; - const r = el.getBoundingClientRect(); - if (r.width < 4 || r.height < 4) return; - rows.push({ - d: depth, - tag: el.tagName.toLowerCase(), - cls: clean(el.className).slice(0, 100), - text: el.children.length === 0 ? clean(el.textContent).slice(0, 50) : '', - rect: rect(el), - st: picked(el) - }); - for (const c of el.children) walk(c, depth + 1); - }; - walk(root, 0); - - return JSON.stringify({ - viewport: { w: innerWidth, h: innerHeight }, - rootCls: clean(root.className).slice(0, 120), - rows - }); - })()` - - const r = await send('Runtime.evaluate', { expression: expr, returnByValue: true }) - const data = JSON.parse(r.result.value) - if (data.error) { - console.error(data.error) - process.exit(1) - } - - console.log(`viewport ${data.viewport.w}x${data.viewport.h} root=.${data.rootCls}`) - for (const n of data.rows) { - const cls = n.cls ? '.' + n.cls.split(/\s+/).slice(0, 2).join('.') : '' - const txt = n.text ? ` "${n.text}"` : '' - console.log(`${' '.repeat(n.d)}${n.tag}${cls} [${n.rect.join(',')}]${txt}`) - const keys = Object.keys(n.st) - if (keys.length) console.log(`${' '.repeat(n.d)} ${JSON.stringify(n.st)}`) - } - - if (outJson) { - await writeFile(outJson, JSON.stringify(data, null, 2), 'utf8') - console.log(`\n已写出 ${outJson}`) - } - ws.close() -} - -main().catch((e) => { - console.error('失败:', e.message) - process.exit(1) -}) diff --git a/scripts/wb-icons.mjs b/scripts/wb-icons.mjs deleted file mode 100644 index c44b29d..0000000 --- a/scripts/wb-icons.mjs +++ /dev/null @@ -1,118 +0,0 @@ -import './wb-legacy-disabled.mjs' - -/** - * 从真实 WorkBuddy 页面导出图标(SVG)+ 关键按钮的完整标记。 - * - * 用法:node scripts/wb-icons.mjs [outFile] - */ - -import { writeFile } from 'node:fs/promises' - -const port = Number(process.argv[2] ?? 9223) -const outFile = process.argv[3] ?? null - -/** 每个条目:名字 → 定位表达式(点击目标或图标宿主) */ -const TARGETS = [ - // 侧栏顶部 - ['brand', '.conversation-list-logo'], - ['templates', '.industry-template-switcher__host button'], - ['newTask', '.conversation-list-tabs .conversation-list-tab-button'], - // 侧栏顶栏操作 - ['topbarBack', '.conversation-list-topbar-actions button'], - ['topbarFilter', '.conversation-list-task-filter-trigger'], - // 分组操作 - ['sectionCompact', '.conversation-section-compact-btn'], - ['sectionAdd', '.conversation-section-add-btn'], - ['sectionChevron', '.conversation-section-chevron'], - // 对话区 - ['artifactActions', '.artifact-slot-panel__actions'], - // 输入区 - ['inputToolbarLeft', '.cr-input-toolbar__left'], - ['inputToolbarRight', '.cr-input-toolbar__right'], - ['sendButton', '.cr-send-button'], - // 右侧面板 - ['tabIcon', '.artifact-tab__icon'], - ['tabClose', '.artifact-tab__close'], - ['tabsAdd', '.artifact-tabs__add'], - ['panelActions', '.sidebar-next-main-header__actions'] -] - -async function main() { - const list = await (await fetch(`http://127.0.0.1:${port}/json/list`)).json() - const page = list.filter((t) => t.type === 'page' && !/windowKind=/.test(t.url))[0] - if (!page) { - console.error('未找到主页面目标') - process.exit(1) - } - - const ws = new WebSocket(page.webSocketDebuggerUrl) - await new Promise((resolve, reject) => { - const timer = setTimeout(() => reject(new Error('连接超时')), 10000) - ws.addEventListener('open', () => { - clearTimeout(timer) - resolve() - }) - ws.addEventListener('error', () => { - clearTimeout(timer) - reject(new Error('连接失败')) - }) - }) - - const send = (method, params = {}) => - new Promise((resolve, reject) => { - const id = Math.floor(Math.random() * 1e9) - const timer = setTimeout(() => reject(new Error(`超时 ${method}`)), 20000) - const handler = (ev) => { - const msg = JSON.parse(ev.data) - if (msg.id === id) { - clearTimeout(timer) - ws.removeEventListener('message', handler) - resolve(msg.result) - } - } - ws.addEventListener('message', handler) - ws.send(JSON.stringify({ id, method, params })) - }) - - const expression = `(() => { - const TARGETS = ${JSON.stringify(TARGETS)}; - const out = {}; - for (const [name, sel] of TARGETS) { - const el = document.querySelector(sel); - if (!el) { out[name] = null; continue; } - const svgs = [...el.querySelectorAll('svg')].map(s => s.outerHTML); - out[name] = { - selector: sel, - text: (el.textContent || '').replace(/\\s+/g, ' ').trim().slice(0, 60), - svgCount: svgs.length, - svgs, - html: el.outerHTML.slice(0, 3000) - }; - } - return JSON.stringify(out); - })()` - - const res = await send('Runtime.evaluate', { expression, returnByValue: true }) - const data = JSON.parse(res.result.value) - - for (const [name, info] of Object.entries(data)) { - if (!info) { - console.log(`### ${name}: 未找到`) - continue - } - console.log(`### ${name} (svg=${info.svgCount}) "${info.text}"`) - for (const s of info.svgs) console.log(' ', s.slice(0, 400)) - console.log('') - } - - if (outFile) { - await writeFile(outFile, JSON.stringify(data, null, 2), 'utf8') - console.log('已写出', outFile) - } - ws.close() -} - -main().catch((err) => { - console.error('失败:', err.message) - process.exit(1) -}) diff --git a/scripts/wb-legacy-disabled.mjs b/scripts/wb-legacy-disabled.mjs deleted file mode 100644 index bc03fb7..0000000 --- a/scripts/wb-legacy-disabled.mjs +++ /dev/null @@ -1,3 +0,0 @@ -// 用户要求:所有查看 WorkBuddy 实现的工作统一使用 REA。 -// 历史直接 CDP 采集器在任何网络连接或文件写入前停止。 -throw new Error('历史 WorkBuddy 直接 CDP 采集已停用。请通过 REA 的 Electron / artifact 工具采集原版;参见 AGENTS.md。') diff --git a/scripts/wb-probe.mjs b/scripts/wb-probe.mjs deleted file mode 100644 index 6b8ab9e..0000000 --- a/scripts/wb-probe.mjs +++ /dev/null @@ -1,171 +0,0 @@ -import './wb-legacy-disabled.mjs' - -/** - * 按文案定位元素并导出其与父级的样式 —— 用于采集那些类名不稳定(CSS Module 哈希)的界面。 - * - * 用法:node scripts/wb-probe.mjs <文案1,文案2,...> [outJson] - */ - -import { writeFile } from 'node:fs/promises' - -const port = Number(process.argv[2] ?? 9223) -const texts = (process.argv[3] ?? '').split(',').map((s) => s.trim()).filter(Boolean) -const outJson = process.argv[4] ?? null - -const PROPS = [ - 'display', - 'flex-direction', - 'flex-wrap', - 'align-items', - 'justify-content', - 'width', - 'height', - 'min-height', - 'padding-top', - 'padding-right', - 'padding-bottom', - 'padding-left', - 'margin-top', - 'margin-bottom', - 'gap', - 'background-color', - 'color', - 'border-top-width', - 'border-top-color', - 'border-radius', - 'font-size', - 'font-weight', - 'line-height', - 'box-shadow', - 'position' -] - -async function main() { - const list = await (await fetch(`http://127.0.0.1:${port}/json/list`)).json() - const page = list.filter((t) => t.type === 'page')[0] - if (!page) throw new Error('未找到页面') - - const ws = new WebSocket(page.webSocketDebuggerUrl) - await new Promise((r, j) => { - const t = setTimeout(() => j(new Error('连接超时')), 8000) - ws.addEventListener('open', () => { - clearTimeout(t) - r() - }) - ws.addEventListener('error', () => { - clearTimeout(t) - j(new Error('连接失败')) - }) - }) - - const send = (method, params = {}) => - new Promise((res, rej) => { - const id = Math.floor(Math.random() * 1e9) - const timer = setTimeout(() => rej(new Error(`超时 ${method}`)), 25000) - const h = (ev) => { - const m = JSON.parse(ev.data) - if (m.id === id) { - clearTimeout(timer) - ws.removeEventListener('message', h) - res(m.result) - } - } - ws.addEventListener('message', h) - ws.send(JSON.stringify({ id, method, params })) - }) - - const expr = `(() => { - const TEXTS = ${JSON.stringify(texts)}; - const PROPS = ${JSON.stringify(PROPS)}; - const clean = (v) => (v == null ? '' : String(v).replace(/\\s+/g, ' ').trim()); - const pick = (el) => { - if (!el) return null; - const cs = getComputedStyle(el); - const o = {}; - for (const p of PROPS) { - const v = clean(cs.getPropertyValue(p)); - if (v && v !== 'normal' && v !== 'auto' && v !== 'none' && v !== '0px' && v !== 'rgba(0, 0, 0, 0)') o[p] = v; - } - return o; - }; - const R = (el) => { if (!el) return null; const r = el.getBoundingClientRect(); return [Math.round(r.x), Math.round(r.y), Math.round(r.width), Math.round(r.height)]; }; - - const out = {}; - for (const t of TEXTS) { - let best = null; - document.querySelectorAll('*').forEach((el) => { - if (el.children.length !== 0) return; - if (clean(el.textContent) !== t) return; - const r = el.getBoundingClientRect(); - if (r.width <= 0 || r.height <= 0) return; - if (!best || r.width * r.height < best.getBoundingClientRect().width * best.getBoundingClientRect().height) best = el; - }); - if (!best) { out[t] = null; continue; } - const p1 = best.parentElement; - const p2 = p1?.parentElement ?? null; - out[t] = { - self: { tag: best.tagName.toLowerCase(), cls: clean(best.className).slice(0, 90), rect: R(best), st: pick(best) }, - parent: p1 ? { tag: p1.tagName.toLowerCase(), cls: clean(p1.className).slice(0, 90), rect: R(p1), st: pick(p1) } : null, - grand: p2 ? { tag: p2.tagName.toLowerCase(), cls: clean(p2.className).slice(0, 90), rect: R(p2), st: pick(p2) } : null - }; - } - - // 输入区 - const inp = document.querySelector('textarea, [contenteditable="true"], input[type="text"]'); - out.__input = inp - ? { - tag: inp.tagName.toLowerCase(), - cls: clean(inp.className).slice(0, 90), - rect: R(inp), - placeholder: inp.getAttribute('placeholder') || inp.getAttribute('data-placeholder') || '', - parent: inp.parentElement - ? { cls: clean(inp.parentElement.className).slice(0, 90), rect: R(inp.parentElement), st: pick(inp.parentElement) } - : null, - grand: inp.parentElement?.parentElement - ? { cls: clean(inp.parentElement.parentElement.className).slice(0, 90), rect: R(inp.parentElement.parentElement), st: pick(inp.parentElement.parentElement) } - : null - } - : null; - - return JSON.stringify({ viewport: { w: innerWidth, h: innerHeight }, out }); - })()` - - const r = await send('Runtime.evaluate', { expression: expr, returnByValue: true }) - const data = JSON.parse(r.result.value) - - console.log(`viewport ${data.viewport.w}x${data.viewport.h}`) - for (const [key, v] of Object.entries(data.out)) { - console.log(`\n### ${key}`) - if (!v) { - console.log(' (未找到)') - continue - } - if (key === '__input') { - console.log(` ${v.tag}.${v.cls} ${JSON.stringify(v.rect)} placeholder="${v.placeholder}"`) - if (v.parent) console.log(` ↑ .${v.parent.cls} ${JSON.stringify(v.parent.rect)} ${JSON.stringify(v.parent.st)}`) - if (v.grand) console.log(` ↑↑ .${v.grand.cls} ${JSON.stringify(v.grand.rect)} ${JSON.stringify(v.grand.st)}`) - continue - } - console.log(` 自身 ${v.self.tag}.${v.self.cls} ${JSON.stringify(v.self.rect)}`) - console.log(` ${JSON.stringify(v.self.st)}`) - if (v.parent) { - console.log(` 父级 ${v.parent.tag}.${v.parent.cls} ${JSON.stringify(v.parent.rect)}`) - console.log(` ${JSON.stringify(v.parent.st)}`) - } - if (v.grand) { - console.log(` 祖父 ${v.grand.tag}.${v.grand.cls} ${JSON.stringify(v.grand.rect)}`) - console.log(` ${JSON.stringify(v.grand.st)}`) - } - } - - if (outJson) { - await writeFile(outJson, JSON.stringify(data, null, 2), 'utf8') - console.log(`\n已写出 ${outJson}`) - } - ws.close() -} - -main().catch((e) => { - console.error('失败:', e.message) - process.exit(1) -}) diff --git a/scripts/wb-shell.mjs b/scripts/wb-shell.mjs deleted file mode 100644 index 7f4c2a0..0000000 --- a/scripts/wb-shell.mjs +++ /dev/null @@ -1,151 +0,0 @@ -import './wb-legacy-disabled.mjs' - -/** - * 完整采集对标外围结构:侧栏(品牌/导航/分组/账号)、搜索、通知、设置入口。 - * - * 用法:node scripts/wb-shell.mjs [outJson] - */ - -import { writeFile } from 'node:fs/promises' - -const port = Number(process.argv[2] ?? 9223) -const outJson = process.argv[3] ?? null - -const PROPS = [ - 'display', - 'flex-direction', - 'align-items', - 'justify-content', - 'width', - 'height', - 'min-height', - 'padding-top', - 'padding-right', - 'padding-bottom', - 'padding-left', - 'margin-top', - 'margin-bottom', - 'gap', - 'background-color', - 'color', - 'border-top-width', - 'border-top-color', - 'border-radius', - 'font-size', - 'font-weight', - 'line-height', - 'opacity', - 'position' -] - -async function main() { - const list = await (await fetch(`http://127.0.0.1:${port}/json/list`)).json() - const page = list.filter((t) => t.type === 'page')[0] - if (!page) throw new Error('未找到页面') - - const ws = new WebSocket(page.webSocketDebuggerUrl) - await new Promise((r, j) => { - const t = setTimeout(() => j(new Error('连接超时')), 8000) - ws.addEventListener('open', () => { - clearTimeout(t) - r() - }) - ws.addEventListener('error', () => { - clearTimeout(t) - j(new Error('连接失败')) - }) - }) - - const send = (method, params = {}) => - new Promise((res, rej) => { - const id = Math.floor(Math.random() * 1e9) - const timer = setTimeout(() => rej(new Error(`超时 ${method}`)), 25000) - const h = (ev) => { - const m = JSON.parse(ev.data) - if (m.id === id) { - clearTimeout(timer) - ws.removeEventListener('message', h) - res(m.result) - } - } - ws.addEventListener('message', h) - ws.send(JSON.stringify({ id, method, params })) - }) - - const expr = `(() => { - const PROPS = ${JSON.stringify(PROPS)}; - const clean = (v) => (v == null ? '' : String(v).replace(/\\s+/g, ' ').trim()); - const picked = (el) => { - const cs = getComputedStyle(el); - const o = {}; - for (const p of PROPS) { - const v = clean(cs.getPropertyValue(p)); - if (v && v !== 'normal' && v !== 'auto' && v !== 'none' && v !== '0px' && v !== 'rgba(0, 0, 0, 0)') o[p] = v; - } - return o; - }; - const rect = (el) => { const r = el.getBoundingClientRect(); return [Math.round(r.x), Math.round(r.y), Math.round(r.width), Math.round(r.height)]; }; - - // 1) 侧栏完整子树(含文字节点) - const side = document.querySelector('.conversation-sidebar') || document.querySelector('[class*="sidebar"]'); - const sidebar = []; - if (side) { - const walk = (el, depth) => { - if (depth > 12) return; - const r = el.getBoundingClientRect(); - if (r.width < 1 || r.height < 1) return; - const kids = [...el.children]; - const ownText = kids.length === 0 ? clean(el.textContent).slice(0, 60) : ''; - sidebar.push({ d: depth, tag: el.tagName.toLowerCase(), cls: clean(el.className).slice(0, 90), text: ownText, rect: rect(el), st: picked(el) }); - kids.forEach((c) => walk(c, depth + 1)); - }; - walk(side, 0); - } - - // 2) 全局搜外围相关元素(搜索/通知/账号/设置) - const keyword = /search|notif|account|avatar|user|profile|setting|login|inbox|message|bell/i; - const found = []; - document.querySelectorAll('[class]').forEach((el) => { - if (typeof el.className !== 'string') return; - if (!keyword.test(el.className)) return; - const r = el.getBoundingClientRect(); - if (r.width < 8 || r.height < 8) return; - found.push({ cls: clean(el.className).slice(0, 100), rect: rect(el), text: clean(el.textContent).slice(0, 60), st: picked(el) }); - }); - - return JSON.stringify({ - viewport: { w: innerWidth, h: innerHeight }, - sidebar, - found: found.slice(0, 60) - }); - })()` - - const r = await send('Runtime.evaluate', { expression: expr, returnByValue: true }) - const data = JSON.parse(r.result.value) - - console.log(`viewport ${data.viewport.w}x${data.viewport.h}`) - console.log(`\n===== 侧栏子树(${data.sidebar.length} 节点)=====`) - for (const n of data.sidebar) { - const cls = n.cls ? '.' + n.cls.split(/\s+/).slice(0, 2).join('.') : '' - const txt = n.text ? ` "${n.text}"` : '' - console.log(`${' '.repeat(n.d)}${n.tag}${cls} [${n.rect.join(',')}]${txt}`) - const keys = Object.keys(n.st) - if (keys.length) console.log(`${' '.repeat(n.d)} ${JSON.stringify(n.st)}`) - } - - console.log(`\n===== 外围相关元素(${data.found.length})=====`) - for (const f of data.found) { - console.log(` .${f.cls.split(/\s+/).slice(0, 2).join('.')} [${f.rect.join(',')}] "${f.text}"`) - } - - if (outJson) { - await writeFile(outJson, JSON.stringify(data, null, 2), 'utf8') - console.log(`\n已写出 ${outJson}`) - } - ws.close() -} - -main().catch((e) => { - console.error('失败:', e.message) - process.exit(1) -}) diff --git a/scripts/wb-tree.mjs b/scripts/wb-tree.mjs deleted file mode 100644 index a21a3f4..0000000 --- a/scripts/wb-tree.mjs +++ /dev/null @@ -1,153 +0,0 @@ -import './wb-legacy-disabled.mjs' - -/** - * 导出真实 WorkBuddy 某个子树的结构与样式(CDP)。 - * - * 用法:node scripts/wb-tree.mjs [maxNodes] - * 例: node scripts/wb-tree.mjs 9223 .conversation-sidebar 200 - */ - -import { writeFile, mkdir } from 'node:fs/promises' -import { join } from 'node:path' - -const port = Number(process.argv[2] ?? 9223) -const rootSelector = process.argv[3] ?? '.conversation-sidebar' -const maxNodes = Number(process.argv[4] ?? 200) -const outDir = process.argv[5] ?? null - -const PROPS = [ - 'display', - 'flex-direction', - 'align-items', - 'justify-content', - 'width', - 'min-width', - 'max-width', - 'height', - 'min-height', - 'padding-top', - 'padding-right', - 'padding-bottom', - 'padding-left', - 'margin-top', - 'margin-bottom', - 'gap', - 'background-color', - 'color', - 'border-top-width', - 'border-top-color', - 'border-radius', - 'box-shadow', - 'font-size', - 'font-weight', - 'line-height', - 'letter-spacing', - 'text-transform', - 'opacity', - 'overflow-y', - 'position' -] - -async function main() { - const list = await (await fetch(`http://127.0.0.1:${port}/json/list`)).json() - const page = list.filter((t) => t.type === 'page' && !/windowKind=/.test(t.url))[0] - if (!page) { - console.error('未找到主页面目标') - process.exit(1) - } - - const ws = new WebSocket(page.webSocketDebuggerUrl) - await new Promise((resolve, reject) => { - const timer = setTimeout(() => reject(new Error('连接超时')), 10000) - ws.addEventListener('open', () => { - clearTimeout(timer) - resolve() - }) - ws.addEventListener('error', () => { - clearTimeout(timer) - reject(new Error('连接失败')) - }) - }) - - const send = (method, params = {}) => - new Promise((resolve, reject) => { - const id = Math.floor(Math.random() * 1e9) - const timer = setTimeout(() => reject(new Error(`超时 ${method}`)), 20000) - const handler = (ev) => { - const msg = JSON.parse(ev.data) - if (msg.id === id) { - clearTimeout(timer) - ws.removeEventListener('message', handler) - resolve(msg.result) - } - } - ws.addEventListener('message', handler) - ws.send(JSON.stringify({ id, method, params })) - }) - - const expression = `(() => { - const ROOT = ${JSON.stringify(rootSelector)}; - const PROPS = ${JSON.stringify(PROPS)}; - const MAX = ${maxNodes}; - const clean = (v) => (v == null ? '' : String(v).replace(/\\s+/g, ' ').trim()); - const root = document.querySelector(ROOT); - if (!root) return JSON.stringify({ error: 'selector not found: ' + ROOT }); - const rows = []; - const walk = (el, depth) => { - if (rows.length >= MAX) return; - const cs = getComputedStyle(el); - const r = el.getBoundingClientRect(); - if (r.width < 1 || r.height < 1) return; - const st = {}; - for (const p of PROPS) { - const v = clean(cs.getPropertyValue(p)); - if (v && v !== 'normal' && v !== 'auto' && v !== 'none' && v !== '0px' && v !== 'rgba(0, 0, 0, 0)') st[p] = v; - } - rows.push({ - depth, - tag: el.tagName.toLowerCase(), - cls: clean(el.className).slice(0, 120), - text: clean(el.childElementCount === 0 ? el.textContent : '').slice(0, 70), - rect: { x: Math.round(r.x), y: Math.round(r.y), w: Math.round(r.width), h: Math.round(r.height) }, - styles: st - }); - for (const c of el.children) walk(c, depth + 1); - }; - walk(root, 0); - return JSON.stringify({ selector: ROOT, viewport: { w: innerWidth, h: innerHeight }, rows }); - })()` - - const res = await send('Runtime.evaluate', { expression, returnByValue: true }) - const data = JSON.parse(res.result.value) - if (data.error) { - console.error(data.error) - process.exit(1) - } - - console.log(`root=${data.selector} viewport=${data.viewport.w}x${data.viewport.h} nodes=${data.rows.length}`) - const lines = [] - for (const row of data.rows) { - const indent = ' '.repeat(row.depth) - const cls = row.cls ? '.' + row.cls.split(/\s+/).slice(0, 2).join('.') : '' - const txt = row.text ? ` "${row.text}"` : '' - lines.push(`${indent}${row.tag}${cls} [${row.rect.x},${row.rect.y} ${row.rect.w}x${row.rect.h}]${txt}`) - const keys = Object.keys(row.styles) - if (keys.length) { - lines.push(`${indent} ${JSON.stringify(row.styles)}`) - } - } - const text = lines.join('\n') - console.log(text.slice(0, 12000)) - - if (outDir) { - await mkdir(outDir, { recursive: true }) - await writeFile(join(outDir, 'tree.json'), JSON.stringify(data, null, 2), 'utf8') - console.log(`\n已写出 ${join(outDir, 'tree.json')}`) - } - ws.close() -} - -main().catch((err) => { - console.error('失败:', err.message) - process.exit(1) -})