Repository navigation
Conversation
mroderick
force-pushed
the
fix/dual-role-attendance-choice
branch
from
October 16, 2026 05:26
d98db41 to
4c2c1fe
Compare
mroderick
marked this pull request as ready for review
October 16, 2026 05:52
mroderick
marked this pull request as draft
October 16, 2026 05:54
A member subscribed to a chapter as both student and coach received one invitation whose role was frozen to whichever invitation pass ran first, so they could only attend in that role (issue #3040). The invitation landing page now offers both role buttons to such members, and joining the waiting list takes the chosen role. The member's choice wins until they accept or join a waiting list, and a cancelled member can choose again. A role assignment requires a subscription to that role, and the role is written with the action it completes, so a refused request changes nothing. Single-role members keep the current flow.
Self check-in refused a role that differed from the invitation role, which trapped dual-role members who had been invited as a student at the door (issue #3040). The door choice now changes the role of an undecided invitation, written together with the check-in so a refused check-in changes nothing. The role must be one the member is subscribed to, and a member without subscriptions checks in in the role of their invitation. Invitations that are accepted or on a waiting list keep their role and get the existing message instead.
The invitation landing page split its row 8/4, leaving the attendance card cramped. Both columns now take 6 from the md breakpoint up.
mroderick
force-pushed
the
fix/dual-role-attendance-choice
branch
from
October 16, 2026 06:44
fdea0bb to
2a94bcb
Compare
mroderick
marked this pull request as ready for review
October 16, 2026 07:06
…d call Review feedback from Olle: == is the conventional choice for string comparison, and the record call wrapped better with one argument per line. No RuboCop rule covers the eql? preference, so this matches the convention by hand.
Collaborator
Author
|
The CI failure in Tests (Group 0) is a flake in the admin member search spec, unrelated to this PR. The search matches name and email with |
olleolleolle
approved these changes
Oct 16, 2026
olleolleolle
left a comment
Collaborator
There was a problem hiding this comment.
I made some style comments, nothing technically blocking!
A false save skipped WaitingList.add while the joined activity was still recorded and the success message still shown. The valid?(:waitinglist) call in create means a failing save is unexpected, so raise on it.
The role-choice rework dropped the parentheses around the locals list, so ActionView no longer parsed the magic comment and the partial accepted any locals again. Declare role and button_label with nil defaults and read them directly.
The workshop page button and the invitation form submit share the role label after the role-choice change, so the same click_on appears twice in these examples.
olleolleolle
approved these changes
Oct 19, 2026
davidmillen50
pushed a commit
to davidmillen50/planner
that referenced
this pull request
Oct 19, 2026
The admin member search spec is flaky: the search matches name and email with ILIKE '%Julie%', and the fabricated members draw random Faker names and emails. A draw containing "julie" (about 0.09% per member) turns the single expected match into two, the controller then renders the pick list instead of redirecting, and the path assertion fails. This showed up once in CI on PR codebar#3042 (Tests Group 0, 2026-10-16). Pinning the three fixtures makes the match deterministic.
This branch has not been deployed
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.
Fixes #3040
Summary
A member subscribed to a chapter as both student and coach could only attend in one role. The invitation email fixed the role to whichever invitation pass ran first, and self check-in refused the other role. This change lets the member choose the role at RSVP and at the door.
It is a short-term fix: I'm working on a proposal to change the data model a bit, to make it adapt to codebar, and not the other way around.
What changes
Review notes
Focus on the role-flip rules in
RoleChoiceConcernsand the check-in behaviour change.Risks: an accepted or waitlisted invitation must keep its role. A flip on a waitlisted invitation would corrupt the per-role waiting list, because the waiting list reads the role from the invitation.
Deliberately not done, to keep this small: the invitation email copy still carries the provisional role, a member on a waiting list must leave it before changing role, and the "no spots left" message is unchanged. Those go with the groups-removal proposal.
Detail
The workshop page already offered "Attend as a student" and "Attend as a coach" to dual-role members, and
WorkshopsController#rsvpalready flipped the invitation role to the member's choice. This change extends the same semantics to the surfaces where the bug bit: the invitation landing page that the email links to, the waiting-list join, and self check-in. The subscription rule makes the server enforce exactly what each surface's views offer.RoleChoiceConcernsholds the rule. The role can change while the invitation is undecided and the member is subscribed to the role they take. It stays fixed once the member accepts or once the invitation carries a waiting-list entry. The chosen role is evaluated against those rules and written with the action it completes.The waiting-list partial now takes the role and the button label as locals, so the chooser can render one join form per role. The student and coach join forms merged into one, which is the only visible change to the existing full-role flow.