Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix(web): prevent long segment summaries from shrinking the editor (#40780)
pineapple88006632a2d81a6cb6
diff --git a/web/app/components/datasets/documents/detail/completed/common/__tests__/summary-text.browser.spec.tsx b/web/app/components/datasets/documents/detail/completed/common/__tests__/summary-text.browser.spec.tsxnew file mode 100644index 00000000000..77748ef1409--- /dev/null+++ b/web/app/components/datasets/documents/detail/completed/common/__tests__/summary-text.browser.spec.tsx@@ -0,0 +1,24 @@+import { render } from 'vitest-browser-react'+import SummaryText from '../summary-text'++describe('SummaryText layout', () => {+ it('bounds long summaries to six lines while keeping their full content scrollable', async () => {+ const summary = Array.from({ length: 20 }, (_, index) => `Summary line ${index + 1}`).join('\n')+ const screen = await render(+ <div style={{ width: 320 }}>+ <SummaryText value={summary} />+ </div>,+ )++ const textbox = screen.getByRole('textbox', { name: 'datasetDocuments.segment.summary' })+ await expect.element(textbox).toBeVisible()+ const textarea = textbox.element() as HTMLTextAreaElement+ const lineHeight = Number.parseFloat(getComputedStyle(textarea).lineHeight)++ expect(textarea.value).toBe(summary)+ expect(textarea.getBoundingClientRect().height).toBeLessThanOrEqual(lineHeight * 6 + 1)+ expect(textarea.scrollHeight).toBeGreaterThan(textarea.clientHeight)+ textarea.scrollTop = textarea.scrollHeight+ expect(textarea.scrollTop).toBeGreaterThan(0)+ })+})diff --git a/web/app/components/datasets/documents/detail/completed/common/summary-text.tsx b/web/app/components/datasets/documents/detail/completed/common/summary-text.tsxindex 0e90b67521f..e59f18a55bb 100644--- a/web/app/components/datasets/documents/detail/completed/common/summary-text.tsx+++ b/web/app/components/datasets/documents/detail/completed/common/summary-text.tsx@@ -18,7 +18,7 @@ const SummaryText = ({ value, onChange, disabled }: SummaryTextProps) => {</div><Textareaaria-labelledby={labelId}- className="field-sizing-content min-h-6 w-full resize-none rounded-none border-none bg-transparent p-0 body-sm-regular leading-6 text-text-secondary hover:border-none hover:bg-transparent focus:border-none focus:bg-transparent focus-visible:ring-inset disabled:bg-transparent disabled:text-text-secondary disabled:hover:bg-transparent"+ className="field-sizing-content max-h-36 min-h-6 w-full resize-none overflow-y-auto rounded-none border-none bg-transparent p-0 body-sm-regular leading-6 text-text-secondary hover:border-none hover:bg-transparent focus:border-none focus:bg-transparent focus-visible:ring-inset disabled:bg-transparent disabled:text-text-secondary disabled:hover:bg-transparent"placeholder={t(($) => $['segment.summaryPlaceholder'], { ns: 'datasetDocuments' })}rows={1}value={value ?? ''}