Skip to content

fix(mothership): canonical folder ids#5741

Merged
Sg312 merged 2 commits into
stagingfrom
fix/mship-folders
Jul 17, 2026
Merged

fix(mothership): canonical folder ids#5741
Sg312 merged 2 commits into
stagingfrom
fix/mship-folders

Conversation

@Sg312

@Sg312 Sg312 commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Canonical folder ids

Type of Change

  • Bug fix

Testing

Manual

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@Sg312
Sg312 requested a review from a team as a code owner July 17, 2026 19:58
@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 17, 2026 8:08pm

Request Review

@greptile-apps

greptile-apps Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR lets create_workflow target folders through canonical VFS paths. The main changes are:

  • Replaces the advertised folderId parameter with folderPath.
  • Resolves canonical folder paths to internal IDs before creation.
  • Retains legacy folderId support in the executor.
  • Adds tests for nested encoded paths and missing folders.

Confidence Score: 4/5

The canonical folder lookup can place a workflow in the wrong folder when normalized paths collide.

  • Workspace access and folder mutability checks remain in place.
  • Standard encoded and missing paths have test coverage.
  • Canonically equivalent sibling names overwrite one another in the path-to-ID map.

apps/sim/lib/copilot/tools/handlers/workflow/mutations.ts

Important Files Changed

Filename Overview
apps/sim/lib/copilot/tools/handlers/workflow/mutations.ts Adds canonical folder-path resolution, with a collision case that can select the wrong folder.
apps/sim/lib/copilot/tools/handlers/workflow/mutations.test.ts Adds mocked coverage for encoded nested paths and missing folders.
apps/sim/lib/copilot/tools/handlers/param-types.ts Adds folderPath while retaining the legacy folderId input.
apps/sim/lib/copilot/generated/tool-catalog-v1.ts Advertises canonical VFS folder paths for workflow creation.
apps/sim/lib/copilot/generated/tool-schemas-v1.ts Updates the runtime tool schema to expose folderPath.
bun.lock Removes obsolete Bun lockfile configuration metadata.

Reviews (1): Last reviewed commit: "folder fix" | Re-trigger Greptile

Comment thread apps/sim/lib/copilot/tools/handlers/workflow/mutations.ts Outdated
@Sg312
Sg312 merged commit 772b710 into staging Jul 17, 2026
18 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/mship-folders branch July 18, 2026 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant