Part of #455 (split). The pictures in the ask: an app card carries its latest look, and a merged pull carries its before and after looks.
Done:
[ ] renderCard accepts an optional image (or two, for before/after). It embeds them as data URIs downscaled to fit the card, and the layout keeps the text readable.
[ ] The app card uses the app's latest look. A pull card whose pull has looks uses the before and after pair. Without looks, the card is the same as today.
[ ] The PNG twin renders with the image. The input hash includes the look's id, so a new look is a new card.
[ ] Tests in test/og-card.test.ts and test/og-png.test.ts cover with and without an image, and a rendered PNG stays under 300 KB.
Files: src/web/og/card.ts, src/web/pages/og.ts, tests.
Risk: card size and raster time. Downscale before embedding, and keep only looks an anonymous reader may see.
Part of #455 (split). The pictures in the ask: an app card carries its latest look, and a merged pull carries its before and after looks.
Done:
renderCardaccepts an optional image (or two, for before/after). It embeds them as data URIs downscaled to fit the card, and the layout keeps the text readable.test/og-card.test.tsandtest/og-png.test.tscover with and without an image, and a rendered PNG stays under 300 KB.Files:
src/web/og/card.ts,src/web/pages/og.ts, tests. Risk: card size and raster time. Downscale before embedding, and keep only looks an anonymous reader may see.