Repository navigation
Invite: offer Add a seat when every paid seat is taken - #2135
Merged
Merged
Conversation
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 24, 2026 17:51
An organization that pays for each member holds only the seats it bought, so inviting one more person needs another seat. The Invite dialog read that refusal as an ordinary failure. Now a SEAT_REQUIRED refusal shows the server's sentence and, for an owner or an admin, one Add a seat button to addSeatUrl in place of Invite. The invitation being written is kept in the tab, and back on the organization's settings the dialog opens again with the address and role as they were, ready to send.
davidmckayv
force-pushed
the
seat-required-screens
branch
from
November 24, 2026 20:35
655bd32 to
f4b6fcc
Compare
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.
On OpenBot Cloud's per-member plan an organization holds only the seats it paid for. Once it has paid, inviting one more person needs another seat, and the Invite dialog said "That couldn't be done just now. Try again." for good. This is the screen side.
Built on #2133 (the spec:
SEAT_REQUIREDandaddSeatUrl), whose commit this branch carries until it merges.What changed
SEAT_REQUIREDrefusal shows the server's sentence ("Each member is $5 a month. Add a seat to invite someone.") in the body's text colour, and for an owner or an admin one Add a seat button toaddSeatUrlin place of Invite. The address and role stay typed. Editing the address clears the refusal and brings Invite back. With noaddSeatUrl(someone who can't add a seat), the sentence shows and Invite stays.addSeatUrlis OpenBot's own address, it is givenreturnTopointing at the organization's settings, as the add-a-card address takes it.Dialog,ButtonandbuttonVariantslink, the same way the plan dialog's Add a card is drawn. No new package.New:
app/src/lib/organizations/seat.ts(reading the refusal, the Add a seat address, keeping and taking the draft invitation).Test
app/tests/organization-invitations.test.tsx, "with every paid seat taken, the invitation says what a member costs and offers Add a seat, and back from adding it, Invite sends it": the fake server answers the invite call with the spec's 402SEAT_REQUIREDproblem. The test checks the sentence, no "try again", the Add a seat link (toaddSeatUrl, coming back to the organization's settings), no Invite button, nothing invited; then, with a seat added, coming back opens the dialog with the address kept, and Invite sends it.Unable to find an accessible element with the role "link" and name "Add a seat").Checked
no-intelligence,no-reload-the-page,plain-setup-words,no-composio,no-retired-page-names) and the client boundary pass.