fix(workspace-popover): added duplicate, import, export workspace; added export multiple workflows#1911
Merged
waleedlatif1 merged 2 commits intostagingfrom Nov 12, 2025
Merged
Conversation
…ded export multiple workflows
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile OverviewGreptile SummaryThis PR adds comprehensive workspace management features including duplicate, import, and export capabilities, along with bulk workflow export and the ability to create workflows directly inside folders. Key Changes
Implementation DetailsThe workspace duplication uses database transactions to ensure data integrity, properly handles folder parent-child relationships, and includes comprehensive permission checks. The import/export functionality preserves the complete workspace structure including workflow states, variables, and folder hierarchy. All new hooks follow established patterns with proper loading states and error handling. Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant WorkspaceHeader
participant useDuplicateWorkspace
participant API as /api/workspaces/[id]/duplicate
participant duplicateWorkspace as lib/workspaces/duplicate
participant Database
participant Router
User->>WorkspaceHeader: Right-click workspace
WorkspaceHeader->>WorkspaceHeader: Show context menu
User->>WorkspaceHeader: Click "Duplicate"
WorkspaceHeader->>useDuplicateWorkspace: handleDuplicateWorkspace(name)
useDuplicateWorkspace->>API: POST /api/workspaces/[id]/duplicate
API->>API: Validate session & request
API->>duplicateWorkspace: duplicateWorkspace()
duplicateWorkspace->>Database: Check source workspace permissions
duplicateWorkspace->>Database: Create new workspace
duplicateWorkspace->>Database: Create admin permission
duplicateWorkspace->>Database: Duplicate folder hierarchy
loop For each workflow
duplicateWorkspace->>duplicateWorkspace: duplicateWorkflow()
duplicateWorkspace->>Database: Copy workflow with blocks/edges/subflows
end
duplicateWorkspace-->>API: Return new workspace data
API-->>useDuplicateWorkspace: 201 Created
useDuplicateWorkspace->>Router: Navigate to new workspace
Router-->>User: Show duplicated workspace
|
4bef2b9 to
129d1bb
Compare
waleedlatif1
added a commit
that referenced
this pull request
Nov 12, 2025
…ded export multiple workflows (#1911) * fix(workspace-popover): added duplicate, import, export workspace; added export multiple workflows * fix copilot keyboard nav
waleedlatif1
added a commit
that referenced
this pull request
Nov 12, 2025
…ded export multiple workflows (#1911) * fix(workspace-popover): added duplicate, import, export workspace; added export multiple workflows * fix copilot keyboard nav
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
Type of Change
Testing
Tested manually
Checklist