Scope templates --status flag to the list subcommand

Merged
RO
5mo ago
+37-17

Summary

The --status filter was registered as a persistent flag on the templates command group, so Cobra propagated it onto every subcommand — construct, show, create, update, delete, construction — where it has no meaning and is silently ignored.

This moves it to a local flag on templates list, the only command that actually uses it.

Context

Surfaced while validating #454 (templates construct returns Bad Request). The reporter suspected this stray --status flag was being sent in the construct POST body and causing the 400. It is not — the flag is never read by construct and never enters any request body. The real cause of #454 is an SDK bug (flat request body missing the project envelope), tracked in basecamp/basecamp-sdk#354.

So this change is purely a cosmetic UX cleanup: the flag no longer clutters the help of commands that don't support it.

Verification

  • --status now appears only under templates list --help, and is gone from templates construct --help (and the other subcommands).
  • .surface snapshot updated: the 7 spurious templates … --status entries removed, templates list --status retained.
  • gofmt, go vet, internal/commands unit tests, skill-drift, and smoke-coverage checks all pass.

Refs #454


Summary by cubic

Scoped the --status flag to templates list only and removed it from other templates subcommands. Added validation to accept only empty, active, archived, or trashed; grouped the acknowledged removals under the .surface-breaking FLAG section; retargeted the e2e test to templates list --status and added an invalid-value failure case.