mirror of
https://github.com/block/buzz.git
synced 2026-11-02 07:22:55 +00:00
Extends the existing compact provider-specific link previews (GitHub/Linear/Google) with generic OpenGraph preview cards for arbitrary URLs in channel messages. - linkPreview.ts: extractGenericLinkPreviewUrls (max 3 per message; skips media URLs, provider-covered URLs, code/spoiler/image-masked content) + RichLinkPreviewMetadata type - useRichLinkPreviews.ts: hook with in-memory caching that invokes the new Tauri command - rich-link-preview-card.tsx: card UI + RichLinkPreviews group - link-preview-attachment.tsx: combined MessageLinkPreviews component (compact provider cards + rich generic cards) so markdown.tsx stays under its file-size ratchet - Rust fetch_link_preview_metadata: OG title/description/site_name/ image/favicon parsing with 3-redirect limit and 256KB/4s caps; requires a title or no card renders - e2eBridge: linkPreviewMetadata mock config; screenshot.mjs gains --mock-config for injecting it Verified: 3787 desktop unit tests, tsc, biome, file-size ratchet, cargo test link_preview (6/6), light/dark screenshots. Signed-off-by: npub1cr79sy35cdv9vqsnnmkrgl8d0wp27edk7mqsw2p5s52upsrv28pszw3kur <c0fc581234c3585602139eec347ced7b82af65b6f6c10728348515c0c06c51c3@buzz.block.builderlab.xyz> Co-authored-by: Thomas Petersen <thomasp@squareup.com> Signed-off-by: Thomas Petersen <thomasp@squareup.com>