Implement watch-event feature (017) with bookmark in RsvpBar
All checks were successful
CI / backend-test (push) Successful in 1m0s
CI / frontend-test (push) Successful in 27s
CI / frontend-e2e (push) Successful in 1m30s
CI / build-and-publish (push) Has been skipped

Add client-side watch/bookmark functionality: users can save events to
localStorage without RSVPing via a bookmark button next to the "I'm attending"
CTA. Watched events appear in the event list with a "Watching" label.
Bookmark is only visible for visitors (not attendees or organizers).

Includes spec, plan, research, tasks, unit tests, and E2E tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 22:20:57 +01:00
parent e01d5ee642
commit c450849e4d
22 changed files with 1266 additions and 31 deletions

View File

@@ -65,6 +65,11 @@ const deleteDialogMessage = computed(() => {
function requestDelete(eventToken: string) {
deleteError.value = ''
const role = getRole(getStoredEvents().find((e) => e.eventToken === eventToken)!)
if (role === 'watcher') {
removeEvent(eventToken)
return
}
pendingDeleteToken.value = eventToken
}
@@ -105,10 +110,10 @@ function cancelDelete() {
pendingDeleteToken.value = null
}
function getRole(event: StoredEvent): 'organizer' | 'attendee' | undefined {
function getRole(event: StoredEvent): 'organizer' | 'attendee' | 'watcher' {
if (event.organizerToken) return 'organizer'
if (event.rsvpToken) return 'attendee'
return undefined
return 'watcher'
}
const groupedSections = computed(() => {