Skip to content

Conversation

@icecrasher321
Copy link
Collaborator

@icecrasher321 icecrasher321 commented Dec 31, 2025

Summary

Subblock being empty string should fail useEffect check in tool-input.tsx

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Dec 31, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Skipped Skipped Dec 31, 2025 1:39am

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 31, 2025

Greptile Summary

  • Changes the condition from if (storeValue) to if (storeValue != null) in the GenericSyncWrapper component's useEffect to allow empty string parameter values to trigger synchronization
  • Fixes a bug where tool parameters couldn't be properly cleared since empty strings were treated as falsy and skipped during store-to-UI synchronization

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/tool-input.tsx Fixed synchronization bug where empty string values were incorrectly excluded from value updates

Confidence score: 5/5

  • This PR is safe to merge with minimal risk
  • Score reflects a simple, targeted bug fix that follows TypeScript best practices and addresses a clear issue
  • No files require special attention as the change is isolated and well-understood

Sequence Diagram

sequenceDiagram
    participant User
    participant ToolInput
    participant Combobox
    participant Store
    participant ToolConfig
    participant ParameterInput

    User->>ToolInput: "Click 'Add tool...'"
    ToolInput->>Combobox: "Open tool selection"
    Combobox->>ToolInput: "Render tool groups"
    ToolInput->>User: "Display available tools"
    
    User->>Combobox: "Select tool from list"
    Combobox->>ToolInput: "Call handleSelectTool"
    ToolInput->>ToolConfig: "getToolParametersConfig(toolId)"
    ToolConfig->>ToolInput: "Return tool parameters"
    ToolInput->>ToolInput: "initializeToolParams"
    ToolInput->>Store: "setStoreValue with new tool"
    Store->>ToolInput: "Update selectedTools state"
    ToolInput->>User: "Display expanded tool configuration"
    
    User->>ParameterInput: "Enter parameter value"
    ParameterInput->>ToolInput: "Call handleParamChange"
    ToolInput->>Store: "Update tool params in store"
    Store->>ToolInput: "Confirm parameter saved"
Loading

@icecrasher321 icecrasher321 merged commit 2cfd75a into staging Dec 31, 2025
11 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/function-tool-inp branch January 1, 2026 03:00
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.

2 participants