Add CLI and TUI trash and spam actions - #175
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds bulk Trash/Spam CLI actions and TUI spam support through the typed HEY SDK.
Changes:
- Adds authenticated
trashandspamcommands with bulk-ID support. - Adds TUI spam handling and posting-state updates.
- Updates documentation, command metadata, coverage records, and tests.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.surface |
Records the new public commands. |
API-COVERAGE.md |
Documents Trash and Spam endpoints. |
README.md |
Documents CLI and TUI actions. |
skills/hey/SKILL.md |
Adds agent guidance and examples. |
internal/cmd/help.go |
Adds commands to curated help. |
internal/cmd/help_test.go |
Updates help expectations. |
internal/cmd/root.go |
Registers both commands. |
internal/cmd/trash.go |
Implements Trash and Spam commands. |
internal/cmd/trash_test.go |
Tests requests, validation, and failures. |
internal/tui/mail.go |
Adds the TUI spam action. |
internal/tui/mail_test.go |
Tests TUI endpoint and help behavior. |
tests/smoke/trash_test.go |
Smoke-tests Trash and validation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hey trash <id>...andhey spam <id>...commands backed by the typed HEY SDK posting operationssas the TUI action for marking the selected thread as spam, alongside the existingtTrash actionValidation
make checkmake race-testt trashands spamactions in the help barSpam 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.
hey trash <id>...andhey spam <id>...in separate commands (internal/cmd/trash.go,internal/cmd/spam.go); adds both to curated help and root./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.hey box --json, and returns concise summaries (styled and--json).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.Written for commit 236d453. Summary will update on new commits.