Move date/menu to action bar and fix activity label sizing

- Agent comment header now only shows name (+ running badge)
- Date, copy, thumbs up/down, and three-dots menu all in action bar
- Activity event STATUS/ASSIGNEE labels changed from text-[9px] to
  text-xs to match value font size

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
dotta 2026-04-06 20:13:27 -05:00
parent 29514606bb
commit a57f6f48b4

View file

@ -558,8 +558,7 @@ function IssueChatAssistantMessage() {
</Avatar>
<div className="min-w-0 flex-1">
<div className="mb-1.5 flex items-center justify-between gap-3">
<div className="flex items-center gap-2">
<div className="mb-1.5 flex items-center gap-2">
<span className="text-sm font-medium text-foreground">{authorName}</span>
{isRunning ? (
<span className="inline-flex items-center gap-1 rounded-full border border-cyan-400/40 bg-cyan-500/10 px-2 py-0.5 text-[10px] font-medium uppercase tracking-[0.14em] text-cyan-700 dark:text-cyan-200">
@ -568,10 +567,57 @@ function IssueChatAssistantMessage() {
</span>
) : null}
</div>
<div className="flex items-center gap-1 text-xs text-muted-foreground">
<a href={anchorId ? `#${anchorId}` : undefined} className="hover:text-foreground hover:underline">
<div className="space-y-3">
<MessagePrimitive.Parts
components={{
Text: ({ text }) => <IssueChatTextPart text={text} />,
ChainOfThought: IssueChatChainOfThought,
}}
/>
{message.content.length === 0 && waitingText ? (
<div className="rounded-sm bg-accent/20 px-3 py-2 text-sm text-muted-foreground">
{waitingText}
</div>
) : null}
{notices.length > 0 ? (
<div className="space-y-2">
{notices.map((notice, index) => (
<div
key={`${message.id}:notice:${index}`}
className="rounded-sm border border-border/60 bg-accent/20 px-3 py-2 text-sm text-muted-foreground"
>
{notice}
</div>
))}
</div>
) : null}
</div>
<div className="mt-2 flex items-center gap-1">
<a
href={anchorId ? `#${anchorId}` : undefined}
className="mr-1 text-xs text-muted-foreground hover:text-foreground hover:underline"
>
{message.createdAt ? formatShortDate(message.createdAt) : ""}
</a>
<ActionBarPrimitive.Copy
copiedDuration={2000}
className="group inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground data-[copied=true]:text-foreground"
title="Copy message"
aria-label="Copy message"
>
<Copy className="h-3.5 w-3.5 group-data-[copied=true]:hidden" />
<Check className="hidden h-3.5 w-3.5 group-data-[copied=true]:block" />
</ActionBarPrimitive.Copy>
{commentId && onVote ? (
<IssueChatFeedbackButtons
activeVote={activeVote}
sharingPreference={feedbackDataSharingPreference}
termsUrl={feedbackTermsUrl ?? null}
onVote={handleVote}
/>
) : null}
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
@ -606,53 +652,6 @@ function IssueChatAssistantMessage() {
</DropdownMenu>
</div>
</div>
<div className="space-y-3">
<MessagePrimitive.Parts
components={{
Text: ({ text }) => <IssueChatTextPart text={text} />,
ChainOfThought: IssueChatChainOfThought,
}}
/>
{message.content.length === 0 && waitingText ? (
<div className="rounded-sm bg-accent/20 px-3 py-2 text-sm text-muted-foreground">
{waitingText}
</div>
) : null}
{notices.length > 0 ? (
<div className="space-y-2">
{notices.map((notice, index) => (
<div
key={`${message.id}:notice:${index}`}
className="rounded-sm border border-border/60 bg-accent/20 px-3 py-2 text-sm text-muted-foreground"
>
{notice}
</div>
))}
</div>
) : null}
</div>
<div className="mt-2 flex items-center gap-1">
<ActionBarPrimitive.Copy
copiedDuration={2000}
className="group inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground data-[copied=true]:text-foreground"
title="Copy message"
aria-label="Copy message"
>
<Copy className="h-3.5 w-3.5 group-data-[copied=true]:hidden" />
<Check className="hidden h-3.5 w-3.5 group-data-[copied=true]:block" />
</ActionBarPrimitive.Copy>
{commentId && onVote ? (
<IssueChatFeedbackButtons
activeVote={activeVote}
sharingPreference={feedbackDataSharingPreference}
termsUrl={feedbackTermsUrl ?? null}
onVote={handleVote}
/>
) : null}
</div>
</div>
</div>
</MessagePrimitive.Root>
);
@ -920,7 +919,7 @@ function IssueChatSystemMessage() {
{statusChange ? (
<div className={cn("flex flex-wrap items-center gap-1.5 text-xs", isCurrentUser && "justify-end")}>
<span className="text-[9px] font-medium uppercase tracking-[0.14em] text-muted-foreground">
<span className="text-xs font-medium uppercase tracking-wider text-muted-foreground">
Status
</span>
<span className="text-muted-foreground">{humanizeValue(statusChange.from)}</span>
@ -931,7 +930,7 @@ function IssueChatSystemMessage() {
{assigneeChange ? (
<div className={cn("flex flex-wrap items-center gap-1.5 text-xs", isCurrentUser && "justify-end")}>
<span className="text-[9px] font-medium uppercase tracking-[0.14em] text-muted-foreground">
<span className="text-xs font-medium uppercase tracking-wider text-muted-foreground">
Assignee
</span>
<span className="text-muted-foreground">