Skip to content

feat(backend): add create-folder action node#24

Open
LukasHirt wants to merge 2 commits into
mainfrom
feat/action-create-folder
Open

feat(backend): add create-folder action node#24
LukasHirt wants to merge 2 commits into
mainfrom
feat/action-create-folder

Conversation

@LukasHirt

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a new createFolder action node end to end: pick a Create Folder entry on the canvas, configure a template-rendered path (e.g. /Archive/{{llm.output}}), and the workflow issues a WebDAV MKCOL at that path when it runs.
  • Backend: exposes webdavfile.Client's existing private mkcol method as a public CreateFolder(ctx, authHeader, davPath) error, adds it to the executor's FileClient interface, and adds a case "createFolder": arm to runAction that renders the path template against vars and calls CreateFolder. Idempotent (201/405/409 all treated as success), matching the existing internal mkcol usage in Comment.
  • Unlike move/copy/rename, this action does not change currentPath — it creates a location rather than relocating the file under consideration. result.Output is set to the rendered path so a subsequent move/copy action can reuse it as its own destination.
  • Frontend: adds an action-create-folder entry to NODE_TYPES under the Actions category (icon folder-add), extends ActionType with 'createFolder', and wires the path config field into NodeDetailsPanel.vue following the same v-model/actionParam pattern used by move's destination field.

Test plan

  • Backend: cd backend && go test ./... — all packages pass, including new tests in pkg/executor (renders path templates, calls CreateFolder with the rendered path, sets result.Output, and does not mutate currentPath) and new pkg/webdavfile/webdavfile_test.go (exercises CreateFolder's MKCOL request shape and its 201/405/409 idempotency, plus propagation of unexpected statuses).
  • go vet ./... and gofmt -l . clean.
  • Frontend: npm run test:unit — new tests/unit/nodeTypes.spec.ts asserts action-create-folder exists in NODE_TYPES with the right category/actionType/defaultData and resolves via findNodeTypeForNode.
  • npm run check:types and npm run lint clean.

🤖 Generated with Claude Code

@LukasHirt
LukasHirt requested a review from a team as a code owner July 24, 2026 16:15
@LukasHirt LukasHirt self-assigned this Jul 24, 2026
Expose webdavfile.Client's existing private mkcol as a public
CreateFolder(ctx, authHeader, davPath) method, wire it into the
executor's FileClient interface, and add a createFolder action type
that renders its `path` template against the run's vars and issues a
WebDAV MKCOL. Idempotent like the existing internal mkcol usage in
Comment (201/405/409 all treated as success).

Unlike move/copy/rename, createFolder does not change currentPath —
it creates a location rather than relocating the file under
consideration.

Signed-off-by: Lukas Hirt <info@hirt.cz>
Add a "Create Folder" action-picker entry (action-create-folder) under
the Actions category, backed by the new createFolder ActionType, and
wire its `path` template-string config field into NodeDetailsPanel.vue
following the same v-model/actionParam pattern used by move/copy's
destination and rename's newName fields.

Signed-off-by: Lukas Hirt <info@hirt.cz>
@LukasHirt
LukasHirt force-pushed the feat/action-create-folder branch from 5b43843 to f125aab Compare July 24, 2026 20:52
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