Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • show subblocks for trigger only blocks in frozen canvas
  • we didn't show the trigger subblocks for blocks that only exclusively function as triggers, like the schedule

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 Jan 15, 2026

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

1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Skipped Skipped Jan 15, 2026 6:34pm

Review with Vercel Agent

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 15, 2026

Greptile Summary

Fixed subblock visibility for trigger-only blocks in the frozen canvas preview. Previously, trigger-mode subblocks were hidden for all blocks. Now, blocks with category: 'triggers' (like Schedule) correctly display their trigger-mode configuration fields in the block details sidebar.

Changes:

  • Updated visibleSubBlocks filter to check blockConfig.category !== 'triggers' before excluding mode === 'trigger' subblocks
  • Allows trigger-only blocks (e.g., Schedule with cron configuration) to show their trigger subblocks in preview mode
  • Non-trigger blocks continue to hide trigger-mode subblocks as expected

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is a precise, well-targeted bug fix that adds a simple category check to preserve existing behavior for non-trigger blocks while enabling the intended display for trigger-only blocks. The logic is sound and properly commented.
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/components/preview/components/block-details-sidebar.tsx Fixed subblock visibility logic to show trigger-mode subblocks for trigger-only blocks (category 'triggers') in frozen canvas preview

Sequence Diagram

sequenceDiagram
    participant User
    participant BlockDetailsSidebar
    participant getBlock
    participant BlockConfig
    participant SubBlock

    User->>BlockDetailsSidebar: View trigger block in frozen canvas
    BlockDetailsSidebar->>getBlock: getBlock(block.type)
    getBlock-->>BlockDetailsSidebar: blockConfig
    
    BlockDetailsSidebar->>BlockDetailsSidebar: Filter subBlocks for visibility
    
    alt Block category is 'triggers'
        BlockDetailsSidebar->>BlockDetailsSidebar: Include trigger-mode subblocks
        Note over BlockDetailsSidebar: New logic: show trigger subblocks<br/>for trigger-only blocks
    else Block category is not 'triggers'
        BlockDetailsSidebar->>BlockDetailsSidebar: Exclude trigger-mode subblocks
        Note over BlockDetailsSidebar: Original logic: hide trigger subblocks<br/>for regular blocks
    end
    
    BlockDetailsSidebar->>SubBlock: Render visibleSubBlocks
    SubBlock-->>User: Display configuration fields
Loading

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, 1 comment

Edit Code Review Agent Settings | Greptile

@waleedlatif1 waleedlatif1 merged commit 5e44357 into staging Jan 15, 2026
6 checks passed
@waleedlatif1 waleedlatif1 deleted the improvement/frozen-canvas branch January 15, 2026 18:34
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