Skip to content

fix(deploy-modal): remove deleted blocks from example curl - #1849

Merged
waleedlatif1 merged 1 commit into
stagingfrom
sim-362
Nov 7, 2025
Merged

fix(deploy-modal): remove deleted blocks from example curl#1849
waleedlatif1 merged 1 commit into
stagingfrom
sim-362

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • remove deleted blocks from example curl

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)

@waleedlatif1
waleedlatif1 marked this pull request as ready for review November 7, 2025 23:24
@vercel

vercelBot commented Nov 7, 2025

Copy link
Copy Markdown

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

1 Skipped Deployment
ProjectDeploymentPreviewCommentsUpdated (UTC)
docsSkippedSkippedNov 7, 2025 11:24pm

@greptile-appsgreptile-appsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

Prevents deleted blocks from appearing in the deploy modal's example curl command by filtering them out during output conversion and adding a cleanup effect.

Key Changes:

  • Modified getInputFormatExample() to return null for deleted blocks and filter them out before generating the curl command
  • Added validation for both UUID-based (blockId_attribute) and blockName.attribute formats
  • Introduced a new useEffect hook that automatically cleans up selectedStreamingOutputs when blocks are deleted
  • Ensures the example curl only includes valid, existing blocks

Confidence Score: 5/5

  • Safe to merge with no issues
  • Clean bug fix with proper validation, defensive programming, and no breaking changes
  • No files require special attention

Important Files Changed

File Analysis

FilenameScoreOverview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/control-bar/components/deploy-modal/deploy-modal.tsx5/5Added filtering to remove deleted blocks from streaming outputs in example curl and added cleanup effect

Sequence Diagram

sequenceDiagram
participant User
participant DeployModal
participant WorkflowStore
participant API
User->>DeployModal: Opens deploy modal
DeployModal->>WorkflowStore: getState().blocks
DeployModal->>DeployModal: Filter selectedStreamingOutputs
Note over DeployModal: Check each output ID
alt UUID-based format (blockId_attribute)
DeployModal->>WorkflowStore: Find block by ID
alt Block found
DeployModal->>DeployModal: Convert to blockName.attribute
else Block deleted
DeployModal->>DeployModal: Return null (filter out)
end
else blockName.attribute format
DeployModal->>WorkflowStore: Find block by name
alt Block not found (deleted)
DeployModal->>DeployModal: Return null (filter out)
else Block exists
DeployModal->>DeployModal: Keep output ID
end
end
DeployModal->>DeployModal: Filter out nulls
DeployModal->>API: Generate example curl with valid outputs only
DeployModal->>User: Display curl command
Loading

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1
waleedlatif1 merged commit d3e81e9 into stagingNov 7, 2025
9 checks passed
@waleedlatif1
waleedlatif1 deleted the sim-362 branch November 7, 2025 23:27
@waleedlatif1waleedlatif1 mentioned this pull request Nov 12, 2025
10 tasks
Sign up for freeto 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

@waleedlatif1