Skip to content

feat(console): invite colleagues to a project by link and accept or decline an invitation - #2978

Merged
peintnermax merged 18 commits into
mainfrom
console-invitations
Nov 24, 2026
Merged

peintnermax merged 18 commits into
mainfrom
console-invitations

Conversation

@peintnermax

@peintnermax peintnermax commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Context

Summary

  • Project Settings → Members (/project/members, beside General): the former Admins page with two tabs, Members and Invitations (?tab=invitations), and Invite member on the tabs' row. Invitations is a table of the project's pending, expired and declined invitations (name, role, inviter, status), newest first with Load more, and an empty state. Accepted ones are left out, as ADR 086 has it: the person is a row of the Members tab.
  • Invite member dialog: optional name and a role (admin, editor, viewer); the link is shown once, inside a message to copy.
  • Row actions by status: a pending row offers Regenerate link (a create with replaces_invitation_id, then the new link) and Cancel invitation; an expired row Regenerate link and Remove invitation; a declined row Remove invitation only. Each sits behind a confirmation in its own words. A declined row keeps its name and shows the day it was declined (responded_at).
  • Invitation page at /invitations/accept, outside the _authed guard: who invited you, the role and the expiry, with Join project and Decline invitation, plus the declined and unavailable states. A signed-out visitor goes to /login?next=/invitations/accept. inv.not_found and inv.inviter_not_admin both end in Invitation unavailable and clear the token; other refusals (inv.self_accept, inv.self_reject) show the API's message and keep it.
  • Inviter: the invitation page and the list (expand=inviter) show the inviter user-ref the server resolves (display, then identifier, then user_id) and never read a user by id; a link a project secret made shows none.
  • Token handling: the token moves from the link's fragment into sessionStorage before the app boots (the entry's first import), also when the link is reopened in a tab already on the page. It is cleared on accept, decline, an unknown token and sign-out, and never reaches a query string.
  • Analytics: invitation_created, invitation_accepted, invitation_rejected and, for a pending link that is cancelled, invitation_cancelled, each with role and invitation_journey_id, listed in product-analytics-events.yaml. The cloud add-on leaves the invitation page out of its page views and Speed Insights.
  • Shared pieces: InputGroup from the shadcn registry (new-york track), and cancel / variant props on ConfirmDialog.

Validation

  • turbo run typecheck test lint build --filter=@zitadel/console (1062 tests), after merging main
  • node scripts/check-pr-title.mjs --title "…"
  • Against a real server built from this branch (turbo run dev:claim --filter=@zitadel/console, a registered user, the seeded project claimed): two named links created; the list request carries status=pending&status=expired&status=rejected&expand=inviter and each row names the inviter; a second user signs up through a link (sent to /login?next=/invitations/accept with no token in the address), declines one and accepts the other; the list then shows the declined row with its name and date and no accepted row; Remove invitation answers 204 and the table is empty.
  • Earlier on this branch, before the API merge: Regenerate link, Cancel invitation, the inviter refused accepting and declining their own link, and the spent-link state.
  • Not rerun after the last merge of main: the real-server pass (the row-menu change is covered by the spec) and the cloud-console tests (unchanged files).

Release notes / changeset

  • Changeset: .changeset/console-invitations.md — @zitadel/server minor — project invitations in the console

Notes

🤖 Generated with Claude Code

peintnermax and others added 2 commits November 11, 2026 09:22
…ecline an invitation

Adds an Invitations tab to the project page (create, regenerate, cancel),
the invitation page a link opens (/invitations/accept), and the
invitation_created, invitation_accepted and invitation_rejected events.

The token moves from the link's fragment into sessionStorage before the app
boots, and the cloud add-on leaves the invitation page out of its page views.

Refs #2855, #2856, #2859. Follows ADR 086.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Resolves conflicts with the project page's General tab, the Empty component
main added, and the generated route tree.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cloud Ready Ready Preview Nov 24, 2026 7:56am UTC

Request Review

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🦋 Changeset detected

Latest commit: 9a9b770

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 27 packages
Name Type
@zitadel/server Minor
@zitadel/cli Minor
@zitadel/testing Minor
@zitadel/server-darwin-arm64 Minor
@zitadel/server-darwin-x64 Minor
@zitadel/server-linux-arm64 Minor
@zitadel/server-linux-x64 Minor
@zitadel/server-win32-x64 Minor
@zitadel/api Minor
@zitadel/components Minor
@zitadel/config Minor
@zitadel/sdk-angular Minor
@zitadel/sdk-core Minor
@zitadel/sdk-next Minor
@zitadel/sdk-nuxt Minor
@zitadel/sdk-qwik Minor
@zitadel/sdk-qwik-router Minor
@zitadel/sdk-react Minor
@zitadel/sdk-solid Minor
@zitadel/sdk-solid-start Minor
@zitadel/sdk-svelte Minor
@zitadel/sdk-sveltekit Minor
@zitadel/sdk-tanstack-start Minor
@zitadel/sdk-vue Minor
@zitadel/cloud Patch
@zitadel/client-sdk-contract Patch
@zitadel/server-sdk-contract Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

peintnermax and others added 3 commits November 12, 2026 13:14
main split the project page into a Settings list, so Invitations is now the
page /project/invitations beside General and Admins.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The lookup resolves the inviter as a user-ref, since the invited person cannot
read the project's users. The page shows it as it arrives.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…e Members page

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…w screen

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@vitorbari

Copy link
Copy Markdown
Contributor

@peintnermax, the list of actions per invitation status should be:

  • Pending: Regenerate and Cancel
  • Expired: Regenerate and Remove, labelled "Remove" rather than "Cancel" because the link is already dead
  • Declined: Remove only

peintnermax and others added 2 commits November 23, 2026 09:50
# Conflicts:
#	docs/product-analytics-events.yaml
…ancelled link

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@peintnermax

Copy link
Copy Markdown
Member Author

@vitorbari Pending and Declined now match your list: a pending row offers Regenerate link and Cancel invitation, a declined row only Remove invitation.

Expired still has Regenerate link only. Remove can't work yet: DELETE /invitations/{invitation_id} deletes pending and rejected invitations and answers an expired one with the opaque 404 (its description says expired rows stay until the cleanup job, and DeleteCancellableInvitation skips them).

Could the server delete an expired invitation too? Once it does, Remove on an expired row is a one-line addition here. Or, if expired rows should stay until the cleanup job, should the expired row keep Regenerate link only?

@vitorbari

Copy link
Copy Markdown
Contributor

@peintnermax ,

sure. I will update DELETE /invitations/{invitation_id} to allow for deleting expired invitations too: #3246

peintnermax and others added 3 commits November 24, 2026 08:31
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…le and the row menu in its own file

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
peintnermax and others added 2 commits November 24, 2026 08:39
…and size an invitation's name like a member's

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…s catalog

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…t is shown

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@peintnermax
peintnermax added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit a106883 Nov 24, 2026
17 checks passed
@peintnermax
peintnermax deleted the console-invitations branch November 24, 2026 08:02
@github-project-automation github-project-automation Bot moved this from Inbox to Done in Engineering Kanban Nov 24, 2026
cursor Bot pushed a commit that referenced this pull request Nov 24, 2026
Main shipped Project Settings → Members with Invite member and
/invitations/accept (#2978, #3066). Drop the outdated not-shipped
callout, lead with the console path, and stop pointing at Add admin.

Co-authored-by: Silvan <adlerhurst@users.noreply.github.com>

This branch was successfully deployed

1 active deployment
Preview — 9a9b770c Deployed Nov 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants