fix(input-format): allow value field to be cleared#1658
Merged
icecrasher321 merged 4 commits intostagingfrom Oct 16, 2025
Merged
fix(input-format): allow value field to be cleared#1658icecrasher321 merged 4 commits intostagingfrom
icecrasher321 merged 4 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Greptile Overview
Summary
This PR fixes a bug where test values in inputFormat fields couldn't be cleared. The fix has two parts:
- UI component: Removed validation that prevented empty values from being saved when the field loses focus (
input-format.tsx:137-138) - Deployment detection: Added sanitization to exclude the
valuefield from workflow change detection, since it's only used for manual testing and shouldn't trigger deployment alerts
The changes allow users to enter and clear test values in inputFormat fields without affecting deployment state.
Confidence Score: 4/5
- This PR is safe to merge with minor consideration for the collapsed field
- The logic is straightforward and solves the stated problem. Score is 4 (not 5) because the
collapsedfield might also need to be excluded from deployment comparison as it's UI-only state, similar to howisExpandedis handled for tools - apps/sim/lib/workflows/utils.ts - consider excluding collapsed field from comparison
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/starter/input-format.tsx | 5/5 | Removed validation that prevented clearing value field on blur (lines 137-138) |
| apps/sim/lib/workflows/utils.ts | 4/5 | Added sanitization function to exclude value field from deployment change detection |
Sequence Diagram
sequenceDiagram
participant User
participant InputField
participant handleValueInputBlur
participant updateField
participant hasWorkflowChanged
participant sanitizeInputFormatForComparison
User->>InputField: Edits value field (including clearing it)
User->>InputField: Blur event (focus away)
InputField->>handleValueInputBlur: onBlur(field)
Note over handleValueInputBlur: Get current value<br/>(empty string allowed)
handleValueInputBlur->>updateField: updateField(id, 'value', current)
Note over updateField: Store value in state<br/>(empty values now saved)
User->>hasWorkflowChanged: Check if workflow changed
hasWorkflowChanged->>sanitizeInputFormatForComparison: Sanitize current inputFormat
Note over sanitizeInputFormatForComparison: Remove 'value' field<br/>from comparison
hasWorkflowChanged->>sanitizeInputFormatForComparison: Sanitize deployed inputFormat
Note over sanitizeInputFormatForComparison: Remove 'value' field<br/>from comparison
hasWorkflowChanged-->>User: Compare other fields only<br/>(value field ignored)
2 files reviewed, 1 comment
This was referenced Oct 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of Change
Testing
Tested Manually
Checklist