Hive Hive
Sign in

feat(server): add copy invite link to members dashboard

GitHub issue · Closed

Metadata
Source
tuist/tuist #11493
Updated
Jul 5, 2026
Details

What changed

Adds a “Copy invite link” action to each pending invitation’s dropdown in the organization Members dashboard (alongside “Revoke invite”). It copies the acceptance URL <server>/auth/invitations/<token> to the clipboard.

Why

Organization member invitations create a valid invitation row and token regardless of whether outbound mail is configured — only the notification email is gated behind Environment.mail_configured?() (accounts.ex:1134). On a self-hosted instance without Mailgun/SMTP, the invite is created but the invitee never gets the acceptance link, so they stay stuck “pending” with no way to join.

The CLI already prints this link (tuist organization invite → “You can also share with them the invite link directly: …”), so admins on air-gapped instances had a path — but the dashboard had no equivalent. The invitations table only exposed “Revoke invite”. This PR closes that gap so the dashboard matches the CLI.

This came out of a self-hosted alpha user report: with TUIST_SKIP_EMAIL_CONFIRMATION=true signup works offline, but dashboard-created invitations were a dead end because no email is sent and the link wasn’t surfaced anywhere.

How it works

  • Reuses the existing Clipboard phx-hook — the same pattern used for the Connect command snippet and the SCIM token copy button — via phx-hook="Clipboard" + data-clipboard-value.
  • Builds the URL with url(~p"/auth/invitations/#{invitation.token}"), the exact route the email and CLI use. The token is already preloaded on each invitation, so there are no query or data-loading changes.
  • Shown unconditionally (not gated on mail_configured?), matching the CLI which always prints the link. Consistent with the existing trust model: anyone with invitation_read (org admins) can already view and revoke these invitations, and the CLI already returns the token to the inviter.

User/developer impact

  • Self-hosted instances without SMTP/Mailgun can now onboard org members entirely through the dashboard: invite → copy link → share → invitee signs up (works via TUIST_SKIP_EMAIL_CONFIRMATION) and opens the link to accept.
  • No behavior change for hosted/tuist.dev users beyond an extra convenient “copy link” action.

Validation

  • mix test test/tuist_web/live/members_live_test.exs8 tests, 0 failures, including a new test asserting the invitations tab renders the copy element with the acceptance URL.
  • mix format --check-formatted on the changed files → clean.
  • Translatable string "Copy invite link" extracted into dashboard_account.pot (template only; no .po files touched, per the gettext workflow).

How to test locally

  1. Run the server without mail configured (no Mailgun key / SMTP), e.g. a fresh dev instance.
  2. As an org admin, go to Members → Invitations, invite an email address.
  3. Open the new invitation’s menu → Copy invite link.
  4. Paste the link — it should be <server>/auth/invitations/<token>. Opening it while logged in as the invitee (matching email) lets them accept without any email being sent.
Flights

Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.

New Flights are paused Configure model inference, GitHub, and a sandbox provider to start another Flight. Existing results remain available below.
No Flights yet

Start a Flight and preserve its objective, outcome, and session here.

Comments

No GitHub comments yet.