perf(events): sign only preview guest photos on event detail - #1412
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/guests/; manage-RSVPs merges photos onto the live guest listmake agent-lint/make agent-typecheck/make agent-complexity/ schema + types checksmake agent-frontend-ci(eslint, prettier, vitest 1267 passed, tsc, types check)🤖 Created with Cursor