fix(mship): add folder rename tools and locked workflow status#5126
fix(mship): add folder rename tools and locked workflow status#5126Sg312 wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Greptile SummaryThis PR consolidates the four separate folder tools (
Confidence Score: 4/5Safe to merge — the consolidation is internally consistent, the VFS lock computation is correct, and no existing behavior is broken beyond the removal of the now-superseded tools. All path resolution logic round-trips correctly through the VFS encoding layer, the lock inheritance walk handles circular refs via a visited set, and the generated catalog/schema files are kept in sync. Two minor concerns: the MCP destructiveHint: false annotation on manage_folder misleads clients about the delete operation, and resolveWorkflowFolderIdByPath re-fetches all folders from the DB on each call, producing duplicate round-trips for move when both target and destination are path-addressed. apps/sim/lib/copilot/tools/mcp/definitions.ts (destructiveHint annotation) and apps/sim/lib/copilot/tools/handlers/workflow/mutations.ts (DB call deduplication in path resolution). Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[manage_folder call] --> B{operation?}
B -->|create| C[resolve parent via path or parentId]
B -->|rename| D[resolveManageFolderTarget path to folderId]
B -->|move| E[resolveManageFolderTarget + resolveManageFolderParent]
B -->|delete| F[resolveManageFolderTarget path to folderId]
C --> C2[executeCreateFolder]
D --> D2[executeRenameFolder]
E --> E2[executeMoveFolder]
F --> F2[executeDeleteFolder]
G[materializeWorkflows] --> H[listFolders incl. locked]
H --> I[computeLockedFolderIds walks ancestor chain per folder]
I --> J{folderId in lockedFolderIds?}
J -->|yes| K[inheritedFolderLock=true]
J -->|no| L[inheritedFolderLock=false]
K --> M[serializeWorkflowMeta locked=true lockedBy=folder]
L --> N[serializeWorkflowMeta locked=wf.locked lockedBy=workflow or undefined]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[manage_folder call] --> B{operation?}
B -->|create| C[resolve parent via path or parentId]
B -->|rename| D[resolveManageFolderTarget path to folderId]
B -->|move| E[resolveManageFolderTarget + resolveManageFolderParent]
B -->|delete| F[resolveManageFolderTarget path to folderId]
C --> C2[executeCreateFolder]
D --> D2[executeRenameFolder]
E --> E2[executeMoveFolder]
F --> F2[executeDeleteFolder]
G[materializeWorkflows] --> H[listFolders incl. locked]
H --> I[computeLockedFolderIds walks ancestor chain per folder]
I --> J{folderId in lockedFolderIds?}
J -->|yes| K[inheritedFolderLock=true]
J -->|no| L[inheritedFolderLock=false]
K --> M[serializeWorkflowMeta locked=true lockedBy=folder]
L --> N[serializeWorkflowMeta locked=wf.locked lockedBy=workflow or undefined]
Reviews (1): Last reviewed commit: "fix(mship): add folder rename tools and ..." | Re-trigger Greptile |
Summary
Add manage folder tool and make locked workflow status clear
Companion: https://github.com/simstudioai/copilot/pull/321
Type of Change
Testing
Manual
Checklist