Skip to content

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

fix(web): session message footer link style and text-2xs token (#18618)

Trang Nguyene713e15c6627
diff --git a/web/.storybook/docs/ThemeTokens/Typography.tsx b/web/.storybook/docs/ThemeTokens/Typography.tsx
index 4345c900db..19bcb8e459 100644
--- a/web/.storybook/docs/ThemeTokens/Typography.tsx
+++ b/web/.storybook/docs/ThemeTokens/Typography.tsx
@@ -68,6 +68,7 @@ const formatPx = (px: number) => `${Number(px.toFixed(2))}px`;
* the scale table reads like Carbon's "used for …" guidance but stays honest.
*/
const SIZE_USAGE: Record<string, string> = {
+ "--text-2xs": "Session message footer",
"--text-xs": "Badge · DataTable cells",
"--text-sm": "Button · Input · DropdownMenu",
"--text-base": "support-chat intro · eval template detail",
diff --git a/web/src/features/sessions/components/ConnectedModernSessionBodyTimeline/components/ConnectedSessionConversationTimeline/components/SessionConversationalView/components/SessionConversationTimeline/components/SessionConversationTimelineTrace/components/SessionTranscriptContent/components/SessionTimelineContentMessage/SessionTimelineContentMessage.tsx b/web/src/features/sessions/components/ConnectedModernSessionBodyTimeline/components/ConnectedSessionConversationTimeline/components/SessionConversationalView/components/SessionConversationTimeline/components/SessionConversationTimelineTrace/components/SessionTranscriptContent/components/SessionTimelineContentMessage/SessionTimelineContentMessage.tsx
index 8f2c4c23b9..b5b12c1ad3 100644
--- a/web/src/features/sessions/components/ConnectedModernSessionBodyTimeline/components/ConnectedSessionConversationTimeline/components/SessionConversationalView/components/SessionConversationTimeline/components/SessionConversationTimelineTrace/components/SessionTranscriptContent/components/SessionTimelineContentMessage/SessionTimelineContentMessage.tsx
+++ b/web/src/features/sessions/components/ConnectedModernSessionBodyTimeline/components/ConnectedSessionConversationTimeline/components/SessionConversationalView/components/SessionConversationTimeline/components/SessionConversationTimelineTrace/components/SessionTranscriptContent/components/SessionTimelineContentMessage/SessionTimelineContentMessage.tsx
@@ -107,7 +107,7 @@ export function SessionTimelineContentMessage({
onOpenObservation && (
<button
type="button"
- className="text-muted-foreground hover:text-foreground invisible shrink-0 font-mono text-xs group-focus-within/collapsible-row:visible group-hover/collapsible-row:visible hover:underline"
+ className="text-muted-foreground hover:text-foreground invisible shrink-0 font-mono text-xs group-hover/collapsible-row:visible group-has-[:focus-visible]/collapsible-row:visible hover:underline"
onClick={onOpenObservation}
>
Open generation
@@ -200,7 +200,7 @@ export function SessionTimelineContentMessage({
groupIndex === groups.length - 1 && (
<div
className={cn(
- "text-muted-foreground mt-1 flex items-center gap-3 font-mono text-[10px]",
+ "text-muted-foreground text-2xs mt-2 flex items-center gap-3 font-mono",
role === "user" ? "justify-end" : "justify-start",
)}
>
@@ -208,7 +208,7 @@ export function SessionTimelineContentMessage({
<button
type="button"
className={cn(
- "hover:text-foreground invisible group-focus-within/bubble:visible group-hover/bubble:visible hover:underline",
+ "hover:text-foreground decoration-muted-foreground/40 hover:decoration-foreground/40 invisible underline underline-offset-2 group-hover/bubble:visible group-has-[:focus-visible]/bubble:visible",
role !== "user" && "order-1",
)}
onClick={onOpenObservation}
diff --git a/web/src/styles/globals.css b/web/src/styles/globals.css
index 04431830f9..382242f911 100644
--- a/web/src/styles/globals.css
+++ b/web/src/styles/globals.css
@@ -200,6 +200,9 @@
/* Text styles: each size token carries its size (whole pixels at a 16px
root), line-height and canonical weight, so `text-*` alone yields a
complete style. Heavier text opts in via `font-bold`, never a raw number. */
+ --text-2xs: 0.6875rem;
+ --text-2xs--line-height: calc(16 / 11);
+ --text-2xs--font-weight: var(--font-weight-regular);
--text-xs: 0.75rem;
--text-xs--line-height: calc(18 / 12);
--text-xs--font-weight: var(--font-weight-regular);