Skip to content

feat(enrichment): rename image/screenshot schema and add previewImage OG URLs#2734

Merged
Innei merged 10 commits into
masterfrom
feat/enrichment-image-schema
May 20, 2026
Merged

feat(enrichment): rename image/screenshot schema and add previewImage OG URLs#2734
Innei merged 10 commits into
masterfrom
feat/enrichment-image-schema

Conversation

@Innei
Copy link
Copy Markdown
Member

@Innei Innei commented May 20, 2026

Summary

Rename image/screenshot fields and table to thumbnailImage/captureImage/enrichment_captures for clarity, and add previewImage OG URLs to all five GitHub providers.

Changes

  • Schema rename: enrichment_screenshotsenrichment_captures, image/screenshot fields → thumbnailImage/captureImage
  • New migration: 0014_enrichment_captures.sql with rename + column adjustments
  • GitHub previewImage: Extract getGitHubOGUrl() helper, add OG preview images to commit, discussion, issue, PR, and repo providers
  • File renames: screenshot-pipelinecapture-pipeline, screenshot-storagecapture-storage, screenshot-repositoryenrichment-capture.repository
  • Cleanup: Drop redundant JSDoc, fix missed oembed fallback field name
  • Tests: Updated all affected tests to match renamed fields and files

Migration note

  • Expand-only (rename table + columns, no data loss)
  • 0014_enrichment_captures.sql handles the transition

Test plan

  • All existing enrichment tests updated and passing
  • Migration SQL verified for expand-contract safety
  • Manual: verify GitHub providers return previewImage in enrichment data
  • Manual: verify captures table stores and retrieves correctly with new column names

Innei added 5 commits May 20, 2026 19:58
…ilImage/captureImage/enrichment_captures

- EnrichmentResult.image → thumbnailImage, screenshot → captureImage, add previewImage
- EnrichmentScreenshot/Palette types → EnrichmentCapture/CapturePalette
- enrichment_screenshots table → enrichment_captures (migration 0014)
- enrichment-screenshot.repository → enrichment-capture.repository
- screenshot-pipeline/screenshot-storage services → capture-pipeline/capture-storage
- api-client bumped to 4.3.0 with updated EnrichmentResult shape
Each provider now populates EnrichmentResult.previewImage with the
opengraph.githubassets.com hero image (1280×640).  The cache token is
derived from the entity's mutation timestamp (pushed_at/updated_at for
repos, updated_at for issues/PRs, commit author date for commits,
updatedAt for discussions) so the URL invalidates when the entity
changes.  The discussion GraphQL query is extended to return updatedAt.
Tests assert URL shape per provider plus width/height invariants and
thumbnailImage regression-guard.
@safedep
Copy link
Copy Markdown

safedep Bot commented May 20, 2026

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

No dependency changes detected. Nothing to scan.

View complete scan results →

This report is generated by SafeDep Github App

@Innei Innei merged commit 975eb59 into master May 20, 2026
12 checks passed
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