Skip to content

feat(cards): let an attachment become the card cover - #121

Open
serrade wants to merge 1 commit into
delorenj:mainfrom
serrade:feat/card-cover-image
Open

serrade wants to merge 1 commit into
delorenj:mainfrom
serrade:feat/card-cover-image

Conversation

@serrade

@serrade serrade commented Sep 29, 2026

Copy link
Copy Markdown

Summary

  • Attaching an image did not expose a way to make it the picture on the front of the card. Trello calls that picture the cover. get_card already returns it; nothing wrote it.
  • setCover on the existing attach tools sends Trello's setCover query parameter only when it is true. update_card_details accepts coverAttachmentId (string to use an attachment already on the card, null to clear the image), coverSize (normal | full), and coverBrightness (light | dark). Those fields are added to the PUT body only when one of them is passed, so a name-only update does not send cover.
  • get_card markdown names the attachment that is the cover. No new tool.

Live check

On a disposable card, then archived:

  • setCover: true on an uploaded image switched the cover to that attachment, and markdown named it. The card banner and the attachment's Cover label matched.
  • coverAttachmentId plus coverSize: "full" moved the cover onto an earlier attachment. The board face used that image.
  • coverAttachmentId: null removed the image cover and left both attachments in place.

Trello still used the first uploaded image as the cover when setCover was omitted and the card had no cover. The flag is not sent in that case. That is Trello's upload behavior, not a second write from this server.

Test plan

  • bun run test:coverage (164 passed, 26 skipped; coverage watermark raised in vitest.config.ts)
  • bun run build
  • Live cover set, switch, and clear on a card, confirmed in the Trello UI
  • Maintainer: bun run test:coverage and bun run build on the branch

Uploading an image never exposed Trello's cover fields, so callers could not choose the picture on the front of a card. Optional setCover and cover fields on the existing tools write that cover without adding a tool.

This branch has not been deployed

No deployments
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.

1 participant