Skip to content

fix(editor): allow references in boolean variable values and sync tag selections to canvas preview#5628

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/variables-boolean-ref-and-preview
Jul 12, 2026
Merged

fix(editor): allow references in boolean variable values and sync tag selections to canvas preview#5628
waleedlatif1 merged 1 commit into
stagingfrom
fix/variables-boolean-ref-and-preview

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Variables block: boolean values can now hold block references — added the canonical left/right arrow mode toggle on the boolean Value field to switch between the true/false selector and the reference-capable manual input (same input all other types use, with tag dropdown + drag-drop). Rows whose value is already a reference default to manual mode
  • Fixed canvas block preview not updating when a tag is selected from the tag dropdown in condition/router blocks: collaborativeSetTagSelection now calls syncDynamicHandleSubblockValue like the typing path does, so the workflow-store copy the canvas preview reads stays in sync

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

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 12, 2026 7:36pm

Request Review

@cursor

cursor Bot commented Jul 12, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Small, localized editor UX and store-sync fixes with no auth, persistence schema, or execution-path changes.

Overview
Variables block boolean assignments can now use block references (and other non-literal values), not only the true/false combobox. A selector ↔ manual toggle on the Value row switches between the literal combobox and the same reference-capable input other types use (tags, drag-drop). Rows whose value is not true/false/empty open in manual mode by default.

Canvas preview for condition/router blocks now updates when a reference is chosen from the tag dropdown: collaborativeSetTagSelection calls syncDynamicHandleSubblockValue after updating the subblock store, matching the typing path so the workflow store the canvas reads stays in sync.

Reviewed by Cursor Bugbot for commit cdeba7c. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates variable editing and canvas preview syncing in the workflow editor. The main changes are:

  • Added a manual/reference-capable mode for boolean variable values.
  • Defaulted non-literal boolean values into the manual input path.
  • Synced tag dropdown selections into the workflow-store preview path.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/variables-input/variables-input.tsx Adds a boolean value toggle that uses the existing manual input path for references while keeping the selector path for literal true/false values.
apps/sim/hooks/use-collaborative-workflow.ts Adds workflow-store syncing for tag selections so dynamic-handle canvas previews update like typed edits.

Reviews (1): Last reviewed commit: "fix(editor): allow references in boolean..." | Re-trigger Greptile

@waleedlatif1 waleedlatif1 merged commit 5e891da into staging Jul 12, 2026
18 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/variables-boolean-ref-and-preview branch July 12, 2026 19:43
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