From 951a580907af1c510e45660f6626325929916e86 Mon Sep 17 00:00:00 2001 From: yyh Date: Tue, 20 Jan 2026 14:21:31 +0800 Subject: [PATCH] feat: artifacts section layout --- .../skill/file-tree/artifacts-section.tsx | 58 +++++++++++++++++++ .../workflow/skill/file-tree/index.tsx | 50 +++++++++------- 2 files changed, 87 insertions(+), 21 deletions(-) create mode 100644 web/app/components/workflow/skill/file-tree/artifacts-section.tsx diff --git a/web/app/components/workflow/skill/file-tree/artifacts-section.tsx b/web/app/components/workflow/skill/file-tree/artifacts-section.tsx new file mode 100644 index 0000000000..90c4d427fd --- /dev/null +++ b/web/app/components/workflow/skill/file-tree/artifacts-section.tsx @@ -0,0 +1,58 @@ +'use client' + +import type { FC } from 'react' +import { RiArrowRightSLine } from '@remixicon/react' +import * as React from 'react' +import FolderSpark from '@/app/components/base/icons/src/vender/workflow/FolderSpark' +import { cn } from '@/utils/classnames' + +type ArtifactsSectionProps = { + className?: string +} + +/** + * Artifacts section component for file tree. + * Shows the artifacts folder with badge and navigation arrow. + * Clicking expands to show artifact files from test runs. + * Placeholder implementation - functionality to be added later. + */ +const ArtifactsSection: FC = ({ className }) => { + // TODO: Replace with actual data + const badgeText = 'Test Run#3' + const hasNewFiles = true + + return ( +
+
+ {/* Title section */} +
+ {/* Icon */} +
+ +
+ {/* Label */} + + Artifacts + + {/* Badge */} +
+ + {badgeText} + +
+
+ + {/* Arrow with indicator */} +
+ + {/* Blue dot indicator */} + {hasNewFiles && ( +
+ )} +
+
+
+ ) +} + +export default React.memo(ArtifactsSection) diff --git a/web/app/components/workflow/skill/file-tree/index.tsx b/web/app/components/workflow/skill/file-tree/index.tsx index d3c030e137..5e41e7802b 100644 --- a/web/app/components/workflow/skill/file-tree/index.tsx +++ b/web/app/components/workflow/skill/file-tree/index.tsx @@ -20,6 +20,7 @@ import { useInlineCreateNode } from '../hooks/use-inline-create-node' import { useRootFileDrop } from '../hooks/use-root-file-drop' import { useSkillAssetTreeData } from '../hooks/use-skill-asset-tree' import { useSyncTreeWithActiveTab } from '../hooks/use-sync-tree-with-active-tab' +import ArtifactsSection from './artifacts-section' import DragActionTooltip from './drag-action-tooltip' import TreeContextMenu from './tree-context-menu' import TreeNode from './tree-node' @@ -166,35 +167,41 @@ const FileTree: React.FC = ({ className }) => { if (treeChildren.length === 0 && !hasPendingCreate) { return ( -
-
- - {t('skillSidebar.empty')} - + <> +
+
+ + {t('skillSidebar.empty')} + +
+
- -
+ + ) } // Search has no matching results if (hasSearchNoResults) { return ( -
-
- - - {t('skillSidebar.searchNoResults')} - - + <> +
+
+ + + {t('skillSidebar.searchNoResults')} + + +
-
+ + ) } @@ -250,6 +257,7 @@ const FileTree: React.FC = ({ className }) => { {dragOverFolderId ? : } + )