Skip to content

fix(link-preview): restore Buzz entity link cards - #5494

Merged
wesbillman merged 2 commits into
mainfrom
tho/entity-link-recipient-cards
Aug 11, 2026
Merged

fix(link-preview): restore Buzz entity link cards#5494
wesbillman merged 2 commits into
mainfrom
tho/entity-link-recipient-cards

Conversation

@tellaho

@tellaho tellaho commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Category: fix
User Impact: Buzz pull request, issue, and repository links now show compact, useful metadata cards in received messages, including messages sent by agents and the CLI.

Problem: Sender-authored snapshots protect recipients from external preview fetches, but that change also removed recipient-side cards for trusted Buzz entity links when the sender did not attach snapshots.

Solution: Resolve recognized Buzz entities only against the active relay and show signed repository identity, title, and compact builder context with the current inline Buzz mark in the favicon slot, but without avatars, thumbnails, or external image fetches. Entity metadata wins over conflicting sender snapshots, while unsupported or unavailable metadata retains a safe text fallback.

File changes

desktop/playwright.config.ts
Adds the entity-link regression spec to the smoke test project.

desktop/src/features/messages/ui/useComposerLinkPreviews.tsx
Treats recognized Buzz entity cards as complete without generating snapshot tags and retains fallback cards when relay metadata is absent.

desktop/src/shared/lib/useResolvedLinkPreviews.test.mjs
Covers kind-scoped entity detection, trusted relay metadata, root-scoped lifecycle queries, exact single-repository root binding, image-less pending state, and fallback behavior.

desktop/src/shared/lib/useResolvedLinkPreviews.ts
Resolves signed repository, pull request, and issue metadata from the active relay. Entity roots fail closed unless they carry exactly one matching repository tag; lifecycle queries are root-scoped before limits; successful metadata remains stable until relay/community reset, and PR commit context uses the immutable root event rather than an unindexed update query.

desktop/src/shared/ui/compact-link-preview-attachment.tsx
Uses Buzz repository identity as the compact card provider and avoids reserving thumbnail space for image-less entity cards.

desktop/src/shared/ui/markdown.tsx
Routes message cards through the combined entity/snapshot preview hook.

desktop/src/shared/ui/markdown/useMessageLinkPreviews.test.mjs
Proves relay-authenticated entity metadata beats a forged sender snapshot while preserving mixed-link content order.

desktop/src/shared/ui/markdown/useMessageLinkPreviews.ts
Combines recipient-resolved Buzz entities with sender-authored external snapshots using explicit trust precedence and first-seen ordering.

desktop/tests/e2e/entity-link-recipient-cards.spec.ts
Exercises repository identity, PR workflow context, repository metadata, image-less rendering, and composer send behavior for agent/CLI-style entity links.

Reproduction steps

  1. Open a channel containing a message sent without link-preview tags whose content includes valid buzz://pr, buzz://issue, or buzz://repo links.
  2. Confirm each card shows its repository identity and signed title; PRs/issues also show compact lifecycle context, and repositories show description/status/default branch.
  3. Confirm the cards use the Buzz mark in the favicon slot with no avatar, thumbnail, or reserved image area.
  4. Compose and send a message containing a Buzz entity link; confirm sending is not blocked waiting for a snapshot.
  5. Send a message containing both a Buzz entity link and a snapshot-backed HTTPS link; confirm cards follow content order and the HTTPS link remains sender-snapshot-only.

Screenshots

Recipient view — Buzz-branded metadata cards

Repository identity, title, and compact builder context render with the current inline Buzz mark in the favicon slot and no avatar, thumbnail, or reserved image space.

Recipient view showing Buzz-branded PR and repository cards

Validation

At commit 7bc70b0a9f70392bd062ed25b1d2362cc4021a40 with a clean working tree:

  • Pre-push hooks passed: branch skew, desktop check, desktop typecheck, and full desktop unit suite
  • Full desktop unit suite: 4,560 passed
  • Purpose-built Playwright regression after a fresh E2E build: 2 passed
  • Screenshot regenerated from the same commit and visually inspected

Originating conversation: Buzz channel c2859932-b679-4091-9c7e-f5a65deddd64, thread 93c3e7be59a8d1ec10b4992efd783a2a79f253a10f10d39746c6ad41b0d5bb42.

@tellaho
tellaho force-pushed the tho/entity-link-recipient-cards branch 3 times, most recently from 7d9f7d8 to 9389405 Compare August 10, 2026 18:09
Render recognized Buzz PR, issue, and repository cards from relay metadata or safe fallbacks when messages do not contain sender-authored preview snapshots. Keep external previews snapshot-only and prevent conflicting entity snapshots from overriding relay-authenticated titles.

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho
tellaho force-pushed the tho/entity-link-recipient-cards branch from 9389405 to fa25fef Compare August 10, 2026 18:27
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho
tellaho force-pushed the tho/entity-link-recipient-cards branch from a66ce98 to 7bc70b0 Compare August 10, 2026 19:17
@tellaho
tellaho marked this pull request as ready for review August 10, 2026 21:38
@tellaho
tellaho requested a review from a team as a code owner August 10, 2026 21:38
@tellaho tellaho changed the title fix(desktop): restore Buzz entity link cards fix(link-preview): restore Buzz entity link cards Aug 10, 2026
@wesbillman
wesbillman merged commit 7e6e9c5 into main Aug 11, 2026
26 checks passed
@wesbillman
wesbillman deleted the tho/entity-link-recipient-cards branch August 11, 2026 01:38
atishpatel added a commit that referenced this pull request Aug 11, 2026
…overy

* origin/main:
  fix(link-preview): reliably render previews sent right after they resolve (#5245)
  fix(link-preview): restore Buzz entity link cards (#5494)
  chore(release): release Buzz Desktop version 0.5.9 (#5521)
  feat(cli): add --visibility flag to channels update (#5119)
  Polish desktop onboarding flow (#5310)
  fix(desktop): quiesce renderer polling while hidden (#3677) (#5490)
  fix(channels): restore member invitations to private channels (#5493)
  perf(ci): experiment with sccache for relay builds (#5224)
  fix(desktop): bound nine unbounded localStorage stores (#5454)
  feat(desktop): time-based sweep for stale localStorage caches (#5453)
  ci(release): gate OSS desktop auto-update promotion (#5398)
  fix(release): pin desktop PR operations to block/buzz (#5212)
  fix(search): surface exact short profile names (#5480)
  Reduce repeated ACP session context (#5423)
  feat(desktop): NIP-AM agent-usage backend — P2 emission/transport/archive + P4a aggregation/D6 (#4000)
  fix(desktop): resolve overlapping member mentions (#5225)

Signed-off-by: Brainy Bumble <0ed7657b57c0e8a9f5288390dd6c8d5d0a3a06abe9b01b9006814f52077d6cdf@buzz.block.builderlab.xyz>
Co-authored-by: Atish Patel <atish@squareup.com>
Signed-off-by: Atish Patel <atish@squareup.com>
wpfleger96 added a commit that referenced this pull request Aug 11, 2026
Bring in main's runtime.rs mesh acp_model wire translation so local
checks and CI both run on the merged tree. Clean auto-merge; the PR's
fail-closed spawn gating and main's model translation touch disjoint
regions of spawn_agent_child.

* origin/main: (24 commits)
  Improve desktop search scoping (#5306)
  Add glass appearance and cohesive settings (#5478)
  Add Send to channel for thread messages (#5305)
  Fix macOS attachment picker lifecycle and allow inert HTML downloads (#5569)
  fix(desktop): preserve fresh channel timelines (#5577)
  fix(desktop): suppress fresh focus-return refetches for channels and home-feed (#5535)
  chore: mesh upgrade, clean up legacy special case code, simplify model selection for mesh (#5289)
  fix(desktop): preserve theme when opening communities (#5266)
  fix(link-preview): resolve YouTube videos through oEmbed (#5520)
  fix(buzz-agent): harden Databricks OAuth token cache and callback (#5534)
  fix(link-preview): reliably render previews sent right after they resolve (#5245)
  fix(link-preview): restore Buzz entity link cards (#5494)
  chore(release): release Buzz Desktop version 0.5.9 (#5521)
  feat(cli): add --visibility flag to channels update (#5119)
  Polish desktop onboarding flow (#5310)
  fix(desktop): quiesce renderer polling while hidden (#3677) (#5490)
  fix(channels): restore member invitations to private channels (#5493)
  perf(ci): experiment with sccache for relay builds (#5224)
  fix(desktop): bound nine unbounded localStorage stores (#5454)
  feat(desktop): time-based sweep for stale localStorage caches (#5453)
  ...

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
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.

2 participants