Skip to content

External attendees on SGA Space bookings (#132) - #137

Merged
pataniaeli merged 2 commits into
devfrom
feat/issue-132-external-attendees
Sep 17, 2026
Merged

pataniaeli merged 2 commits into
devfrom
feat/issue-132-external-attendees

Conversation

@pataniaeli

@pataniaeli pataniaeli commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Closes #132

What changed

SGA Space bookings can now include people without a Chambers account, e.g. an interview candidate.

  • Adding one: type their @northeastern.edu address in Add Attendees. If no Chambers user has that exact address, the dropdown offers Add (Enter works too). Someone who does have an account is still added as themselves, so their chosen inbox (The Benedikt Option (TM) #109) applies. External attendees show as dashed chips.
  • Emails: external attendees get the same confirmation, update, "added" / "removed" and cancellation emails, with calendar invites, as Chambers attendees. That covers single bookings, weekly series (create, series edit, series cancel) and blackout cascades.
  • Room display: shown as "Guest" or "N guests", never by address.
  • Admin SGA Spaces tab: the attendee count includes them.

How

  • New external_attendees text[] column on space_bookings and space_booking_series.
  • The API normalizes addresses (trim, lowercase, dedupe), accepts only @northeastern.edu (the same pattern as SGA inboxes), caps the list at 25, and rejects the whole request if any address is invalid.
  • attendeeKeys(row) in lib/spaces-email.ts returns user ids plus an email:<address> key for each external attendee, and resolveSpacesAddresses maps those keys to the address itself. Every existing "who to email" calculation (added, dropped, cancellation To/Bcc) therefore covers both kinds of attendee without a second code path.

Migration: already applied to production

supabase/migrations/20260917004809_space_external_attendees.sql, with a rollback script. The file is renamed from 20260916010000 to the version production recorded; its contents are unchanged.

  • Added external_attendees text[] not null default '{}' to space_bookings and space_booking_series, with a cardinality <= 25 check on each. Verified both columns and constraints are in place after applying.
  • Additive: the code currently on dev never touches the column, so it's unaffected. This PR's code can now deploy.

Note

PR #134 (#127) also touches the series PATCH destructuring and the modal's series submit body, so whichever merges second will have a small, mechanical conflict.

Testing

  • tsc --noEmit clean. eslint on changed files is clean apart from one warning that was already there.
  • Not exercised in a browser: the app requires a signed-in session, and the migration isn't applied.

🤖 Generated with Claude Code

An SGA Space booking could only list Chambers users, so an interview
candidate or a guest from another office couldn't be put on it or sent its
invite. Typing an @northeastern.edu address in the attendee search now
offers to add it when no Chambers user has that address, and it shows as a
dashed chip.

Addresses are stored in a new external_attendees column on bookings and
series, validated to @northeastern.edu and capped at 25. Every place that
works out who to email -- create, edit (added/removed diff), cancel,
blackout cascades, and all three series routes -- resolves attendees
through attendeeKeys, where an external address is an `email:` key that
resolveSpacesAddresses maps to itself. So external attendees get the same
invites, updates and cancellations as everyone else. The room display
counts them as "Guest" instead of showing their address.

Co-Authored-By: Claude Opus 5 <[email protected]>
@pataniaeli pataniaeli added the enhancement New feature or request label Sep 17, 2026
@vercel

vercel Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
chambers Ready Ready Preview Sep 17, 2026 12:49am UTC

Applied to production as 20260917004809_space_external_attendees; contents
unchanged. The rollback's header now names the renamed file.

Co-Authored-By: Claude Opus 5 <[email protected]>
@pataniaeli pataniaeli self-assigned this Sep 17, 2026
@pataniaeli
pataniaeli merged commit 38ac8ee into dev Sep 17, 2026
4 checks passed
@pataniaeli
pataniaeli deleted the feat/issue-132-external-attendees branch September 17, 2026 15:13
pataniaeli added a commit that referenced this pull request Sep 18, 2026
Resolves the conflict #137 predicted: #132 (external attendees) and this
branch each added a field to the same series PATCH destructuring, week and
series updates, and the modal's series submit body. Both are kept --
space_id from #127 and external_attendees from #132. Every place this branch
moved the series onto the new spaceId is unchanged.

Co-Authored-By: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant