Panes by column: a forest of panes, curves between them, close, pin and an active rule

The tree of forks becomes a forest: a pinned pane stays open when a pane it was
opened from closes, as an orphan in its own column. Close takes a pane and what
was opened from it, pinned panes excepted; pin and unpin; [ and ] move to the
pane above or below in a column.

The panes view is laid out by column: column d holds every pane at depth d and
divides its own height among them, a short pane taking only what its text needs;
when they do not fit, all but the focused branch's pane (and pinned ones) fold
into one-line tabs. A faint curve runs from the words, row or link each pane was
opened from to its title, the focused branch's in a stronger ink; curves through
one gutter take lanes side by side, ordered to cross least. Every pane has the
same hairline right and bottom. The active pane has a heavy rule across its top,
the rest of the focused branch a hairline. Each pane has a pin and a x at its top
right (the x also on its spine); q closes the active pane, whatever it shows
(it used to close a whole fork from wherever the fork began, which closed the
node an article was opened from); P pins it. /curves off hides the curves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
This commit is contained in:
thalladaandClaude Opus 5.5 committed 2026-11-16 00:37:59 -05:00
1 parent 2f8ca98207
commit 3298cc430c
20 files changed
+1822 -783

No files matched your search

+3 -3
View File
@@ -10,7 +10,7 @@ import { command, focusedTitle, jump, keys, seedLinks, selected, settle, state,
/** The panes' titles, left to right: a node's title, or W:article for a Wikipedia pane. */
const trail = (page: Page) =>
state(page, (s) => s.trail.map((p: any) => (p.kind === "node" ? s.snap.nodes[p.id].title || s.snap.nodes[p.id].anchors[0]?.text : `W:${p.title}${p.sec ? `#${p.sec}` : ""}`)));
const panes = (page: Page) => page.locator(".strip > .pane");
const panes = (page: Page) => page.locator(".strip .pane");
/** Tab through the focused section's marked spans until the selection is these words. */
async function tabTo(page: Page, words: string) {
@@ -30,7 +30,7 @@ async function column(page: Page, path = "/doc/fixed-points") {
async function wide(page: Page, path = "/doc/fixed-points") {
await page.setViewportSize({ width: 1920, height: 1080 });
await page.goto(path);
await page.waitForSelector(".strip > .pane");
await page.waitForSelector(".strip .pane");
await page.evaluate(() => document.fonts.ready);
}
/** Open a section in panes and select the first marked span in its text. */
@@ -174,7 +174,7 @@ test("panes: Tab and Enter open an article in the next pane; its sections open a
for (let i = 0; i < 4 && (await state(page, (s) => s.selectedText())) !== "Alonzo Church"; i++) await keys(page, "Tab");
await keys(page, "Enter");
await expect(panes(page).last().locator(".wiki-head h2")).toHaveText("Alonzo Church");
const spine = page.locator(".wiki-pane[data-covered] .spine").first();
const spine = page.locator(".col[data-covered] .wiki-pane .spine").first();
await expect(spine.locator(".wmark")).toHaveText("W");
expect(await spine.evaluate((el) => getComputedStyle(el).backgroundColor)).not.toBe(await page.locator(".pane.root .spine").evaluate((el) => getComputedStyle(el).backgroundColor));
});