From 0f03c6c9f6c2c2f3869170bec0fb6a97fc463629 Mon Sep 17 00:00:00 2001 From: Vuong Hoang Date: Sun, 26 Apr 2026 15:07:59 -0700 Subject: [PATCH] =?UTF-8?q?STATUS:=20news-digest=20=C3=97=20button=20+=20c?= =?UTF-8?q?ross-device=20hidden=20tray=20landed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New section documenting the architecture change (news-digest-web moved from nginx:alpine to a FastAPI app on uvicorn built from the worker's same Dockerfile), the three new endpoints (GET /api/hidden, POST /api/hide, POST /api/restore), the item-id scheme (12-char sha1 of reddit: or miniflux: so hide-once = hide-forever-for-that-article), and the playbook changes (dropped DOCKER_BUILDKIT=0 now that ana-docker is on docker-ce 29, added round-trip API verify steps). --- STATUS.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/STATUS.md b/STATUS.md index 7dd6589..5df1893 100644 --- a/STATUS.md +++ b/STATUS.md @@ -424,6 +424,40 @@ Verified post-recreate: seahub log shows `Seahub is started ... Done.` without traceback; traefik `seafile@docker` dropped to 0 502s in the next 20s window. +## news-digest — per-item × button + cross-device hidden tray (2026-04-24) + +Daily Digest pages now have a small × on each item that hides it +from the page. State persists server-side at `/output/hidden.json`, +so the same hidden set follows the user across devices (home, ipad, +laptop, work). A "Hidden (N)" tray at the bottom of each page lists +items hidden FROM THE CURRENT PAGE with a restore button per row; +older hidden ids that aren't on this page sit silently in +`hidden.json` and continue to filter future editions that include +the same article. + +Architecture change: `news-digest-web` swapped from `nginx:alpine` +to a FastAPI app on uvicorn, built from the **same Dockerfile** as +the worker. One image, two containers — the worker's cron-driven +ENTRYPOINT runs in `news-digest-worker`, while compose overrides +entrypoint+command to launch `uvicorn web:app` in `news-digest-web`. +Drops one image dep, adds three endpoints: +- `GET /api/hidden` — JSON array of hidden item ids +- `POST /api/hide` — `{id}` → adds to hidden.json +- `POST /api/restore` — `{id}` → removes from hidden.json + +Item ids are stable 12-char sha1 prefixes (`reddit:` / +`miniflux:`) computed in `digest.py` at render time so +hide-once means hide-forever-for-that-article. Storage: single +JSON array, atomic writes via tempfile+rename, threading.Lock +inside the single uvicorn worker. No auth — same trust boundary +as the digest itself (LAN-only on port 8181). + +The deploy playbook also dropped its `DOCKER_BUILDKIT=0` fallback +(no longer needed post docker-ce 29 migration) and gained three +verify steps: `/api/hidden` returns a JSON array, `app.js` is +reachable, and a synthetic `smoke-` id round-trips through +hide → list → restore → list. + ## Session milestones — 2026-04-24 (the "tooling day" + housekeeping pm) Morning / early afternoon — the original tooling day: