🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(web): align prompt detail page with trace view styling (#18448)
Trang Nguyen65c78c7df069
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 6bf180c132..919ae63e92 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -558,7 +558,7 @@ The background color of the following component will be `hsl(var(--primary))` an| --find-match-selected-foreground | Foreground color for selected search matches | CodeMirrorEditor || --find-match-background | Background color for search matches | CodeMirrorEditor || --surface-sunken | Off-white panel behind detail content (99%, lighter than zinc-50) | Trace detail panel, nav sidebar |-| --surface-output | Background of output blocks in the trace preview (zinc-100) | IOPreview, MarkdownViewer |+| --surface-output | Background of output blocks in the trace preview (zinc-100) | IOPreview, MarkdownViewer, CodeView || --line-dotted | Dotted connector lines; dimmed in dark | dotted-line-y, prompt timeline || --surface | Sticky table chrome fill; follows --surface-context | Table headers, footers || --observation-<type>-line | Observation type colour for stroked icons and borders | ItemTypeIcon, graph nodes |diff --git a/web/src/components/design-system/Badge/Badge.stories.tsx b/web/src/components/design-system/Badge/Badge.stories.tsxindex 19167f0aa1..b2daf2c63d 100644--- a/web/src/components/design-system/Badge/Badge.stories.tsx+++ b/web/src/components/design-system/Badge/Badge.stories.tsx@@ -35,6 +35,7 @@ const allColors = Object.keys({orangeTint: true,limeTint: true,fuchsiaTint: true,+ inverted: true,} satisfies Record<Color, true>) as Color[];export const Default = meta.story({});@@ -75,6 +76,10 @@ export const Small = meta.story({args: { text: "DEBUG", size: "sm" },});+export const Large = meta.story({+ args: { text: "# 16", size: "lg", color: "inverted", font: "mono" },+});+export const GhostInteractive = meta.story({args: {color: "ghost",diff --git a/web/src/components/design-system/Badge/Badge.tsx b/web/src/components/design-system/Badge/Badge.tsxindex e566e8ccf0..a8acc181a5 100644--- a/web/src/components/design-system/Badge/Badge.tsx+++ b/web/src/components/design-system/Badge/Badge.tsx@@ -10,6 +10,8 @@ const badgeVariants = cva({variants: {size: {+ /** Matches the 24px entity tile next to page titles. */+ lg: "h-6 gap-1.5 px-2",default: "h-5.5 gap-1.5 pr-1.5 pl-2",md: "h-5 gap-1 px-1.5",sm: "h-4.5 gap-1 px-1.5",@@ -45,6 +47,7 @@ const badgeVariants = cva("border-category-lime/40 bg-category-lime/10 text-foreground-secondary",fuchsiaTint:"border-category-fuchsia/40 bg-category-fuchsia/10 text-foreground-secondary",+ inverted: "border-transparent bg-primary text-primary-foreground",},interactive: {true: "underline-dotted",diff --git a/web/src/components/ui/command.tsx b/web/src/components/ui/command.tsxindex 52b81d5eba..7bf2e81748 100644--- a/web/src/components/ui/command.tsx+++ b/web/src/components/ui/command.tsx@@ -78,8 +78,10 @@ const CommandInput = React.forwardRef<React.ComponentRef<typeof CommandPrimitive.Input>,React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input> & {showBorder?: boolean;+ /** Compact panel-toolbar search: 28px, xs text, mono placeholder. */+ variant?: "default" | "toolbar";}->(({ className, showBorder = true, ...props }, ref) => (+>(({ className, showBorder = true, variant = "default", ...props }, ref) => (<divclassName={cn("relative flex items-center p-1",@@ -92,6 +94,7 @@ const CommandInput = React.forwardRef<ref={ref}className={cn("placeholder:text-muted-foreground flex h-8 w-full rounded-md bg-transparent py-3 pr-6 pl-6 text-sm outline-hidden focus:ring-0 focus:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",+ variant === "toolbar" && "h-7 text-xs placeholder:font-mono",className,)}{...props}diff --git a/web/src/features/prompts/components/PromptVariableListPreview.tsx b/web/src/features/prompts/components/PromptVariableListPreview.tsxindex 2ca4085102..28e0e3c02a 100644--- a/web/src/features/prompts/components/PromptVariableListPreview.tsx+++ b/web/src/features/prompts/components/PromptVariableListPreview.tsx@@ -1,4 +1,4 @@-import { Badge } from "@/src/components/ui/badge";+import { BadgeShell } from "@/src/components/design-system/Badge/Badge";export const PromptVariableListPreview = ({variables,@@ -7,14 +7,14 @@ export const PromptVariableListPreview = ({}) => {return (<div>- <p className="text-muted-foreground mb-2 text-sm">+ <p className="text-foreground-secondary mb-2 text-xs">The following variables are available:</p><div className="flex min-h-6 flex-wrap gap-2">{variables.map((variable) => (- <Badge key={variable} variant="outline">+ <BadgeShell key={variable} font="mono" size="md">{variable}- </Badge>+ </BadgeShell>))}</div></div>diff --git a/web/src/features/prompts/components/SetPromptVersionLabels/index.tsx b/web/src/features/prompts/components/SetPromptVersionLabels/index.tsxindex 0d246db902..bf8eb1143f 100644--- a/web/src/features/prompts/components/SetPromptVersionLabels/index.tsx+++ b/web/src/features/prompts/components/SetPromptVersionLabels/index.tsx@@ -1,7 +1,7 @@/* eslint-disable no-nested-ternary *//* eslint-disable @repo/no-abstracted-overlay-trigger */-import React, { useEffect, useState, useRef, type ReactNode } from "react";-import { CircleFadingArrowUp } from "lucide-react";+import React, { useEffect, useState, useRef } from "react";+import { Plus } from "lucide-react";import { Button } from "@/src/components/ui/button";import { Input } from "@/src/components/ui/input";import {@@ -37,16 +37,12 @@ export function SetPromptVersionLabels({prompt,isOpen,setIsOpen,- title,- showOnlyOnHover = false,maxVisibleLabels = 8,}: {promptLabels: string[];prompt: Prompt;isOpen: boolean;setIsOpen: (isOpen: boolean) => void;- title?: ReactNode;- showOnlyOnHover?: boolean;maxVisibleLabels?: number;}) {const projectId = useProjectIdFromURL();@@ -174,33 +170,27 @@ export function SetPromptVersionLabels({return (<Popover open={isOpen} onOpenChange={handleOnOpenChange} modal={false}>- <PopoverTrigger asChild data-version-trigger="true">- <div- className={cn(- "flex w-fit max-w-full min-w-0 cursor-pointer flex-wrap gap-1",- !hasAccess && "cursor-not-allowed",- )}- >- {title && title}- {promptLabels.length > 0 && (- <LabelList- labels={toPromptLabelListItems(promptLabels)}- maxVisible={maxVisibleLabels}- />- )}+ {/* Inline: labels wrap one by one inside the host's row. */}+ <div className="contents">+ {promptLabels.length > 0 && (+ <LabelList+ labels={toPromptLabelListItems(promptLabels)}+ layout="inline"+ maxVisible={maxVisibleLabels}+ />+ )}+ <PopoverTrigger asChild><Button- variant="outline"- title="Add prompt label"- className={cn(- "bg-muted-gray text-primary h-6 w-6",- showOnlyOnHover && "opacity-0 group-hover:opacity-100",- !hasAccess && "cursor-not-allowed group-hover:opacity-50",- )}+ variant="ghost"+ size="sm"+ disabled={!hasAccess}+ className="gap-1">- <CircleFadingArrowUp className="icon-base text-icon-foreground shrink-0" />+ <Plus className="icon-sm text-icon-foreground" aria-hidden />+ Add label</Button>- </div>- </PopoverTrigger>+ </PopoverTrigger>+ </div><PopoverContentclassName="max-w-[90vw] sm:max-w-md"align="start"diff --git a/web/src/features/prompts/components/duplicate-prompt.tsx b/web/src/features/prompts/components/duplicate-prompt.tsxindex 885d7a48e7..1b03a63851 100644--- a/web/src/features/prompts/components/duplicate-prompt.tsx+++ b/web/src/features/prompts/components/duplicate-prompt.tsx@@ -205,7 +205,7 @@ export const DuplicatePromptButton: React.FC<{icon={<Copy className="icon-base" aria-hidden="true" />}hasAccess={hasAccess}trackingEventName="prompt_detail:duplicate_button_click"- variant="outline"+ variant="ghost"title="Duplicate prompt"usageLimit={typeof promptLimit === "number"diff --git a/web/src/features/prompts/components/prompt-detail.tsx b/web/src/features/prompts/components/prompt-detail.tsxindex b8062f20d9..ac605109d9 100644--- a/web/src/features/prompts/components/prompt-detail.tsx+++ b/web/src/features/prompts/components/prompt-detail.tsx@@ -10,7 +10,10 @@ import {import type { z } from "zod";import { ChatMessageList } from "@/src/features/traces";import { Tabs } from "@/src/components/design-system/Tabs/Tabs";-import { Badge } from "@/src/components/ui/badge";+import { BadgeShell } from "@/src/components/design-system/Badge/Badge";+import { IconButton } from "@/src/components/design-system/IconButton/IconButton";+import { IO_SECTIONS_FLUSH_CLASS } from "@/src/features/traces/constants/ioSectionClasses";+import { DetailViewHeaderShell } from "@/src/features/traces/components/DetailViewHeaderShell";import { JSONView } from "@/src/components/ui/CodeJsonViewer";import { CodeSection } from "@/src/components/design-system/CodeSection/CodeSection";import { DetailPageNav } from "@/src/features/navigate-detail-pages";@@ -311,28 +314,32 @@ export const PromptDetail = ({<CommandclassName={cn("flex min-h-0 flex-col gap-2 overflow-hidden bg-transparent font-bold focus:ring-0 focus:outline-hidden focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:outline-hidden data-focus:ring-0",- mobile ? "rounded-none" : "rounded-none border-r pr-3",+ mobile ? "rounded-none" : "rounded-none border-r px-3",)}><divclassName={cn("flex shrink-0 items-center justify-between",- mobile ? "mb-1" : "mt-3",+ mobile ? "mb-1" : "-mx-3 border-b py-1.5 pr-3 pl-1",)}><CommandInputshowBorder={false}- placeholder="Search..."- className="text-muted-foreground h-fit border-none py-0 text-sm focus:ring-0"+ variant="toolbar"+ placeholder="Search"+ className="border-none py-0 focus:ring-0"/><Button+ variant="secondary"onClick={() => {capture("prompts:update_form_open");}}className={cn("shrink-0",- mobile ? "h-8 w-fit px-3" : "h-6 w-6 px-1 lg:h-8 lg:w-fit lg:px-3",+ mobile+ ? "h-8 w-fit px-3"+ : "h-6 w-6 px-1 lg:h-7 lg:w-fit lg:px-2.5",)}><Link@@ -452,82 +459,76 @@ export const PromptDetail = ({`/project/${projectId}/prompts/${entry.id}?tab=${currentTab}`}listKey="prompts"+ compact/></>),}}>- <div className="grid flex-1 grid-cols-1 gap-4 overflow-hidden px-3 md:grid-cols-4">+ <div className="grid flex-1 grid-cols-1 overflow-hidden md:grid-cols-4">{isMobile ? null : renderVersionHistory()}- <div className="col-span-1 mt-3 flex max-h-full min-h-0 min-w-0 flex-col md:col-span-3">+ <div className="col-span-1 flex max-h-full min-h-0 min-w-0 flex-col md:col-span-3">{isMobile ? (- <Drawer- open={isVersionHistoryOpen}- onOpenChange={setIsVersionHistoryOpen}- >- <DrawerTrigger asChild>- <Button- variant="outline"- className="mb-3 w-full min-w-0 justify-start gap-2 px-3"- >- <History className="icon-base text-icon-foreground shrink-0" />- <span className="shrink-0">Version #{prompt.version}</span>+ <div className="px-4 pt-3">+ <Drawer+ open={isVersionHistoryOpen}+ onOpenChange={setIsVersionHistoryOpen}+ >+ <DrawerTrigger asChild>+ <Button+ variant="outline"+ className="mb-3 w-full min-w-0 justify-start gap-2 px-3"+ >+ <History className="icon-base text-icon-foreground shrink-0" />+ <span className="shrink-0">Version #{prompt.version}</span>+ <span+ className="text-muted-foreground min-w-0 flex-1 truncate text-left font-normal"+ title={prompt.commitMessage ?? prompt.name}+ >+ {prompt.commitMessage ?? prompt.name}+ </span>+ <DropdownIndicator />+ </Button>+ </DrawerTrigger>+ <DrawerContent className="max-h-[85dvh]">+ <DrawerHeader className="shrink-0 border-b text-left">+ <DrawerTitle>Prompt versions</DrawerTitle>+ <DrawerDescription>+ Select a version of {prompt.name}.+ </DrawerDescription>+ </DrawerHeader>+ <div className="min-h-0 flex-1 overflow-hidden p-4 pt-2">+ {renderVersionHistory({+ mobile: true,+ onVersionSelect: () => setIsVersionHistoryOpen(false),+ })}+ </div>+ </DrawerContent>+ </Drawer>+ </div>+ ) : null}+ <DetailViewHeaderShell>+ <div className="grid w-full grid-cols-1 items-start gap-2 md:grid-cols-[minmax(0,1fr)_auto]">+ <div className="flex min-w-0 flex-wrap items-center gap-x-1 gap-y-1.5">+ <span className="mr-1 inline-flex max-w-full min-w-0 items-center gap-2">+ <BadgeShell color="inverted" font="mono" size="lg">+ # {prompt.version}+ </BadgeShell><span- className="text-muted-foreground min-w-0 flex-1 truncate text-left font-normal"+ className="text-primary min-w-0 truncate text-lg leading-6 font-bold"title={prompt.commitMessage ?? prompt.name}>{prompt.commitMessage ?? prompt.name}</span>- <DropdownIndicator />- </Button>- </DrawerTrigger>- <DrawerContent className="max-h-[85dvh]">- <DrawerHeader className="shrink-0 border-b text-left">- <DrawerTitle>Prompt versions</DrawerTitle>- <DrawerDescription>- Select a version of {prompt.name}.- </DrawerDescription>- </DrawerHeader>- <div className="min-h-0 flex-1 overflow-hidden p-4 pt-2">- {renderVersionHistory({- mobile: true,- onVersionSelect: () => setIsVersionHistoryOpen(false),- })}- </div>- </DrawerContent>- </Drawer>- ) : null}- <div className="flex flex-col items-start gap-2">- <div className="flex w-full min-w-0 flex-col gap-2 md:grid md:grid-cols-[minmax(0,1fr)_auto] md:items-start md:justify-between">- <div className="flex max-w-full min-w-0 shrink flex-col">- <div className="flex max-w-full min-w-0 flex-wrap items-start gap-1">- <SetPromptVersionLabels- title={- <div- className="contents cursor-default!"- onClick={(e) => e.stopPropagation()}- >- <Badge- variant="outline"- className="mr-1 h-6 text-nowrap"- >- # {prompt.version}- </Badge>- <span className="mb-0 line-clamp-2 min-w-0 text-lg font-bold break-all md:break-normal md:wrap-break-word">- {prompt.commitMessage ?? prompt.name}- </span>- </div>- }- promptLabels={prompt.labels}- prompt={prompt}- isOpen={isLabelPopoverOpen}- setIsOpen={setIsLabelPopoverOpen}- />- </div>-- <div className="min-h-1 flex-1" />+ </span>+ <SetPromptVersionLabels+ promptLabels={prompt.labels}+ prompt={prompt}+ isOpen={isLabelPopoverOpen}+ setIsOpen={setIsLabelPopoverOpen}+ /></div>- <div className="flex h-full w-full flex-wrap content-start items-start justify-end gap-1 md:w-auto lg:flex-nowrap">+ <div className="flex flex-wrap items-start justify-end gap-1 lg:flex-nowrap"><JumpToPlaygroundDropdownMenuControllersource="prompt"prompt={{@@ -539,7 +540,8 @@ export const PromptDetail = ({{({ Trigger, disabled, title }) => (<Trigger asChild><Button- variant="outline"+ variant="ghost"+ size="sm"disabled={disabled}title={title}className={cn(@@ -563,7 +565,8 @@ export const PromptDetail = ({><DialogTrigger asChild disabled={!hasExperimentWriteAccess}><Button- variant="outline"+ variant="ghost"+ size="sm"disabled={!hasExperimentWriteAccess}onClick={() => capture("dataset_run:new_form_open")}>@@ -603,7 +606,8 @@ export const PromptDetail = ({{({ disabled, openDrawer }) => (<Buttontype="button"- variant="outline"+ variant="ghost"+ size="sm"disabled={disabled}onClick={() =>openDrawer({@@ -634,9 +638,11 @@ export const PromptDetail = ({</CommentDrawerController><DropdownMenu><DropdownMenuTrigger asChild>- <Button variant="outline" size="icon">- <MoreVertical className="icon-base text-icon-foreground" />- </Button>+ <IconButton+ icon={MoreVertical}+ label="More actions"+ size="sm"+ /></DropdownMenuTrigger><DropdownMenuContentalign="end"@@ -653,7 +659,7 @@ export const PromptDetail = ({</DropdownMenu></div></div>- </div>+ </DetailViewHeaderShell><Tabsvalue={currentTab}layout="fill"@@ -691,7 +697,12 @@ export const PromptDetail = ({</div></Tabs.Content><Tabs.Content value="prompt" layout="fill">- <div className="mb-2 flex max-h-full min-h-0 w-full flex-col gap-2 overflow-y-auto">+ <div+ className={cn(+ "mb-2 flex max-h-full min-h-0 w-full flex-col gap-3 overflow-y-auto px-4 pt-3",+ IO_SECTIONS_FLUSH_CLASS,+ )}+ >{promptGraph.data?.graph && (<div className="flex items-center justify-end py-2"><Tabs@@ -743,7 +754,7 @@ export const PromptDetail = ({</div></Tabs.Content><Tabs.Content value="config" layout="fill">- <div className="flex max-h-full min-h-0 w-full flex-col overflow-y-auto pb-4">+ <div className="flex max-h-full min-h-0 w-full flex-col overflow-y-auto px-4 pt-3 pb-4"><JSONViewjson={prompt.config}title="Config"@@ -752,12 +763,12 @@ export const PromptDetail = ({</div></Tabs.Content><Tabs.Content value="use-prompt" layout="fill">- <div className="flex h-full min-h-0 w-full flex-col gap-2 overflow-y-auto pb-4">+ <div className="flex h-full min-h-0 w-full flex-col gap-3 overflow-y-auto px-4 pt-3 pb-4">{pythonCode && (<CodeSection title="Python" content={pythonCode} />)}{jsCode && <CodeSection title="JS/TS" content={jsCode} />}- <p className="text-muted-foreground pl-1 text-xs">+ <p className="text-muted-foreground text-xs">See{" "}<ahref="https://langfuse.com/docs/prompts"diff --git a/web/src/features/prompts/components/prompt-history.tsx b/web/src/features/prompts/components/prompt-history.tsxindex 97925358c3..9385c41702 100644--- a/web/src/features/prompts/components/prompt-history.tsx+++ b/web/src/features/prompts/components/prompt-history.tsx@@ -1,12 +1,14 @@import { type RouterOutputs } from "@/src/utils/api";-import { useState, useRef, useEffect } from "react";+import { useRef, useEffect } from "react";import { PromptVersionDiffDialogContent } from "./PromptVersionDiffDialog";import { Timeline } from "@/src/components/design-system/Timeline/Timeline";-import { Badge } from "@/src/components/ui/badge";+import { BadgeShell } from "@/src/components/design-system/Badge/Badge";+import { IconButton } from "@/src/components/design-system/IconButton/IconButton";+import { Tooltip } from "@/src/components/design-system/Tooltip/Tooltip";+import { LabelList } from "@/src/components/design-system/LabelList/LabelList";+import { toPromptLabelListItems } from "@/src/features/prompts/utils";import { CommandItem } from "@/src/components/ui/command";-import { Button } from "@/src/components/ui/button";import { DialogController } from "@/src/components/ui/dialog";-import { SetPromptVersionLabels } from "@/src/features/prompts/components/SetPromptVersionLabels";import { CommentCountIcon } from "@/src/features/comments/CommentCountIcon";import { FileDiffIcon } from "lucide-react";@@ -19,8 +21,6 @@ const PromptHistoryTraceNode = (props: {openCommentDrawer: (promptId: string, promptVersion: number) => void;commentCounts?: Map<string, number>;}) => {- const [isHovered, setIsHovered] = useState(false);- const [isLabelPopoverOpen, setIsLabelPopoverOpen] = useState(false);const { prompt } = props;const commentCount = props.commentCounts?.get(prompt.id);@@ -60,8 +60,6 @@ const PromptHistoryTraceNode = (props: {<Timeline.Itemkey={prompt.id}isActive={props.currentPromptVersion === prompt.version}- onMouseEnter={() => setIsHovered(true)}- onMouseLeave={() => setIsHovered(false)}onClick={(e) => {const target = e.target as HTMLElement;if (@@ -77,50 +75,47 @@ const PromptHistoryTraceNode = (props: {}}><div- className="items-start gap-1 space-y-1 rounded-none"+ className="flex items-center gap-2 rounded-none"style={{cursor: "pointer",}}>- <div className="flex flex-wrap items-start gap-1">- <SetPromptVersionLabels- title={- <Badge- onClick={(e) => {- e.stopPropagation();- props.index === 0- ? props.setCurrentPromptVersion(undefined)- : props.setCurrentPromptVersion(prompt.version);- }}- variant="outline"- className="bg-background/50 h-6 shrink-0"- data-version-trigger="false"- >- # {prompt.version}- </Badge>- }- promptLabels={prompt.labels}- prompt={prompt}- isOpen={isLabelPopoverOpen}- setIsOpen={setIsLabelPopoverOpen}- showOnlyOnHover- />- {commentCount ? (- <span+ <div className="flex min-w-0 flex-1 flex-col gap-1.5">+ <div className="flex flex-wrap items-center gap-1">+ <BadgeShellonClick={(e) => {e.stopPropagation();- props.openCommentDrawer(prompt.id, prompt.version);+ props.index === 0+ ? props.setCurrentPromptVersion(undefined)+ : props.setCurrentPromptVersion(prompt.version);}}- className="cursor-pointer"- role="button"+ font="mono"+ size="md">- <CommentCountIcon count={commentCount} />- </span>- ) : null}- </div>+ # {prompt.version}+ </BadgeShell>+ {prompt.labels.length > 0 && (+ <LabelList+ labels={toPromptLabelListItems(prompt.labels)}+ layout="inline"+ maxVisible={8}+ />+ )}+ {commentCount ? (+ <span+ onClick={(e) => {+ e.stopPropagation();+ props.openCommentDrawer(prompt.id, prompt.version);+ }}+ className="cursor-pointer"+ role="button"+ >+ <CommentCountIcon count={commentCount} />+ </span>+ ) : null}+ </div>- <div className="grid w-full grid-cols-1 items-start justify-between gap-1 md:grid-cols-[1fr_auto]">- <div className="min-h-7 min-w-0">+ <div className="min-w-0">{prompt.commitMessage && (<div className="flex flex-1 flex-nowrap gap-2"><span@@ -136,43 +131,43 @@ const PromptHistoryTraceNode = (props: {{prompt.creator || prompt.createdBy}</div></div>- <div className="flex flex-row justify-end space-x-1">- {props.currentPrompt &&- props.currentPromptVersion !== prompt.version ? (- <DialogController- size="xl"- closeOnInteractionOutside- renderContent={({ closeDialog }) => (- <PromptVersionDiffDialogContent- leftPrompt={prompt}- rightPrompt={props.currentPrompt!}- closeDialog={closeDialog}- />- )}- >- {({ isOpen, openDialog }) =>- isHovered ||- props.currentPromptVersion === prompt.version ||- isOpen ? (- <Button- variant="outline"- type="button"- size="icon"- className="h-7 w-7 px-0"+ </div>+ {props.currentPrompt &&+ props.currentPromptVersion !== prompt.version ? (+ <DialogController+ size="xl"+ closeOnInteractionOutside+ renderContent={({ closeDialog }) => (+ <PromptVersionDiffDialogContent+ leftPrompt={prompt}+ rightPrompt={props.currentPrompt!}+ closeDialog={closeDialog}+ />+ )}+ >+ {({ openDialog }) => (+ <span className="flex shrink-0 opacity-0 group-hover:opacity-100 focus-within:opacity-100 pointer-coarse:opacity-100">+ <Tooltip+ label="Compare with selected prompt"+ hoverableContent={false}+ >+ {({ getTriggerProps }) => (+ <IconButton+ {...getTriggerProps()}+ icon={FileDiffIcon}+ label="Compare with selected prompt"+ size="sm"onClick={(event) => {event.stopPropagation();openDialog();}}- title="Compare with selected prompt"- >- <FileDiffIcon className="icon-base text-icon-foreground" />- </Button>- ) : null- }- </DialogController>- ) : null}- </div>- </div>+ />+ )}+ </Tooltip>+ </span>+ )}+ </DialogController>+ ) : null}</div></Timeline.Item></CommandItem>diff --git a/web/src/features/traces/components/DetailViewHeaderShell.tsx b/web/src/features/traces/components/DetailViewHeaderShell.tsxindex 06410fb8a1..49cf95e303 100644--- a/web/src/features/traces/components/DetailViewHeaderShell.tsx+++ b/web/src/features/traces/components/DetailViewHeaderShell.tsx@@ -1,6 +1,6 @@import { type ReactNode } from "react";-/** Padded container shared by the trace and observation detail headers. */+/** Padded container shared by the trace, observation and prompt detail headers. */export function DetailViewHeaderShell({ children }: { children: ReactNode }) {return (<div className="@container shrink-0 space-y-1.5 px-4 pt-3 pb-2">diff --git a/web/src/features/traces/components/TraceLogView/LogViewToolbar.tsx b/web/src/features/traces/components/TraceLogView/LogViewToolbar.tsxindex 0143036975..32288312f5 100644--- a/web/src/features/traces/components/TraceLogView/LogViewToolbar.tsx+++ b/web/src/features/traces/components/TraceLogView/LogViewToolbar.tsx@@ -139,8 +139,9 @@ export const LogViewToolbar = memo(function LogViewToolbar({<Command className="flex-1 rounded-none border-0 bg-transparent"><CommandInputshowBorder={false}+ variant="toolbar"placeholder="Search observations..."- className="placeholder:text-muted-foreground h-7 border-0 text-xs placeholder:font-mono focus:ring-0"+ className="border-0 focus:ring-0"value={searchQuery}onValueChange={onSearchChange}onFocus={onSearchFocus}diff --git a/web/src/features/traces/components/TracePanelNavigationHeader/TracePanelNavigationHeader.tsx b/web/src/features/traces/components/TracePanelNavigationHeader/TracePanelNavigationHeader.tsxindex 59ac8eabab..cb59877fe3 100644--- a/web/src/features/traces/components/TracePanelNavigationHeader/TracePanelNavigationHeader.tsx+++ b/web/src/features/traces/components/TracePanelNavigationHeader/TracePanelNavigationHeader.tsx@@ -238,8 +238,9 @@ function TracePanelNavigationHeaderExpanded({><CommandInputshowBorder={false}+ variant="toolbar"placeholder="Search"- className="@max-[299px]/navheader:placeholder:text-muted-foreground placeholder:text-muted-foreground h-7 min-w-0 border-0 pr-0 text-xs placeholder:font-mono focus:ring-0 @max-[299px]/navheader:h-[1.625rem]"+ className="@max-[299px]/navheader:placeholder:text-muted-foreground min-w-0 border-0 pr-0 focus:ring-0 @max-[299px]/navheader:h-[1.625rem]"value={searchInputValue}onValueChange={setSearchInputValue}onKeyDown={handleSearchKeyDown}