Uh oh!
There was an error while loading. Please reload this page.
Add restore and mark-spam commands - #186
Conversation
There was a problem hiding this comment.
Pull request overview
Adds SDK-backed mailbox controls for restoring trashed topics and marking individual entries as spam.
Changes:
- Adds and registers both commands with validation and output handling.
- Adds request, validation, help, and command-surface tests.
- Updates user and agent documentation.
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 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
skills/hey/SKILL.md | Adds agent guidance and examples. |
README.md | Documents both commands and ID types. |
internal/cmd/topic_controls.go | Implements both mailbox controls. |
internal/cmd/topic_controls_test.go | Tests requests and validation. |
internal/cmd/root.go | Registers the commands. |
internal/cmd/help.go | Adds commands to curated help. |
internal/cmd/help_test.go | Updates the help snapshot. |
API-COVERAGE.md | Records SDK endpoint coverage. |
.surface | Updates the CLI surface baseline. |
Suppressed comments (1)
internal/cmd/topic_controls.go:65
- The user-facing
hey mark-spam --helpoutput only showsShort, so it omits the PR's promised warning to confirm the exact entry ID before changing mailbox state; the annotation is limited to agent help. Add the warning to aLongdescription.
Use: "mark-spam <entry-id>",
Short: "Mark an email entry as spam",
Example: " hey mark-spam 12345",
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
9c7b956 to
3c4c687Compare
What changed
This adds two mailbox controls already exposed by the current SDK:
hey restore <topic-id>returns a trashed topic to active mailhey mark-spam <entry-id>marks one email entry as spamThey are separate from the existing posting actions because the APIs use different IDs.
hey trashandhey spamtake box item IDs, while these commands take a topic ID and an entry ID respectively.Both commands validate positive IDs and reject list-only output formats before authentication or any HTTP request. Their help and agent guidance call out that they change mailbox state and require confirmation of the exact ID.
Tests
make checkNo live mailbox mutations were used to test this change.
Summary by cubic
Adds two mailbox controls:
hey restore <topic-id>returns a trashed topic to active mail, andhey mark-spam <entry-id>marks a single email entry as spam. Previously onlyhey trash/hey spamexisted and used box item IDs; these use topic and entry IDs to target the correct objects.Topics().Restore,Entries().MarkSpam) and adds API coverage for the corresponding PUT endpoints.--ids-only/--countbefore auth or any HTTP request; both commands change mailbox state and require the exact ID.root.go; adds shared helpers intopic_controls.gofor ID parsing, list-format rejection, and summarized output..surface, README examples, andskills/hey/SKILL.md.Written for commit 3c4c687. Summary will update on new commits.