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,5 +267,20 @@ describe("a web page's menus", () => {
|
||||
expect(keys).toContain(`store.onWeb && (k === "R" || k === "s")`);
|
||||
expect(find(paneEntries({ article: "A page", web: true, arrange: false, pinned: false }, act), "Arrange with a model").disabled).toBe(true);
|
||||
});
|
||||
|
||||
it("words of a page's text take what words of an article take: the lenses on the bar and in the menu, Delete on a note; no linking by hand", () => {
|
||||
const { act } = recorder();
|
||||
const web = sel({ article: true, web: true });
|
||||
const bar = (c: SelCtx) => barItems(c, act).map((g) => g.map((i) => `${i.label} ${i.key}`));
|
||||
expect(bar(web)).toEqual(bar(sel({ article: true })));
|
||||
expect(barItems(web, act).flat().map((i) => i.key)).toEqual(["e", "d", "y", "x", "c", ":"]);
|
||||
const menu = labels(selectionEntries(web, act));
|
||||
for (const l of ["Copy", "Open the original", "Expand", "Define", "Why?", "An example", "An objection", "Ask your own question…"]) expect(menu).toContain(l);
|
||||
expect(menu).not.toContain("Link to…");
|
||||
const onNote = labels(selectionEntries(sel({ article: true, web: true, note: true }), act));
|
||||
expect(onNote).toContain("Open the note");
|
||||
expect(onNote).toContain("Delete the note");
|
||||
expect(onNote).not.toContain("Link it…");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user