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

@@ -22,6 +22,10 @@ export function getAllTags(event, name) {
.map((tag) => tag[1]);
}
export function getImetaTags(event) {
return event.tags.filter((tag) => tag[0] === "imeta");
}
function repoOwnerFromAddress(repoAddress) {
const owner = (repoAddress ?? "").split(":")[1] ?? "";
return /^[a-fA-F0-9]{64}$/.test(owner) ? owner.toLowerCase() : null;
@@ -80,6 +84,7 @@ function commentsForIssue(issueId, commentEvents) {
.map((event) => ({
id: event.id,
content: event.content,
tags: getImetaTags(event),
author: event.pubkey,
createdAt: event.created_at,
}));
@@ -101,6 +106,7 @@ export function eventToProjectIssue(
id: issue.id,
title,
content: issue.content,
tags: getImetaTags(issue),
author: issue.pubkey,
createdAt: issue.created_at,
repoAddress: getTag(issue, "a") ?? null,