diff --git a/specs/feature-backlog.md b/specs/feature-backlog.md index 7ac5d93..c16f137 100644 --- a/specs/feature-backlog.md +++ b/specs/feature-backlog.md @@ -31,30 +31,39 @@ focus is **front-end improvements** to `psf-memo-client` (the React SPA). ## In progress -- **Notifications query performance (2026-09-18):** `GET /posts/notifications/:addr` - is slow because it full-scans the `likes`, `postChildren`, and `follows` - stores and loads a post for every candidate. The fix bounds the work to the - viewer's activity inside a configurable block window - (`NOTIFICATION_BLOCK_WINDOW`, default 25000; cutoff = - `status.chainBlockHeight - window`): the viewer's posts are read from - `addrPostHeights` within the window, likes and replies are prefix-scanned - from `postLikes`/`postChildren` per post, and follows are read from a new - followee-keyed, height-ordered `followeeHeights` index maintained by the - indexer. `pagination.total` counts only in-window notifications. Affected - components: `psf-memo-indexer` (index writes) and `psf-memo-db` (read path, - config). Specs: - `psf-memo-indexer/specs/followee-heights-indexing.feature`, - `psf-memo-db/specs/backfill-followee-index.feature`, - `psf-memo-db/specs/notifications-query-performance.feature`. - **Developer documentation:** update - `psf-memo-indexer/dev-docs/psf-memo-db.md` (new `followeeHeights` store, - `NOTIFICATION_BLOCK_WINDOW` config, read-route notes) and - `psf-memo-indexer/dev-docs/design-decisions-and-tradeoffs.md` (why per-object - scans plus a block window replace the full-store scans), and let the architect - record the per-task what/why summary under `docs/reviews/`. +_(none)_ ## Recently completed +- **Notifications query performance (2026-09-18):** `GET /posts/notifications/:addr` + is now bounded to the viewer's activity inside a configurable block window + (`NOTIFICATION_BLOCK_WINDOW`, default 25000; cutoff + `status.chainBlockHeight - window`) instead of full-scanning `likes`, + `postChildren`, and `follows`. The viewer's posts are read from + `addrPostHeights` within the window, likes and replies are prefix-scanned + from `postLikes`/`postChildren` per post, and follows come from a new + followee-keyed, height-ordered `followeeHeights` index written by the indexer + (`/level/followeeheight` route, `backfill-followee-index` utility). + `pagination.total` counts only in-window notifications, and because a + notification is drawn from the viewer's content inside the window, an + interaction with a post older than the window is not returned even when the + interaction itself is recent. Indexer + DB. Specs: + `psf-memo-indexer/specs/followee-heights-indexing.feature`, + `psf-memo-db/specs/backfill-followee-index.feature`, + `psf-memo-db/specs/notifications-query-performance.feature`. Merged to + `master` at `a1eb548688` (review commit `c9728cc301`; records + `docs/reviews/notifications-query-performance-verification.json` (db) and + `docs/reviews/notifications-query-performance-indexer-verification.json`; the + later `a1eb548` commit is docs-only, so the records are valid for the merged + tree). Developer documentation captured in + `psf-memo-indexer/dev-docs/psf-memo-db.md` (new `followeeHeights` store, + `NOTIFICATION_BLOCK_WINDOW` config, route notes) and + `psf-memo-indexer/dev-docs/design-decisions-and-tradeoffs.md` (why per-object + scans plus a block window replace the full-store scans); architect summary + `docs/reviews/notifications-query-performance-summary.md`. Independent + acceptance check after merge: db notifications 10/10, db backfill 4/4, + indexer 4/4. + - **Topics table layout (2026-09-18):** the topics page now renders topics in a react-bootstrap `Table`, so the four columns line up. A pure `buildTopicsTable` view model (`psf-memo-client/src/services/topics-table.js`) @@ -344,14 +353,11 @@ Reference: https://memo.sv/protocol (Wayback snapshot 2025-12-15) small; handoffs are blocked on a dirty tree. See `docs/process-improvements.md` for the what/why, commits, and verification evidence. -## Next up: Notifications query performance +## Next up: TBD -Specification complete and awaiting coder handoff. Make -`GET /posts/notifications/:addr` bounded to the viewer's activity in a -configurable block window instead of full-scanning `likes`, `postChildren`, and -`follows`. See **In progress** above for the specs and the developer -documentation deliverable. Current direction otherwise remains front-end -improvements to `psf-memo-client`. +Current direction is front-end improvements to `psf-memo-client` (UI/UX polish, +accessibility, performance, responsiveness, state handling, error surfacing). +Ask the user for the next feature. ## Notes for future cycles