Keep article image previews as link cards #34

Merged
erik merged 1 commit from task-2494df77-clickable-card-preview into main 2026-06-27 23:59:29 -05:00
Owner

Summary

  • keep ActivityPub language-tagged content so Mastodon no longer shows Translate
  • remove ActivityPub article image attachment so Mastodon does not render the banner as media that opens the image
  • rely on the public article OpenGraph metadata for a clickable article link card preview
  • add a regression assertion that article ActivityPub objects do not serialize attachment

Verification

  • npm run typecheck
  • npm test -- --run src/federation/tests/routes.test.ts
  • npm test
  • npm run build

Task: task-2494df77

Note: after release/deploy, redeliver slug-cli-init and verify in Chromium that Mastodon shows a clickable status card with image, not a media gallery, and no Translate control.

## Summary - keep ActivityPub language-tagged content so Mastodon no longer shows Translate - remove ActivityPub article image attachment so Mastodon does not render the banner as media that opens the image - rely on the public article OpenGraph metadata for a clickable article link card preview - add a regression assertion that article ActivityPub objects do not serialize `attachment` ## Verification - npm run typecheck - npm test -- --run src/federation/__tests__/routes.test.ts - npm test - npm run build Task: task-2494df77 Note: after release/deploy, redeliver `slug-cli-init` and verify in Chromium that Mastodon shows a clickable status card with image, not a media gallery, and no Translate control.
Author
Owner

Review summary

Approved. The PR removes the ActivityPub image attachment that caused Mastodon to render the banner as media, while preserving language-tagged content for the Translate fix. This aligns the desired UX: Mastodon should use the article URL plus OpenGraph metadata to render a clickable link card, not a media gallery image that opens the image file.

Acceptance criteria coverage

  • Keeps contentMap/language-tagged ActivityPub content from PR #33, preserving the no-Translate behavior.
  • Removes article Document attachment so the banner is not treated as media.
  • Leaves public OpenGraph metadata in place for link-card image preview generation.
  • Adds regression assertion that article ActivityPub objects do not serialize attachment.

Verification

  • npm run typecheck
  • npm test -- --run src/federation/__tests__/routes.test.ts
  • npm test
  • npm run build

Important follow-up gate

Do not close task task-2494df77 after merge alone. After release/deploy, redeliver slug-cli-init and verify in Chromium that Mastodon shows a clickable article status card with image, not a media gallery, and no Translate control.

Blocking issues

None.

Verdict

Approved.

## Review summary Approved. The PR removes the ActivityPub image attachment that caused Mastodon to render the banner as media, while preserving language-tagged content for the Translate fix. This aligns the desired UX: Mastodon should use the article URL plus OpenGraph metadata to render a clickable link card, not a media gallery image that opens the image file. ## Acceptance criteria coverage - [x] Keeps `contentMap`/language-tagged ActivityPub content from PR #33, preserving the no-Translate behavior. - [x] Removes article `Document` attachment so the banner is not treated as media. - [x] Leaves public OpenGraph metadata in place for link-card image preview generation. - [x] Adds regression assertion that article ActivityPub objects do not serialize `attachment`. ## Verification - `npm run typecheck` - `npm test -- --run src/federation/__tests__/routes.test.ts` - `npm test` - `npm run build` ## Important follow-up gate Do not close task `task-2494df77` after merge alone. After release/deploy, redeliver `slug-cli-init` and verify in Chromium that Mastodon shows a clickable article status card with image, not a media gallery, and no Translate control. ## Blocking issues None. ## Verdict Approved.
erik merged commit 373e85f7c9 into main 2026-06-27 23:59:29 -05:00
erik deleted branch task-2494df77-clickable-card-preview 2026-06-27 23:59:29 -05:00
Sign in to join this conversation.
No description provided.