feat(cli): add --as-superadmin flag to workspace list-remote#9043
Conversation
Wires the existing /workspaces/list_as_superadmin endpoint into the CLI so superadmins can enumerate every workspace on an instance from CI tooling, not just the ones the calling user is a member of. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploying windmill with
|
| Latest commit: |
34eea98
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://775104c1.windmill.pages.dev |
| Branch Preview URL: | https://cli-list-remote-as-superadmi.windmill.pages.dev |
|
Claude finished @rubenfiszel's task in 2m 9s —— View job PR reviewGood to merge — small, focused change; pagination matches the established CLI pattern (cf. FindingsNone at P0/P1. Optional notes (not worth blocking):
AGENTS.md complianceNo violations. No frontend or Rust code touched, so the Test coverageCLI command — no automated test infrastructure exists for these CLI subcommands in the repo, so no new tests are expected. The PR description's test plan covers the relevant manual scenarios. Manual verification before merge. The four checkboxes in the PR description are the right ones — exercise |
Adds an AGENTS.md note pointing to system_prompts/generate.py so future CLI command edits keep the agent-facing CLI docs in sync, and regenerates the auto-generated outputs for the new --as-superadmin flag. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
I've now thoroughly reviewed the diff, the API handler, the SDK function, and surrounding code patterns. Here's my assessment: Pi ReviewGood to merge This is a clean, focused change adding an Key points verified:
Test coverageCLI — the codebase does not generally have automated tests for CLI command handlers. No tests expected for this change. Manual verification
|
Codex ReviewGood to merge No findings. Checked the CLI diff, root Test coverageCLI-only change; no backend/frontend/CI automated test requirement applies directly here. Manual verification should cover |
|
I've now reviewed the full diff, the backend handler, the SDK usage in Pi ReviewGood to merge This is a clean, focused change adding AGENTS.md complianceNo violations. The CLI change follows existing conventions and the regeneration rule is satisfied. Test coverageCLI command — the codebase does not have automated test infrastructure for CLI subcommand handlers. No new tests are expected. Manual verificationThe four checkboxes in the PR description are the right ones:
|
Summary
wmill workspace list-remoteonly shows workspaces the caller is a member of (listUserWorkspaces). The instance-wide list endpoint/workspaces/list_as_superadminexists in the API and SDK but wasn't wired into the CLI.--as-superadmintolist-remote. When set, callslistWorkspacesAsSuperAdmin(paginated, 100 per page until exhausted) and renders id / name / owner / fork-of. Falls through to the existing per-user path otherwise.Note: for the CI "create-if-missing" use case,
wmill workspace add --createis already idempotent and usually the right primitive — this flag is for when you actually need to enumerate (audit, drift detection, etc.).Test plan
wmill workspace list-remote --as-superadmin --base-url ... --token <superadmin-token>lists every workspace on the instancewmill workspace list-remote(no flag) still shows the user-scoped list andLogged in as:line🤖 Generated with Claude Code
Summary by cubic
Adds a new --as-superadmin flag to the
wmill workspace list-remotecommand so superadmins can list every workspace on an instance. Also regenerates CLI prompts and documents the regen step to keep agent-facing docs in sync.--as-superadminuseslistWorkspacesAsSuperAdminwith pagination (100/page) until all are fetched.system_prompts/*,cli/src/guidance/skills.gen.ts) and added anAGENTS.mdnote to runpython system_prompts/generate.pyafter CLI changes.Written for commit 34eea98. Summary will update on new commits.