Skip to content

feat(users): add bulk user deletion command#83

Merged
jaxxstorm merged 2 commits intomainfrom
delete_devices
Apr 15, 2026
Merged

feat(users): add bulk user deletion command#83
jaxxstorm merged 2 commits intomainfrom
delete_devices

Conversation

@jaxxstorm
Copy link
Copy Markdown
Owner

Adds delete users with filtering, dry-run/confirm behavior, tests, and parity/spec updates.

Signed-off-by: Lee Briggs lee@leebriggs.co.uk

Adds delete users with filtering, dry-run/confirm behavior, tests, and parity/spec updates.

Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
Copilot AI review requested due to automatic review settings April 15, 2026 14:45
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7d5fd1c26e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/tscli/delete/users/cli.go Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new bulk tscli delete users command to support filter-driven multi-user deletion with a dry-run default, updates OpenAPI parity mappings/specs, and extends CLI test coverage/documentation to include the new command.

Changes:

  • Introduce tscli delete users with validated filters (--status, --last-seen, --devices), admin safeguards (--admins), and --confirm for mutations.
  • Extend CLI parity + example-output tests and refresh API mock fixtures to support bulk-user deletion flows.
  • Update OpenAPI command-operation mappings and add/extend spec documents describing the bulk deletion workflow.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/cli/testdata/leaf_commands.txt Adds delete users to the leaf-command manifest coverage list.
test/cli/parity_new_commands_test.go Adds mocked-API tests for dry-run vs confirmed bulk deletion; adds validation expectations.
test/cli/example_output_test.go Adds output-shape coverage for delete users in example-output suite.
pkg/contract/openapi/command-operation-map.yaml Maps delete users to list-users + per-user delete operations for parity.
openspec/specs/openapi-command-parity/spec.md Updates parity spec to explicitly cover bulk user deletion workflow.
openspec/specs/bulk-user-deletion/spec.md New spec defining behavior, validation, safeguards, and output expectations.
openspec/changes/archive/2026-04-15-add-delete-users-command/tasks.md New archived change record/tasks checklist for the feature.
openspec/changes/archive/2026-04-15-add-delete-users-command/specs/openapi-command-parity/spec.md Archived spec delta for parity requirements.
openspec/changes/archive/2026-04-15-add-delete-users-command/specs/bulk-user-deletion/spec.md Archived spec delta for bulk-user deletion requirements.
openspec/changes/archive/2026-04-15-add-delete-users-command/proposal.md Archived proposal describing motivation and impact.
openspec/changes/archive/2026-04-15-add-delete-users-command/design.md Archived design notes for command behavior and safety model.
openspec/changes/archive/2026-04-15-add-delete-users-command/.openspec.yaml Adds openspec metadata for the archived change.
internal/testutil/apimock/fixtures.go Expands user fixtures and adds a suspended user to enable filtering scenarios.
docs/commands/tscli_delete_users.md Generated docs page for the new delete users command.
docs/commands/tscli_delete.md Adds delete users to the delete command group docs.
docs/commands/_sidebar.md Adds delete users to docs sidebar navigation.
docs/commands/README.md Adds delete users to docs README command index.
cmd/tscli/delete/users/cli_test.go Adds unit tests for filter validation, candidate selection, and dry-run/confirm behavior.
cmd/tscli/delete/users/cli.go Implements the bulk deletion command, filtering, and structured summary output.
cmd/tscli/delete/devices/cli_test.go Adds validation coverage for rejecting unexpected positional args.
cmd/tscli/delete/devices/cli.go Enforces cobra.NoArgs to reject positional args.
cmd/tscli/delete/cli.go Registers the new delete users command under the delete command group.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/tscli/delete/users/cli_test.go
Comment thread cmd/tscli/delete/users/cli.go Outdated
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
@jaxxstorm jaxxstorm merged commit de09744 into main Apr 15, 2026
1 check passed
@jaxxstorm jaxxstorm deleted the delete_devices branch April 15, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants