Annotate Wikipedia articles with the same keys as nodes

An article's text is drawn from its sanitised HTML as selectable text
(articleText.ts): paragraphs, list items and quotes with their inline
elements; a formula is one unit; tables and preformatted blocks are shown
but carry no offsets. The selection ladder, Tab, Enter, e d y x c :, D and
the rest go through the same store paths as on a node; a note on article
words is a note (Enter steps into it; c, f, u, the editor and history work
on it as on any other) and shows wherever the article is opened, in the
library's own note style. Detached annotations are listed at the top of
their section with a link to the old revision. Keys that only make sense on
a node say why in the status line. Tab on a link now selects its words, so
Esc widens before h leaves, as in a node.

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-15 21:53:00 -05:00
1 parent f63fc10dc0
commit 2c1ee048a4
18 files changed
+1134 -126

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ test("everything is reachable with the mouse: titles, marked spans, and a dragge
expect(focus.text.length).toBeGreaterThan(3);
await page.keyboard.press("e");
await idle(page);
const made = await state(page, (s) => Object.values(s.snap.nodes).filter((n: any) => n.kind === "note" && /^[Mm]ock/.test(n.body)).map((n: any) => n.anchors[0].text));
const made = await state(page, (s) => Object.values(s.snap.nodes).filter((n: any) => n.kind === "note" && !n.wanchor && /^[Mm]ock/.test(n.body)).map((n: any) => n.anchors[0].text));
expect(made).toContain(focus.text);
});