Add sent mail listing
RO
2mo ago+742+742+012345678901234567890123456789-10-10-01234567890123456789
Summary
- add first-class
hey sentwith one latest outbound message per thread, newest first - match HEY's compact human recipient summary while returning exact
to,cc, andbccarrays in JSON - include thread ID, subject, summary, delivery time, and app URL for reconciliation scripts
- support
--limit,--all,--page,--ids-only,--count, Markdown, and the standard JSON formats - document the command and cover its output, pagination, limits, help surface, and smoke contract
Closes #469.
Dependencies
- haystack#8874 adds recipients, delivery time, and Sent pagination headers
- hey-sdk#222 models those fields and exposes paginated Sent reads
This branch pins the SDK PR commit with a Go pseudo-version so CI and review are reproducible. It must be changed to the published SDK release before this PR merges.
Tests
make testmake lintmake buildgo test -cfortests/smoke- built
./bin/heyagainst a real HEY account through a redacting validator: three rows checked; thread ID, subject, sent time, app URL, and array shapes valid; no message content or personal data printed or retained
Production does not expose recipient data until the Haystack dependency deploys, so that real-account check correctly found no populated recipient arrays. Unit and smoke contracts cover the new response shape.
Summary by cubic
Adds hey sent, a first-class command that lists the latest outbound message in each thread, newest first. It provides thread and delivery metadata for scripts while matching HEY's compact human-readable recipient summary. Closes #469.
New Features
- JSON includes exact
to,cc, andbccarrays, thread ID, subject, summary, delivery time, and app URL; when both delivery and creation times are missing,sent_atreports asnull. - Supports
--limit(reading pages until the requested count is reached),--all,--page,--ids-only,--count, Markdown, and the standard JSON formats. --allfollows pagination for up to 100 pages; notices suggest--allwhen more pages remain and a sanitized--pagecursor when the run was truncated.- Documentation, API coverage, help output, unit tests, and smoke coverage include the new command and its edge cases.
Dependencies
- Pins
github.com/basecamp/hey-sdk/goto a commit pseudo-version; replace it with the published SDK release before merging. - Recipient arrays remain empty until HEY's backend exposes Sent recipient data.