From 7c3e2cc66fce7551beeba8253f80e96a4470da29 Mon Sep 17 00:00:00 2001 From: t0ng7u Date: Sun, 12 Jul 2026 15:53:15 +0800 Subject: [PATCH] refactor(web): inline retry chain and polish model mapping popover in usage logs Show the retry chain as compact grey inline text next to the channel badge (middle-collapsed beyond three hops, full chain in the tooltip) instead of hiding it behind a popover icon. Move the model-mapping route marker inside the badge's trailing icon slot, size the mapping popover to its content, and make both model names copyable. Group ratio now hides together with the group name when sensitive info is masked. --- .../columns/common-logs-columns.tsx | 65 ++++++++----------- .../usage-logs/components/model-badge.tsx | 36 ++++++---- 2 files changed, 48 insertions(+), 53 deletions(-) diff --git a/web/default/src/features/usage-logs/components/columns/common-logs-columns.tsx b/web/default/src/features/usage-logs/components/columns/common-logs-columns.tsx index 00f1224c9a..87d109d721 100644 --- a/web/default/src/features/usage-logs/components/columns/common-logs-columns.tsx +++ b/web/default/src/features/usage-logs/components/columns/common-logs-columns.tsx @@ -24,11 +24,6 @@ import { useTranslation } from 'react-i18next' import { GroupBadge } from '@/components/group-badge' import { CopyableStatusBadge, StatusBadge } from '@/components/status-badge' import { Avatar, AvatarFallback } from '@/components/ui/avatar' -import { - Popover, - PopoverContent, - PopoverTrigger, -} from '@/components/ui/popover' import { Tooltip, TooltipContent, @@ -347,6 +342,17 @@ export function useCommonLogsColumns(isAdmin: boolean): ColumnDef[] { const channelChain = hasRetryChain ? useChannel.join(' → ') : undefined + // Inline variant is compact (no spaces) so three hops fit the + // 160px cell; longer chains collapse the middle, keeping the + // first hops and the final channel. Full chain stays in the + // tooltip below. + let channelChainInline: string | undefined + if (hasRetryChain) { + channelChainInline = + useChannel.length > 3 + ? `${useChannel[0]}→${useChannel[1]}→…→${useChannel.at(-1)}` + : useChannel.join('→') + } const channelDisplay = log.channel_name ? `${log.channel_name} #${log.channel}` : `#${log.channel}` @@ -366,7 +372,7 @@ export function useCommonLogsColumns(isAdmin: boolean): ColumnDef[] {
} > -
+
[] { )} {hasRetryChain && ( - - e.stopPropagation()} - /> - } - > - - -
-

{t('Retry Chain')}

-

- {channelChain} -

-
-
-
+ + )} {affinity && (