fix(web): armature edit-mode bones survive save and the coverage spec runs
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

The coverage spec could not start: the armature workbench renders only in the
web workbench (?ui=web), the diagnostic-panel filter hid it there, and the
spec's own WebEngineClient waited on the editor's exclusive native-files Web
Lock. Give the client an ephemeral mode (marked by worker name, no OPFS store
and no lock) and let the fixture load in web mode without the native overlay.

Bone authoring in Edit mode was also discarded on save: the engine wrote
object bones while the save flush rebuilds them from the edit-bone list
(ED_editors_flush_edits -> ED_armature_from_edit). Mirror each edit into the
edit bones and refresh arm_roll from the bone matrix so roll survives the
round trip.

armature-editor-coverage-ui-production: 6 passed (dev server, Chromium).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
mes123456
2026-11-30 02:23:33 +08:00
parent 013ea78a45
commit 8d9bb86f12
9 changed files with 75 additions and 18 deletions

View File

@@ -25,7 +25,9 @@ test("armature panel operates on the selected bone", async ({ page }, testInfo)
page.setDefaultTimeout(8_000);
await observeNative(page);
const workflow = new NativeUIWorkflow(page, testInfo.outputPath("panel"));
await page.goto("/");
/* The armature workbench is the web workbench Properties editor; the desktop
* mode renders the native properties mirror instead. */
await page.goto("/?ui=web");
await workflow.load(path.join(root, fixturePath), "PoseConstraintArmatureObject");
const panel = page.getByTestId("armature-authoring-workbench");
await workflow.save("before");
@@ -80,7 +82,10 @@ for (const route of Object.keys(routes) as Route[]) {
finally { timings.push({ stage: name, seconds: (performance.now() - start) / 1000 }); }
};
const create = () => {
const client = new WebEngineClient({ timeoutMs: 10_000 });
/* These engines never touch the shared OPFS native-files store: the page's
* editor already holds its exclusive Web Lock, and the fixture round-trips
* through saveBlend/openBlend bytes only. */
const client = new WebEngineClient({ timeoutMs: 10_000, nativeFiles: false });
clients.push(client);
return client;
};