fix(desktop): render rich project work item content (#3100)

## Summary

Project issues, pull requests, reviews, and commit details no longer
flatten rich content into inert or plain text. They now share the
message markdown and media pipeline, preserving NIP-92 `imeta` metadata
so links, images, and videos render consistently.

Commit bodies are fetched only when a single-commit detail view is
opened, keeping list queries lightweight while exposing full context
beside the diff.

### Related issue

None found.

### Testing

- Pre-push suite: `desktop-check`, `desktop-test`, `desktop-tauri-test`,
`rust-tests`, and `mobile-test`
- Project issue and pull request regression tests cover preserving
attachment metadata on roots, updates, and comments
- The project commit detail smoke scenario verifies linked text, images,
and video in commit bodies

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
This commit is contained in:
thomaspblock
2026-07-27 12:22:05 +02:00
committed by GitHub
parent 070fb6a161
commit afb272bb7b
23 changed files with 200 additions and 43 deletions

View File

@@ -36,7 +36,6 @@ import type { UserProfileLookup } from "@/features/profile/lib/identity";
import { useIdentityQuery } from "@/shared/api/hooks";
import type { ChannelMember } from "@/shared/api/types";
import { normalizePubkey, truncatePubkey } from "@/shared/lib/pubkey";
import { Markdown } from "@/shared/ui/markdown";
import {
ProjectFeedRow,
ProjectFeedRowCluster,
@@ -49,6 +48,7 @@ import {
ProfileAuthorName,
ProfileIdentityButton,
} from "./ProjectProfileIdentity";
import { ProjectRichContent } from "./ProjectRichContent";
import { PullRequestReviewersRow } from "./PullRequestReviewersRow";
import { PullRequestReviewCard } from "./PullRequestReviewCard";
@@ -639,10 +639,9 @@ function PullRequestDetail({
<div>
{pullRequest.content ? (
<header className="p-4">
<Markdown
className="text-sm"
<ProjectRichContent
content={pullRequest.content}
interactive={false}
tags={pullRequest.tags}
/>
</header>
) : null}
@@ -670,9 +669,11 @@ function PullRequestDetail({
) : null}
</div>
{update.content ? (
<p className="text-sm text-muted-foreground">
{update.content}
</p>
<ProjectRichContent
className="text-sm text-muted-foreground"
content={update.content}
tags={update.tags}
/>
) : null}
</article>
))}
@@ -829,10 +830,10 @@ function PullRequestDetail({
</span>
</div>
{activityContent ? (
<Markdown
<ProjectRichContent
className="mt-1 text-sm text-foreground/90"
content={activityContent}
interactive={false}
tags={item.tags}
/>
) : null}
{item.anchor ? (