Files
explicata/playwright.config.ts
T
thalladaandClaude Fable 5.2 f8c6576ea1 Web pages: a link to any address opens as an article, as Wikipedia's do
A url link now opens in the app instead of the browser. The server fetches
the page (robots.txt honoured, public addresses only, size and time caps),
keeps a snapshot on disk until it is reloaded, and cuts it into a lead and
sections: by its headings, else by pseudo-headings, else in chunks, or by a
model when asked (s), within a daily budget. The pane has its own amber
ground, the author and date in its head when the page gives them, and the
source in its foot. W opens the original, R reads it again. See
docs/pages.md.

Pictures and videos are kept, in web pages and in Wikipedia articles:
pictures through the server (only addresses seen in a page that was read),
videos as a still that loads the player on a click.

A section that is only a link (a target, no text, no sections) opens as
its article at once, and L opens a target to the right of the node's own
pane, never under it.

Article text is sized to read like the reader's own.

Panes: a pane that already has all its column can give beside the others'
tabs no longer peeks over them on hover, and the curves of tabs under a
peeking pane are no longer drawn over it. The keypress timing test judges
each of its two passes on its own, so a stall from outside the app does
not fail it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
2026-11-18 13:44:13 -05:00

36 lines
1.7 KiB
TypeScript

import { mkdtempSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { defineConfig } from "@playwright/test";
// EX_E2E_PORT lets two runs go side by side.
const PORT = Number(process.env.EX_E2E_PORT ?? 4760);
// Each run gets an empty data directory, so it starts from a freshly seeded library.
const data = process.env.EX_E2E_DATA ?? mkdtempSync(join(tmpdir(), "ie-e2e-"));
process.env.EX_E2E_DATA = data;
export default defineConfig({
testDir: "e2e",
timeout: 60_000,
workers: 1,
reporter: [["list"]],
// The page starts in the column (`/view column`): auto would show panes at this width. A test of
// the panes view sets its own width and lets the layout follow it (helpers.ts `autoLayout`).
use: {
baseURL: `http://localhost:${PORT}`,
viewport: { width: 1440, height: 900 },
storageState: { cookies: [], origins: [{ origin: `http://localhost:${PORT}`, localStorage: [{ name: "ie:settings", value: JSON.stringify({ view: "column" }) }] }] },
},
webServer: {
// The production build with the deterministic mock model: what is measured is the app's
// own pipeline, not a model's speed.
// Each port builds into its own directory: two runs side by side must not rebuild the files the
// other is serving.
command: `npx vite build --outDir dist-e2e-${PORT} --emptyOutDir && npx tsx server/index.ts`,
env: { EX_DIST: `dist-e2e-${PORT}`, EX_PROD: "1", EX_LLM: "mock", EX_MOCK_DELAY: "10", EX_DATA: data, PORT: String(PORT), EX_USER: "tester", EX_WIKI: "mock", EX_PAGES: "mock", EX_EMBED: "fake", EX_WIKI_MOCK_BULK_MS: "60" },
url: `http://localhost:${PORT}/api/state`,
reuseExistingServer: false,
timeout: 60_000,
},
});