-
Notifications
You must be signed in to change notification settings - Fork 20k
fix: remove hardcoded 48-character limit from text inputs #30156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: remove hardcoded 48-character limit from text inputs #30156
Conversation
Remove the DEFAULT_VALUE_MAX_LEN (48) fallback from text input components. When max_length is not configured, inputs should have no character limit. This fixes an issue where text inputs in workflow and chatflow were always limited to 48 characters even when the max_length setting was removed. The fix: - Removes DEFAULT_VALUE_MAX_LEN fallback from Input maxLength prop - Only applies maxLength when max_length is explicitly configured - Adds tests to verify maxLength behavior fixes langgenius#26940 Signed-off-by: majiayu000 <1835304752@qq.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR removes the hardcoded 48-character fallback limit from text input components, allowing inputs to have no character limit when max_length is not explicitly configured. Previously, all text inputs without a configured max_length would default to a 48-character limit via DEFAULT_VALUE_MAX_LEN.
Key Changes:
- Removed
DEFAULT_VALUE_MAX_LENfallback from text input components across the application - Updated validation logic to only enforce length limits when explicitly configured
- Added tests to verify maxLength attribute behavior
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| web/app/components/share/text-generation/run-once/index.tsx | Removed DEFAULT_VALUE_MAX_LEN import and fallback from text input maxLength prop |
| web/app/components/share/text-generation/run-once/index.spec.tsx | Added tests verifying maxLength attribute is only present when max_length is configured |
| web/app/components/share/text-generation/index.tsx | Removed DEFAULT_VALUE_MAX_LEN import and updated batch input validation to only check length when max_length is set |
| web/app/components/app/configuration/prompt-value-panel/index.tsx | Removed DEFAULT_VALUE_MAX_LEN import and fallback from both string and number input maxLength props |
| web/app/components/app/configuration/debug/chat-user-input.tsx | Removed DEFAULT_VALUE_MAX_LEN import and fallback from both string and number input maxLength props |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
DEFAULT_VALUE_MAX_LEN(48 characters) fallback from text input componentsmax_lengthis not configured, inputs now have no character limit as expectedmaxLengthwhen explicitly configured by the userTest plan
fixes #26940