feat(folders): add new properties to support sub-folders - #81
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the Scenario Folders endpoint model to support nested folder trees (sub-folders) by adding new folder properties, new listing filters for parent/descendant expansion, and corresponding tool + test updates.
Changes:
- Extend
Folderto include hierarchy/tree fields (path,parentId,hasChildren,children, and subtree totals). - Add
parentId/childrenDepthsupport tofolders.list(), plusparentIdsupport forcreate()andupdate(). - Update MCP/CLI tool schemas and Jest mocks/tests to cover nested folders.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/mocks/folders/update.json | Expands the mocked update response with new hierarchy fields. |
| test/mocks/folders/list.json | Updates list mock to include hierarchy fields and a children array for nested folders. |
| test/mocks/folders/list-children.json | Adds a new mock for listing children of a specific parent folder. |
| test/mocks/folders/create.json | Expands top-level create mock with hierarchy fields and subtree totals. |
| test/mocks/folders/create-nested.json | Adds a new mock for creating a nested (child) folder. |
| test/folders.spec.ts | Adds/updates unit tests for listing children/descendants and creating/moving nested folders. |
| src/endpoints/folders.ts | Adds new Folder fields and new list/create/update inputs to support sub-folders. |
| src/endpoints/folders.tools.ts | Extends tool input schemas/examples for parentId and childrenDepth. |
Suppressed comments (1)
test/folders.spec.ts:101
- This test validates the request body for moving a folder to the top level, but it doesn't assert the response reflects the move. Returning a response with parentId=null and asserting it would make the test more realistic and cover the SDK’s returned value.
let requestBody: unknown;
mockFetch('PATCH https://make.local/api/v2/scenarios-folders/1576', foldersUpdateMock, req => {
requestBody = req.body;
});
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Pedro Kehl (pedrokehl)
force-pushed
the
sub-folders
branch
from
August 17, 2026 13:41
f5357af to
88adaf3
Compare
se-abmanzin
approved these changes
Aug 18, 2026
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.
No description provided.