docs(events): update activities→events references after module rename

Updates documentation that referenced the pre-rename `src/modules/
activities/` paths, useActivities composables, and ACTIVITIES_*
SERVICE_TOKENS to match the new `src/modules/events/` layout.

Touched:
- docs/nostr-patterns/{README,publishing,subscriptions,replaceable-events}.md:
  the "Canonical: src/modules/activities/composables/useRSVP.ts" anchors
  used throughout these pattern docs now point at the renamed paths.
- CLAUDE.md Payment Rails Pattern section: "Activities is the first
  consumer" / "Activities passes [...]" → "Events".

The mobile-browser docs reference to "Activity Lifecycle Kills" (line
810) is left alone — that's Android browser terminology, not the
events module.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-06-09 19:38:54 +02:00
commit 89afd83f1a
5 changed files with 13 additions and 13 deletions

View file

@ -717,7 +717,7 @@ VITE_WEBSOCKET_ENABLED=true
## Payment Rails Pattern ## Payment Rails Pattern
Shared primitives for modules that mix Lightning + fiat (and, future, Shared primitives for modules that mix Lightning + fiat (and, future,
cash / internal-wallet) payment rails. Activities is the first cash / internal-wallet) payment rails. Events is the first
consumer; restaurant + marketplace will adopt the same primitives as consumer; restaurant + marketplace will adopt the same primitives as
their backends gain fiat support. their backends gain fiat support.
@ -784,7 +784,7 @@ type PaymentMethod = {
``` ```
Module usage: Module usage:
- **Activities** passes `[lightning, ...one entry per organizer provider]`. - **Events** passes `[lightning, ...one entry per organizer provider]`.
- **Restaurant** (future) passes the subset of - **Restaurant** (future) passes the subset of
`[lightning, cash, internal, ...fiat providers]` enabled by the `[lightning, cash, internal, ...fiat providers]` enabled by the
restaurant's `accepts_*` flags. restaurant's `accepts_*` flags.

View file

@ -1,7 +1,7 @@
# Nostr patterns # Nostr patterns
Living reference for reusable Nostr patterns that show up across modules Living reference for reusable Nostr patterns that show up across modules
(activities, forum, market, chat, tasks, base, nostr-feed). (events, forum, market, chat, tasks, base, nostr-feed).
**Read before writing any new Nostr code in this repo.** **Update whenever you **Read before writing any new Nostr code in this repo.** **Update whenever you
introduce, refine, or correct a pattern.** Each section has a "Canonical introduce, refine, or correct a pattern.** Each section has a "Canonical

View file

@ -2,7 +2,7 @@
## Treat `result.success === 0` as failure, not success ## Treat `result.success === 0` as failure, not success
**Canonical:** `src/modules/activities/composables/useRSVP.ts` — **Canonical:** `src/modules/events/composables/useRSVP.ts` —
`if (!result || result.success <= 0) return null`. `if (!result || result.success <= 0) return null`.
```ts ```ts
@ -23,7 +23,7 @@ composable. Don't write code that silently treats both as success.
## Optimistic-on-success, not optimistic-on-click ## Optimistic-on-success, not optimistic-on-click
**Canonical:** `src/modules/activities/composables/useRSVP.ts` — local **Canonical:** `src/modules/events/composables/useRSVP.ts` — local
cache update after the `await` resolves with `success > 0`, before the cache update after the `await` resolves with `success > 0`, before the
relay echoes the event back through the subscription. relay echoes the event back through the subscription.
@ -39,7 +39,7 @@ button flip twice.
## Pending-coord debounce: disable the button during in-flight publish ## Pending-coord debounce: disable the button during in-flight publish
**Canonical:** `src/modules/activities/composables/useRSVP.ts` — **Canonical:** `src/modules/events/composables/useRSVP.ts` —
`pendingCoords: ref<Set<string>>` + `isPending(...)` predicate + `pendingCoords: ref<Set<string>>` + `isPending(...)` predicate +
`try { … } finally { pendingCoords.value.delete(coord) }`. `try { … } finally { pendingCoords.value.delete(coord) }`.
@ -66,7 +66,7 @@ while a previous publish on activity B is still flying. A global
## Sign with `nostr-tools.finalizeEvent`, take privkey as bytes ## Sign with `nostr-tools.finalizeEvent`, take privkey as bytes
**Canonical:** `src/modules/activities/composables/useRSVP.ts` — **Canonical:** `src/modules/events/composables/useRSVP.ts` —
`hexToUint8Array` helper + `finalizeEvent(template, signingKey)`. `hexToUint8Array` helper + `finalizeEvent(template, signingKey)`.
`finalizeEvent` expects a `Uint8Array`, not a hex string. Several composables `finalizeEvent` expects a `Uint8Array`, not a hex string. Several composables

View file

@ -7,7 +7,7 @@ in this file follows from that single fact.
## Strictly-monotonic `created_at` per coord ## Strictly-monotonic `created_at` per coord
**Canonical:** `src/modules/activities/composables/useRSVP.ts` — **Canonical:** `src/modules/events/composables/useRSVP.ts` —
`lastPublishAt` map + the `Math.max(now, previous + 1)` line. `lastPublishAt` map + the `Math.max(now, previous + 1)` line.
```ts ```ts
@ -31,7 +31,7 @@ than the last click on the same coord.
## Per-pubkey latest-wins state for derived counts ## Per-pubkey latest-wins state for derived counts
**Canonical:** `src/modules/activities/composables/useRSVP.ts` — **Canonical:** `src/modules/events/composables/useRSVP.ts` —
`rsvpStates: ref<Map<coord, Map<pubkey, RSVPEntry>>>` + `upsertRSVPState` + `rsvpStates: ref<Map<coord, Map<pubkey, RSVPEntry>>>` + `upsertRSVPState` +
`getRSVPCount` (count entries where status === 'accepted'). `getRSVPCount` (count entries where status === 'accepted').
@ -51,7 +51,7 @@ any "who's currently in state X" question.
## Replaceable list, full-rewrite on toggle ## Replaceable list, full-rewrite on toggle
**Canonical:** `src/modules/activities/composables/useBookmarks.ts` — **Canonical:** `src/modules/events/composables/useBookmarks.ts` —
NIP-51 kind 10003 bookmark list. NIP-51 kind 10003 bookmark list.
For replaceable lists (10003 bookmarks, 10000 mute list, 10006 communities, For replaceable lists (10003 bookmarks, 10000 mute list, 10006 communities,
@ -66,7 +66,7 @@ diverges on next refresh.
## Vue 3 reactivity for nested `ref<Map>` ## Vue 3 reactivity for nested `ref<Map>`
**Canonical:** `src/modules/activities/composables/useRSVP.ts` — **Canonical:** `src/modules/events/composables/useRSVP.ts` —
`upsertRSVPState` (the `rsvpStates.value.set(coord, inner)` after mutating `upsertRSVPState` (the `rsvpStates.value.set(coord, inner)` after mutating
`inner`). `inner`).

View file

@ -2,7 +2,7 @@
## Subscribe, store the unsubscribe handle, clean up on unmount ## Subscribe, store the unsubscribe handle, clean up on unmount
**Canonical:** `src/modules/activities/composables/useRSVP.ts` — **Canonical:** `src/modules/events/composables/useRSVP.ts` —
`loadRSVPs()` (subscribe block) + the matching `onUnmounted(() => unsubscribe?.())`. `loadRSVPs()` (subscribe block) + the matching `onUnmounted(() => unsubscribe?.())`.
```ts ```ts
@ -33,7 +33,7 @@ session-long vs view-long), not by accident.
## EOSE means "backfill done", not "all events delivered" ## EOSE means "backfill done", not "all events delivered"
**Canonical:** `src/modules/activities/composables/useRSVP.ts` — **Canonical:** `src/modules/events/composables/useRSVP.ts` —
`onEose: () => { isLoaded.value = true }`. `onEose: () => { isLoaded.value = true }`.
`onEose` fires once, after the relay flushes everything stored that matches `onEose` fires once, after the relay flushes everything stored that matches