Skip to content

Undo delete, past-event archive, cancel, and guest pages for gone events - #7

Merged
HeWillCook merged 2 commits into
mainfrom
feat/lifecycle
Nov 16, 2026
Merged

HeWillCook merged 2 commits into
mainfrom
feat/lifecycle

Conversation

@HeWillCook

Copy link
Copy Markdown
Owner

Wave 1 of the lifecycle & polish spec. Stacked on #6; will be rebased onto main once #6 merges. Uses migration 0005 (already on production).

What

  • Undo instead of confirm: delete is a soft delete (deleted_at). The dashboard shows Deleted "…" [Undo] (POST, host-scoped). Deleted events are purged lazily after 30 days. Every host read and write path excludes deleted events, either directly or via getHostEvent; the audit is in the child report and covered by tests.
  • Past events archive: the dashboard splits into Upcoming and a collapsed "Past events (N)". Cancelled events keep their date bucket with a badge.
  • Cancel without deleting: Cancel/Reinstate on the edit page. A cancelled banner and a "Copy cancellation message" button appear in the event header.
  • Guest pages: a deleted event shows "no longer available" with the host's name, and its link preview drops the title. A cancelled event shows a read-only page with a banner and no calendar links.
  • RSVP writes are rejected server-side for deleted and cancelled events.
  • One eventState helper with precedence deleted > cancelled > past (start + 12h) > upcoming.

Tests

120 targeted tests pass locally across event-state, events/rsvp services, actions, components, duplicate and the guest pages; typecheck and lint are clean.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cookout Ready Ready Preview Nov 16, 2026 3:28am UTC

HeWillCook and others added 2 commits November 15, 2026 22:27
Wave 1 of the event lifecycle spec (features 1, 2, 4, 5).

- Deleting an event now sets deleted_at instead of removing it. Every host
  read and write path filters deleted rows in one place (getHostEvent,
  listHostEvents, headcountForEvents), so host pages 404 and host writes are
  rejected. restoreEvent clears it; the dashboard's "Deleted ... Undo" notice
  looks the id up host-scoped and only for deleted events.
- purgeDeletedEvents runs lazily on dashboard load, host-scoped, and hard
  deletes anything deleted more than 30 days ago (children cascade).
- Dashboard splits Upcoming (soonest first) from a collapsed Past details
  block (most recent first); grouping is a pure helper in lib/event-state,
  where eventState also derives deleted > cancelled > past > upcoming.
  Cancelled events stay in their date bucket with a badge.
- cancelEvent/uncancelEvent services and edit-page actions, a host layout
  cancellation banner with a copyable message, and an invite stub that hides
  when cancelled.
- Guest pages: a deleted event renders a friendly "no longer available" slip
  with the host's name; a cancelled one renders read-only with a "Cancelled
  by <host>" notice and the guest's existing answer. submitRsvp/updateRsvp
  reject both server-side.
- DeleteEventSection loses its confirm step (deletable is now reversible) and
  gains a pending state; a shared SubmitButton backs the new forms.

Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@HeWillCook
HeWillCook changed the base branch from feat/new-surfaces to main November 16, 2026 03:27
@HeWillCook
HeWillCook merged commit dfa1e68 into main Nov 16, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant