diigo-cache: date windows and search on the public page (1d)

/public/<username> takes days, after, before, in (year, month,
quarter, ISO week), by=updated|created, and q (words, "phrases",
#tags, -negation, gmail/Slack/GitHub date operators). JSON answers
echo the parsed filter; a malformed one is a 400.

Filters query the stored items in sqlite through the read-only
viewer instead of walking diigo pages: the public page keeps no
fetch authority, and a filled cache already holds every item.
Results say `complete` when every diigo page is stored; freshness
is 1f's head refresh. So the fetch budget and the O(log pages)
walk test go, and the fake deep account shrinks to 300.

Generated-by: Claude Opus 5.5
This commit is contained in:
dckc committed 2026-10-09 01:17:03 -05:00
1 parent efb54ad4cc
commit 002f08b456
9 files changed
+418 -120

No files matched your search

+6 -10
View File
@@ -42,20 +42,16 @@ narrative.
2026-10-07, via `scripts/compare-export.ts`. Getting there
found diigo's `page_num` is 0-based (schema v2 migration).
- [ ] **1d. Date windows and search on the public page**, toward the
- [x] **1d. Date windows and search on the public page**, toward the
weekly PESOS roundup of [#23](https://github.com/dckc/madmode-blog/issues/23)
(a week's permalink: `in=2026-W41`). One filter, two spellings:
devs pass `{ days: 7, q: "#weekly" }`, URLs the same fields;
`q` takes gmail/Slack/GitHub operators. UTC, ISO weeks, half-open
windows; a fetch budget per request. Design: the API in
`diigo-cache/src/query.ts` and the skipped suites in
`tests/query.test.ts` and `tests/caches.test.ts` ("public page
filters"); done when they're unskipped and green.
Reconcile with 1f first: `query.ts` plans to filter while walking
diigo's pages (binary search by `updated`), but after 1c-vi a
filled cache holds every item, so 1d can query `items` in sqlite
and spend diigo fetches only on a head refresh (1f). Choose
before implementing; the skipped suites may need adjusting.
windows (`diigo-cache/src/query.ts`; `tests/query.test.ts`,
`tests/caches.test.ts` "public page filters"). Filters read
stored `items` only (the public page never fetches): results are
as fresh as the cache, and say `complete` when every diigo page
is stored. Keeping them fresh is 1f. 2026-10-09.
- [x] **1e. Fill job: a button that grabs every page** into a cache
from the webkey page `/cache/#<key>`, which trades the key for a