Skip to content

Add contact avatar operations - #229

Merged
robzolkos merged 2 commits into
mainfrom
feat/contact-avatars
Oct 2, 2026
Merged

robzolkos merged 2 commits into
mainfrom
feat/contact-avatars

Conversation

@robzolkos

@robzolkos robzolkos commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

  • model UpdateContactAvatar and DeleteContactAvatar in Smithy
  • generate typed routes, request models, and service methods for Go, Rust, TypeScript, Kotlin, and Swift
  • add Go Contacts.UpdateAvatar and Contacts.DeleteAvatar wrappers
  • cover both operations in every shipped SDK and the shared conformance suite

The update operation takes the signed blob ID returned by Attachments.Upload / CreateDirectUpload, and returns the updated contact.

Dependency

Requires basecamp/haystack#8895, which adds the JSON response contract while preserving the browser form flow.

Validation

  • make check

Summary by cubic

Adds UpdateContactAvatar and DeleteContactAvatar to the Smithy contract and regenerates the Go, Rust, TypeScript, Kotlin, and Swift SDKs with shared conformance coverage.

New Features

  • UpdateContactAvatar PUTs the signed blob ID returned by Attachments.Upload / CreateDirectUpload and returns the updated contact.
  • DeleteContactAvatar removes the uploaded avatar and restores the default avatar, responding with 204.
  • Both operations are idempotent and retried with exponential backoff on 429 and 503.
  • The Go Contacts service gains UpdateAvatar / DeleteAvatar wrappers with instrumentation and validation error mapping.

Dependencies

  • Requires basecamp/haystack#8895 for the JSON response contract while preserving the browser form flow.

Written for commit 899e38e. Summary will update on new commits.

Review in cubic

Copilot AI balanced review requested due to automatic review settings September 28, 2026 00:30

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 review overview

🟡 Changes recommended

The modeled delete response status and validation documentation are inconsistent with the new behavior.

Review effort: Balanced
Findings: 1 Medium severity · 2 Low severity

Open (3)
What changed in this PR

Adds contact avatar update/delete operations across the Smithy contract and all five shipped SDKs, with unit and conformance coverage.

Changes:

  • Models avatar update/delete routes and payloads.
  • Regenerates all SDK clients and metadata.
  • Adds cross-SDK tests and conformance dispatch.

[!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.

File Description
spec/​hey.smithy Defines avatar operations and models.
spec/​shape-fingerprint.json Records the new response shape.
spec/​route-coverage.json Adds route coverage metadata.
openapi.json Publishes the generated API contract.
behavior-model.json Adds retry/idempotency behavior.
go/​pkg/​generated/​client.gen.go Generates Go models and methods.
go/​pkg/​hey/​contacts.go Adds Go convenience wrappers.
go/​pkg/​hey/​services_test.go Tests Go avatar behavior.
go/​pkg/​hey/​url-routes.json Registers Go route metadata.
rust/​hey-sdk/​src/​generated/​types.rs Generates Rust models.
rust/​hey-sdk/​src/​generated/​services/​contacts.rs Generates Rust service methods.
rust/​hey-sdk/​src/​generated/​routes.rs Generates Rust routes.
rust/​hey-sdk/​tests/​services_contacts.rs Tests Rust avatar behavior.
rust/​hey-sdk/​PARITY.md Updates parity counts.
typescript/​src/​generated/​schema.ts Generates TypeScript schema types.
typescript/​src/​generated/​operations.ts Generates TypeScript operations.
typescript/​src/​generated/​coverage.json Registers generated coverage.
typescript/​tests/​client.test.ts Tests TypeScript requests.
typescript/​README.md Updates operation count.
typescript/​VALIDATION.md Updates validation totals.
kotlin/​sdk/​src/​commonMain/​kotlin/​com/​basecamp/​hey/​generated/​Routes.kt Generates Kotlin routes.
kotlin/​sdk/​src/​commonMain/​kotlin/​com/​basecamp/​hey/​generated/​services/​ContactsService.kt Generates Kotlin methods.
kotlin/​sdk/​src/​commonMain/​kotlin/​com/​basecamp/​hey/​generated/​models/​ContactAvatarPayload.kt Adds Kotlin payload model.
kotlin/​sdk/​src/​commonMain/​kotlin/​com/​basecamp/​hey/​generated/​models/​ContactAvatarRequestContent.kt Adds Kotlin request model.
kotlin/​sdk/​src/​commonMain/​kotlin/​com/​basecamp/​hey/​generated/​models/​UpdateContactAvatarResponseContent.kt Adds Kotlin response alias.
kotlin/​sdk/​src/​commonTest/​kotlin/​com/​basecamp/​hey/​ContactsServiceTest.kt Tests Kotlin behavior.
kotlin/​sdk/​src/​commonTest/​kotlin/​com/​basecamp/​hey/​RouteTest.kt Updates Kotlin route count.
swift/​Sources/​Hey/​Generated/​Routes.swift Generates Swift routes.
swift/​Sources/​Hey/​Generated/​Services/​ContactsService.swift Generates Swift methods.
swift/​Sources/​Hey/​Generated/​Models/​ContactAvatarPayload.swift Adds Swift payload model.
swift/​Sources/​Hey/​Generated/​Models/​ContactAvatarRequestContent.swift Adds Swift request model.
swift/​Sources/​Hey/​Generated/​Models/​UpdateContactAvatarResponseContent.swift Adds Swift response alias.
swift/​Tests/​HeyTests/​ContactsTests.swift Tests Swift behavior.
swift/​Tests/​HeyTests/​RouteTests.swift Updates Swift route count.
conformance/​tests/​paths.json Adds shared path fixtures.
conformance/​runner/​go/​main.go Dispatches Go fixtures.
conformance/​runner/​rust/​src/​operations.rs Dispatches Rust fixtures.
conformance/​runner/​kotlin/​src/​main/​kotlin/​com/​basecamp/​hey/​conformance/​Operations.kt Dispatches Kotlin fixtures.
conformance/​runner/​swift/​Sources/​ConformanceRunner/​Operations.swift Dispatches Swift fixtures.
conformance/​runner/​typescript/​fixture-inventory.json Registers TypeScript fixtures.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread spec/hey.smithy Outdated
Comment thread go/pkg/hey/contacts.go Outdated
Comment thread typescript/VALIDATION.md Outdated

@cursor cursor Bot 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.

Approved. Cursor Security Agent completed successfully with no findings that need human review; Cursor Bugbot was not present. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Approver

@robzolkos
robzolkos force-pushed the feat/contact-avatars branch 3 times, most recently from 9f45904 to 5de99fd Compare October 2, 2026 22:09
@robzolkos
robzolkos force-pushed the feat/contact-avatars branch from 5de99fd to 899e38e Compare October 2, 2026 22:24
@robzolkos
robzolkos merged commit 2ff1459 into main Oct 2, 2026
37 checks passed
@robzolkos
robzolkos deleted the feat/contact-avatars branch October 2, 2026 22:38
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