Skip to content

Fix features: Save project name on blur/Enter in top navbar 修复顶部导航栏内联重命名问题#33

Open
harryhmx wants to merge 1 commit into
nexu-io:mainfrom
harryhmx:fix/studio-topbar-rename
Open

Fix features: Save project name on blur/Enter in top navbar 修复顶部导航栏内联重命名问题#33
harryhmx wants to merge 1 commit into
nexu-io:mainfrom
harryhmx:fix/studio-topbar-rename

Conversation

@harryhmx

@harryhmx harryhmx commented Jun 8, 2026

Copy link
Copy Markdown

The top-navbar project-name input only reset to the original value on blur — it never called API.patchProject. The sidebar three-dot Rename worked because it uses prompt() + API.patchProject.

Changes:

  • Enter key or click any area outside the input box: SAVE
  • Escape key: RESET to Original Name (cancel edit)

Additional Change:

  • .npmrc: add onnxruntime-node-install=skip to skip CUDA GPU binary download from NuGet CDN (unnecessary for CPU-only users, and the CDN is often unreachable from certain network environments)

注意顶部导航栏的项目名称输入框,当我尝试 Rename 并确认后,本来修改的项目名又重置为原始值——因为它从未调用过 API.patchProject。侧边栏的三个点“重命名”功能之所以有效,是因为它使用了 prompt() + API.patchProject。

更改:

  • Enter 键或点击输入框外其他区域:保存
  • Esc 键:重置为原始名称(取消编辑)

附加修改:

  • .npmrc:添加 onnxruntime-node-install=skip 以跳过从 NuGet CDN 下载 CUDA GPU 二进制文件(仅使用 CPU 的用户无需此操作,且某些网络环境下常无法访问该 CDN)

The top-navbar project-name input only reset to the original value on
blur — it never called API.patchProject. The sidebar three-dot Rename
worked because it uses prompt() + API.patchProject.

Changes:
- Enter key: blur → save
- Escape key: reset to original name and blur (cancel edit)
- blur: save via API.patchProject, sync state.projects so the sidebar
  refreshes immediately without a manual reload
- .npmrc: add onnxruntime-node-install=skip to skip CUDA GPU binary
  download from NuGet CDN (unnecessary for CPU-only users, and the
  CDN is often unreachable from certain network environments)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk/medium Medium risk size/S Size S (20-99 LOC) type/bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants