trails/openspec/changes
Ullrich Schäfer 95ac79b093 Propose: notifications
Closes the social loop opened by social-feed: a Pending follower has no
way to know their request was approved, and a follower has no signal at
all that someone they follow just posted. Adds a notifications surface
for three v1 event types — follow_request_approved, follow_received,
activity_published — plus a /notifications page, navbar unread count,
and mark-as-read controls.

Capabilities:
- New: notifications (table, page, badge, generation hooks)
- Modified: social-follows (approve + auto-accept emit)
- Modified: activity-feed (public create fans out)
- Modified: journal-landing (nav entry alongside follow-requests)

Design picks:
- Fan-out-on-write for activity_published (1:N) so /notifications is a
  flat single-table query and "mark read" composes trivially. 1:1
  events insert directly. Cost ceiling documented at 10k followers ×
  50 activities/day = 500k/day, still trivial; revisit only if hot.
- Single notifications table with loose subject_id (no per-type FK);
  renderer dereferences by type. Mastodon-style.
- Two distinct nav entries (Follow requests + Notifications). Pending
  is "act on this", notifications is "this happened" — different
  semantics, kept separate.
- Loader-driven unread count (no real-time channel). Real-time is
  deferred.
- 90-day retention for read rows; unread kept indefinitely.

Out of scope: per-type mute preferences, email/push, real-time,
notifications about routes/replies/mentions, federated notifications.
Each tracked as follow-up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 00:12:35 +02:00
..
activity-photos Fix all OpenSpec validation failures (36/36 passing) 2026-04-06 22:17:52 +02:00
archive Archive public-content-visibility 2026-04-24 21:57:21 +02:00
changelog Add 8 proposed changes and old trails analysis 2026-03-25 03:57:20 +01:00
configurable-demo-persona Apply configurable-demo-persona: per-instance demo identity + voice 2026-04-19 10:30:32 +02:00
demo-activity-bot Apply demo-activity-bot: Bruno, the synthetic public-walk generator 2026-04-19 10:14:58 +02:00
e2e-test-reorganization Fix all openspec validation errors (45/45 pass) 2026-04-12 22:41:51 +02:00
journal-poi-details Fix all openspec validation errors (45/45 pass) 2026-04-12 22:41:51 +02:00
komoot-import Add 8 proposed changes and old trails analysis 2026-03-25 03:57:20 +01:00
local-dev-stack Fix all OpenSpec validation failures (36/36 passing) 2026-04-06 22:17:52 +02:00
mobile-app Implement mobile route editor with MapLibre and BRouter routing 2026-04-15 01:06:10 +02:00
notifications Propose: notifications 2026-04-26 00:12:35 +02:00
pg-boss-background-jobs Add pg-boss background job queue with session expiry 2026-04-13 21:17:24 +02:00
route-discovery Fix all OpenSpec validation failures (36/36 passing) 2026-04-06 22:17:52 +02:00
route-features Add 8 proposed changes and old trails analysis 2026-03-25 03:57:20 +01:00
route-sharing Fix all OpenSpec validation failures (36/36 passing) 2026-04-06 22:17:52 +02:00
social-federation Propose: social-federation (ActivityPub via Fedify) 2026-04-25 22:31:28 +02:00
social-feed Locked-account profiles: private = stub + Pending follow flow 2026-04-25 23:38:26 +02:00
staging-environments Add OpenSpec proposal for staging environments 2026-04-14 09:02:23 +02:00
visual-redesign Fix all OpenSpec validation failures (36/36 passing) 2026-04-06 22:17:52 +02:00
waypoint-notes Fix all OpenSpec validation failures (36/36 passing) 2026-04-06 22:17:52 +02:00