mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
The rich-link-previews work (#3818, shipped 0.5.8) moved all link-preview rendering to sender-authored ["link-preview","snapshot",…] tags for privacy. Correct for external URLs, but it killed buzz://pr|issue|repo entity cards entirely: - buzz:// links can never get a snapshot — the desktop composer's isValidLinkPreviewSnapshotCanonicalUrl requires https:, and CLI/agent senders attach no snapshot tags at all. - So every entity link agents post (as the base prompt instructs them to) renders as raw plaintext since 0.5.8. The snapshot privacy model does not apply to buzz:// links: their titles come from the community relay itself via entityTitleLoader (kind 1618/1621 lookups), zero external requests. This restores recipient-side extraction for buzz:// hrefs only: - markdown/useMessageLinkPreviews.ts: new hook — extracts buzz:// previews from message content, resolves titles via useResolvedLinkPreviews, and merges them with snapshot-tag previews (snapshots win on duplicate hrefs). markdown.tsx calls it in place of the inline parseLinkPreviewSnapshots memo. - useResolvedLinkPreviews.ts: new withEntityFallbacks() re-adds buzz:// previews the hook drops on null relay metadata (repo links never fetch titles) using their fallback title; external links keep the drop behavior. - useComposerLinkPreviews.tsx: composer keeps buzz:// cards via the same fallback and treats them as done immediately — there is no snapshot to wait for, so send is not blocked. - New e2e spec (smoke) proves recipient-side cards render for bare buzz://pr and buzz://repo links with relay-resolved titles and no snapshot tags, and that the composer card does not block send. External-URL policy fallout of #3818 (pre-0.5.8 history, fragment URLs, non-desktop senders of https links) is intentionally out of scope pending design decisions. Co-authored-by: Wintermute <c0fc581234c3585602139eec347ced7b82af65b6f6c10728348515c0c06c51c3@buzz.block.builderlab.xyz> Signed-off-by: Wintermute <c0fc581234c3585602139eec347ced7b82af65b6f6c10728348515c0c06c51c3@buzz.block.builderlab.xyz>
Buzz
Desktop chat shell with:
- Tauri + React + TypeScript + Vite
- Tailwind CSS
- shadcn/ui-ready shared components
- Biome (lint/format/check)
- Feature-driven frontend structure
Scripts
pnpm dev- run the web frontendpnpm tauri dev- run the desktop apppnpm build- typecheck and build frontendpnpm typecheck- TypeScript checkspnpm lint- Biome lintpnpm format- Biome format (write)pnpm check- Biome check
Structure
src/shared- reusable app-wide code (ui,lib,styles)src/features- feature modules (vertical slices)src/app- top-level app composition