Skip to content

feat(portal,sanity): support multiple guests per booking - #823

Merged
codercatdev merged 15 commits into
devfrom
feat/multi-guest-portal
Nov 7, 2026
Merged

codercatdev merged 15 commits into
devfrom
feat/multi-guest-portal

Conversation

@codercatdev

Copy link
Copy Markdown
Contributor

Why

Episodes can have more than one guest (e.g. the Sanity episode with Chris LaRocque and Cody). Bookings only modeled one guest, so a second guest could only be added as a coordinator, had no speaker profile of their own, and the single media release on the booking could be signed by one person on everyone's behalf.

What

  • Schema: booking.guests[] (name, email, guestSlug, guestDocId, per-guest signature + consents). Empty = single-guest booking, unchanged behavior.
  • Access: every guest email is on the portal invite list.
  • Release (/api/portal/sign-release): recorded on the signed-in guest's own entry. Non-guests (host, coordinators) get 403 on multi-guest bookings. The first guest is mirrored to the top-level release fields so the ops app keeps working.
  • Profile (/api/portal/guest-profile): a guest edits only their own profile; the host picks a guest via ?guest=<key>. guestSlug overrides in the request body are now host-only (previously any signed-in user could point the save at any guest/author slug).
  • Portal page: "Guests on This Episode" roster with profile/release status per guest; profile and release sections act on the signed-in guest.
  • /guest-portal/[token] redirect also matches guests[].
  • Biome lint/format fixes in og-utils.ts / topics.ts that were already failing on main.

This branch is based on main (dev was 12 commits behind), so it also brings dev up to date.

Verification

  • biome check passes; astro check has no new errors in touched files; astro build and Sanity tsc pass.
  • Helper logic checked against the Sanity booking's shape (legacy → 1 guest; multi → both; case-insensitive email match; host is not a guest).
  • After deploy: migrate private.booking-gcal-sanity-20261125 to guests[] and verify both guests' portal views.

Made with Cursor

codercatdev and others added 15 commits November 3, 2026 19:26
…reschedule flow, and post-production rough cut + draft episode preview
…t Portable Text block, and auto-paste table conversion
…x630 cards, and Media Library prewarm script
… cards across all courses, lessons, podcasts, posts, and pages
release: send portal sign-in codes via Cloudflare Email Sending
A booking can now list every guest appearing on an episode in `guests[]`.
Each guest signs in with their own email, edits only their own speaker
profile, and signs their own media release; the host can view and edit any
guest's profile but cannot sign on a guest's behalf. Single-guest bookings
without `guests[]` behave exactly as before.

- booking schema: `guests[]` with name, email, profile link, and per-guest
  release signature/consents
- portal-guests: resolve the guest list (legacy single-guest fallback)
- access list includes every guest email
- sign-release / guest-profile: act on the signed-in guest's entry; the
  first guest is mirrored to the top-level release fields for the ops app
- guest-profile: only the host may target an arbitrary guestSlug
- portal page: "Guests on This Episode" roster with profile/release status
- fix biome lint/format errors already on main so CI passes

Co-authored-by: Cursor <cursoragent@cursor.com>
…esholds

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

⚡ Cloudflare Worker Preview Ready!

Environment URL
PR Preview https://ee561863-codingcatdev-dev.codingcatdev.workers.dev
Dev Custom Domain https://dev.codingcat.dev
  • Worker Version ID: ee561863-dc7a-4f8b-9ce9-5ad9435c596f
  • Protection: Restricted to @codingcat.dev accounts via Cloudflare Zero Trust Access

@codercatdev
codercatdev merged commit 32bccf3 into dev Nov 7, 2026
2 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