Skip to content

Fix mobile admin scroll, email BCC leak, and My Rooms rework - #17

Merged
pataniaeli merged 6 commits into
devfrom
fix/github-issues-batch
Aug 25, 2026
Merged

Fix mobile admin scroll, email BCC leak, and My Rooms rework#17
pataniaeli merged 6 commits into
devfrom
fix/github-issues-batch

Conversation

@pataniaeli

@pataniaeli pataniaeli commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Addresses 5 open issues:

  • Closes Administrator Tab will not scroll on mobile #10 — Administrator tab bar is now horizontally scrollable on mobile, so Advanced Settings (and any tab past the viewport edge) is reachable. The clipping was caused by the shared <main> container's overflow-x-hidden combined with the tab row having no scroll container of its own.
  • Closes Bcc on emails #15 — Booking-updated, space-booking-confirmed, and space-booking-cancelled emails no longer expose every recipient's address to each other via to:/cc:. They now send to a neutral address and bcc the real recipients.
  • Closes View of Senate session types #16 — The Senate session-type badge (Full Body / Weekly / Office Hours) no longer renders as a solid red block. It now uses muted, per-type tinted pills consistent with the site's existing status-badge style.
  • Closes Filterable Senates #13 — Senate members/leadership can toggle which session types show up in My Rooms, persisted in localStorage so the filter survives across sessions.
  • Closes New default view #14 — All Bookings in My Rooms gets search + status filters, plus a List/Calendar toggle (a new month-grid calendar view) instead of one long undifferentiated list.

Also bumped the version to 1.12.4 (package.json, package-lock.json, dashboard sidebar footer).

Test plan

  • npx tsc --noEmit passes
  • npx eslint shows no new errors/warnings vs. the pre-existing baseline (all remaining errors are in files untouched by this PR)
  • Confirmed /my-rooms and /administrator routes compile cleanly via local dev server (Turbopack)
  • Manual click-through in a logged-in session (I couldn't authenticate as a real northeastern.edu user in this environment — please verify the My Rooms filters/calendar and the mobile admin tab scroll visually before merging)

🤖 Generated with Claude Code

pataniaeli and others added 4 commits August 25, 2026 17:48
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The main content area has overflow-x-hidden, and the tab row had no
scroll container of its own, so tabs past the viewport edge (including
Advanced Settings) were unreachable on mobile.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Booking-updated and space-booking-confirmed emails put every recipient
in a shared to: array, so body members could see each other's email
addresses. Space-booking-cancelled exposed attendee emails the same
way via cc:. All three now send to a neutral address and bcc the real
recipients.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- #14: All Bookings gets search + status filters plus a List/Calendar
  toggle, replacing the single long undifferentiated list with a
  month-grid calendar option and lighter-weight filtering.
- #13: Senate members/leadership can now toggle which session types
  (Full Body, Weekly, Office Hours) show up, persisted in
  localStorage so the choice survives across sessions.
- #16: the Senate session-type badge no longer renders as a solid red
  block; it now uses muted, per-type tinted pills consistent with the
  rest of the site's status-badge styling.

Shared types/colors/formatters used by my-rooms, calendar-view, and
booking-detail-modal are consolidated into shared.ts instead of being
duplicated with the solid-badge styling baked in.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
chambers Ready Ready Preview Aug 25, 2026 10:56pm

…n Settings

- Calendar is now the default My Rooms view instead of the list.
- Calendar entries (day cells and the expanded day panel) show the
  booking's team, not the room — the room stays as secondary detail.
- The Senate session-type filter moved out of My Rooms entirely and
  into a "Senate Session Types Shown in My Rooms" section in the
  Settings modal, gated on actually holding a Senate body membership
  (verified against board_memberships, any role). It's now a real
  per-user preference (senate_type_preferences jsonb column, same
  pattern as email_preferences) instead of a localStorage toggle, so
  it follows the user across devices. My Rooms refetches when the
  preference changes via a small window event, since the Settings
  modal can be open on top of it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@pataniaeli

Copy link
Copy Markdown
Collaborator Author

Addressed review feedback:

  • Calendar is now the default My Rooms view (was List).
  • Calendar entries show the team, not the room — both the day-cell mini list and the expanded day-detail panel lead with the body name; room is now secondary detail.
  • Senate session-type filter moved to Settings, out of My Rooms. It's a real per-user preference now (senate_type_preferences jsonb column on users, same shape as email_preferences) rather than a localStorage toggle, so it follows the user across devices/browsers. The section only renders when the user actually holds a board_memberships row for the Senate body (verified against the live DB — checked directly with an authenticated session: the "Senate Session Types Shown in My Rooms" checkboxes appear for a Senate member and the preference round-trips correctly to the users table).
  • Applied the migration (20260825020000_add_senate_type_preferences.sql) to the live Supabase project — additive, nullable-free not null default '{}'::jsonb column, no backfill needed.

Verified end-to-end with a live authenticated session in this environment: toggled a Senate type off/on in Settings, confirmed the DB value changed, and confirmed My Rooms refetches (via a small window event) to pick up the new preference without a manual page reload.

🤖 Generated with Claude Code

The events query embeds event_tracking(...) as a one-to-one relation
(booking_id is event_tracking's primary key), so PostgREST returns it
as a single object, not an array. The page typed it as an array and
read event_tracking?.[0], which is always undefined on a real object
— so the checklist always initialized to unchecked from the DB
regardless of what was actually saved. It only looked checked because
of the optimistic local state update, which reset on the next load.

Also stopped swallowing a failed PATCH silently: the optimistic update
now rolls back if the save request doesn't come back ok, instead of
showing a checked box that was never written.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@pataniaeli

Copy link
Copy Markdown
Collaborator Author

Also fixed a bug you flagged that wasn't on GitHub: Event checklist progress (Event Management Form / Engage Form) not persisting across sessions.

Root cause: `event_tracking` has `booking_id` as its primary key, so it's a true one-to-one relation to `bookings`. PostgREST embeds one-to-one relations as a single object, not an array — but the events page typed `event_tracking` as an array and read `event_tracking?.[0]`, which is always `undefined` on a plain object. So every fresh load re-derived the checklist as unchecked from the DB, no matter what had actually been saved. It only looked like it worked in the moment because of the optimistic local-state update on click, which vanished on the next load/session.

Confirmed via a live authenticated session: found an existing row in `event_tracking` with `event_management_form: true` that was rendering unchecked on load; fixed the object/array mismatch, reloaded, and it now renders checked correctly and survives a hard reload. Also stopped silently swallowing a failed save — the optimistic checkbox now rolls back if the PATCH doesn't come back `ok`, instead of showing state that was never written.

🤖 Generated with Claude Code

@pataniaeli
pataniaeli merged commit 7ea4adf into dev Aug 25, 2026
3 checks passed
@pataniaeli
pataniaeli deleted the fix/github-issues-batch branch August 25, 2026 22:59
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