Skip to content

fix: enable auto-resize for chat input textarea - #12836

Merged
KevinHuSh merged 1 commit into
infiniflow:mainfrom
Crystora:fix/enable-auto-resize
Jan 28, 2026
Merged

KevinHuSh merged 1 commit into
infiniflow:mainfrom
Crystora:fix/enable-auto-resize

Conversation

@Crystora

@Crystora Crystora commented Jan 26, 2026 •

Copy link
Copy Markdown
Contributor

Closes #12803

What problem does this PR solve?

The chat input textarea in the Chat UI (and Embed UI) has a fixed height and cannot be resized, causing poor UX when users type messages longer than 2 sentences. The input becomes cramped and difficult to read/edit.
Root cause: The Textarea component in NextMessageInput had resize-none and field-sizing-content CSS classes that prevented resizing, and the existing autoSize prop was not being utilized.

Solution:

  • Removed resize-none and field-sizing-content classes
  • Added autoSize={{ minRows: 1, maxRows: 8 }} to enable auto-expand
  • Added max-h-40 class to limit maximum height to 160px
    The textarea now auto-expands from 1 to 8 rows as users type longer messages.

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. labels Jan 26, 2026
@Crystora

Copy link
Copy Markdown
Contributor Author

@KevinHuSh Could you please review this PR?

@KevinHuSh
KevinHuSh requested a review from cike8899 January 27, 2026 01:49
@KevinHuSh KevinHuSh added the ci Continue Integration label Jan 27, 2026
@KevinHuSh
KevinHuSh marked this pull request as draft January 27, 2026 01:49
@KevinHuSh
KevinHuSh marked this pull request as ready for review January 27, 2026 01:49
@Crystora

Copy link
Copy Markdown
Contributor Author

@cike8899 Could you please review this PR? Thanks

@KevinHuSh
KevinHuSh merged commit df3d044 into infiniflow:main Jan 28, 2026
@Crystora
Crystora deleted the fix/enable-auto-resize branch January 28, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Chat text box cannot be resized

3 participants