Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

fixed circular dependencies

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 10, 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 10, 2026 8:05am

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 10, 2026

Greptile Overview

Greptile Summary

Resolves circular dependencies by replacing barrel exports from @/stores/panel with direct imports to specific store files. Changes useCopilotStore imports from @/stores/panel to @/stores/panel/copilot/store, useVariablesStore imports to @/stores/panel/variables/store, and splits the Variable type import to @/stores/panel/variables/types. This follows the established path alias patterns and eliminates import cycles between the workflow registry store and panel stores.

Confidence Score: 5/5

  • Safe to merge - clean refactoring that eliminates circular dependencies without changing functionality
  • All changes are purely import path refactoring from barrel exports to direct paths. No logic changes, no syntax errors, and the approach correctly follows the established import patterns custom instruction. The circular dependency issue is cleanly resolved by breaking the import cycle between stores/panel/index.ts and stores/workflows/registry/store.ts.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
apps/sim/lib/copilot/tools/client/workflow/block-output-utils.ts 5/5 Splits imports to use direct store and type paths, resolving circular dependency
apps/sim/stores/workflows/registry/store.ts 5/5 Updates import path from barrel export to direct store path, breaking circular dependency with panel stores

Sequence Diagram

sequenceDiagram
    participant Tool as Copilot Tools
    participant PanelIndex as @/stores/panel/index
    participant CopilotStore as @/stores/panel/copilot/store
    participant VariablesStore as @/stores/panel/variables/store
    participant RegistryStore as @/stores/workflows/registry/store
    
    Note over Tool,PanelIndex: Before: Circular Dependency
    Tool->>PanelIndex: import { useCopilotStore }
    PanelIndex->>CopilotStore: re-export from ./copilot
    RegistryStore->>PanelIndex: import { useVariablesStore }
    PanelIndex->>VariablesStore: re-export from ./variables
    VariablesStore->>RegistryStore: import for references
    Note over RegistryStore,PanelIndex: Circular cycle created
    
    Note over Tool,VariablesStore: After: Direct Imports
    Tool->>CopilotStore: import from @/stores/panel/copilot/store
    Tool->>VariablesStore: import from @/stores/panel/variables/store
    RegistryStore->>VariablesStore: import from @/stores/panel/variables/store
    Note over Tool,VariablesStore: No circular dependencies
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.

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1 waleedlatif1 merged commit a11d452 into staging Jan 10, 2026
10 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/build branch January 10, 2026 08:10
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