From 8391cf7d050a9bdf2db342a91099f0bb406054e8 Mon Sep 17 00:00:00 2001 From: yungle246 Date: Thu, 18 Jun 2026 17:59:54 +0900 Subject: [PATCH] fix(web): keep API key table header and rows aligned on scroll The secret-key modal rendered the header and the rows in separate containers with fixed pixel column widths. Adding the Scope column pushed the total width past the modal, so the body scrolled horizontally on its own and desynced from the fixed header. Switch to proportional flex columns (header and rows share the same weights) with min-w-0 + truncate, and constrain the body to vertical scroll only. Columns now always fit the modal width, so the header and values stay aligned. The scope cell gains a title tooltip for the full label when truncated. --- .../develop/secret-key/secret-key-modal.tsx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/web/app/components/develop/secret-key/secret-key-modal.tsx b/web/app/components/develop/secret-key/secret-key-modal.tsx index 46c61da006b..efb33c40563 100644 --- a/web/app/components/develop/secret-key/secret-key-modal.tsx +++ b/web/app/components/develop/secret-key/secret-key-modal.tsx @@ -157,20 +157,20 @@ const SecretKeyModal = ({ !!apiKeysList?.data?.length && (
-
{t('apiKeyModal.secretKey', { ns: 'appApi' })}
- {!appId &&
{t('apiKeyModal.scope', { ns: 'appApi' })}
} -
{t('apiKeyModal.created', { ns: 'appApi' })}
-
{t('apiKeyModal.lastUsed', { ns: 'appApi' })}
-
+
{t('apiKeyModal.secretKey', { ns: 'appApi' })}
+ {!appId &&
{t('apiKeyModal.scope', { ns: 'appApi' })}
} +
{t('apiKeyModal.created', { ns: 'appApi' })}
+
{t('apiKeyModal.lastUsed', { ns: 'appApi' })}
+
-
+
{apiKeysList.data.map(api => (
-
{generateToken(api.token)}
- {!appId &&
{getScopeLabel(api.dataset_id)}
} -
{formatTime(Number(api.created_at), t('dateTimeFormat', { ns: 'appLog' }) as string)}
-
{api.last_used_at ? formatTime(Number(api.last_used_at), t('dateTimeFormat', { ns: 'appLog' }) as string) : t('never', { ns: 'appApi' })}
-
+
{generateToken(api.token)}
+ {!appId &&
{getScopeLabel(api.dataset_id)}
} +
{formatTime(Number(api.created_at), t('dateTimeFormat', { ns: 'appLog' }) as string)}
+
{api.last_used_at ? formatTime(Number(api.last_used_at), t('dateTimeFormat', { ns: 'appLog' }) as string) : t('never', { ns: 'appApi' })}
+
{isCurrentWorkspaceManager && (