Web pages: notes on a page's words, as on Wikipedia's
A web page's text now takes the same selection bar, menu and keys as an article's: the lenses write a note anchored to the words, shown in the text, reached by Tab, opened, edited and deleted like any other. The notes are filed under the page's node (keyed by normUrl, a url target) in the same hidden container as articles' notes; an anchor's rev is the page's content hash as a number. Words are found again in whichever section holds them after a reload or an arrangement; gone, the note is listed as detached, and a page that cannot be shown lists every note kept on it. Page text goes to the model fenced as untrusted. Existing Wikipedia notes read as before. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
This commit is contained in:
1 parent
f8c6576ea1
commit
58bc8b5a2f
20 files changed
+972
-288
No files matched your search
@@ -267,31 +267,6 @@ test("links in a page's text: one to another page opens it next, one to an artic
|
||||
await expect.poll(async () => (await trail(page)).at(-1)).toBe("U:hostile.example.org/about");
|
||||
});
|
||||
|
||||
test("a web page's text is not written on: e d y x c, : and D say why, and nothing is added to the library", async ({ page }) => {
|
||||
await wide(page, "Error-correcting codes");
|
||||
await follow(page, WEB.tracing);
|
||||
await expect(page.locator(".wiki-pane.web .wrow").first()).toBeVisible();
|
||||
const count = () => state(page, (s) => Object.keys(s.snap.nodes).length);
|
||||
const before = await count();
|
||||
for (const k of ["e", "d", "c"]) {
|
||||
await keys(page, k);
|
||||
await expect(status(page)).toContainText(/shown as it is/);
|
||||
}
|
||||
await keys(page, "i i");
|
||||
expect(await state(page, (s) => s.selectedText())).toBeTruthy();
|
||||
for (const k of ["e", "y", "x", "c", "D", "w"]) {
|
||||
await keys(page, k);
|
||||
await expect(status(page)).toContainText(/not kept here|cannot be linked/);
|
||||
}
|
||||
await page.keyboard.press(":");
|
||||
await page.keyboard.type("why is this so?");
|
||||
await page.keyboard.press("Enter");
|
||||
await expect(status(page)).toContainText("not kept here");
|
||||
expect(await count()).toBe(before);
|
||||
expect(await state(page, (s) => s.pending.size)).toBe(0);
|
||||
await keys(page, "Escape Escape");
|
||||
});
|
||||
|
||||
test("an address of a Wikipedia article opens as the article: following a link to one, and picking one in the link picker", async ({ page }) => {
|
||||
await wide(page, "Error-correcting codes");
|
||||
await jump(page, "Error-correcting codes");
|
||||
|
||||
Reference in new issue
Block a user