Events 3.7.2 + Website 1.6.1: no duplicate events after a reseed; "Events site" in the header

A reseed gives every event a new id without listing the old ones in the
feed's `deleted`, and consumers only fetched ?updatedSince= after the first
sync, so the old copies stayed beside the new ones.

- Both: the 15-minute feed poll and "Sync now" fetch the whole list and
  drop copies that aren't in it; the fetch after event.changed stays
  incremental.
- Events set-demo.js keeps FeedEntry and marks its live entries removed,
  resets the links' lastGoodAt, then publishes the new feed, sends
  event.changed and fetches the linked products' events back in.
- Website loadDemo lists the old published events in FeedRemoval and sends
  event.changed after publishing.
- Website header: links to the church's other sites read "Events site"
  with an external-link icon, not a second "Events".

Checked: Website backend tests (133), Events backend tests (802), both
typechecks, Website frontend build. set-demo.js not run end to end (no
local database).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-27 15:35:38 +02:00
co-authored by Claude Opus 5.5
parent a75d2f7b46
commit 7f681c9e81
24 changed files with 211 additions and 29 deletions
+5
View File
@@ -237,6 +237,11 @@ from"). When on:
secret). It fetches `?updatedSince=<lastGoodAt minus 5 minutes>`, 15 s timeout, parses with
`parseEventFeed` (rejected events are logged, never block the rest), and upserts into
`ImportedEvent`. One failing link never holds up another (separate jobs).
**Changed in Events 3.7.2 / Website 1.6.1:** the 15-minute poll and "Sync now" fetch the whole
list (no `updatedSince`) and drop copies that aren't in it, so events a sibling lost without
listing them in `deleted` (a reseed, a restore) can't stay forever. Only the fetch after an
`event.changed` asks for what changed. Demo reseeds (`set-demo.js`, the Website's `loadDemo`)
list the old events in `deleted` and send `event.changed`, so siblings are right at once.
- **The last good copy stays.** A failed sync only sets `lastSyncError`; admins see "Last synced
2 hours ago" on Linked products and on the dashboard's event list.
- **Read-only**, keyed by `origin.product` + `id` (`eventKey`), and **never re-published**: the
+9 -3
View File
@@ -10,8 +10,8 @@ separately below; the two often differ.
| What | Repo | Latest | Tag | Released |
|------|------|--------|-----|----------|
| Cross Events | `crosscode-platform` (`apps/events`) | **3.7.1** | `events@3.7.1` | 2026-11-26 |
| Church Website | `crosscode-platform` (`apps/website`) | **1.6.0** | `website@1.6.0` | 2026-11-27 |
| Cross Events | `crosscode-platform` (`apps/events`) | **3.7.2** | `events@3.7.2` | 2026-11-27 |
| Church Website | `crosscode-platform` (`apps/website`) | **1.6.1** | `website@1.6.1` | 2026-11-27 |
| Accounts | `crosscode-platform` (`apps/accounts`) | **1.8.0** | `accounts@1.8.0` | 2026-11-26 |
| Server agent | `crosscode-platform` (`apps/agent`) | **1.6.0** | `agent@1.6.0` | 2026-11-27 |
| Contracts | `crosscode-platform` (`packages/contracts`) | **1.19.0** | `contracts@1.19.0` | 2026-11-27 |
@@ -30,7 +30,7 @@ on each run, so merging to `main` and pushing releases it. Its changes are liste
| `@crosscode/auth-client` | `packages/auth-client` | 1.1.0 (released with Events 3.0.0 and Accounts 1.1.0) |
| `@crosscode/seo` | `packages/seo` | 1.0.0 (released with Events 2.4.0) |
| `@crosscode/ui` | `packages/ui` | 0.3.0 (fonts, `ChurchFooter`; 0.2.0 with Accounts 1.7.0, 0.3.0 with Events 3.7.0) |
| Website | `apps/website` | 1.6.0 (1.0.0–1.1.0 released 2026-11-26, 1.2.0–1.6.0 on 2026-11-27; installed for the demo church cross-demo2 (1.6.0) only, Hope Family Church next) |
| Website | `apps/website` | 1.6.1 (1.0.0–1.1.0 released 2026-11-26, 1.2.0–1.6.1 on 2026-11-27; installed for the demo church cross-demo2 (1.6.0) only, Hope Family Church next) |
| App | `apps/app` | 0.0.0 (not started, phase 6) |
These shared packages ship inside the apps that use them, from the same checkout, so they don't
@@ -38,6 +38,12 @@ need their own tags until something outside this repo depends on them.
## What each latest release was for
- **Cross Events 3.7.2 + Church Website 1.6.1 (2026-11-27):** events from the other product no
longer show twice after a reseed: the 15-minute feed poll and "Sync now" fetch the whole list and
drop copies that are gone, and both demo loaders list the old events as removed and tell the
other product at once (Events' `set-demo.js` also fetches the Website's events back in). The
Website's header says "Events site" with an external-link icon instead of a second "Events".
**Not deployed yet.**
- **crosscode.co.za 1.9.1 (2026-11-27):** the web address examples (both product pages and the
Church Website brochure) say yourchurch instead of a real church's name (hopefamily). **Not
deployed yet.**