feat(web): deployed functional suite, outliner expansion fix and local-first 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

Outliner: react-accessible-treeview's controlled expandedIds sync expands a
node together with its parent, then the next pass treats that extra parent id
as removed from the controlled set and collapses the whole branch. Reproduced
as a collapsed tree after ch11 -> ch12 (scene rows complete in React, one
collapsed row in the DOM). Keep OUTLINER_ROOT_ID in the controlled set so both
passes agree, and drop the rows-digest memo that regressed the normal path.
Also arm a bounded post-open OUTLINER_REFRESH loop so the tree settles on rows
of the newly opened Main instead of the previous one.

Tests: web/playwright.deployed.config.ts + web/tests/deployed walk the 31
manual chapters and the 31 capability rows headed against a deployed origin,
and tools/web/run-deployed-functional-tests.mjs preflights, runs and reports.
--local serves the production bundle from web/dist on loopback with the same
COOP/COEP/CORP/CSP headers, so a case costs compile time instead of a 300 MB
download: full local suite 60/60 in 10.3 min, also 60/60 against the deployed
release. Report dirs are resolved absolute and [ch28a]-style tags map to their
chapter.

Area layout: split from the clamped source rect and keep the area switcher
inside a narrow header.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
mes123456
2026-11-24 16:12:26 +08:00
parent 570aa2dd54
commit a5f772e18f
162 changed files with 9341 additions and 8 deletions

View File

@@ -32,6 +32,22 @@ test("split creates a new generic area inside the active rect", () => {
assert.equal(next.areas[1].editor, "3D Viewport");
});
test("split starts from the clamped rect of an out-of-bounds restored area", () => {
/* A workspace restored from storage can carry a rect saved before the bounds
* clamp (probe: a 5th split area landed at x=1599 on a 1600px window). The
* split must clamp the source first instead of propagating it. A zero-width
* rect is not the case here: clampRect lifts it to AREA_MIN_WIDTH and the
* split then correctly refuses a second child below that minimum. */
const state = workspace([area("viewport", 1.2, 0, 0.6, 1)]);
const next = applyAreaOperation(state, { type: "SPLIT_AREA", areaId: "viewport", direction: "VERTICAL", factor: 0.5 });
assert.equal(next.areas.length, 2);
for (const item of next.areas) {
const { x, y, width, height } = item.rect;
assert.ok(x >= 0 && y >= 0 && width >= 0 && height >= 0, `${item.id} rect must be non-negative`);
assert.ok(x + width <= 1.0001 && y + height <= 1.0001, `${item.id} rect must stay inside the normalized grid`);
}
});
test("neighbor lookup uses perpendicular overlap and join unions rects", () => {
const state = workspace([area("left", 0, 0, 0.5, 1), area("right", 0.5, 0, 0.5, 1, "Properties")]);
assert.equal(findAreaNeighbor(state.areas, "right", "LEFT")?.id, "left");