Add admin workshop RSVP members page (replaces 4k-item dropdown) - #2798
Merged
Conversation
mroderick
force-pushed
the
fix/admin-workshop-nplus1
branch
from
August 9, 2026 07:29
6f89a35 to
2380b3c
Compare
mroderick
force-pushed
the
feature/workshop-rsvp-page-clean
branch
from
August 9, 2026 07:39
d80b073 to
fdb2e36
Compare
mroderick
marked this pull request as ready for review
August 9, 2026 10:49
mroderick
force-pushed
the
feature/workshop-rsvp-page-clean
branch
from
August 9, 2026 10:52
fdb2e36 to
11e2ea6
Compare
KimberleyCook
approved these changes
Aug 9, 2026
mroderick
force-pushed
the
feature/workshop-rsvp-page-clean
branch
2 times, most recently
from
August 9, 2026 12:23
0b37cf2 to
6d4bd02
Compare
Add a dedicated RSVP members page for a workshop (GET /admin/workshops/:id/rsvp): an eligible invited-member count (invitations joined to member, excluding banned), a name-search form over that workshop's invited members in any attending state (Pagy, 20/page), and a per-row toggle that posts the inverted attending value to the existing Admin::InvitationsController#update, which redirects back preserving the search. Show the workshop details (id, date/time, venue, spots) and an intro. Replace the full invitation <select> on the show page with a prominent "RSVP a member" button and set page titles.
Member.find_members_by_name interpolates the search term into an ILIKE pattern unescaped, so a bare '%' matches every member and a trailing backslash raises a Postgres 'LIKE pattern must not end with escape character' error. Escape %, _ and backslash so search terms are treated literally. This hardens the new RSVP search and the existing admin/member_search endpoint.
mroderick
force-pushed
the
feature/workshop-rsvp-page-clean
branch
from
August 9, 2026 12:32
6d4bd02 to
bf9f1c5
Compare
mroderick
enabled auto-merge
August 9, 2026 12:34
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.
Summary
Replaces the 4,000-item RSVP dropdown on the admin workshop show page with a dedicated, search-driven RSVP members page. The show page now links to it with a prominent button and no longer queries the full invitation list.
The manual RSVP is only ever used, when members show up for a workshop and haven't accepted the invite. We don't need to show the full list of RSVPs in a dropdown every time an organiser opens the workshop detail page.
What it does
GET /admin/workshops/:id/rsvp(Admin::WorkshopsController#rsvp):Member.find_members_by_name), results paginated with Pagy at 20/pageattendingvalue to the existingAdmin::InvitationsController#update, which redirects back preserving the search + page<select>is replaced by an "RSVP a member" button; the page no longer materialises the invitation list%,_and backslash inMember.find_members_by_name(a bare%matched every member; a trailing backslash caused a 500) — also hardens the existingadmin/member_searchRelated work
Tests
Member.find_members_by_namespecs for wildcard/backslash termsNotes
Measured performance
/admin/workshops/3824(4,364 invitations, 27 attending) against the production dump, same session.DomContentLoaded)Replacing the
<select>with a link removes the ~9 s render of the 4,337-option dropdown and the large HTML body, taking the page from ~119 s to ~2.0 s end-to-end (roughly 60x faster).Query count is unchanged (~202) — the N+1 fix is #2797, which is complementary; the two PRs merge independently.