fix(issues): render comments with Markdown to enable issue mention cards

Comment body was using RichTextEditor in read-only mode which doesn't
support IssueMentionCard rendering. Switch to Markdown component so
mention://issue/ links render as rich cards with status + title.
This commit is contained in:
Jiang Bohan 2026-03-31 16:49:03 +08:00
parent dbd4830e35
commit da086db982

View file

@ -20,6 +20,7 @@ import { cn } from "@/lib/utils";
import { useActorName } from "@/features/workspace";
import { timeAgo } from "@/shared/utils";
import { RichTextEditor, type RichTextEditorRef } from "@/components/common/rich-text-editor";
import { Markdown } from "@/components/markdown";
import { ReplyInput } from "./reply-input";
import type { TimelineEntry } from "@/shared/types";
@ -164,7 +165,7 @@ function CommentRow({
) : (
<>
<div className="mt-1.5 pl-8 text-sm leading-relaxed text-foreground/85">
<RichTextEditor defaultValue={entry.content ?? ""} editable={false} />
<Markdown mode="minimal">{entry.content ?? ""}</Markdown>
</div>
{!isTemp && (
<ReactionBar
@ -339,7 +340,7 @@ function CommentCard({
) : (
<>
<div className="pl-10 text-sm leading-relaxed text-foreground/85">
<RichTextEditor defaultValue={entry.content ?? ""} editable={false} />
<Markdown mode="minimal">{entry.content ?? ""}</Markdown>
</div>
{!isTemp && (
<ReactionBar