Name: Explicata, and EX_ for the environment variables

Infinispand becomes Explicata (Latin, "things unfolded") wherever the name
shows: the page title, README, package, prompts, seed title, Wikipedia
User-Agent and startup line. Every IE_* variable becomes EX_*. The browser's
IndexedDB name and the ie: storage keys stay, so settings and replicas
already stored are found; the migration fixtures keep the old seed title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yB6q6Kn9JiRmGKzPQMh7o
This commit is contained in:
thalladaandClaude Opus 5.5 committed 2026-11-17 18:03:49 -05:00
1 parent e6d71e84de
commit 60d26908d6
51 files changed
+256 -252

No files matched your search

+2 -2
View File
@@ -113,8 +113,8 @@ test("every kind of pane's title rule is drawn by the curve into it, in the pane
test("a pane's colour is a function of the forest: unchanged by focus, a source scrolled out of sight, folding to a tab, or which way its rule is drawn", async ({ page }) => {
await library(page);
for (const t of ["Infinispand", "Fixed points"]) await clickOpen(page, "Library", t);
await clickOpen(page, "Infinispand", "Expansion by depth");
for (const t of ["Explicata", "Fixed points"]) await clickOpen(page, "Library", t);
await clickOpen(page, "Explicata", "Expansion by depth");
await clickOpen(page, "Fixed points", "The idea itself");
const colourOf = async () => Object.fromEntries((await lines(page)).map((l) => [l.to, { stroke: l.stroke, colour: l.colour, hue: l.paneHue }]));
const before = await colourOf();
+19 -19
View File
@@ -69,7 +69,7 @@ async function still(page: Page) {
}
async function open(page: Page) {
await visit(page, "Infinispand");
await visit(page, "Explicata");
await page.waitForSelector(".strip .pane");
await page.evaluate(() => document.fonts.ready);
await expect(page.locator(".strip .pane")).toHaveCount(2);
@@ -121,11 +121,11 @@ test("Enter on a section row opens its pane below in the next column; Shift+Ente
await keys(page, "l l l"); // Expansion by depth showing; the focus on its first row
// Nothing to the right yet: a plain trail is one pane per column.
await keys(page, "Enter");
expect(await tree(page)).toEqual(["Infinispand", [["*", ["Expansion by depth", [["*", "Levels of a node"]]]]]]);
expect(await columns(page)).toEqual([["Infinispand"], ["Expansion by depth"], ["Levels of a node"]]);
expect(await tree(page)).toEqual(["Explicata", [["*", ["Expansion by depth", [["*", "Levels of a node"]]]]]]);
expect(await columns(page)).toEqual([["Explicata"], ["Expansion by depth"], ["Levels of a node"]]);
await keys(page, "j Enter");
expect(await columns(page)).toEqual([["Infinispand"], ["Expansion by depth"], ["Levels of a node", "Pre-generated depth"]]);
expect(await trail(page)).toEqual(["Infinispand", "Expansion by depth", "Pre-generated depth"]);
expect(await columns(page)).toEqual([["Explicata"], ["Expansion by depth"], ["Levels of a node", "Pre-generated depth"]]);
expect(await trail(page)).toEqual(["Explicata", "Expansion by depth", "Pre-generated depth"]);
// They share the column's height, one above the other, beside the pane they came from.
const b = await boxes(page);
const [a, c, parent] = [b["Levels of a node"], b["Pre-generated depth"], b["Expansion by depth"]];
@@ -139,15 +139,15 @@ test("Enter on a section row opens its pane below in the next column; Shift+Ente
await expect(pane(page, "Expansion by depth").locator(".node.forked > .row")).toHaveText([/Levels of a node/]);
// Shift+Enter opens in place of the focused one.
await keys(page, "j Shift+Enter");
expect(await columns(page)).toEqual([["Infinispand"], ["Expansion by depth"], ["Levels of a node", "Generation on demand"]]);
expect(await columns(page)).toEqual([["Explicata"], ["Expansion by depth"], ["Levels of a node", "Generation on demand"]]);
// Enter (or Shift+Enter) on the row of a pane already open focuses it: no second copy, and nothing closes.
await keys(page, "k k Enter");
expect(await columns(page)).toEqual([["Infinispand"], ["Expansion by depth"], ["Levels of a node", "Generation on demand"]]);
expect(await trail(page)).toEqual(["Infinispand", "Expansion by depth", "Levels of a node"]);
expect(await columns(page)).toEqual([["Explicata"], ["Expansion by depth"], ["Levels of a node", "Generation on demand"]]);
expect(await trail(page)).toEqual(["Explicata", "Expansion by depth", "Levels of a node"]);
await keys(page, "Enter");
expect(await columns(page)).toEqual([["Infinispand"], ["Expansion by depth"], ["Levels of a node", "Generation on demand"]]);
expect(await columns(page)).toEqual([["Explicata"], ["Expansion by depth"], ["Levels of a node", "Generation on demand"]]);
await keys(page, "j j Shift+Enter");
expect(await trail(page)).toEqual(["Infinispand", "Expansion by depth", "Generation on demand"]);
expect(await trail(page)).toEqual(["Explicata", "Expansion by depth", "Generation on demand"]);
});
test("a click, a Ctrl- and a middle click open beside; a Shift-click in place; a click in another fork makes it the focused one", async ({ page }) => {
@@ -157,24 +157,24 @@ test("a click, a Ctrl- and a middle click open beside; a Shift-click in place; a
const row = (t: string) => page.locator(".pane .row", { hasText: t }).first();
await row("Borrowed from Gwern").click();
await row(kids[0]).click();
expect(await trail(page)).toEqual(["Infinispand", "Borrowed from Gwern", kids[0]]);
expect(await trail(page)).toEqual(["Explicata", "Borrowed from Gwern", kids[0]]);
await row(kids[1]).click({ modifiers: ["Control"] });
expect(await tree(page)).toEqual(["Infinispand", [["*", ["Borrowed from Gwern", [kids[0], ["*", kids[1]]]]]]]);
expect(await tree(page)).toEqual(["Explicata", [["*", ["Borrowed from Gwern", [kids[0], ["*", kids[1]]]]]]]);
await row(kids[2]).click({ button: "middle" });
expect(await tree(page)).toEqual(["Infinispand", [["*", ["Borrowed from Gwern", [kids[0], kids[1], ["*", kids[2]]]]]]]);
expect(await tree(page)).toEqual(["Explicata", [["*", ["Borrowed from Gwern", [kids[0], kids[1], ["*", kids[2]]]]]]]);
// A click on the first fork's heading focuses that fork, and makes that pane the active one.
await pane(page, kids[0]).locator(".pane-head").click();
expect(await trail(page)).toEqual(["Infinispand", "Borrowed from Gwern", kids[0]]);
expect(await trail(page)).toEqual(["Explicata", "Borrowed from Gwern", kids[0]]);
expect(await focusedTitle(page)).toBe(kids[0]);
await expect(page.locator(".pane.active .pane-head h2")).toHaveText(kids[0]);
// The first pane's rows too: beside, in the next column (above, as its row is above); and a click on a row already open keeps it.
await row("Display forms").click();
await expect.poll(() => columns(page)).toEqual([["Infinispand"], ["Display forms", "Borrowed from Gwern"], kids.slice(0, 3)]);
await expect.poll(() => columns(page)).toEqual([["Explicata"], ["Display forms", "Borrowed from Gwern"], kids.slice(0, 3)]);
await row("Display forms").click();
expect((await columns(page))[1]).toEqual(["Display forms", "Borrowed from Gwern"]);
// A Shift-click opens in place of the focused one (Display forms), and selects no text on the way.
await row("Editing and regeneration").click({ modifiers: ["Shift"] });
expect(await trail(page)).toEqual(["Infinispand", "Editing and regeneration"]);
expect(await trail(page)).toEqual(["Explicata", "Editing and regeneration"]);
await expect.poll(async () => (await columns(page))[1]).toEqual(["Editing and regeneration", "Borrowed from Gwern"]);
expect(await page.evaluate(() => window.getSelection()?.isCollapsed ?? true)).toBe(true);
});
@@ -429,7 +429,7 @@ test("exactly one pane is active, under a heavy rule; the rest of the focused br
async function five(page: Page) {
await open(page);
await keys(page, "j Enter j Enter j Enter j Enter j Enter");
const kids = (await childTitles(page, "Infinispand")).slice(0, 5);
const kids = (await childTitles(page, "Explicata")).slice(0, 5);
expect((await columns(page))[1]).toEqual(kids);
await still(page);
return kids;
@@ -458,7 +458,7 @@ test("a crowded column stacks its panes as the strip stacks columns: covered par
await expect(page.locator(".pane.active .pane-head h2")).toHaveText(kids[4]);
const where = await focusedTitle(page);
await keys(page, "[");
expect(await trail(page)).toEqual(["Infinispand", kids[3]]);
expect(await trail(page)).toEqual(["Explicata", kids[3]]);
await expect(page.locator(".pane.active .pane-head h2")).toHaveText(kids[3]);
b = await boxes(page);
expect(b[kids[3]].whole).toBe(true);
@@ -726,7 +726,7 @@ test("a fork whose node is deleted closes, and the others stay", async ({ page,
const res = await request.post("/api/ops", { data: { author: "another", message: "Delete it", ops: [{ op: "delete", id }] } });
expect(res.ok()).toBe(true);
await expect.poll(async () => (await columns(page))[2]).toEqual(["Levels of a node"]);
expect(await trail(page)).toEqual(["Infinispand", "Expansion by depth", "Levels of a node"]);
expect(await trail(page)).toEqual(["Explicata", "Expansion by depth", "Levels of a node"]);
});
test("a window too short to share a column stacks it at once: the focused pane whole, the other covered to its tab", async ({ page }) => {
+2 -2
View File
@@ -15,7 +15,7 @@ const titlesUnder = (page: Page, title: string) =>
/** The first tree, opened in the column (hoisted, with the library one step out). */
async function open(page: Page) {
await openPage(page, "Infinispand");
await openPage(page, "Explicata");
await page.evaluate(() => document.fonts.ready);
}
@@ -29,7 +29,7 @@ test("opens on an outline of ten titles with the prompt folded above it", async
await expect(page.locator("article > .outline > .node")).toHaveCount(10);
await expect(page.locator(".node.open")).toHaveCount(0);
await expect(page.locator(".abstract.seed.folded")).toBeVisible();
await expect(page.locator("h1")).toHaveText("Infinispand");
await expect(page.locator("h1")).toHaveText("Explicata");
await page.keyboard.press("Enter");
await expect(page.locator(".abstract.seed.folded")).toHaveCount(0);
await expect(page.locator(".abstract.seed")).toContainText("I think maybe we want something like CDRTs under the hood");
+1 -1
View File
@@ -338,7 +338,7 @@ test("in the panes view the panel narrows the panes, and the curves follow it th
await page.goto("/");
await page.waitForSelector(".strip .pane");
await page.evaluate(() => document.fonts.ready);
await page.locator(".pane .row", { hasText: "Infinispand" }).first().dispatchEvent("click");
await page.locator(".pane .row", { hasText: "Explicata" }).first().dispatchEvent("click");
await page.locator(".pane .row", { hasText: "Expansion by depth" }).first().dispatchEvent("click");
await expect(page.locator(".strip .pane")).toHaveCount(3);
await still(page);
+3 -3
View File
@@ -1,5 +1,5 @@
/**
* Links and Wikipedia, keyboard only, against the mock Wikipedia (IE_WIKI=mock, server/wikiMock.ts)
* Links and Wikipedia, keyboard only, against the mock Wikipedia (EX_WIKI=mock, server/wikiMock.ts)
* and the shared library with links written into it over the op API (e2e/helpers.ts). Nothing here
* touches the network: requests to wikipedia.org are refused, so a test that opens one only sees
* the address it would have gone to.
@@ -403,14 +403,14 @@ test("a disambiguation page lists its senses as rows; a missing article, an unre
await command(page, "/link w:Rate limited example");
await keys(page, "Enter");
await expect(page.locator(".wiki-pane.active").locator(".wiki-problem")).toContainText("fewer requests");
await expect(page.locator(".status .message")).toContainText("IE_WIKI_CONTACT");
await expect(page.locator(".status .message")).toContainText("EX_WIKI_CONTACT");
expect(await page.evaluate(() => localStorage.getItem("ie:wiki-hint"))).toBe("true");
await keys(page, "h h h");
await command(page, "/link w:Slow article");
await keys(page, "Enter");
await expect(page.locator(".wiki-pane.active").locator(".wiki-wait")).toContainText("Loading");
await expect(page.locator(".wiki-pane.active").locator(".wiki-head h2")).toHaveText("Slow article", { timeout: 10_000 });
await expect(page.locator(".status .message")).not.toContainText("IE_WIKI_CONTACT");
await expect(page.locator(".status .message")).not.toContainText("EX_WIKI_CONTACT");
await keys(page, "h h h");
await command(page, "/unlink");
});
+5 -5
View File
@@ -3,7 +3,7 @@ import { expect, test, type Page } from "@playwright/test";
import { command, idle, jump, keys, openPage, settle, state } from "./helpers";
/** The first tree as the page (hoisted), with the library one step out. */
const open = (page: Page) => openPage(page, "Infinispand");
const open = (page: Page) => openPage(page, "Explicata");
test.afterEach(({ page }) => settle(page));
@@ -63,7 +63,7 @@ test("hoisting makes one node the whole page; Esc at its top steps out to its pa
await jump(page, "Semantic conflicts");
await page.keyboard.press("z");
await expect(page.locator("h1")).toHaveText("Semantic conflicts");
await expect(page.locator(".crumbs")).toHaveText(/^Library › Infinispand › Versioning and merge ›/);
await expect(page.locator(".crumbs")).toHaveText(/^Library › Explicata › Versioning and merge ›/);
await expect(page.locator("article > .outline > .node")).toHaveCount(3);
await page.keyboard.press("Escape");
await expect(page.locator("h1")).toHaveText("Versioning and merge");
@@ -71,11 +71,11 @@ test("hoisting makes one node the whole page; Esc at its top steps out to its pa
expect(await state(page, (s) => s.snap.nodes[s.focus.node].title)).toBe("Semantic conflicts");
await page.keyboard.press("O"); // collapse everything: the focus goes to the top
await page.keyboard.press("Escape");
await expect(page.locator("h1")).toHaveText("Infinispand");
await expect(page.locator("h1")).toHaveText("Explicata");
await page.keyboard.press("O");
await page.keyboard.press("Escape");
await expect(page.locator("h1")).toHaveText("Library");
expect(await state(page, (s) => s.snap.nodes[s.focus.node].title)).toBe("Infinispand");
expect(await state(page, (s) => s.snap.nodes[s.focus.node].title)).toBe("Explicata");
await expect(page).toHaveURL(/\/n\/[^/]+$/);
// On the root itself, the address is the library's.
await page.keyboard.press("O");
@@ -118,7 +118,7 @@ test("an outside agent edits over HTTP with the same ops, and the open page foll
await open(page);
const tree = await (await request.get("/api/tree/main")).json();
// The tree is the whole library; its top-level trees are the root's sections.
expect(Object.values<any>(tree.nodes).filter((n) => n.parent === tree.root).map((n) => n.title)).toContain("Infinispand");
expect(Object.values<any>(tree.nodes).filter((n) => n.parent === tree.root).map((n) => n.title)).toContain("Explicata");
const target = Object.values<any>(tree.nodes).find((n) => n.title === "The first tree");
expect(target).toBeTruthy();
const res = await request.post("/api/ops/main", {
+7 -7
View File
@@ -61,12 +61,12 @@ test("the library root is the first page and a node like any other: its sections
// The first top-level node opens in place, as any section does: the library stays the page.
await keys(page, "j l");
await expect(page.locator(".top h1")).toHaveText("Library");
await expect(page.locator("article > .outline > .node.open > .row .title")).toHaveText("Infinispand");
await expect(page.locator("article > .outline > .node.open > .row .title")).toHaveText("Explicata");
// Its text is a prompt its sections cite: folded there too.
await expect(page.locator("article > .outline > .node.open > .content > .abstract.seed.folded")).toBeVisible();
const first = await state(page, (s) => s.focus.node);
await expect(page).toHaveURL(new RegExp(`/n/${encodeURIComponent(first)}$`));
await expect(page).toHaveTitle("Infinispand");
await expect(page).toHaveTitle("Explicata");
// Back up onto the root itself: its address is the library's, /l/<id>, and it is the node the keys act on.
await keys(page, "h k");
expect(await state(page, (s) => s.focus.node === s.snap.root)).toBe(true);
@@ -90,12 +90,12 @@ test("the library root is the first page and a node like any other: its sections
await keys(page, "Escape");
// z makes a node the page; Esc at its top steps back out to the library, on its row.
await keys(page, "j z");
await expect(page.locator(".top h1")).toHaveText("Infinispand");
await expect(page.locator(".top h1")).toHaveText("Explicata");
await expect(page.locator(".crumbs")).toHaveText(/^Library ›/);
await expect(page.locator(".top .byline")).toContainText(/^\d+ sections · \d+ nodes/);
await keys(page, "Escape");
await expect(page.locator(".top h1")).toHaveText("Library");
expect(await focusedTitle(page)).toBe("Infinispand");
expect(await focusedTitle(page)).toBe("Explicata");
});
test("an address names a node by its id, and survives a reload, Back and Forward; an old /doc/ address shows the library", async ({ page }) => {
@@ -127,8 +127,8 @@ test("an address names a node by its id, and survives a reload, Back and Forward
});
test("the jump box searches the whole library, says where each match is, and goes there", async ({ page }) => {
await openPage(page, "Infinispand");
await expect(page.locator(".top h1")).toHaveText("Infinispand");
await openPage(page, "Explicata");
await expect(page.locator(".top h1")).toHaveText("Explicata");
await page.keyboard.press("/");
await page.keyboard.type("amphidromes");
const hit = page.locator(".jump li").first();
@@ -141,7 +141,7 @@ test("the jump box searches the whole library, says where each match is, and goe
// Back to where the jump started.
await page.goBack();
await ready(page);
await expect.poll(() => focusedTitle(page)).toBe("Infinispand");
await expect.poll(() => focusedTitle(page)).toBe("Explicata");
// A top-level node is found like any other, and says it is in the library.
await page.keyboard.press("/");
await page.keyboard.type("Fixed points");
+22 -22
View File
@@ -19,7 +19,7 @@ const paneTitles = async (page: Page) => (await panes(page)).map((p) => p.title)
const nodeId = (page: Page, title: string) => page.evaluate((t) => (Object.values((globalThis as any).__ie.snap.nodes) as any[]).find((n) => n.title === t).id as string, title);
async function open(page: Page) {
await openAt(page, "Infinispand");
await openAt(page, "Explicata");
await page.waitForSelector(".strip .pane");
await page.evaluate(() => document.fonts.ready);
// The library pane and the tree's; hoisting makes the tree's top the first.
@@ -40,12 +40,12 @@ test("the library is the first pane, and any node of it opens in the next; reloa
expect(await paneTitles(page)).toEqual(["Library"]);
await expect(page.locator(".pane.root .rows > .node")).toHaveCount(await state(page, (s) => s.snap.nodes[s.snap.root].children.filter((c: string) => !s.snap.nodes[c].articles).length));
await keys(page, "j l"); // the first top-level node's row, then open it
expect(await paneTitles(page)).toEqual(["Library", "Infinispand"]);
expect(await paneTitles(page)).toEqual(["Library", "Explicata"]);
// Its pane is headed like any other; its text, a prompt its sections cite, is folded.
await expect(page.locator(".pane:not(.root) .pane-head h2")).toHaveText("Infinispand");
await expect(page.locator(".pane:not(.root) .pane-head h2")).toHaveText("Explicata");
await expect(page.locator(".pane:not(.root) .abstract.seed.folded")).toBeVisible();
await keys(page, "j l"); // the next one: its pane opens beside the first one's, below it in the same column
expect(await paneTitles(page)).toEqual(["Library", "Infinispand", "A mind made of text"]);
expect(await paneTitles(page)).toEqual(["Library", "Explicata", "A mind made of text"]);
await keys(page, "l l"); // into its first section, and open that
const third = await paneTitles(page);
expect(third).toHaveLength(4);
@@ -68,13 +68,13 @@ test("the library is the first pane, and any node of it opens in the next; reloa
test("auto shows panes at 1920 px and on a laptop's 1366, the panes as pages on a phone or a narrow window; v and /view switch", async ({ page }) => {
await open(page);
await expect(page.locator(".app.view-panes .strip .pane")).toHaveCount(1);
await expect(page.locator(".strip .pane.root h1")).toHaveText("Infinispand");
await expect(page.locator(".strip .pane.root h1")).toHaveText("Explicata");
await page.setViewportSize({ width: 1366, height: 768 });
await expect(page.locator(".app.view-panes .strip .pane")).toHaveCount(1);
for (const [width, height] of [[820, 900], [390, 800]]) {
await page.setViewportSize({ width, height });
await expect(page.locator(".app.view-pages .panes[data-layout=pages] .strip .pane"), `${width}`).toHaveCount(1);
await expect(page.locator(".trail .trail-step")).toHaveText(["Infinispand"]);
await expect(page.locator(".trail .trail-step")).toHaveText(["Explicata"]);
}
await page.setViewportSize({ width: 1920, height: 1080 });
await expect(page.locator(".strip .pane")).toHaveCount(1);
@@ -101,7 +101,7 @@ test("opening three levels deep gives four panes left to right; h moves back lef
await keys(page, "l l l j j l l l");
await expect(page.locator(".strip .pane")).toHaveCount(4);
const ps = await panes(page);
expect(ps.map((p) => p.title)).toEqual(["Infinispand", "Expansion by depth", "Generation on demand", "Deepening a leaf"]);
expect(ps.map((p) => p.title)).toEqual(["Explicata", "Expansion by depth", "Generation on demand", "Deepening a leaf"]);
for (let i = 1; i < ps.length; i++) expect(ps[i].left).toBeGreaterThan(ps[i - 1].left);
// In each parent's list, the child whose pane is showing is marked.
await expect(page.locator(".pane .node.showing > .row")).toHaveText(["Expansion by depth", "Generation on demand", "Deepening a leaf"].map((t) => new RegExp(t)));
@@ -111,7 +111,7 @@ test("opening three levels deep gives four panes left to right; h moves back lef
expect(await focusedTitle(page)).toBe("Generation on demand");
await keys(page, "h");
expect(await focusedTitle(page)).toBe("Expansion by depth");
expect(await paneTitles(page)).toEqual(["Infinispand", "Expansion by depth", "Generation on demand", "Deepening a leaf"]);
expect(await paneTitles(page)).toEqual(["Explicata", "Expansion by depth", "Generation on demand", "Deepening a leaf"]);
// And forward again along the same trail.
await keys(page, "l");
expect(await focusedTitle(page)).toBe("Levels of a node");
@@ -121,14 +121,14 @@ test("opening three levels deep gives four panes left to right; h moves back lef
expect(await focusedTitle(page)).toBe("Deepening a leaf");
await expect(page.locator(".pane.active .pane-head h2")).toHaveText("Generation on demand");
await keys(page, "q");
expect(await paneTitles(page)).toEqual(["Infinispand", "Expansion by depth"]);
expect(await paneTitles(page)).toEqual(["Explicata", "Expansion by depth"]);
expect(await focusedTitle(page)).toBe("Generation on demand");
await keys(page, "q");
expect(await paneTitles(page)).toEqual(["Infinispand"]);
expect(await paneTitles(page)).toEqual(["Explicata"]);
expect(await focusedTitle(page)).toBe("Expansion by depth");
// The first pane stays.
await keys(page, "q");
expect(await paneTitles(page)).toEqual(["Infinispand"]);
expect(await paneTitles(page)).toEqual(["Explicata"]);
await expect(page.locator(".status .message")).toContainText("first pane stays");
});
@@ -141,19 +141,19 @@ test("j and k move among siblings, and the strip follows", async ({ page }) => {
await keys(page, "j");
expect(await focusedTitle(page)).toBe("Pre-generated depth");
await keys(page, "l"); // open it: its pane appears
expect(await paneTitles(page)).toEqual(["Infinispand", "Expansion by depth", "Pre-generated depth"]);
expect(await paneTitles(page)).toEqual(["Explicata", "Expansion by depth", "Pre-generated depth"]);
await keys(page, "j"); // a closed sibling: the open one's pane stays until something else is opened
expect(await focusedTitle(page)).toBe("Generation on demand");
expect(await paneTitles(page)).toEqual(["Infinispand", "Expansion by depth", "Pre-generated depth"]);
expect(await paneTitles(page)).toEqual(["Explicata", "Expansion by depth", "Pre-generated depth"]);
await keys(page, "k");
expect(await paneTitles(page)).toEqual(["Infinispand", "Expansion by depth", "Pre-generated depth"]);
expect(await paneTitles(page)).toEqual(["Explicata", "Expansion by depth", "Pre-generated depth"]);
await keys(page, "k k k k"); // stops at the first sibling, never wanders into other panes
expect(await focusedTitle(page)).toBe("Levels of a node");
await keys(page, "j j j j j j");
expect(await focusedTitle(page)).toBe("Deeper, not longer");
// A click on a row does what l does: focus it and show its pane, beside the one already open there.
await page.locator(".pane .row", { hasText: "Generation on demand" }).click();
expect(await paneTitles(page)).toEqual(["Infinispand", "Expansion by depth", "Pre-generated depth", "Generation on demand"]);
expect(await paneTitles(page)).toEqual(["Explicata", "Expansion by depth", "Pre-generated depth", "Generation on demand"]);
expect(await focusedTitle(page)).toBe("Generation on demand");
});
@@ -177,9 +177,9 @@ test("a pre-generated note opened in a pane is set inside the pane", async ({ pa
test("in panes everything is reachable with the mouse: rows, headings, marked spans, a dragged selection", async ({ page }) => {
await open(page);
await page.locator(".pane .row", { hasText: "Borrowed from Gwern" }).click();
expect(await paneTitles(page)).toEqual(["Infinispand", "Borrowed from Gwern"]);
expect(await paneTitles(page)).toEqual(["Explicata", "Borrowed from Gwern"]);
await page.locator(".pane .row", { hasText: "Semantic zoom" }).click();
expect(await paneTitles(page)).toEqual(["Infinispand", "Borrowed from Gwern", "Semantic zoom"]);
expect(await paneTitles(page)).toEqual(["Explicata", "Borrowed from Gwern", "Semantic zoom"]);
// A marked span opens its note, and closes it again.
const anchor = page.locator(".pane .anchor", { hasText: "StretchText" });
await anchor.click();
@@ -189,11 +189,11 @@ test("in panes everything is reachable with the mouse: rows, headings, marked sp
// A pane's heading focuses its node, leaving the trail as it is; a click on the focused row whose pane is showing keeps it; its x closes it.
await page.locator(".pane-head", { hasText: "Borrowed from Gwern" }).click();
expect(await focusedTitle(page)).toBe("Borrowed from Gwern");
expect(await paneTitles(page)).toEqual(["Infinispand", "Borrowed from Gwern", "Semantic zoom"]);
expect(await paneTitles(page)).toEqual(["Explicata", "Borrowed from Gwern", "Semantic zoom"]);
await page.locator(".pane .row", { hasText: "Borrowed from Gwern" }).click();
expect(await paneTitles(page)).toEqual(["Infinispand", "Borrowed from Gwern", "Semantic zoom"]);
expect(await paneTitles(page)).toEqual(["Explicata", "Borrowed from Gwern", "Semantic zoom"]);
await page.locator('.pane[data-pane-index="1"] .pane-ctl .pane-btn.close').click();
expect(await paneTitles(page)).toEqual(["Infinispand"]);
expect(await paneTitles(page)).toEqual(["Explicata"]);
await page.locator(".pane .row", { hasText: "Borrowed from Gwern" }).click();
await page.locator(".pane .row", { hasText: "Typography" }).click();
// Dragging across a pane's text makes that range the focus.
@@ -223,14 +223,14 @@ test("past the viewport, earlier panes become spines; a click on one brings it b
expect(await strip.evaluate((el) => el.scrollWidth > el.clientWidth)).toBe(true);
// The root has slid under the rest and shows as a spine, its title set vertically.
const spine = page.locator('.col[data-covered] .spine').first();
await expect(spine).toHaveText("Infinispand");
await expect(spine).toHaveText("Explicata");
await expect.poll(() => spine.evaluate((el) => getComputedStyle(el).opacity)).toBe("1");
expect(await spine.locator(".spine-title").evaluate((el) => getComputedStyle(el).writingMode)).toBe("vertical-rl");
const box = (await spine.boundingBox())!;
expect(box.x).toBeGreaterThanOrEqual(0);
expect(box.width).toBeLessThan(60);
await spine.click();
expect(await focusedTitle(page)).toBe("Infinispand");
expect(await focusedTitle(page)).toBe("Explicata");
// The trail stays; the strip slides back to show the first pane whole.
await expect(page.locator(".strip .pane")).toHaveCount(4);
await expect.poll(async () => (await panes(page))[0].left).toBe(0);
+15 -15
View File
@@ -27,14 +27,14 @@ test.afterEach(({ page }) => settle(page));
test("a column's panes stand in the order of their sources: opened from a row higher up, a pane stands higher", async ({ page }) => {
await library(page);
await clickOpen(page, "Library", "Octopus minds");
await clickOpen(page, "Library", "Infinispand");
await expect.poll(() => colTitles(page, 1)).toEqual(["Infinispand", "Octopus minds"]);
await clickOpen(page, "Library", "Explicata");
await expect.poll(() => colTitles(page, 1)).toEqual(["Explicata", "Octopus minds"]);
await clickOpen(page, "Library", "Fixed points");
await expect.poll(() => colTitles(page, 1)).toEqual(["Infinispand", "Fixed points", "Octopus minds"]);
await expect.poll(() => colTitles(page, 1)).toEqual(["Explicata", "Fixed points", "Octopus minds"]);
// Kept with the view.
await page.reload();
await page.waitForSelector(".strip .pane");
expect(await colTitles(page, 1)).toEqual(["Infinispand", "Fixed points", "Octopus minds"]);
expect(await colTitles(page, 1)).toEqual(["Explicata", "Fixed points", "Octopus minds"]);
await noFaults(page, "after a reload");
});
@@ -98,12 +98,12 @@ test("a click anywhere in a pane that is not text, a row or a link makes that pa
test("every pane of a crowded column shows at least its tab, above or below the one looked at; tabs line up with the active rule; curves stay on their sources and lines", async ({ page }) => {
await page.setViewportSize({ width: 1920, height: 700 });
await library(page);
for (const t of ["Octopus minds", "Infinispand", "The tides", "Fixed points", "What a proof is"]) await clickOpen(page, "Library", t);
for (const t of ["Octopus minds", "Explicata", "The tides", "Fixed points", "What a proof is"]) await clickOpen(page, "Library", t);
// The one looked at near the top: those below it stack at the column's foot.
await pane(page, "Infinispand").locator(".pane-head h2").dispatchEvent("click");
await pane(page, "Explicata").locator(".pane-head h2").dispatchEvent("click");
await still(page);
for (const first of ["Infinispand", "What a proof is"]) {
if (first !== "Infinispand") {
for (const first of ["Explicata", "What a proof is"]) {
if (first !== "Explicata") {
await pane(page, first).locator(".pane-head h2").dispatchEvent("click");
await still(page);
}
@@ -145,7 +145,7 @@ test("every pane of a crowded column shows at least its tab, above or below the
test("a pane cut off for any reason peeks out whole, across and down, and the curves follow it: covered from below or above, by its share, by the column's foot, beside a pinned pane, and with its column covered", async ({ page }) => {
await page.setViewportSize({ width: 1920, height: 700 });
await library(page);
for (const t of ["Octopus minds", "Infinispand", "The tides", "Fixed points"]) await clickOpen(page, "Library", t);
for (const t of ["Octopus minds", "Explicata", "The tides", "Fixed points"]) await clickOpen(page, "Library", t);
/** Hover each pane of the top-level trees' column that is cut off, and check it comes out whole, and the curves with it. */
const sweep = async (label: string, across: boolean) => {
const col = page.locator(".strip > .col").nth(1);
@@ -190,7 +190,7 @@ test("a pane cut off for any reason peeks out whole, across and down, and the cu
return peeked;
};
// Covered from below (the one looked at near the top) and from above (near the foot).
await pane(page, "Infinispand").locator(".pane-head h2").dispatchEvent("click");
await pane(page, "Explicata").locator(".pane-head h2").dispatchEvent("click");
await still(page);
expect(await sweep("top looked at", false)).toBeGreaterThan(0);
await pane(page, "Octopus minds").locator(".pane-head h2").dispatchEvent("click");
@@ -214,7 +214,7 @@ test("a pane cut off for any reason peeks out whole, across and down, and the cu
await page.setViewportSize({ width: 1920, height: 1080 });
await page.evaluate(() => Object.keys(localStorage).filter((k) => k.startsWith("ie:view:")).forEach((k) => localStorage.removeItem(k)));
await library(page);
await clickOpen(page, "Library", "Infinispand");
await clickOpen(page, "Library", "Explicata");
await clickOpen(page, "Library", "Octopus minds");
await pane(page, "Octopus minds").locator(".pane-head h2").dispatchEvent("click");
await still(page);
@@ -224,7 +224,7 @@ test("a pane cut off for any reason peeks out whole, across and down, and the cu
test("the curves keep to their sources and landing lines through every kind of layout change: scrolls, a resize, folding, a drag, an article arriving, a sticky tab", async ({ page }) => {
await library(page);
for (const t of ["Infinispand", "Fixed points"]) await clickOpen(page, "Library", t);
for (const t of ["Explicata", "Fixed points"]) await clickOpen(page, "Library", t);
await clickOpen(page, "Fixed points", "Recursion without names");
await noFaults(page, "opened");
await clickOpen(page, "Recursion without names", "fixed-point combinator", ".lnk, .anchor");
@@ -304,7 +304,7 @@ test("a dotted curve to a source out of sight in its pane turns, at its end, tow
test("Alt with h j k l moves between panes from a node, a selection or an article; left then right comes back; [ ] still go up and down", async ({ page }) => {
await library(page);
await clickOpen(page, "Library", "Infinispand");
await clickOpen(page, "Library", "Explicata");
await clickOpen(page, "Library", "Fixed points");
await clickOpen(page, "Fixed points", "Recursion without names");
await pane(page, "Recursion without names").locator(".pane-head h2").dispatchEvent("click");
@@ -316,11 +316,11 @@ test("Alt with h j k l moves between panes from a node, a selection or an articl
await expect.poll(() => activeTitle(page)).toBe("Recursion without names");
await page.keyboard.press("Alt+h");
await page.keyboard.press("Alt+k");
await expect.poll(() => activeTitle(page)).toBe("Infinispand");
await expect.poll(() => activeTitle(page)).toBe("Explicata");
await page.keyboard.press("Alt+j");
await expect.poll(() => activeTitle(page)).toBe("Fixed points");
await page.keyboard.press("Alt+ArrowUp");
await expect.poll(() => activeTitle(page)).toBe("Infinispand");
await expect.poll(() => activeTitle(page)).toBe("Explicata");
await keys(page, "]");
await expect.poll(() => activeTitle(page)).toBe("Fixed points");
await page.keyboard.press("Alt+h");
+2 -2
View File
@@ -27,8 +27,8 @@ async function forest(page: Page) {
await open(page, "Library", "Octopus minds");
await open(page, "Octopus minds", "A separate experiment");
await open(page, "A separate experiment", "The common ancestor");
await open(page, "Library", "Infinispand");
await open(page, /Infinispand/, "Expansion by depth");
await open(page, "Library", "Explicata");
await open(page, /Explicata/, "Expansion by depth");
await open(page, "Expansion by depth", "Levels of a node");
await open(page, "Expansion by depth", "Generation on demand");
await open(page, "Library", "The tides");
+1 -1
View File
@@ -12,7 +12,7 @@ async function open(page: Page) {
(globalThis as any).__opened = [];
window.open = ((url: string) => ((globalThis as any).__opened.push(String(url)), null)) as typeof window.open;
});
await openPage(page, "Infinispand");
await openPage(page, "Explicata");
}
test.describe.configure({ mode: "serial" });
+1 -1
View File
@@ -4,7 +4,7 @@
* bare [[marks]] resolved on save, model-written text with its marks taken out and checked, the
* Related list, /linkhere and /linkall with progress and a cancel, the /autolink modes, and latency. Against the
* mock model, the mock Wikipedia (Octopus, Cephalopod, Fred Hoyle, Hoyle state, Carbon-12, Lambda
* calculus, …) and the hashed-words embedder (IE_EMBED=fake).
* calculus, …) and the hashed-words embedder (EX_EMBED=fake).
*/
import { expect, test, type Page } from "@playwright/test";
import { addTop, autoLayout, command, idle, jump, keys, linksHere, paced, selected, settle, state, visit, writeReport } from "./helpers";
+2 -2
View File
@@ -8,12 +8,12 @@
* term of several words and not a single lower-case word, and fails on a sentence that says
* "mockfail" (src/llm/mock.ts).
*
* IE_SHOTS=<dir> also saves the links list with each filter, light and dark, into that directory.
* EX_SHOTS=<dir> also saves the links list with each filter, light and dark, into that directory.
*/
import { expect, test, type Page } from "@playwright/test";
import { addTop, command, idle, keys, linksHere, selected, settle, state, visit } from "./helpers";
const SHOTS = process.env.IE_SHOTS;
const SHOTS = process.env.EX_SHOTS;
const nolink = (page: Page) => state(page, (s) => (s.snap.nodes[s.focus.node].nolink ?? []) as string[]);
const panel = (page: Page) => page.locator("[data-links-panel]");