#454 IndexNow sends the pages of the moments and durations a save changes
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#454
- pull request
- state:merged
Closes #453. Editing a moment sent IndexNow only its timeline's page. A moment's own page, which a search for that moment lands on, waited for the engines' next crawl. **What's sent now** (for timelines whose entities the sitemap lists: public, unlabelled, ≤ `SITEMAP_TIMELINE_ENTITIES` moments): - **Whole timeline:** all of its moment and duration pages when it's made public, becomes listed, or gets a new address (rename). These come from `store.entityKeys`, as the sitemap reads them. - **After a save:** the pages of the moments and durations it added, changed or removed, plus both ends of each relationship it added or removed, since entity pages list what they relate to. These are read from saved history with `differences()` between the previous and current head revisions, so the cost follows the change, not the timeline's size. Each timeline is capped at the sitemap's per-timeline limit. - **Unchanged:** the hourly limit per address, batches of 10,000, retries. **Also fixed:** a partial save from the editor moves `updated_at` at most once a minute. An edit within a minute of another change therefore never got its timeline's page sent. The poller now tracks each timeline's head revision, and a new head counts as a save. **Not covered** (documented): - A timeline that keeps no saved history sends only its own page, since there's nothing to compare. - When a timeline is renamed, made private or deleted, its entities' old addresses aren't sent. Engines drop them at their next crawl, as the sitemap no longer lists them. The sitemap and IndexNow now share the listing rule (`entitiesListed`, `timelineEntityLimit` in `server/indexnow.mjs`). **Tests** - `indexnow-postgres`: publishing sends every entity page. Editing one moment sends just that moment's page, through both a full-document save and the editor's partial save. Adding a relationship sends both ends. Removing a moment sends its page. A rename sends all entity pages at the new address. A labelled timeline sends only its own page. - `indexnow.test`: `entityChanges`, `entityPath`, and a head-only change counting as a save. - `sharing-postgres` (sitemap with entity pages) passes. The unit tests pass, apart from `contents.test`'s known false failure about the local `node_modules` link. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/pull/454
Related
Open #454 IndexNow sends the pages of the moments and durations a save changes in the timeline