Files
ipodderx-rs/TODO.md
rays a958f7cb37 Trim the state database; Popular lists feeds the way Directory does
Drops the created columns on users, subscriptions and sessions, which were
written by every insert and read by nothing, and migrate()'s add list, whose
columns all predate 0.3.0. Removes Db::subscribed_feed_ids (no callers),
Db::subscriber_count (one caller wanting > 0) and Managed.orphaned (never
read). The old-database test now builds the tables with foreign keys on.

Popular now lists the feeds inside an OPML or a Patreon creator, never the
collection, as Directory does.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TAC7sLVqfKmY6rsTLXzNgk
2026-09-12 13:15:55 +00:00

28 lines
1.4 KiB
Markdown

# To do
## Trim the state database
From an audit of the database layer and a read-only copy of production on 2026-09-12. The data
itself was clean: no leftover tables or indexes, 47 free pages, one stray `entry_state` row.
Check each against the code before cutting it.
- [x] **`migrate()`'s add list.** All eight columns arrived in 0.2.0, and 0.5.0 only supports
upgrades from 0.3.0 on. Drop the list and its loop; keep the `retired` drop loop, which a
database coming from 0.4.0 still needs. (`src/db.rs`)
- [x] **`Db::subscribed_feed_ids`.** No callers; its doc says the scanner walks it, and it does not.
(`src/db.rs`)
- [x] **`Db::subscriber_count`.** One caller, which only asks whether it is above zero:
`subscriber_counts()?.contains_key(&id)`. (`src/db.rs`, `src/web.rs`)
- [x] **The `created` columns** on `users`, `subscriptions` and `sessions`. Written on every insert,
never read. Add them to `retired` and drop them from the inserts. (`src/db.rs`)
- [x] **`Managed.orphaned`.** Selected by `managed_feeds()` on every call and never read;
`FeedSummary.orphaned` is what the UI uses. (`src/db.rs`)
## Popular
- [x] **Popular lists feeds the way Directory does**: the feeds inside an OPML or a Patreon
creator, never the collection itself. (`src/web.rs`, `web/index.html`)
After these: `cargo test`, `node tests/page-smoke.js`, `npx playwright test`. Copy `state.db`
aside before deploying: `migrate()` drops columns on the first start.