Skip to content

fix(deploy): reuse subblock merge helper in use change detection hook #3287

Merged
icecrasher321 merged 2 commits intostagingfrom
fix/change-detection-trigger-subblocks
Feb 21, 2026
Merged

fix(deploy): reuse subblock merge helper in use change detection hook #3287
icecrasher321 merged 2 commits intostagingfrom
fix/change-detection-trigger-subblocks

Conversation

@icecrasher321
Copy link
Collaborator

Summary

Use mergeSubblockStateWithValues in change detection hook to prevent unrolling differences.

Type of Change

  • Bug fix

Testing

Tested manually with Slack trigger

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 Feb 21, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Feb 21, 2026 3:52pm

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 21, 2026

Greptile Summary

Refactored change detection hook to use the shared mergeSubblockStateWithValues helper instead of duplicating the merge logic inline. This eliminates code duplication and ensures consistent subblock merging behavior across the codebase.

  • Removed 38 lines of inline subblock merging logic
  • Added import for mergeSubblockStateWithValues from @/lib/workflows/subblocks
  • The helper correctly handles null/undefined filtering and creates default subblock structures for values without existing definitions
  • Maintains identical behavior to the previous implementation after the fix in commit 7c5a6bd

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • This is a straightforward refactoring that replaces duplicate inline logic with a shared helper function. The helper function performs the exact same operations with identical behavior, including proper null/undefined filtering. The change improves code maintainability by consolidating subblock merging logic that was previously duplicated across multiple files.
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/hooks/use-change-detection.ts Refactored to use shared mergeSubblockStateWithValues helper, removing 38 lines of duplicate logic while maintaining identical behavior

Last reviewed commit: d042fbb

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@icecrasher321 icecrasher321 merged commit 2a6d4fc into staging Feb 21, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/change-detection-trigger-subblocks branch February 22, 2026 02:12
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