Uh oh!
There was an error while loading. Please reload this page.
fix(workspace-popover): added duplicate, import, export workspace; added export multiple workflows - #1911
Conversation
…ded export multiple workflows
The latest updates on your projects. Learn more about Vercel for GitHub. |
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
|
Uh oh!
There was an error while loading. Please reload this page.
4bef2b9 to
129d1bbCompareUh oh!
There was an error while loading. Please reload this page.
…ded export multiple workflows (#1911) * fix(workspace-popover): added duplicate, import, export workspace; added export multiple workflows * fix copilot keyboard nav
…ded export multiple workflows (#1911) * fix(workspace-popover): added duplicate, import, export workspace; added export multiple workflows * fix copilot keyboard nav
Summary
Type of Change
Testing
Tested manually
Checklist