Repository navigation
feat: CLI hide accepted invitations from zitadel invitation list by default - #3083
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: cefbd6a The changes in this PR will be included in the next version bump. This PR includes changesets to release 27 packages
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>
…-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>
There was a problem hiding this comment.
🟡 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
--statusrepeatable, 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
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>
| 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>
|
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. |

Depends on #2932 — merge after it.
Summary
Hides accepted invitations from
zitadel invitation listby default, as the console does, using the repeatablestatusfilter #3072 added (#2853).invitation list:--statusis repeatable and defaults topending,expiredandrejected; the server filters, so paging stays exact. A footer says accepted invitations are left out and how to list them.invitation cancelwithout an id picks from pending and declined invitations, and its hints list both statuses.@zitadel/clichangeset.🤖 Generated with Claude Code