dify/web/app/components/workflow/skill
yyh 12ca422c8a
fix(app-assets): restore atomic batch upload for nested folder targets
The previous nested folder upload flow bypassed the backend batch-upload
contract when parentId was set. Instead of creating the whole metadata
tree in one backend operation, the frontend recursively called
createFolder/getFileUploadUrl for each node.

That introduced two regressions for uploads into subfolders:

- consistency regression: mid-sequence failures could leave partially
  created folder trees under the destination folder
- performance regression: metadata creation degraded from a single
  batch request to O(files + folders) round-trips before file bytes
  were uploaded

This change moves nested uploads back to the original batch semantics:

- add optional parent_id support to app asset batch-upload payload
- create the whole nested tree under the target parent in
  AppAssetService.batch_create_from_tree
- pass parentId through useBatchUpload instead of using per-node
  createFolder/getFileUploadUrl calls
- remove the now-unnecessary useBatchUploadOperation wrapper
- add a backend unit test covering batch tree creation under an
  existing parent folder

After this change, both root uploads and subfolder uploads use the same
single-request metadata creation path, preserving atomic tree creation
semantics and avoiding avoidable metadata round-trips.
2026-03-26 15:16:55 +08:00
..
editor refactor(web): remove tooltip-plus and migrate to ui tooltip 2026-03-25 13:35:43 +08:00
file-tree fix(skill): align node menu to the right 2026-03-25 12:58:26 +08:00
hooks fix(app-assets): restore atomic batch upload for nested folder targets 2026-03-26 15:16:55 +08:00
skill-body fix(skill): stabilize file tree local operations 2026-03-25 12:21:32 +08:00
start-tab chore: update skills templates 2026-03-26 10:49:25 +08:00
utils refactor(skill): migrate file tree menus to base ui overlays 2026-03-24 19:57:29 +08:00
viewer fix: remove portal-to-follow-elem-plus shim 2026-03-24 22:18:30 +08:00
constants.ts refactor(skill): migrate file tree menus to base ui overlays 2026-03-24 19:57:29 +08:00
main.tsx refactor(skill): regroup skill body, file tree, and tree hooks 2026-02-07 14:20:01 +08:00
type.ts refactor(skill-editor): extract hooks and utils into separate directories 2026-01-15 16:00:42 +08:00