Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore(agent): Polish assistant UI (mainly around quick actions) (#15198)

Lysander Kiesel7f73dc010d06
diff --git a/web/src/components/nav/in-app-ai-agent-button.tsx b/web/src/components/nav/in-app-ai-agent-button.tsx
index c713f188bd..92a7496a11 100644
--- a/web/src/components/nav/in-app-ai-agent-button.tsx
+++ b/web/src/components/nav/in-app-ai-agent-button.tsx
@@ -8,6 +8,7 @@ import {
useInAppAiAgent,
type InAppAgentEntryPoint,
} from "@/src/ee/features/in-app-agent/components/InAppAiAgentProvider";
+import { cn } from "@/src/utils/tailwind";
/** Launcher only — the assistant window itself is rendered by
* InAppAgentWindowHost from the persistent authenticated layout, so it
@@ -59,13 +60,16 @@ export const InAppAiAgentButton = () => {
return (
<Button
type="button"
- variant={open ? "secondary" : "ghost"}
- size="sm"
+ variant="outline"
aria-label={open ? "Close assistant" : "Open assistant"}
aria-pressed={open}
data-ignore-outside-interaction
onClick={() => toggleAssistant("top_nav")}
- className="gap-2"
+ className={cn(
+ "gap-2",
+ open &&
+ "border-primary-accent bg-primary-accent/10 hover:bg-primary-accent/15",
+ )}
>
<BotMessageSquare className="h-4 w-4" />
<span className="hidden sm:inline">Assistant</span>
diff --git a/web/src/ee/features/in-app-agent/components/InAppAgentWindow.tsx b/web/src/ee/features/in-app-agent/components/InAppAgentWindow.tsx
index ac4ec289f3..843993b616 100644
--- a/web/src/ee/features/in-app-agent/components/InAppAgentWindow.tsx
+++ b/web/src/ee/features/in-app-agent/components/InAppAgentWindow.tsx
@@ -100,15 +100,15 @@ function InAppAgentQuickActionPicker({
return (
<>
- <p className="text-foreground mt-4 text-base font-medium">
+ <p className="text-foreground mt-3 text-sm font-medium">
Welcome to the Langfuse Assistant
</p>
- <p className="text-muted-foreground mt-2 max-w-xs text-center text-sm leading-relaxed">
+ <p className="text-muted-foreground mt-1 max-w-xs text-center text-xs leading-relaxed">
What do you want to do?
</p>
<Tabs
value={selectedContext}
- className="mt-5 w-full max-w-md"
+ className="mt-4 w-full max-w-sm"
onValueChange={(value) => {
if (isInAppAgentQuickActionContext(value)) {
setSelectedContext(value);
@@ -117,21 +117,21 @@ function InAppAgentQuickActionPicker({
>
<TabsList
aria-label="Quick action category"
- className="h-auto w-full justify-between rounded-none border-b bg-transparent p-0"
+ className="flex h-auto w-full rounded-none border-b bg-transparent p-0"
>
{IN_APP_AGENT_QUICK_ACTION_CONTEXTS.map((context) => (
<TabsTrigger
key={context}
value={context}
disabled={isDisabled}
- className="text-muted-foreground data-[state=active]:border-primary-accent data-[state=active]:text-foreground h-8 shrink-0 rounded-none border-b-2 border-transparent bg-transparent px-0 text-sm tracking-[-0.04em] shadow-none data-[state=active]:bg-transparent data-[state=active]:shadow-none"
+ className="text-muted-foreground data-[state=active]:border-primary-accent data-[state=active]:text-foreground h-7 min-w-0 flex-1 rounded-none border-b-2 border-transparent bg-transparent px-1 text-xs shadow-none data-[state=active]:bg-transparent data-[state=active]:shadow-none"
>
{IN_APP_AGENT_QUICK_ACTION_CONTEXT_LABELS[context]}
</TabsTrigger>
))}
</TabsList>
</Tabs>
- <div className="mt-4 flex w-full max-w-sm flex-col gap-2.5">
+ <div className="mt-3 grid w-full max-w-sm grid-cols-1 gap-2">
{selectedActions.map((action, position) => {
const ActionIcon = action.icon ?? contextFallbackIcon;
@@ -140,21 +140,21 @@ function InAppAgentQuickActionPicker({
key={action.id}
type="button"
variant="outline"
- className="bg-card hover:bg-muted/60 group h-auto min-h-16 w-full justify-start gap-2.5 rounded-lg px-3 py-2 text-left whitespace-normal shadow-xs"
+ className="bg-card hover:bg-muted/60 group h-auto min-h-13 w-full justify-start gap-2 rounded-md px-2.5 py-2 text-left whitespace-normal shadow-xs"
disabled={isDisabled}
onClick={() => {
onSelectAction(action, selectedContext, position);
}}
>
- <span className="bg-muted text-primary-accent flex size-8 shrink-0 items-center justify-center rounded-md">
- <ActionIcon aria-hidden="true" className="size-4" />
+ <span className="bg-muted text-primary-accent flex size-7 shrink-0 items-center justify-center rounded-md">
+ <ActionIcon aria-hidden="true" className="size-3.5" />
</span>
<span className="min-w-0 flex-1">
- <span className="text-foreground block text-sm leading-snug font-semibold">
+ <span className="text-foreground block text-xs leading-snug font-semibold">
{action.label}
</span>
<span
- className="text-muted-foreground mt-0.5 block truncate text-sm leading-snug font-normal"
+ className="text-muted-foreground mt-0.5 block truncate text-xs leading-snug font-normal"
title={action.description}
>
{action.description}
@@ -162,7 +162,7 @@ function InAppAgentQuickActionPicker({
</span>
<ArrowRight
aria-hidden="true"
- className="text-muted-foreground size-4 shrink-0 transition-transform group-hover:translate-x-0.5"
+ className="text-muted-foreground size-3.5 shrink-0 transition-transform group-hover:translate-x-0.5"
/>
</Button>
);
@@ -708,7 +708,7 @@ export function InAppAgentWindow(props: InAppAgentWindowProps) {
{!hasUserMessage ? (
<div className="flex h-full w-full flex-1 flex-col items-center justify-center px-2">
<div>
- <BotMessageSquare className="text-muted-foreground mx-auto h-8 w-8" />
+ <BotMessageSquare className="text-muted-foreground mx-auto h-7 w-7" />
</div>
<InAppAgentQuickActionPicker
key={`${selectedConversationId ?? "new"}:${quickActionResetKey}`}