Skip to content

Model the contact thread list: page cursor and postings on GetContact - #127

Merged
monorkin merged 1 commit into
mainfrom
contact-threads-page
Aug 26, 2026
Merged

Model the contact thread list: page cursor and postings on GetContact#127
monorkin merged 1 commit into
mainfrom
contact-threads-page

Conversation

@monorkin

Copy link
Copy Markdown
Contributor

A contact's JSON has always carried one page of the threads they are on — the list HEY heads "All threads with GitHub" — but the SDK dropped the postings, the entries_title heading, and the Link cursor. No server change involved; this models what the endpoint already serves.

API surface

  • Adds the optional page query parameter to GetContact and entries_title + postings to ContactDetail.
  • Adds ContactPage and Contacts().ThreadsPage(ctx, contactID, cursor): an empty cursor starts at the top, the next page's cursor is read from the response Link header, following the page-read pattern.
  • Contacts().Get keeps its signature and one-page behavior.
  • Bumps the Go SDK version to 0.27.0.

Proof

  • Unit coverage verifies the heading and postings parse, the cursor is passed through as the page query, and the last page answers no cursor.
  • Conformance coverage verifies the opaque page cursor on the generated request.
  • make check passes: Go tests and lint green, generated artifacts current, all 167 conformance cases pass.

Risk and reviewer focus

Low: the parameter and fields are additive and the existing Get is unchanged. Please focus on the ContactDetail additions matching the served JSON.

Consumer

hey-cli's TUI: opening a fully read bundle shows the contact's thread list (the web app's behavior), where today it dead-ends on an empty screen. Follows up basecamp/hey-cli#337.

A contact's JSON has always carried one page of the threads they are on --
the list HEY heads "All threads with GitHub" -- but the SDK dropped the
postings, the heading and the Link cursor. Model them, and add
Contacts().ThreadsPage for the cursor-bearing read.

Bumps the Go SDK version to 0.27.0.
Copilot AI balanced review requested due to automatic review settings August 26, 2026 10:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@monorkin
monorkin merged commit 1312234 into main Aug 26, 2026
18 checks passed
@monorkin
monorkin deleted the contact-threads-page branch August 26, 2026 10:59
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