Long segment summaries shrink the editable chunk area
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start in web/app/components/datasets/documents/detail/completed/segment-detail.tsx and common/summary-text.tsx, then reproduce the issue with a long segment summary in the non-fullscreen edit drawer. Trace the column flex layout and autosizing summary field. Done means the summary remains bounded and scrolls within its field while the segment content editor retains a usable minimum height.
Written by the indexing model from the issue text.
Description
Self Checks
- I have read the Contributing Guide and Language Policy.
- This is only for bug report.
- I have searched for existing issues, including closed ones.
- I am submitting this report in English.
Dify version
1.16.1 / current main
Cloud or Self Hosted
Self Hosted
Steps to reproduce
- Open a document in a knowledge base with segment summary enabled.
- Open a segment in the non-fullscreen edit drawer.
- Enter or generate a long summary containing many lines.
- Observe the editable segment content area above the summary field.
Expected behavior
The segment content editor should keep a usable minimum height. A long summary should scroll inside its own field or otherwise remain bounded within the drawer.
Actual behavior
The summary textarea grows with its content and the segment content editor above it is progressively compressed. With a sufficiently long summary, the editable content area becomes difficult to use.
Root cause
In web/app/components/datasets/documents/detail/completed/segment-detail.tsx, the non-fullscreen drawer uses a column flex layout. The segment content area uses h-0 grow, while the summary panel uses shrink-0. In common/summary-text.tsx, the summary field uses react-textarea-autosize with minRows but no maximum row count or max height, so the summary panel can consume the available drawer height without bound.
Proposed fix
Bound the summary textarea height and enable scrolling inside the summary field after the limit is reached, while keeping the segment content editor usable.
Related work
This is separate from #40698, which covers summary regeneration timing and stale segment drawer callbacks.
- Dominant language
- TypeScript
- Stars
- 157k
- Forks
- 24.7k
- Avg merge
- 22h 32m
- Merged PRs (30d)
- 611
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from langgenius/dify
-
Annotation Reply: a stored score threshold of 0.0 is silently replaced with 1, disabling the feature Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
langgenius/dify#42639 · 1 comment · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
langgenius/dify#42468 · 1 comment · 1 reaction ·
-
🐞 bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
langgenius/dify#42446 · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
langgenius/dify#42355 · 1 comment · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
langgenius/dify#42350 · 1 comment · 1 reaction ·
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100