Skip to content

feat: CLI hide accepted invitations from zitadel invitation list by default - #3083

Merged
vitorbari merged 14 commits into
2859-cli-invitation-analyticsfrom
2853-cli-invitation-list-contract
Nov 16, 2026
Merged

vitorbari merged 14 commits into
2859-cli-invitation-analyticsfrom
2853-cli-invitation-list-contract

Conversation

@vitorbari

@vitorbari vitorbari commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #2932 — merge after it.

Summary

Hides accepted invitations from zitadel invitation list by default, as the console does, using the repeatable status filter #3072 added (#2853).

  • invitation list: --status is repeatable and defaults to pending, expired and rejected; the server filters, so paging stays exact. A footer says accepted invitations are left out and how to list them.
  • invitation cancel without an id picks from pending and declined invitations, and its hints list both statuses.
  • SKILL.md and a @zitadel/cli changeset.

🤖 Generated with Claude Code

vitorbari and others added 7 commits November 13, 2026 11:09
Lookup names the inviter; decline refuses the inviter (inv.self_reject) and
accept a creator who lost admin (inv.inviter_not_admin). Invitations carry
rejected_at and keep metadata on decline, cancel removes a declined one, and
the list takes a repeatable status filter and expand=inviter. Amends ADR 086.

The redeem handlers stay stubs, and the list answers 501 for several statuses
or expand, until the implementation lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	apps/api/internal/api/generated/oas_handlers_gen.go
#	apps/api/internal/api/generated/oas_schemas_gen.go
#	apps/api/internal/api/generated/oas_server_gen.go
#	apps/api/internal/api/generated/oas_unimplemented_gen.go
#	packages/go/api/oas_client_gen.go
#	packages/go/api/oas_schemas_gen.go
…etadata

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No guard in the server limits lookup, accept or reject; the edge does, so
per ADR 078 §7 they declare no 429. Amends ADR 086.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…onded_at

One who and when for accept and decline; status says which. Replaces
accepted_by, accepted_at and rejected_at, and amends ADR 086.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cli-invitation-list-contract

# Conflicts:
#	docs/adrs/086-invitations.md
Follows the contract in #3072: --status is repeatable and defaults to
every status but accepted, as the console does; invitation get reports
responded_by and responded_at; invitation cancel also removes a declined
invitation, without sending invitation_cancelled for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 13, 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 16, 2026 11:35pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦋 Changeset detected

Latest commit: cefbd6a

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

This PR includes changesets to release 27 packages
Name Type
@zitadel/cli Minor
@zitadel/testing Minor
@zitadel/server 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

…-list-contract

Carries the invitation specs and mock onto #3072's contract: the mock
reads every repeated status, answers responded_by and responded_at, and
cancels a declined invitation; specs cover the default that leaves
accepted invitations out, a repeated --status, and removing a declined
invitation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vitorbari vitorbari changed the title feat: hide accepted invitations from zitadel invitation list by default feat: CLI hide accepted invitations from zitadel invitation list by default Nov 15, 2026
…-list-contract

The invitation contract landed on main, so the API, ADR and generated
files take main's versions and this branch keeps only the CLI changes:
the list's default statuses and repeated --status, and the cancel picker
offering declined invitations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vitorbari
vitorbari marked this pull request as ready for review November 16, 2026 18:43
Copilot AI balanced review requested due to automatic review settings November 16, 2026 18:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The default filter hides accepted invitations without an explanatory hint in empty output, and generated CLI samples for unfiltered API requests silently omit them.

2 open issues
What changed in this PR

Aligns CLI invitation listing with the console by hiding accepted invitations by default, while preserving server-side filtering and pagination.

Changes:

  • Makes --status repeatable, defaulting to pending, expired and rejected invitations.
  • Includes declined invitations in the cancellation picker and related hints.
  • Updates tests, command documentation, agent guidance and release notes.
File Description
apps/​cli/​tests/​unit/​lib/​backend/​services/​invitation.test.ts Checks the pending-and-rejected cancellation query.
apps/​cli/​tests/​unit/​cli/​commands/​invitation/​cancel.test.ts Updates expected cancellation hints.
apps/​cli/​tests/​integration/​invitation-list.spec.ts Tests default exclusion and repeated status filters.
apps/​cli/​tests/​helpers/​project.ts Explicitly requests every invitation status.
apps/​cli/​src/​lib/​backend/​services/​invitation.ts Fetches pending and declined cancellation candidates.
apps/​cli/​src/​cli/​commands/​invitation/​list.ts Adds repeated filters, default statuses and explanatory text.
apps/​cli/​src/​cli/​commands/​invitation/​create.ts Uses array-valued status flags in follow-ups.
apps/​cli/​src/​cli/​commands/​invitation/​cancel.ts Expands the picker and hints to include declined invitations.
apps/​cli/​skills/​zitadel-cli/​SKILL.md Documents listing defaults and invitation behavior.
apps/​cli/​README.md Refreshes generated command documentation.
apps/​cli/​command-reference.json Updates generated flag and command metadata.
.changeset/​cli-invitation-list-contract.md Adds a CLI minor-release note.

Review effort: Balanced

vitorbari and others added 2 commits November 16, 2026 18:49
A list that found nothing drops its footer, so the empty message carries
the hint. The docs' sample for an unfiltered invitation list names every
status, since the command alone leaves accepted ones out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Repeated --status values are forwarded without deduplication, causing otherwise valid invitation list requests to fail the server’s uniqueItems validation.

1 open issue
2 resolved since last review

Review effort: Balanced

const listed = await invitationService.page(
{
status: flags.status === undefined ? undefined : [flags.status],
status: [...(flags.status ?? OPEN_STATUSES)],
The invitation analytics now stack on top of this branch instead of under
it, so this branch keeps only the list's default statuses and the cancel
flow: the read before the question, the refusal of an accepted or expired
invitation, and the picker offering declined ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vitorbari
vitorbari merged commit cefbd6a into main Nov 16, 2026
9 of 11 checks passed
@vitorbari
vitorbari deleted the 2853-cli-invitation-list-contract branch November 16, 2026 23:31
@github-project-automation github-project-automation Bot moved this from Inbox to Done in Engineering Kanban Nov 16, 2026
@vitorbari

Copy link
Copy Markdown
Contributor Author

Replaced by #3176: the order is inverted, so the list and cancel-flow changes merge first and the analytics stack on top. GitHub shows this one as merged because its head is now part of the analytics branch.

This branch was successfully deployed

1 active deployment
Preview — cefbd6a5 Deployed Nov 16, 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