From 12e1c7d9d07653a3af70b3f9905c60a459bd17e9 Mon Sep 17 00:00:00 2001 From: Sean Teramae Date: Fri, 24 Jul 2026 14:33:30 -0700 Subject: [PATCH] fix(studio): Show toast on logs copy Signed-off-by: Sean Teramae --- web/packages/common/src/components/LogViewer/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/packages/common/src/components/LogViewer/index.tsx b/web/packages/common/src/components/LogViewer/index.tsx index fbef8a174fc..9d239e69ea8 100644 --- a/web/packages/common/src/components/LogViewer/index.tsx +++ b/web/packages/common/src/components/LogViewer/index.tsx @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useStickToBottom } from '@nemo/common/src/hooks/useStickToBottom'; +import { useToast } from '@nemo/common/src/providers/toast/useToast'; import { triggerDownload } from '@nemo/common/src/utils/file'; import { formatLogs } from '@nemo/common/src/utils/logs'; import type { PlatformJobLog } from '@nemo/sdk/generated/platform/schema'; @@ -44,6 +45,8 @@ export const LogViewer: FC = ({ const isShowingLogs = useMemo(() => logs.length > 0 && !isLoading, [logs.length, isLoading]); + const { success } = useToast(); + const { ref: codeScrollRef, scrollToBottom } = useStickToBottom({ enabled: isShowingLogs, resetKey: showAllLogs, @@ -84,6 +87,7 @@ export const LogViewer: FC = ({ kind="block" collapsible={false} rows={rows} + onCopySuccess={() => success('Copied to clipboard!', { durationMs: 3000 })} attributes={{ CodeSnippetCode: { ref: codeScrollRef,