From 1dbbab40c6e4b8ff05053ffb8649d5d6d0ef57ed Mon Sep 17 00:00:00 2001 From: Matt Pua Date: Tue, 7 Jul 2026 17:38:15 -0400 Subject: [PATCH] fix: show full command in tooltip on truncated tool rows Truncated terminal-command rows relied on the native `title` attribute, which is unreliable/absent in-app, so users couldn't see the full command. Swap it for the Tooltip primitive, rendering the full command in a wrapping mono block on hover. Generated-By: PostHog Code Task-Id: 9f618854-2b33-47b4-9c9f-81e9d196b329 --- .../session-update/ExecuteToolView.tsx | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/packages/ui/src/features/sessions/components/session-update/ExecuteToolView.tsx b/packages/ui/src/features/sessions/components/session-update/ExecuteToolView.tsx index 5dcf6da7b9..e820c4840a 100644 --- a/packages/ui/src/features/sessions/components/session-update/ExecuteToolView.tsx +++ b/packages/ui/src/features/sessions/components/session-update/ExecuteToolView.tsx @@ -1,5 +1,6 @@ import { Terminal } from "@phosphor-icons/react"; import { compactHomePath } from "@posthog/shared"; +import { Tooltip } from "@posthog/ui/primitives/Tooltip"; import { useChatThreadChrome } from "../chat-thread/chatThreadChrome"; import { ToolRow } from "./ToolRow"; import { @@ -51,6 +52,14 @@ export function ExecuteToolView({ ); const hasOutput = output.trim().length > 0; + // Full command in a wrapping mono block so a truncated row still surfaces + // exactly what ran on hover, however long it is. + const commandTooltip = ( + + {command} + + ); + return ( - - {truncateText(compactHomePath(command), MAX_COMMAND_LENGTH)} - + + + {truncateText(compactHomePath(command), MAX_COMMAND_LENGTH)} + + ) : ( - - {truncateText(compactHomePath(command), MAX_COMMAND_LENGTH)} - + + + {truncateText(compactHomePath(command), MAX_COMMAND_LENGTH)} + + ))}