Skip to content

Commit fac67c6

Browse files
committed
Fix comment tooltip display
1 parent 37918a0 commit fac67c6

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

apps/web/src/components/chat/MessagesTimeline.tsx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { type TurnDiffSummary } from "../../types";
1111
import { summarizeTurnDiffStats } from "../../lib/turnDiffTree";
1212
import { extractTrailingDiffContextComments } from "../../lib/diffContextComments";
1313
import ChatMarkdown from "../ChatMarkdown";
14-
import { Undo2Icon } from "lucide-react";
14+
import { MessageSquareIcon, Undo2Icon } from "lucide-react";
1515
import { Button } from "../ui/button";
1616
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
1717
import { clamp } from "effect/Number";
@@ -20,7 +20,6 @@ import { buildExpandedImagePreview, ExpandedImagePreview } from "./ExpandedImage
2020
import { ProposedPlanCard } from "./ProposedPlanCard";
2121
import { ChangedFilesTree } from "./ChangedFilesTree";
2222
import { DiffStatLabel, hasNonZeroStat } from "./DiffStatLabel";
23-
import { DiffContextCommentsAttachment } from "./DiffContextCommentsAttachment";
2423
import { MessageCopyButton } from "./MessageCopyButton";
2524
import { computeMessageDurationStart } from "./MessagesTimeline.logic";
2625
import { type TimestampFormat } from "../../appSettings";
@@ -436,11 +435,19 @@ export const MessagesTimeline = memo(function MessagesTimeline({
436435
<Tooltip>
437436
<TooltipTrigger
438437
render={
439-
<DiffContextCommentsAttachment
440-
commentCount={extractedDiffComments.commentCount}
441-
previewTitle={extractedDiffComments.previewTitle}
442-
className="gap-1.5 rounded-full border-border/50 bg-background/35 px-1.5 py-0.5 text-muted-foreground/65 shadow-none"
443-
/>
438+
<button
439+
type="button"
440+
className="inline-flex items-center gap-1 text-muted-foreground/50"
441+
aria-label={`${extractedDiffComments.commentCount} diff context comment${
442+
extractedDiffComments.commentCount === 1 ? "" : "s"
443+
}`}
444+
title={extractedDiffComments.previewTitle ?? undefined}
445+
>
446+
<MessageSquareIcon className="size-3" />
447+
<span className="text-[10px] font-medium">
448+
{extractedDiffComments.commentCount}
449+
</span>
450+
</button>
444451
}
445452
/>
446453
<TooltipPopup

0 commit comments

Comments
 (0)