Skip to content

perf(events): sign only preview guest photos on event detail - #1412

Merged
timkwist merged 3 commits into
mainfrom
perf-event-detail-skip-guest-presigns
Aug 13, 2026
Merged

perf(events): sign only preview guest photos on event detail#1412
timkwist merged 3 commits into
mainfrom
perf-event-detail-skip-guest-presigns

Conversation

@timkwist

Copy link
Copy Markdown
Collaborator

Overview

Event detail still presigned every guest photo on first paint, even though the page only shows five preview avatars. That B2 signing work is the expensive part of opening an event.

GET /events/{id}/ now signs photos only for those five preview guests (same going/maybe, members-first order as the UI). Names, RSVP status, and host invited-card photos stay on that response. GET /events/{id}/guests/ returns every guest with photos and is fetched when view-all or manage-RSVPs opens, so photos are not dropped.

Test plan

  • tests/test_event_list_memory.py — detail signs 5 preview photos and leaves the rest unsigned; /guests/ signs every packed guest photo; hidden viewers still get an empty list
  • Frontend: view-all loads photos from /guests/; manage-RSVPs merges photos onto the live guest list
  • make agent-lint / make agent-typecheck / make agent-complexity / schema + types checks
  • make agent-frontend-ci (eslint, prettier, vitest 1267 passed, tsc, types check)
  • On staging, open an event with more than 5 guests: preview avatars have photos; view-all shows everyone with photos; manage-RSVPs still shows photos after adding/removing someone

🤖 Created with Cursor

First paint still returns every guest name, but B2 URLs only for the five
preview avatars. View-all and manage-RSVPs load the rest from /guests/.
Keeps that helper at five arguments by attaching B2 URLs after the
guest rows are built, instead of suppressing the arg-count lint.
…t fetch

Review found mergeEventGuestPhotos could desync invited avatars from a stale
/guests/ cache, and manage-RSVPs paid for a full photo-sign request it never
renders. Overlay guest photos by user id only, build /guests/ without a full
EventOut, and lock the preview cohort with tests.
@timkwist
timkwist marked this pull request as ready for review August 13, 2026 15:18
@timkwist
timkwist merged commit a96d3a1 into main Aug 13, 2026
3 checks passed
@timkwist
timkwist deleted the perf-event-detail-skip-guest-presigns branch August 13, 2026 15:18
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