fix: show message action tooltips at bottom on agents page (#24041)

The CopyButton tooltip on `/agents` defaulted to top (Radix default),
while the Edit button already used `side="bottom"`. This adds an
optional `tooltipSide` prop to `CopyButton` and passes `"bottom"` in the
agents `ConversationTimeline` so both tooltips appear below the buttons
consistently.

## Changes

- `CopyButton`: added optional `tooltipSide` prop, forwarded to
`<TooltipContent side={tooltipSide}>`
- `ConversationTimeline`: passed `tooltipSide="bottom"` to the
copy-message `CopyButton`

> Generated by Coder Agents
This commit is contained in:
Kyle Carberry
2026-04-05 20:44:59 +00:00
committed by GitHub
parent a16755dd66
commit 937f50f0ae
2 changed files with 4 additions and 1 deletions
@@ -12,11 +12,13 @@ import { useClipboard } from "#/hooks/useClipboard";
type CopyButtonProps = ButtonProps & {
text: string;
label: string;
tooltipSide?: "top" | "bottom" | "left" | "right";
};
export const CopyButton: FC<CopyButtonProps> = ({
text,
label,
tooltipSide,
...buttonProps
}) => {
const { showCopiedSuccess, copyToClipboard } = useClipboard();
@@ -34,7 +36,7 @@ export const CopyButton: FC<CopyButtonProps> = ({
<span className="sr-only">{label}</span>
</Button>
</TooltipTrigger>
<TooltipContent>{label}</TooltipContent>
<TooltipContent side={tooltipSide}>{label}</TooltipContent>
</Tooltip>
);
};
@@ -643,6 +643,7 @@ const ChatMessageItem = memo<{
text={parsed.markdown}
label="Copy message"
className="size-6"
tooltipSide="bottom"
/>
)}
{isUser && onEditUserMessage && (