feat: show Open for pending bugs and accept --status open

Closed
TJ
24d ago
+76-18

Why

The updated docs (docs.detail.dev) call unresolved bugs Open, but the CLI showed "Pending" and only accepted --status pending.

What

  • Human output labels the pending review state as Open (review_state_label). JSON output is unchanged and keeps the raw API value "pending".
  • detail bugs list --status accepts open (now the documented value and the default). pending still works as a hidden alias. Both parse to BugReviewState::Pending, so the CLI always sends status=pending and doesn't depend on the backend alias, which ships separately and may not be deployed yet.
  • Help text, the reopen message, and the close-state rejection message say "open". docs/HELP.md is regenerated with cargo xtask generate-help.
  • Unit tests cover the open→pending parse, serialization to "pending", the label, and CLI parsing of --status open and --status pending.

Notes:

  • bugs list has no status column, so the "Open" label shows up in bugs show (the Close row for a reopened bug) and anywhere else review_state_label is used.
  • Vulns are intentionally unchanged. The vulns CLI docs still use pending throughout. The app's Vulns filter says "Open", so we could align vulns in a follow-up if we want consistency.

Validation

  • cargo fmt --check: clean
  • cargo clippy -- -D warnings: pass. --all-targets has an unrelated existing failure in completions.rs:59, which CI doesn't run.
  • cargo test: 375 lib + 18 integration + 2 skills tests pass
  • cargo xtask check: openapi.json and docs/HELP.md up to date
  • Against prod (read-only), comparing a binary built from main with this branch:
    • bugs list detail --status open: before, invalid value 'open'. After, the same 313 bugs as --status pending.
    • bugs show <reopened bug>: Close Pending before, Close Open after. --format json still shows "state": "pending".

🤖 Generated with Claude Code