Repository navigation
Conversation
Invites are stateless signed tokens, so the limit never had anything to count against. Put an optional usage limit (invite/usagesLeft) in the signed payload, so it cannot be raised, and record the agents that accepted a token on the server. Reject further agents with 'This invite has no usages left'; an agent that already accepted may open the link again for free. The invite preview reports the places left. The Permissions & Invites form gets a 'Limit how many people can use this link' option. Browser-peer invites never reach a server and refuse a limit.
…ion opens it The Share dialog's open-source invite link gets a compact "Limit uses" control signed through the existing maxUsages plumbing. The resource action now opens the dialog (via a module-level host, like the search overlay) instead of the old Permissions & Invites page, whose Create Invite form is removed. The editor-seat hint moves into the dialog.
joepio
force-pushed
the
claude/invite-usage-limit
branch
from
October 8, 2026 09:27
f202698 to
bf01271
Compare
joepio
added a commit
that referenced
this pull request
Oct 8, 2026
Combines #2123, #2127, #2133, #2134, #2135, #2136, #2138, #2140, #2141, #2142, #2143, #2147, #2149, #2132, #2121, #2129, #2146 and #1870. Includes fixes for the combination: Dagger mount for the form validation cases, drive mapping list without the flush sentinel, web_time in search, sidebar resize test at the touch bar height.
Member
Author
|
Landed on develop through the batch #2153 (d102056), with this PR's head unchanged. Closing as merged. Generated by Claude Code |
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.
Requested by Joep · project thread
Before: An invite link could be used by any number of people, because invites are stateless signed tokens and the server never counted acceptances. The "Permissions & Invites" action opened an old page with its own invite form, separate from the Share dialog.
After: The Share dialog's link invite (self-hosted servers) has a "Limit uses" control. The limit is signed into the token, so a recipient cannot raise it, and the server records which agents accepted and refuses further ones with "This invite has no usages left. Ask for a new one." The invite page shows that message once the link is used up. An agent that already accepted can reopen the link without using a place. The "Permissions & Invites" action now opens the Share dialog (renamed "Share"), and the old Create Invite form is removed; the hosted editor-seat hint moved into the dialog.
Reported by a self-hoster on Discord.
How:
max_usagesin the signed payload (server/src/invite_token.rs), acceptances inTree::PluginMetabehind a mutex, checked inserver/src/plugins/invite.rsbefore rights are granted.generateInviteToken(..., maxUsages), newcomponents/Share/UsageLimit.tsx, action opens the dialog throughshareDialogState.tsandShareDialogHost.docs/src/invitations.md.Limits: the count is per accepting server; browser-peer invites cannot carry a limit; hosted email invites and the quick-copy link stay unlimited. de, es and fr translations are empty. The
/app/shareroute still exists for deep links (the e2e specs use it) and is now redundant. Playwright e2e was not run;makeDrivePublicand the share-menu test were edited to go through the dialog and are untested. Screenshots (desktop and 390px) are shared in the project thread, not committed.Tests: Rust (token roundtrip and tamper, limit enforcement, two agents against a one-use invite), vitest in
browser/liband the Share components.