Skip to content

fix: remove hardcoded 48-character limit from text inputs#5

Open
tomerqodo wants to merge 2 commits intoaugment_full_base_fix_remove_hardcoded_48-character_limit_from_text_inputs_pr5from
augment_full_head_fix_remove_hardcoded_48-character_limit_from_text_inputs_pr5
Open

fix: remove hardcoded 48-character limit from text inputs#5
tomerqodo wants to merge 2 commits intoaugment_full_base_fix_remove_hardcoded_48-character_limit_from_text_inputs_pr5from
augment_full_head_fix_remove_hardcoded_48-character_limit_from_text_inputs_pr5

Conversation

@tomerqodo
Copy link
Copy Markdown

Benchmark PR from agentic-review-benchmarks#5

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Jan 26, 2026

🤖 Augment PR Summary

Summary: Removes the hardcoded 48-character default limit from text inputs so values are only constrained when a variable’s max_length is explicitly configured.

Changes:

  • Drops DEFAULT_VALUE_MAX_LEN fallbacks across app debug/config and share/run-once input components
  • Stops defaulting max_length in workflow/pipeline variable templates and editors
  • Updates batch text-generation CSV validation to rely solely on configured max_length
  • Adjusts tests: removes the paragraph default-max-length assertion and adds RunOnce coverage for optional maxLength attributes

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

return false
}
const headerData = data[0]
console.log('Checking batch inputs:', { dataLength: data.length, headerData })
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a debug console.log was left in checkBatchInputs, which will spam browser logs for everyone using the shared text-generation page.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

if (varItem.type === 'string') {
const maxLen = varItem.max_length || DEFAULT_VALUE_MAX_LEN
if (item[varIndex].length > maxLen) {
if (item[varIndex].length > varItem.max_length) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

item[varIndex].length > varItem.max_length can behave unexpectedly when max_length is null/undefined (e.g., null coerces to 0 and may fail every non-empty value). Consider explicitly skipping the max-length check unless max_length is a finite number.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

{type === 'number' && (
<Input
type="number"
type="text"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switching the number variable input from type="number" to type="text" removes native numeric validation and the numeric keyboard on mobile, while handleInputValueChange stores the raw string. If this was only done to support maxLength, it may need additional guarding to prevent non-numeric values from being submitted.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant