Add restore command - #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.
9c7b956 to
3c4c687
Compare
|
Thanks for keeping this one refreshed. Read against current Keep
Drop Rebase notes: |
3c4c687 to
c790ad7
Compare
|
Rebased onto current
Validation: focused unit/race coverage and |
What changed
Adds
hey restore <thread-id>...for restoring one or more email threads from Trash.topic_idvalues and deduplicates repeated IDsTopics().Restoreonce per thread and stops on the first failurehey search --in trash --jsonas the current ID source and tohey thread list --in trash --jsononce List system views through thread list #161 landsThe earlier
mark-spamcommand and its supporting surface have been removed.Validation
GOWORK=off TMPDIR=/tmp mise exec -- make check