feat(desktop): enrich link previews with page metadata - #3316
Open
tellaho wants to merge 3 commits into
Open
Conversation
Co-authored-by: npub14vtk7pvazqrq9639qu7e560wnqtl0d53ca4gjuvq6jzf3k2el23qqlwa7f <ab176f059d100602ea25073d9a69ee9817f7b691c76a897180d48498d959faa2@buzz.block.builderlab.xyz> Signed-off-by: npub14vtk7pvazqrq9639qu7e560wnqtl0d53ca4gjuvq6jzf3k2el23qqlwa7f <ab176f059d100602ea25073d9a69ee9817f7b691c76a897180d48498d959faa2@buzz.block.builderlab.xyz>
Co-authored-by: npub14vtk7pvazqrq9639qu7e560wnqtl0d53ca4gjuvq6jzf3k2el23qqlwa7f <ab176f059d100602ea25073d9a69ee9817f7b691c76a897180d48498d959faa2@buzz.block.builderlab.xyz> Signed-off-by: npub14vtk7pvazqrq9639qu7e560wnqtl0d53ca4gjuvq6jzf3k2el23qqlwa7f <ab176f059d100602ea25073d9a69ee9817f7b691c76a897180d48498d959faa2@buzz.block.builderlab.xyz>
Co-authored-by: Taylor Ho <[email protected]> Signed-off-by: Taylor Ho <[email protected]>
tellaho
force-pushed
the
tho/link-ograph-embeds
branch
from
July 28, 2026 14:51
fb62b1e to
e8d3c1f
Compare
tellaho
marked this pull request as ready for review
July 28, 2026 15:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Category: improvement
User Impact: Messages now show richer, more recognizable previews for supported HTTPS links.
Problem: Link cards relied on URL-derived or sender-entered labels, so they often lacked the page context users needed. Generic HTTPS links had no compact preview at all.
Solution: Fetch bounded Open Graph, Twitter, or HTML title metadata through the native networking boundary, while preserving provider-specific labels and safe URL fallbacks. Generic links use a bundled globe icon, and unsafe or unavailable metadata fails closed without changing the visible link.
File changes
desktop/src-tauri/src/commands/link_preview.rs
Adds hardened, bounded page-metadata retrieval and title/site-name extraction for public HTTPS URLs.
desktop/src-tauri/src/lib.rs
Registers the native link-preview metadata command.
desktop/src/features/communities/useCommunityInit.ts
Clears ephemeral preview metadata when the active community changes.
desktop/src/shared/lib/linkPreview.test.mjs
Covers generic HTTPS previews, exclusions, ordering, deduplication, and title fallbacks.
desktop/src/shared/lib/linkPreview.ts
Recognizes generic public HTTPS links while retaining specialized provider previews and existing limits.
desktop/src/shared/lib/useResolvedLinkPreviews.ts
Resolves fetched metadata through an ephemeral, deduplicated client cache and merges it into card models.
desktop/src/shared/ui/link-preview-attachment.tsx
Uses the bundled globe as the neutral source mark for generic web previews.
Reproduction steps
https://URL and confirm a compact card appears below the visible original link with a globe source icon.http://URL and confirm Buzz leaves the link visible without generating a preview card.Screenshots
Generic source icon before/after: