Add CLI and TUI trash and spam actions
Merged
RO
3mo ago+369+369+012345678901234567890123456789-7-7-0123456789
Summary
- add bulk
hey trash <id>...andhey 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
sas the TUI action for marking the selected thread as spam, alongside the existingtTrash 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 checkmake 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 trashands spamactions 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>...andhey 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.jsonand/postings/spam.json; TUI bindstโ Trash andsโ 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.