Files
Nexus/docs/changelog/2026-06-10-files-new-file-fix.md
T
Nexus Agent 72042598b0
Nexus CI/CD / test (push) Waiting to run
Nexus CI/CD / e2e (push) Blocked by required conditions
Nexus CI/CD / deploy (push) Blocked by required conditions
Nexus Pre-commit Checks / quick-check (push) Waiting to run
Fix files page new-file flow and SFTP parent directory creation.
Show a clear prompt when no server is selected, wait for the editor workbench before openFile, and mkdir -p parent paths before SFTP writes.
2026-06-13 09:08:17 +08:00

936 B

2026-06-10 — 文件管理「新建文件」修复

摘要

修复文件页「新建文件」点击无反馈或创建后编辑器不弹出的问题。

动机

  • 未选服务器时按钮被禁用,用户以为功能坏了
  • 创建成功后未等待 FileEditorWorkbench 就绪即 openFile,编辑器静默不打开
  • SFTP 写入前未确保父目录存在(部分路径下 write-file 失败)

涉及文件

  • frontend/src/composables/files/useFilesActions.tsopenNewFileDialogwaitForEditorWorkbench
  • frontend/src/composables/files/useFilesEditor.ts — 导出 waitForEditorWorkbench
  • frontend/src/components/files/FilesToolbar.vue — 未选服务器时提示而非禁用
  • server/infrastructure/ssh/asyncssh_pool.py — SFTP 写前 mkdir -p 父目录

验证

cd frontend && npm run type-check
# 文件管理 → 选服务器 → 新建文件 → 应创建并打开编辑器