Add CLI and TUI trash and spam actions

Merged
RO
3mo ago
+369-7

Summary

  • add bulk hey trash <id>... and hey spam <id>... commands backed by the typed HEY SDK posting operations
  • explain the safe shared-thread behavior: Trash removes your access rather than deleting a shared thread for everyone
  • add s as the TUI action for marking the selected thread as spam, alongside the existing t Trash action
  • remove completed Trash/Spam actions from the current TUI box and show a confirmation notice through the existing stale-safe posting action flow
  • update root help, command metadata, README, embedded skill, API coverage, and the public surface baseline
  • add CLI endpoint/body/summary/error tests, TUI endpoint/state/help coverage, and a disposable-thread smoke test

Validation

  • make check
  • make race-test
  • smoke test package compilation
  • local build and rendered CLI help/command metadata
  • authenticated CLI Trash validation against a dedicated disposable hey-cli thread
  • verified the thread left Imbox and appeared in Trash
  • authenticated TUI render confirmed the t trash and s spam actions in the help bar

Spam was not invoked against the real account because it trains HEY's filters; its request and state transitions are covered by the SDK-backed unit/TUI tests.


Summary by cubic

Add bulk CLI actions to move threads to Trash or mark them as spam, and TUI shortcuts to trigger them. Previously unavailable; now trashing a shared thread removes your access, and marking spam moves the thread to Spam and trains filters.

  • Implements hey trash <id>... and hey spam <id>... in separate commands (internal/cmd/trash.go, internal/cmd/spam.go); adds both to curated help and root.
  • Uses SDK endpoints POST /postings/trash.json and /postings/spam.json; TUI binds t โ†’ Trash and s โ†’ Spam in the existing posting flow, removing items from the current box with a confirmation notice.
  • CLI requires auth, validates at least one numeric ID from hey box --json, and returns concise summaries (styled and --json).
  • Docs updated (README.md, skills/hey/SKILL.md, .surface, API-COVERAGE.md). Tests cover endpoints, args/usage, TUI state/help; smoke test exercises Trash only to avoid spam filter training.