Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • added trigger mode context for deploy preview

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 Feb 10, 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 10, 2026 4:29am

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 10, 2026

Greptile Overview

Greptile Summary

This PR updates the deploy preview sidebar to derive a block’s “trigger-mode context” and filter subblocks accordingly (including a special-case for legacy trigger-config subblocks), so the preview reflects trigger-only configuration when appropriate.

It also adjusts the ShortInput overlay styling in the editor by changing how pointer-events-none/opacity are applied to the formatted-text overlay.

Key integration surface: PreviewEditorContent’s subblock visibility now depends on TriggerUtils.isTriggerBlock(block) (category/triggerMode/legacy starter), while the editor panel’s visibility is driven by a separate displayTriggerMode flag; without a shared predicate, preview/editor can show different fields for the same block.

Confidence Score: 3/5

  • This PR is moderately safe to merge after fixing two UI/behavioral inconsistencies.
  • Core changes are localized, but (1) the ShortInput overlay can intercept pointer events in preview/disabled states, and (2) Preview now computes trigger-mode context differently than the editor, which can cause mismatched visible fields for the same block. These should be aligned before merge.
  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input.tsx; apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-editor.tsx

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input.tsx Changed overlay class logic so pointer-events-none no longer applies in preview/disabled, which can cause the overlay to intercept input interactions while in preview.
apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-editor.tsx Added trigger-mode context to preview by filtering visible subblocks based on TriggerUtils.isTriggerBlock and special-casing trigger-config, but this introduces a different trigger-mode source of truth than the editor panel.

Sequence Diagram

sequenceDiagram
  participant Preview as PreviewEditorContent
  participant TriggerUtils as TriggerUtils.isTriggerBlock
  participant Blocks as getBlock(type)
  participant Editor as useEditorSubblockLayout

  Preview->>Blocks: getBlock(block.type)
  Preview->>TriggerUtils: isTriggerBlock(block)
  TriggerUtils->>Blocks: getBlock(block.type)
  TriggerUtils-->>Preview: effectiveTrigger (bool)
  Preview-->>Preview: filter subBlocks (trigger-config/mode)

  Editor-->>Editor: uses displayTriggerMode (from UI state)
  Editor-->>Editor: filter subBlocks (mode/trigger-config)

  Note over Preview,Editor: Preview and Editor may compute different trigger context
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
Copy link
Collaborator Author

@greptile

@waleedlatif1
Copy link
Collaborator Author

@cursor review

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.

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@waleedlatif1 waleedlatif1 merged commit e321f88 into staging Feb 10, 2026
11 checks passed
@waleedlatif1 waleedlatif1 deleted the improvement/preview branch February 10, 2026 04:32
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