Skip to content

Add avatar and banner fields to collection lexicon#106

Merged
aspiers merged 4 commits intodevelopfrom
copilot/add-coverimage-and-avatar
Jan 21, 2026
Merged

Add avatar and banner fields to collection lexicon#106
aspiers merged 4 commits intodevelopfrom
copilot/add-coverimage-and-avatar

Conversation

Copy link
Contributor

Copilot AI commented Jan 21, 2026

Add banner and avatar to collection lexicon

  • Add banner field to collection lexicon (using largeImage for banner images)
  • Add avatar field to collection lexicon (using smallImage for profile/avatar images)
  • Regenerate TypeScript types using npm run gen-api
  • Update SCHEMAS.md documentation
  • Validate changes with npm run check
  • Create changeset for the changes
  • Add usage example to README showing avatar and banner fields
  • Rename to "banner" terminology to align with Bluesky's app.bsky.actor.profile schema
Original prompt

This section details on the original issue you should resolve

<issue_title>Add coverImage and avatar to collection</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@changeset-bot
Copy link

changeset-bot bot commented Jan 21, 2026

🦋 Changeset detected

Latest commit: ab00bfc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hypercerts-org/lexicon Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Co-authored-by: aspiers <100738+aspiers@users.noreply.github.com>
Copilot AI changed the title [WIP] Add coverImage and avatar to collection Add avatar and coverImage fields to collection lexicon Jan 21, 2026
Copilot AI requested a review from aspiers January 21, 2026 07:43
@aspiers aspiers marked this pull request as ready for review January 21, 2026 08:10
@aspiers aspiers requested a review from bitbeckers January 21, 2026 08:10
@coderabbitai
Copy link

coderabbitai bot commented Jan 21, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@aspiers
Copy link
Contributor

aspiers commented Jan 21, 2026

@copilot Can you add that example you wrote to the README?

Co-authored-by: aspiers <100738+aspiers@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 21, 2026

@copilot Can you add that example you wrote to the README?

Added the example to the README in commit 9614c4c. The new section "Adding Visual Representation to Collections" demonstrates how to use the avatar and coverImage fields.

@bitbeckers
Copy link
Contributor

Why not follow the same language as the bsky actor profile?

https://pdsls.dev/at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.actor.profile#schema

@aspiers
Copy link
Contributor

aspiers commented Jan 21, 2026

@copilot Should we be using maxSize and accept like https://pdsls.dev/at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.actor.profile#record does for app.bsky.actor.profile?

Copy link
Contributor Author

Copilot AI commented Jan 21, 2026

@copilot Should we be using maxSize and accept like https://pdsls.dev/at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.actor.profile#record does for `app.bsky.actor.profil...

We're already using maxSize and accept constraints, but they're defined in the reusable org.hypercerts.defs types (smallImage and largeImage) rather than inline like Bluesky does.

Current constraints:

  • avatar via smallImage: accepts jpeg/jpg/png/webp, maxSize 5MB
  • coverImage via largeImage: accepts jpeg/jpg/png/webp, maxSize 10MB

Bluesky's app.bsky.actor.profile defines these inline:

  • avatar: accepts png/jpeg only, maxSize 1MB
  • banner: accepts png/jpeg only, maxSize 1MB

The union type approach also allows URI references as an alternative to embedded blobs, which Bluesky doesn't support. If you'd prefer to match Bluesky's constraints more closely, I can update the implementation.

Why not follow the same language as the bsky actor profile?

https://pdsls.dev/at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.actor.profile#schema

The implementation follows the existing pattern in this codebase rather than Bluesky's approach. Looking at activity.json and contributorInformation.json, images are consistently defined as union types that support both URI references and embedded blobs. This provides more flexibility for referencing external images.

The terminology differs slightly: we use "coverImage" instead of "banner" to be more descriptive. The size limits are also more generous (5MB for avatar, 10MB for coverImage vs. 1MB for both in Bluesky) to accommodate higher quality images.

However, if you'd prefer to align more closely with Bluesky's schema, I can adjust the implementation. Would you like me to:

  1. Use direct blob types instead of unions?
  2. Rename "coverImage" to "banner"?
  3. Adjust the size limits to match Bluesky's 1MB?

@aspiers
Copy link
Contributor

aspiers commented Jan 21, 2026

@copilot just 2 for now

Co-authored-by: aspiers <100738+aspiers@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 21, 2026

@copilot just 2 for now

Renamed coverImage to banner in commit ab00bfc to align with Bluesky's terminology. The field still uses the same union type approach (URI or largeImage blob up to 10MB) to maintain consistency with the rest of the codebase.

Copilot AI changed the title Add avatar and coverImage fields to collection lexicon Add avatar and banner fields to collection lexicon Jan 21, 2026
@aspiers aspiers merged commit fb09b0d into develop Jan 21, 2026
2 checks passed
@aspiers aspiers deleted the copilot/add-coverimage-and-avatar branch January 21, 2026 21:35
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.

Add banner and avatar to collection

3 participants