From e53ca7e820c096370d51e8e5b2148f5a171270c5 Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 23 Oct 2026 17:28:35 +0800 Subject: [PATCH] fix(usage): tighten request log column spacing The request log has more columns than the other usage tables, so at the default window size the last column (first token) was cut off and the table had to scroll sideways. Its columns are already sized to their content, so the model column had no slack to give back. Narrow the gaps for this table only: 16px between columns (was 24px) and 32px between column groups (was 40px), keeping the 16px outer edges. The table shrinks by 72px with the same rows; model names are not truncated. The provider, model and pricing tables keep their spacing. --- src/components/usage/RequestLogTable.tsx | 6 ++++-- src/components/usage/usageTable.ts | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/usage/RequestLogTable.tsx b/src/components/usage/RequestLogTable.tsx index b8e07314d..1acad67da 100644 --- a/src/components/usage/RequestLogTable.tsx +++ b/src/components/usage/RequestLogTable.tsx @@ -619,7 +619,8 @@ export function RequestLogTable({ key: id, className: cn( cells[id].props.className, - groupBreaks.has(id) && usageTable.groupGap, + usageTable.denseCell, + groupBreaks.has(id) && usageTable.denseGroupGap, pin.className, ), style: pin.style, @@ -671,7 +672,8 @@ export function RequestLogTable({ ref={index === 0 ? firstHeadRef : undefined} className={cn( usageTable.th, - groupBreaks.has(id) && usageTable.groupGap, + usageTable.denseCell, + groupBreaks.has(id) && usageTable.denseGroupGap, pin.className, )} style={pin.style} diff --git a/src/components/usage/usageTable.ts b/src/components/usage/usageTable.ts index 18cabed5d..a408fdd24 100644 --- a/src/components/usage/usageTable.ts +++ b/src/components/usage/usageTable.ts @@ -23,6 +23,9 @@ export const usageTable = { td: "whitespace-nowrap px-3 first:ps-4 last:pe-4", /** 列组之间多留的间距(请求日志按身份 / 成本 / Tokens / 性能分组):组内列距 24px,换组处 40px */ groupGap: "ps-7", + /** 请求日志列多,收紧一档:组内列距 16px,换组处 32px(叠在 th / td / groupGap 之后,首尾 16px 不变) */ + denseCell: "px-2 first:ps-4 last:pe-4", + denseGroupGap: "ps-6", mono: "font-mono text-caption", muted: "text-fg-3", empty: "py-10 text-center text-body text-fg-3",