test(web): record outliner rename evidence
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -427,6 +427,8 @@
|
|||||||
Mass 1.0→5.0 写入 Main;证据 `tools/web/complete/probe-physics.mjs`。
|
Mass 1.0→5.0 写入 Main;证据 `tools/web/complete/probe-physics.mjs`。
|
||||||
- Sequencer:Properties 的 Sequencer Strip Editing → Add Strip 创建
|
- Sequencer:Properties 的 Sequencer Strip Editing → Add Strip 创建
|
||||||
`Web MOVIE`(MOVIE);证据 `tools/web/complete/probe-sequencer.mjs`。
|
`Web MOVIE`(MOVIE);证据 `tools/web/complete/probe-sequencer.mjs`。
|
||||||
|
- Outliner:右键 `Data` 菜单 → 重命名,`PBR Studio Ground` → `GroundRenamed`,
|
||||||
|
Main 已改名;证据 `tools/web/complete/probe-outliner-rename.mjs`。
|
||||||
- Compositor:`WASM 合成求值` 在无合成节点组的场景返回结构化
|
- Compositor:`WASM 合成求值` 在无合成节点组的场景返回结构化
|
||||||
`INVALID_ARGUMENT: COMPOSITOR_NODE_GROUP_MISSING: scene has no
|
`INVALID_ARGUMENT: COMPOSITOR_NODE_GROUP_MISSING: scene has no
|
||||||
compositing node group`。此前错误对象被渲染为 `[object Object]`,已在
|
compositing node group`。此前错误对象被渲染为 `[object Object]`,已在
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"schemaVersion": 1,
|
"schemaVersion": 1,
|
||||||
"task": "WBV2-P1425-001",
|
"task": "WBV2-P1425-001",
|
||||||
"updatedAt": "2026-11-14T07:15:00+08:00",
|
"updatedAt": "2026-11-14T07:18:00+08:00",
|
||||||
"status": "in_progress",
|
"status": "in_progress",
|
||||||
"focus": "COMPLETE-TUTORIAL-001 backend export gap (USD/Alembic)",
|
"focus": "COMPLETE-TUTORIAL-001 backend export gap (USD/Alembic)",
|
||||||
"breakpoint": "blender-5.2.0/source/blender/web_engine/CMakeLists.txt (USD wiring); WASM 6ee2b261",
|
"breakpoint": "blender-5.2.0/source/blender/web_engine/CMakeLists.txt (USD wiring); WASM 6ee2b261",
|
||||||
@@ -202,5 +202,10 @@
|
|||||||
"fix": "App.tsx normalizes ErrorReport code/message instead of [object Object]",
|
"fix": "App.tsx normalizes ErrorReport code/message instead of [object Object]",
|
||||||
"script": "tools/web/complete/probe-compositor.mjs",
|
"script": "tools/web/complete/probe-compositor.mjs",
|
||||||
"acceptance": "NOT_CLAIMED"
|
"acceptance": "NOT_CLAIMED"
|
||||||
|
},
|
||||||
|
"outlinerRenameProbe": {
|
||||||
|
"result": "Data menu → 重命名: PBR Studio Ground → GroundRenamed in Main",
|
||||||
|
"script": "tools/web/complete/probe-outliner-rename.mjs",
|
||||||
|
"acceptance": "NOT_CLAIMED"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
75
tools/web/complete/probe-outliner-rename.mjs
Normal file
75
tools/web/complete/probe-outliner-rename.mjs
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
/**
|
||||||
|
* Focused case: edit mode -> select all -> UV -> 展开(角度) on a mesh.
|
||||||
|
*
|
||||||
|
* node tools/web/complete/probe-outliner-rename.mjs --base-url http://127.0.0.1:5176
|
||||||
|
*/
|
||||||
|
import { ASSETS, parseArgs, launchBrowser, newPage, openApp, openFile, waitScene } from "../course/lib/lesson-recorder.mjs";
|
||||||
|
|
||||||
|
const args = parseArgs();
|
||||||
|
const BASE = args.baseUrl || "http://127.0.0.1:5176";
|
||||||
|
const browser = await launchBrowser(args.gpu);
|
||||||
|
const { context, page, consoleErrors } = await newPage(browser, {});
|
||||||
|
page.setDefaultTimeout(90_000);
|
||||||
|
await page.addInitScript(() => {
|
||||||
|
const NativeWorker = window.Worker;
|
||||||
|
window.__probeWorkers = [];
|
||||||
|
window.__probeMessages = [];
|
||||||
|
window.Worker = class extends NativeWorker {
|
||||||
|
constructor(...params) {
|
||||||
|
super(...params);
|
||||||
|
window.__probeWorkers.push(this);
|
||||||
|
this.addEventListener("message", (event) => window.__probeMessages.push(event.data));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const log = (...parts) => console.log(new Date().toISOString().slice(11, 19), ...parts);
|
||||||
|
const python = async (source) => {
|
||||||
|
const requestId = `probe-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
||||||
|
return await page.evaluate(({ requestId, source }) => new Promise((resolve) => {
|
||||||
|
const started = Date.now();
|
||||||
|
const read = () => {
|
||||||
|
const hit = window.__probeMessages.find((message) => message && message.requestId === requestId && message.kind === "result");
|
||||||
|
if (hit) { clearInterval(timer); resolve(hit); return; }
|
||||||
|
if (Date.now() - started > 240000) { clearInterval(timer); resolve({ timeout: true }); }
|
||||||
|
};
|
||||||
|
const timer = setInterval(read, 250);
|
||||||
|
for (const worker of window.__probeWorkers) worker.postMessage({ requestId, command: { type: "jsonCommand", cmd: "pythonExec", params: { source, filename: "ProbeRename.py", console: false } } });
|
||||||
|
}), { requestId, source }, { timeout: 300_000 });
|
||||||
|
};
|
||||||
|
const renameState = async () => {
|
||||||
|
const result = await python(`
|
||||||
|
import bpy, json
|
||||||
|
print('RENAME ' + json.dumps({'objects': sorted(obj.name for obj in bpy.data.objects)}))
|
||||||
|
`);
|
||||||
|
const out = result?.result?.json;
|
||||||
|
const status = await page.evaluate(() => document.querySelector('[data-testid="engine-status"]')?.textContent ?? "");
|
||||||
|
return { state: out?.state, output: out?.output, error: out?.error, status };
|
||||||
|
};
|
||||||
|
const menu = async (label, item) => {
|
||||||
|
await page.getByRole("button", { name: label, exact: true }).click();
|
||||||
|
await page.getByRole("menuitem", { name: item, exact: true }).click();
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
await openApp(page, BASE);
|
||||||
|
await openFile(page, ASSETS.studio);
|
||||||
|
await waitScene(page, { objects: 6, timeout: 240_000 });
|
||||||
|
const row = page.locator('[role="treeitem"][aria-label="PBR Studio Ground"]').first();
|
||||||
|
await row.click({ button: "right" });
|
||||||
|
await page.waitForTimeout(600);
|
||||||
|
log("menu", JSON.stringify(await page.evaluate(() => Array.from(document.querySelectorAll('[role="menuitem"]')).map((node) => node.textContent))));
|
||||||
|
await page.getByRole("menuitem", { name: /重命名/ }).first().click();
|
||||||
|
const input = page.locator('.tree-row input').first();
|
||||||
|
await input.waitFor({ timeout: 30_000 });
|
||||||
|
await input.fill("GroundRenamed");
|
||||||
|
await input.press("Enter");
|
||||||
|
await page.waitForTimeout(2000);
|
||||||
|
log("renamed", JSON.stringify(await renameState()));
|
||||||
|
} catch (error) {
|
||||||
|
log("probe error", error instanceof Error ? error.message : String(error));
|
||||||
|
log("state", JSON.stringify(await renameState().catch(() => null)));
|
||||||
|
} finally {
|
||||||
|
log("consoleErrors", JSON.stringify(consoleErrors.slice(-10)));
|
||||||
|
await context.close();
|
||||||
|
await browser.close();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user