You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 test
make lint
make build
go test -c for tests/smoke
built ./bin/hey against 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, and bcc arrays, thread ID, subject, summary, delivery time, and app URL; older servers report sent_at as null.
Supports --limit (reading pages until the requested count is reached), --all, --page, --ids-only, --count, Markdown, and the standard JSON formats.
--all follows pagination for up to 100 pages; notices suggest --all when more pages remain and a sanitized --page cursor 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/go to 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.
Written for commit 75fe8f3. Summary will update on new commits.
The reason will be displayed to describe this comment to others. Learn more.
Approved. Cursor Security Agent completed successfully with no findings that need human review; Cursor Bugbot was not running on this PR, so that signal was skipped. No reviewers were assigned.
Sent by Cursor Approval Agent: Pull Request Approver
Adds hey sent to list the latest outbound message per thread for reconciliation and scripting.
Changes:
Adds paginated Sent output with recipient, timestamp, and thread metadata.
Adds command documentation, help entries, and tests.
Pins and synchronizes the supporting SDK model changes.
[!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.
Show continuation notice when styled output is empty
internal/cmd/sent.go:181
When the first page is empty but still includes a continuation cursor, notice tells the user that more results are available. This early return suppresses that notice only for styled output, leaving the user with “No sent messages.” and no way to discover the continuation. Print the notice before returning, as the non-empty styled path does.
Both Sent projections mark summary as omitempty. Attachment-only sends can validly have an empty summary, so JSON then omits the documented key, and Markdown omits the entire summary column when every row is empty. Remove omitempty from both tags to keep the output shape stable with an empty string/cell.
Avoid reporting partial page count as total results
internal/cmd/sent.go:104
When --limit trims a fetched page, len(collected.Items) is only the number fetched so far. If collected.Cursor is still non-empty, the current notice incorrectly presents that value as the server total (the new test's page 2 advertises page 3 but reports “Showing 2 of 3 results”). Use the existing non-total pagination notice while another cursor exists, and update the test expectation.
Fixed the latest review concerns in bc05bbf. Empty summaries now remain in JSON and Markdown, and a trimmed page with a continuation cursor no longer reports the fetched partial page as the total result count.
With --all, collectPages stops when it reads an empty page even if that page still carries a cursor. In that case this notice says “Use --all” although --all was already used, while next_page contains the cursor needed to resume. Emit a continuation notice for this case and add coverage for the existing empty-page test with --all.
Test hard-codes UTC date instead of using local timezone
internal/cmd/sent_test.go:110
This expected date depends on the machine's local timezone because formatSentTimestamp converts active_at with Local(). In UTC+10, for example, this timestamp renders as 2026-09-20, so the test fails even though the output is correct. Derive the expected date in time.Local instead of hard-coding the UTC date.
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
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 sentwith one latest outbound message per thread, newest firstto,cc, andbccarrays in JSON--limit,--all,--page,--ids-only,--count, Markdown, and the standard JSON formatsCloses #469.
Dependencies
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./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 retainedProduction 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
to,cc, andbccarrays, thread ID, subject, summary, delivery time, and app URL; older servers reportsent_atasnull.--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.Dependencies
github.com/basecamp/hey-sdk/goto a commit pseudo-version; replace it with the published SDK release before merging.Written for commit 75fe8f3. Summary will update on new commits.