feat(reorder): allow workflow/folder reordering#2818
Merged
waleedlatif1 merged 11 commits intostagingfrom Jan 14, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile Summary
Important Files Changed
Confidence score: 4/5
Sequence DiagramsequenceDiagram
participant User
participant API as PUT /api/workflows/reorder
participant Auth as getSession
participant Permissions as getUserEntityPermissions
participant DB as Database
participant Store as useWorkflowRegistry
User->>API: "PUT /api/workflows/reorder with workspaceId and updates"
API->>Auth: "getSession()"
Auth-->>API: "session with user.id"
API->>API: "Parse and validate request body with ReorderSchema"
API->>Permissions: "getUserEntityPermissions(userId, workspace, workspaceId)"
Permissions-->>API: "permission type"
API->>DB: "SELECT workflows by id IN updates"
DB-->>API: "existing workflows"
API->>API: "Filter validIds in workspace"
API->>DB: "Begin transaction: UPDATE workflow SET sortOrder, folderId, updatedAt"
DB-->>API: "transaction complete"
API->>Store: "Optimistic update: set sortOrder and folderId"
Store-->>API: "state updated"
API-->>User: "Success response with updated count"
|
…ove/below folders at the same level
Collaborator
|
@greptile |
apps/sim/app/workspace/[workspaceId]/w/hooks/use-import-workspace.ts
Outdated
Show resolved
Hide resolved
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/hooks/use-drag-drop.ts
Outdated
Show resolved
Hide resolved
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/hooks/use-drag-drop.ts
Show resolved
Hide resolved
…nitization helper
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
Support reordering of workflows / folders. Maintains on export/import.
Type of Change
Testing
Tested manually
Checklist