Skip to content

Add CLI and TUI trash and spam actions - #175

Merged
robzolkos merged 2 commits into
mainfrom
feature/email-trash-spam
Aug 19, 2026
Merged

Add CLI and TUI trash and spam actions#175
robzolkos merged 2 commits into
mainfrom
feature/email-trash-spam

Conversation

@robzolkos

@robzolkos robzolkos commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

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.

Written for commit 236d453. Summary will update on new commits.

Review in cubic

Copilot AI balanced review requested due to automatic review settings August 19, 2026 05:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds bulk Trash/Spam CLI actions and TUI spam support through the typed HEY SDK.

Changes:

  • Adds authenticated trash and spam commands 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.

Comment thread internal/cmd/trash.go Outdated
Copilot AI review requested due to automatic review settings August 19, 2026 05:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.

@robzolkos
robzolkos merged commit c637d07 into main Aug 19, 2026
25 checks passed
@robzolkos
robzolkos deleted the feature/email-trash-spam branch August 19, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants