Skip to content

fix(companies): invited colleagues can sign up while the waitlist is on - #528

Merged
allisonmahmood merged 2 commits into
mainfrom
fix/526-invite-waitlist
Oct 4, 2026
Merged

allisonmahmood merged 2 commits into
mainfrom
fix/526-invite-waitlist

Conversation

@allisonmahmood

Copy link
Copy Markdown
Owner

While the waitlist is on, a colleague invited from /company couldn't create an account. The invitation link sent them to Patchy's /join with Clerk's invitation ticket, and Patchy never uses that ticket. So Clerk rejected their sign-up (sign_up_restricted_waitlist) and put them on the waitlist like a stranger. Closes #526; found while checking #481.

Invitations now carry no redirect URL. The emailed link opens Clerk's own sign-up page (sign-in for an existing account), which uses the ticket. Clerk then sends the person to the app's home URL. / sends anyone without a company to /join, where their invitation is waiting.

Signing up through the ticket marks the Clerk invitation accepted. Clerk refuses to revoke an accepted invitation (invitation_already_accepted), so revoke and resend now treat it like an already-revoked one. InvitationAlreadyRevoked is renamed InvitationNotPending to match. Patchy's own invitation still decides who joins.

I checked each Clerk behaviour on a throwaway app in Waitlist mode, deleted afterwards. The live Clerk test now follows the invitation link and expects the Account Portal's /sign-up with a ticket. Run against the development instance, it passes; the old /join link would fail it.

Made by Claude Opus 5.5 via Claude Code, reviewed by GPT 6.1 Sol via codex.

allisonmahmood and others added 2 commits October 4, 2026 23:57
Clerk's Waitlist mode admits a new person only with an invitation's
ticket. Patchy's invitations sent their link to /join, which never uses
the ticket, so an invited colleague ended up on the waitlist.

Invitations now carry no redirect, so the link opens Clerk's own sign-up
or sign-in page, which uses the ticket. Clerk then sends the person to
the home URL, and / takes a person without a company to /join. Signing up
accepts the Clerk invitation, so revoke and resend treat Clerk's
invitation_already_accepted like an already-revoked invitation.

Closes #526

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions github-actions Bot added area:server Touches the server area area:docs Touches the docs area size:s Under 100 changed lines labels Oct 4, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Codex review (GPT 6.1 Sol), two passes before the PR opened.

Triage trace (on the claim, before the fix): confirmed that /join keeps the ticket only inside the door's redirect_url, and nothing Patchy serves uses it. Without the redirect, / → /join?return=/ lists the invitation by email. Also flagged an edge that this PR handles: signing up now accepts the Clerk invitation, and Clerk refuses to revoke an accepted one. A throwaway Clerk app confirmed it: 400 invitation_already_accepted, and a fresh invitation to that existing account opens Clerk's /sign-in.

Review of the diff: no blockers or should-fix findings. One nit: the live assertion checked the path but not the origin, so a Patchy /sign-up redirect would have passed. Fixed in 8e39fa9, which compares against the Account Portal origin from Session.signInUrl.

@allisonmahmood
allisonmahmood merged commit 37bbab4 into main Oct 4, 2026
13 checks passed
@allisonmahmood
allisonmahmood deleted the fix/526-invite-waitlist branch October 4, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Touches the docs area area:server Touches the server area size:s Under 100 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(companies): invited colleagues cannot sign up while the waitlist is on

1 participant