Fix mobile admin scroll, email BCC leak, and My Rooms rework - #17
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…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>
|
Addressed review feedback:
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 🤖 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>
|
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 |
Summary
Addresses 5 open issues:
<main>container'soverflow-x-hiddencombined with the tab row having no scroll container of its own.to:/cc:. They now send to a neutral address andbccthe real recipients.localStorageso the filter survives across sessions.Also bumped the version to 1.12.4 (
package.json,package-lock.json, dashboard sidebar footer).Test plan
npx tsc --noEmitpassesnpx eslintshows no new errors/warnings vs. the pre-existing baseline (all remaining errors are in files untouched by this PR)/my-roomsand/administratorroutes compile cleanly via local dev server (Turbopack)🤖 Generated with Claude Code