fix(import): fix array errors on import/export#2211
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile OverviewGreptile SummaryFixed array validation errors during workflow import/export by converting empty strings to
Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant WorkflowImporter
participant NormalizeSubblockValues
participant RegenerateIds
participant CredentialExtractor
Note over User,CredentialExtractor: Import/Export Flow with Array Error Fix
User->>WorkflowImporter: Import workflow JSON
WorkflowImporter->>WorkflowImporter: Parse JSON content
WorkflowImporter->>NormalizeSubblockValues: Normalize subblock values
Note over NormalizeSubblockValues: Convert empty strings to null<br/>Prevents "Expected array, received string" errors
NormalizeSubblockValues-->>WorkflowImporter: Return normalized blocks
WorkflowImporter->>RegenerateIds: Regenerate IDs (if enabled)
RegenerateIds->>RegenerateIds: Map old IDs to new IDs
RegenerateIds->>RegenerateIds: Update blocks, edges, loops, parallels
RegenerateIds-->>WorkflowImporter: Return workflow with new IDs
WorkflowImporter-->>User: Import complete
User->>CredentialExtractor: Export/Share workflow
CredentialExtractor->>CredentialExtractor: Sanitize credentials
Note over CredentialExtractor: Clear sensitive fields with null<br/>instead of empty strings
CredentialExtractor->>CredentialExtractor: Clear OAuth credentials → null
CredentialExtractor->>CredentialExtractor: Clear secret fields → null
CredentialExtractor->>CredentialExtractor: Clear workspace-specific fields → null
CredentialExtractor-->>User: Export sanitized workflow
Note over User,CredentialExtractor: Removed Features (No longer in flow)
Note over User,CredentialExtractor: ❌ GDrive tools (list/read/request access)
Note over User,CredentialExtractor: ❌ Mermaid diagram generation
Note over User,CredentialExtractor: ❌ Google Drive picker integration
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix import/export. Add copilot validation
Type of Change
Testing
Manual
Checklist