Skip to content

improvement(cli): files batch-delete takes file ids as arguments - #9518

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/files-batch-delete-positional
Oct 31, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
fix/files-batch-delete-positional

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • sim files batch-delete <id> <id> --yes now works: the ids may follow the command as arguments, exactly like rm, as well as through --file-ids
  • Agents (Mothership's in-process CLI and coding agents on the public CLI) most often write the positional form; it failed with required option '--file-ids <value...>' not specified and cost a retry or a --help round trip
  • New trailing flag spec: one list field per command may also take trailing arguments. Values fold into the list flag before the request is built, so @path manifests, validation and the --yes gate apply unchanged; passing both forms is refused, and a missing value still fails with --file-ids is required
  • Enabled only for files batch-delete; every other command's parsing is unchanged
  • Regenerated the CLI docs (usage line, argument row, and --file-ids now reads "required, or pass the values as arguments")

Type of Change

  • Improvement

Testing

  • New packages/sim-cli/src/runtime/trailing-list.test.ts through runEmbeddedCli (the path Mothership uses), capturing the real request: positional ids send the same body as --file-ids; both forms, and neither, are refused before any request; the --yes confirmation still applies. 3/3 pass; with trailing removed all 3 fail
  • Related sim-cli suites (build, options, execute, request, commands, reference, embed isolation): 122/122 pass
  • bun run lint, check:cli-api, check:cli-docs, check:openapi, check:mcp-operations, check:utils, check:comment-hygiene, check:test-patterns, check:explicit-any, check:file-names, check:source-conventions
  • Type-check, full check:audits and the test suites run in CI

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Ready Ready Preview Oct 31, 2026 9:03am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the latest docs baseline update matches the changed examples.

Summary

sim files batch-delete now accepts file IDs as arguments or through --file-ids.

  • File batch deletion accepts IDs after the command or through its flag.

Reviews (2) · Last reviewed commit: "chore(docs): record the batch-delete usa..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 9 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

Docs compatibility: this PR intentionally changes one public code example, the sim files batch-delete usage line ([options] to [file-ids...] [options]), on cli/files.mdx and cli/reference.mdx. Per apps/docs/ARCHITECTURE.md, the frozen baseline is not regenerated; only those two fence entries (hash and byte count) are updated. The update asserted that each old entry is the previous usage line and that the new text reproduces the compiler's hash. content:verify-compatibility passes with 0 lost routes, 0 lost anchors and no other changed examples.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 10 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit e0b3427 into staging Oct 31, 2026
71 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/files-batch-delete-positional branch October 31, 2026 17:45

This branch was successfully deployed

1 active deployment
Preview — aa562585 Deployed Oct 31, 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

None yet

Development

Successfully merging this pull request may close these issues.

1 participant