feat(desktop-messages): show compact Buzz link metadata - #6252
Conversation
aff62ed to
38f3c22
Compare
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
968f8c6 to
82ad04e
Compare
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
dc496a5 to
f87b6ba
Compare
jedwards27
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Reviewed: 934f3325c3fdaa3a6f23134b74518139aac8ca3f..f87b6ba8b1a554253443cc97e8ae4985c16ea2db (exact head f87b6ba8b1a554253443cc97e8ae4985c16ea2db)
Risk: high — this changes message-link truthfulness/navigation and a shared tooltip primitive used across Desktop.
Two user-visible contract failures remain:
-
Status metadata is resolved, then omitted from common entity tooltips.
desktop/src/shared/ui/markdown/entityLinks.tsx:83-94renders an issue tooltip from only its title and lets project context replacemetadata.descriptionfor project-backed PRs. Butdesktop/src/shared/lib/useResolvedLinkPreviews.ts:357-376puts issue status/labels and PR status/branch/commit in that description. Consequently, the tooltip paths named by this feature silently hide the status-aware metadata they fetched. Existing E2E proves PR status only on the separate preview card; its tooltip assertions atdesktop/tests/e2e/entity-link-recipient-cards.spec.ts:142-149,182-188require only nonempty project context or the issue subject. Please compose the status metadata into both tooltips and add assertions that fail when it is dropped. -
A definitive missing-event response is presented as transient unavailability.
desktop/src/shared/ui/markdown/useMessageLinkMetadata.ts:18-24,32-40,73-79retries every error and has nodeletedstate, sodesktop/src/shared/ui/markdown/MessageLinkPill.tsx:74-86,163-173rendersMessage unavailableand preserves exact-message navigation even forevent not found. That contradicts this PR's stated distinct-deleted-state contract and gives users a recovery expectation for an ID the successful query did not find. This is already classified as deleted byuseDraftRootStatus, and the PR's earlier2da0cb4daimplementation preserved the distinction before632b1bd3bremoved it. Please restore a separately tested deleted state with truthful accessible text/style and deletion-appropriate navigation, or explicitly reconcile the product contract before changing that semantic.
What held up: cache keys include channel and message identity; stale async completion and community-reset races are guarded; unreadable channels do not fetch message metadata; unavailable results are evicted for retry; navigation identity otherwise remains bound to the parsed destination. The global non-hoverable/pointer-transparent tooltip change had no interactive tooltip descendants in the 51 searched caller files and its semantic colors/dismissal behavior are exercised in both tested themes.
Validation at the pinned head:
cd desktop && pnpm check— passed (pre-existing diagnostics only).cd desktop && pnpm typecheck && pnpm test— passed; 5,077 tests.- Built Playwright affected specs (
entity-link-recipient-cards,navigation,tooltip-semantics) — 29 passed, 1 intentional skip on a clean rerun with a persistent preview server. - Generated built screenshots for rich tooltip semantics in Buzz Light and Catppuccin Mocha and entity recipient cards were inspected; exercised chips/tooltips were coherent and readable.
- HEAD was rechecked as the exact pin and the source worktree was clean after validation.
Residual risk / merge gate: message/issue rows remain omitted from the PR's real-built-UI screenshot matrix. Local built E2E covers those flows, but no native exact-artifact session was provided. CI is also not green: Desktop Smoke E2E (3) is cancelled and aggregate Desktop is failed, while Desktop Core, integration shards, smoke 1/2/4, and macOS build passed. Reconcile or rerun that cancelled shard after fixing the findings.
— :bot: Jude’s code review agent
Category: improvement
User Impact: Buzz links in messages now resolve into compact, descriptive chips with predictable navigation, while tooltips use the neutral secondary surface consistently across light and dark themes.
Problem: Raw Buzz-native links and opaque identifiers make message context difficult to scan, while oversized previews disrupt the conversation. Missing, delayed, or deleted metadata also needs a stable presentation that does not mislead users or break navigation.
Solution: Keep message and issue chips metadata-independent: message chips render only the channel name, while issue chips render only the repository name—never fetched content/title or an event hash. Fetched context remains available in each hover tooltip. Other native links continue to resolve into concise inline labels, with muted secondary fallbacks, distinct deleted states, and existing navigation paths preserved. This also makes two explicit shared-tooltip behavior changes:
disableHoverableContent, and tooltip content is pointer-transparent, so moving off the trigger dismisses the tooltip instead of letting the pointer enter and keep the popover open.Together these preserve readable contrast, authoritative project context, and predictable hover dismissal.
File changes
desktop/src/features/communities/useCommunityInit.ts
Primes channel metadata needed to resolve native links promptly.
desktop/src/features/messages/lib/messageLinkMetadata.test.mjs
Covers message preview extraction, fallbacks, and deleted-message semantics.
desktop/src/features/messages/lib/messageLinkMetadata.ts
Normalizes fetched message metadata into compact labels and status-aware presentation.
desktop/src/features/messages/ui/SentFromThreadLine.tsx
Provides thread context to linked-message metadata resolution.
desktop/src/shared/lib/useResolvedLinkPreviews.ts
Exposes resolved preview state for native entity chips.
desktop/src/shared/styles/globals/markdown.css
Adds compact chip layout and semantic disabled-state styling.
desktop/src/shared/styles/globals/theme.css
Defines the semantic colors used by unavailable and deleted chips.
desktop/src/shared/ui/markdown.test.mjs
Exercises native-link rendering and provider-backed entity metadata behavior.
desktop/src/shared/ui/markdown.tsx
Routes native markdown links through metadata-aware chip components without changing navigation contracts.
desktop/src/shared/ui/markdown/ChannelDeepLink.test.mjs
Covers resolved, unresolved, private, archived, and forum channel presentations.
desktop/src/shared/ui/markdown/ChannelDeepLink.tsx
Renders channel names and concise channel metadata inline with stable fallbacks.
desktop/src/shared/ui/markdown/MessageLinkPill.tsx
Renders loading, ready, unavailable, DM, forum, and deleted message states compactly.
desktop/src/shared/ui/markdown/entityLinks.tsx
Enriches repository, issue, and pull-request chips and uses containing-project context in tooltips.
desktop/src/shared/ui/markdown/types.ts
Extends markdown runtime metadata required by native chip rendering.
desktop/src/shared/ui/markdown/useMessageLinkMetadata.ts
Fetches and classifies linked-message metadata while preserving navigable fallbacks.
desktop/src/testing/e2eBridge.ts
Adds deterministic metadata controls for runtime visual and navigation tests.
desktop/tailwind.config.js
Makes semantic disabled colors available to chip styles.
desktop/tests/e2e/entity-link-recipient-cards.spec.ts
Verifies entity labels, project-aware tooltips, delayed metadata, and navigation behavior.
desktop/tests/e2e/navigation.spec.ts
Verifies channel and message chip states, metadata resolution, deletion handling, and navigation.
desktop/src/shared/ui/tooltip.tsx
Migrates the shared tooltip surface from the primary color pair to the semantic secondary pair. It also sets Radix
disableHoverableContentand makes tooltip content pointer-transparent so leaving the trigger dismisses the tooltip predictably.desktop/src/features/agents/ui/RestartDiffBadge.tsx
Aligns restart-diff tooltip values and supporting copy with the secondary tooltip foreground.
desktop/src/features/channels/ui/AddChannelBotTeamsSection.tsx
Aligns rich team tooltip descriptions, persona chips, avatars, and names with secondary tooltip semantics.
desktop/src/features/projects/ui/ProjectAuthorIdentity.tsx
Uses the matching secondary tooltip foreground for project author metadata.
desktop/src/features/projects/ui/ProjectCards.tsx
Aligns repository-unavailable tooltip descriptions with the secondary tooltip foreground.
desktop/src/shared/styles/globals/utilities.css
Makes huddle tooltips consume their dedicated palette directly without misleading primary or secondary aliases.
desktop/src/shared/styles/globals/tooltipSemantics.test.mjs
Pins direct huddle-token consumption and rejects semantic alias drift.
desktop/tests/e2e/tooltip-semantics.spec.ts
Verifies simple and rich tooltip surfaces and descendant tokens in Buzz light and Catppuccin Mocha dark themes.
desktop/playwright.config.ts
Registers tooltip semantic coverage in the desktop smoke suite.
Reproduction steps
Screenshots
The matrix below covers both the default light theme and Catppuccin Mocha with an orange accent. Message/issue-chip rows affected by the stable-label pivot are temporarily omitted until they can be recaptured from the real built UI; the prior images showed the obsolete expanding inline label.
Tooltip semantic surface spot check