Skip to content

Conversation

@majiayu000
Copy link
Contributor

Summary

  • Removes the hardcoded DEFAULT_VALUE_MAX_LEN (48 characters) fallback from text input components
  • When max_length is not configured, inputs now have no character limit as expected
  • Only applies maxLength when explicitly configured by the user

Test plan

  • All existing tests pass (5458 tests)
  • Added new tests to verify maxLength behavior:
    • Input should not have maxLength attribute when max_length is not set
    • Input should have maxLength attribute when max_length is set

fixes #26940

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>
@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 25, 2025
@crazywoola crazywoola self-assigned this Dec 25, 2025
Copy link
Contributor

Copilot AI left a 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_LEN fallback 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.

crazywoola
crazywoola previously approved these changes Jan 14, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 14, 2026
@majiayu000 majiayu000 requested a review from WTW0313 as a code owner January 14, 2026 05:41
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jan 14, 2026
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jan 14, 2026
@crazywoola crazywoola merged commit 2b021e8 into langgenius:main Jan 15, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frontend charactes limitation

2 participants