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>
44 lines
1.5 KiB
TypeScript
44 lines
1.5 KiB
TypeScript
import { execFileSync } from "node:child_process";
|
|
import path from "node:path";
|
|
|
|
/**
|
|
* Launch parameters shared by the Playwright config and the shared-session
|
|
* fixture, so both modes (isolated and reused context) drive the same browser.
|
|
*/
|
|
export const DEPLOYED_ORIGIN = (process.env.WEB_ORIGIN ?? "https://49.232.250.35:58014").replace(/\/+$/, "");
|
|
export const DEPLOYED_VIEWPORT = { width: 1600, height: 900 };
|
|
|
|
export function chromePath(): string | undefined {
|
|
if (process.env.CHROME_PATH) return process.env.CHROME_PATH;
|
|
try { return execFileSync("which", ["google-chrome"], { encoding: "utf8" }).trim() || undefined; }
|
|
catch { return undefined; }
|
|
}
|
|
|
|
const hardwareArgs = [
|
|
"--no-sandbox",
|
|
"--use-gl=angle",
|
|
"--use-angle=gl",
|
|
"--ignore-gpu-blocklist",
|
|
"--enable-gpu-rasterization",
|
|
"--enable-zero-copy",
|
|
"--enable-unsafe-webgpu",
|
|
];
|
|
const swiftshaderArgs = [
|
|
"--no-sandbox",
|
|
"--use-gl=swiftshader",
|
|
"--enable-unsafe-swiftshader",
|
|
"--enable-unsafe-webgpu",
|
|
"--enable-dawn-features=allow_unsafe_apis",
|
|
"--use-webgpu-adapter=swiftshader",
|
|
];
|
|
|
|
export function browserArgs(): string[] {
|
|
const mode = process.env.GPU_MODE ?? (process.env.DISPLAY ? "hardware" : "swiftshader");
|
|
return mode === "hardware" ? hardwareArgs : swiftshaderArgs;
|
|
}
|
|
|
|
/** Chromium profile kept between runs: the 300 MB engine is revalidated, not re-downloaded. */
|
|
export function profileDir(repoRoot: string): string {
|
|
return process.env.DEPLOYED_PROFILE ?? path.join(repoRoot, "web/.cache/deployed-profile");
|
|
}
|