Skip to content

fix(variables): fixed floating variables, added autcomplete off to prevent suggested values - #1908

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/variables-only
Nov 12, 2025
Merged

fix(variables): fixed floating variables, added autcomplete off to prevent suggested values#1908
waleedlatif1 merged 2 commits into
stagingfrom
fix/variables-only

Conversation

@waleedlatif1

@waleedlatif1waleedlatif1 commented Nov 12, 2025

Copy link
Copy Markdown
Collaborator

Summary

  • Fixed floating variables, restored collaborative features and ensured it works
  • Added autcomplete off to prevent suggested values in subblocks

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

vercelBot commented Nov 12, 2025

Copy link
Copy Markdown

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

1 Skipped Deployment
ProjectDeploymentPreviewCommentsUpdated (UTC)
docsSkippedSkippedNov 12, 2025 1:52am

@waleedlatif1
waleedlatif1 marked this pull request as ready for review November 12, 2025 01:47
@greptile-apps

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

This PR restores the floating variables modal feature with full collaborative support. The main changes include:

  • Re-enabled variables modal: Uncommented imports, state management (useVariablesStore), and UI elements in panel-new.tsx to restore the variables menu option and floating modal
  • Integrated collaborative workflow: Updated variables.tsx to use collaborative hooks (collaborativeAddVariable, collaborativeUpdateVariable, collaborativeDeleteVariable) instead of direct store operations, enabling real-time multi-user synchronization
  • Icon standardization: Replaced all Trash2 and conflicting Trash icons from lucide-react with the custom Trash icon from the emcn design system across 13 files for consistency

The variables modal now properly syncs changes across all collaborators in real-time through the socket-based collaborative workflow system.

Confidence Score: 4/5

  • This PR is safe to merge with low risk
  • The changes are well-structured and focused on restoring a previously commented-out feature. The integration with collaborative workflow hooks follows established patterns in the codebase. The icon standardization is straightforward and low-risk. Minor uncertainty around edge cases in real-time collaboration justifies a score of 4 rather than 5.
  • No files require special attention

Important Files Changed

File Analysis

FilenameScoreOverview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/variables/variables.tsx4/5Restored variables modal with collaborative features; switched from local store to collaborative hooks (collaborativeUpdateVariable, collaborativeAddVariable, collaborativeDeleteVariable) and proper variable store integration
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/panel-new.tsx5/5Re-enabled variables modal by uncommenting imports, state, and UI elements; restored variables menu item in popover

Sequence Diagram

sequenceDiagram
participant User
participant PanelNew as Panel Component
participant VariablesStore as Variables Store
participant CollaborativeHook as useCollaborativeWorkflow
participant VariablesModal as Variables Modal
participant Socket as Socket/Backend
User->>PanelNew: Click Variables menu item
PanelNew->>VariablesStore: setIsOpen(true)
VariablesStore-->>VariablesModal: isOpen=true (render modal)
VariablesModal->>CollaborativeHook: Get collaborative functions
CollaborativeHook-->>VariablesModal: Return collaborative CRUD functions
User->>VariablesModal: Add new variable
VariablesModal->>CollaborativeHook: collaborativeAddVariable(data)
CollaborativeHook->>VariablesStore: addVariable(data, id)
CollaborativeHook->>Socket: Emit add variable operation
Socket-->>CollaborativeHook: Confirm operation
User->>VariablesModal: Update variable field
VariablesModal->>CollaborativeHook: collaborativeUpdateVariable(id, field, value)
CollaborativeHook->>VariablesStore: updateVariable(id, updates)
CollaborativeHook->>Socket: Emit update operation
Socket-->>CollaborativeHook: Confirm operation
User->>VariablesModal: Delete variable
VariablesModal->>CollaborativeHook: collaborativeDeleteVariable(id)
CollaborativeHook->>VariablesStore: deleteVariable(id)
CollaborativeHook->>Socket: Emit delete operation
Socket-->>CollaborativeHook: Confirm operation
Note over VariablesModal,Socket: All changes sync in real-time<br/>to other collaborators
Loading

@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.

16 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1waleedlatif1 changed the title fix(variables): fixed floating variablesfix(variables): fixed floating variables, added autcomplete off to prevent suggested valuesNov 12, 2025
@waleedlatif1
waleedlatif1 merged commit 96f134b into stagingNov 12, 2025
4 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/variables-only branch November 12, 2025 01:52
waleedlatif1 added a commit that referenced this pull request Nov 12, 2025
…event suggested values (#1908)
* fixed variables
* add autocomplete=off to prevent suggestions for subblock values
waleedlatif1 added a commit that referenced this pull request Nov 12, 2025
…event suggested values (#1908)
* fixed variables
* add autocomplete=off to prevent suggestions for subblock values
@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