Files
Nexus/docs/changelog/2026-06-13-files-new-file-fix.md
2026-07-08 22:31:31 +08:00

1.0 KiB

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

摘要

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

动机

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

涉及文件

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

迁移/重启

  • 需重启 nexus 容器 + 同步前端

验证

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