WIP: diigo-cache: /public/<username>/all, searched client-side #2

Draft
dckc wants to merge 1 commits from dckc/diigo-search AGit into main
pull from: dckc/diigo-search
Owner

Warning

Unreviewed LLM output. Generated by Claude Opus 5.5; no human has reviewed this code yet.

/public/<username>/all: every stored shared bookmark on one page, in the public page's microformats (h-feed of h-entry).

  • No JS: the whole list; the search form submits to the existing server-filtered page.
  • With JS: the newest 5 show; search hides and shows entries in place as you type.
  • Same search: src/query.ts → src/query.js (JSDoc types, checkJs). The worker imports it as code and serves the same file at /_query.js (a ?raw import plus a wrangler Text rule), so the browser runs the server's matcher. shown() decides what the page shows; the page script reads items back out of each h-entry.

Tests (116 pass, lint clean): shown(); /all lists all 270 stored shared items, none hidden; /_query.js is exactly the module the worker runs; client-side search over /all's parsed microformats finds the same set as the server's ?q= for 5 queries.

Not in CI: the in-page script. I checked it once in headless Chromium against a captured page: 5 of 54 shown by default, 8 for ?q=fragments, and a bad query shows its error.

No stored-state changes.

All code and docs here are AI-generated (Generated-by: trailer).

🤖 Generated with Claude Code

> [!WARNING] > **Unreviewed LLM output.** Generated by Claude Opus 5.5; no human has reviewed this code yet. `/public/<username>/all`: every stored shared bookmark on one page, in the public page's microformats (h-feed of h-entry). - **No JS:** the whole list; the search form submits to the existing server-filtered page. - **With JS:** the newest 5 show; search hides and shows entries in place as you type. - **Same search:** `src/query.ts` → `src/query.js` (JSDoc types, `checkJs`). The worker imports it as code and serves the same file at `/_query.js` (a `?raw` import plus a wrangler Text rule), so the browser runs the server's matcher. `shown()` decides what the page shows; the page script reads items back out of each h-entry. Tests (116 pass, lint clean): `shown()`; `/all` lists all 270 stored shared items, none hidden; `/_query.js` is exactly the module the worker runs; client-side search over `/all`'s parsed microformats finds the same set as the server's `?q=` for 5 queries. Not in CI: the in-page script. I checked it once in headless Chromium against a captured page: 5 of 54 shown by default, 8 for `?q=fragments`, and a bad query shows its error. No stored-state changes. All code and docs here are AI-generated (`Generated-by:` trailer). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
dckc added 1 commit 2026-10-10 21:45:54 +00:00
Every stored shared bookmark on one page, in the public page's
microformats. Without JS that's the whole list, and the search form
asks the server's filtered page. With JS, the newest 5 show and search
hides and shows entries in place.

The browser runs the server's own matcher: query.ts becomes query.js
(JSDoc types, checkJs), which the worker imports as code and serves as
text at /_query.js via a `?raw` import and a wrangler Text rule.
`shown()` picks what the page shows; the page's script reads items
back from each h-entry.

Tests: shown(); /all lists all 270 stored shared items, none hidden;
/_query.js is the module the worker runs; and client-side search over
/all's parsed microformats finds what the server's ?q= finds. The
script itself was checked once in headless Chromium (5 of 54 shown by
default; ?q=fragments shows 8), not in CI.

Generated-by: Claude Opus 5.5
You are not authorized to merge this pull request.
This pull request can be merged automatically.
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin refs/pull/2/head:dckc/diigo-search
git checkout dckc/diigo-search
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dckc/captoys#2