diff --git a/packages/dify-ui/src/scroll-area/index.stories.tsx b/packages/dify-ui/src/scroll-area/index.stories.tsx
index bd3a1cef162..28c00bea2a7 100644
--- a/packages/dify-ui/src/scroll-area/index.stories.tsx
+++ b/packages/dify-ui/src/scroll-area/index.stories.tsx
@@ -17,7 +17,7 @@ const meta = {
layout: 'padded',
docs: {
description: {
- component: 'Compound scroll container built on Base UI Scroll Area. The examples mirror the upstream anatomy and focus patterns while applying Dify UI tokens, panel surfaces, and scrollbar spacing.',
+ component: 'Compound scroll container built on Base UI Scroll Area. The examples mirror the upstream anatomy and focus patterns while applying Dify UI tokens, panel surfaces, and scrollbar spacing. Base UI ScrollArea.Content defaults to min-width: fit-content, so vertical-only regions that should truncate long content must set min-width: 0 on the content slot.',
},
},
},
@@ -70,6 +70,19 @@ const articleParagraphs = [
'A scroll area follows the same principle in an interface. The viewport owns scrolling, the content stays inside its measured width, and the scrollbar remains a visual affordance rather than a second layout system.',
] as const
+const fileRows = [
+ 'agent-roster-skill-detail-dialog-preview-image.png',
+ 'workflow-agent-binding-source-of-truth-summary.md',
+ 'very-long-file-name-that-should-truncate-inside-a-vertical-scroll-area-without-creating-horizontal-scroll.json',
+ 'runtime-output-schema.ts',
+ 'knowledge-retrieval-notes.md',
+ 'composer-draft-original-state-diffing-notes.md',
+ 'generated-contract-console-query-options.ts',
+ 'agent-v2-workflow-node-config-schema.json',
+ 'selected-file-highlight-behavior.spec.tsx',
+ 'scroll-area-content-min-width-regression.md',
+] as const
+
const gridCells = Array.from({ length: 100 }, (_, index) => index + 1)
function StorySection({
@@ -176,6 +189,39 @@ export const Vertical: Story = {
),
}
+export const VerticalTruncation: Story = {
+ render: () => (
+
+
+
+
+
+ {fileRows.map(file => (
+
+
+
+ {file}
+
+
+ ))}
+
+
+
+
+
+
+
+
+ ),
+}
+
export const ScrollFade: Story = {
render: () => (