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>
31 lines
1.2 KiB
TypeScript
31 lines
1.2 KiB
TypeScript
import fs from "node:fs";
|
|
import path from "node:path";
|
|
import { REPO_ROOT } from "./deployed";
|
|
|
|
/** The 31 capability rows that the manual generation and parity checks share. */
|
|
export interface CapabilityRow {
|
|
area: string;
|
|
feature: string;
|
|
status: string;
|
|
note?: string;
|
|
chapter?: string;
|
|
}
|
|
|
|
const MATRIX_PATH = path.join(REPO_ROOT, "tools/web/manual/feature-matrix.json");
|
|
|
|
function load(): CapabilityRow[] {
|
|
if (!fs.existsSync(MATRIX_PATH)) throw new Error(`feature matrix not found: ${MATRIX_PATH}`);
|
|
/* The file is an object with metadata (schemaVersion, legend, …) and a
|
|
* `capabilities` array; older copies were a bare array. */
|
|
const parsed = JSON.parse(fs.readFileSync(MATRIX_PATH, "utf8")) as CapabilityRow[] | { capabilities?: CapabilityRow[] };
|
|
const rows = Array.isArray(parsed) ? parsed : parsed.capabilities ?? [];
|
|
if (!Array.isArray(rows) || rows.length === 0) throw new Error(`feature matrix has no capabilities: ${MATRIX_PATH}`);
|
|
return rows;
|
|
}
|
|
|
|
export const CAPABILITIES: CapabilityRow[] = load();
|
|
|
|
export function capabilitySlug(row: CapabilityRow): string {
|
|
return `${row.area}-${row.feature}`.replace(/[^\w一-龥]+/g, "-").replace(/^-|-$/g, "").slice(0, 48);
|
|
}
|