Skip to content

Windows tray: fall back past a broken managed CLI to Volta and PATH installs - #1753

Merged
iamtoruk merged 1 commit into
mainfrom
fix/windows-tray-volta-cli
Oct 13, 2026
Merged

iamtoruk merged 1 commit into
mainfrom
fix/windows-tray-volta-cli

Conversation

@iamtoruk

Copy link
Copy Markdown
Member

Fixes #1750.

When the desktop app starts the Windows tray it sets CODEBURN_BIN to its own launcher (%LOCALAPPDATA%\codeburn-menubar\codeburn-cli.cmd), and the tray's resolve() treated any CODEBURN_BIN as final. If that launcher failed (in #1750 cmd.exe reported "The system cannot find the path specified"), the PATH search and the VOLTA_HOME lookup from #1534 never ran, so a Volta install under D:\Data\Volta\bin was never tried.

  • cli_status now uses probe(): tries CODEBURN_BIN, then every install found via PATH, Volta and npm (deduped), then the recorded launcher, and keeps the first whose --version works.
  • If none works, the error lists each path with its own failure ("Looked for" shows them all); .setup-error uses white-space: pre-line.
  • Export and terminal actions use the probed CLI instead of re-resolving.
  • The desktop app no longer overwrites a CODEBURN_BIN the user set themselves.

Tests: new Rust tests for candidate order, launcher missing or exiting 1 falling through, and all-failing listing every path; new vitest that a user CODEBURN_BIN is kept. Locally: cargo test 163 passed, app menubar tests 86 passed, full app vitest 1515 passed. The Windows-only code paths could not be compiled on macOS, so the Windows CI build is the real check.

Follow-up, not in this PR: stderr from .cmd children is decoded as UTF-8 and shows garbled on non-UTF-8 code pages.

…nstalls

The desktop app starts the tray with CODEBURN_BIN set to its own
codeburn-cli.cmd launcher, which the tray took as final. When that launcher
failed (#1750: exit 1, "The system cannot find the path specified"), the
Volta install under a relocated VOLTA_HOME was never tried.

The setup check now probes CODEBURN_BIN, every install the PATH and prefix
search finds, then the recorded launcher, and keeps the first whose
--version answers. When none does, the error lists each path with its own
failure. Export and terminal actions use the probed CLI. The desktop app no
longer overwrites a CODEBURN_BIN the person set themselves.
@iamtoruk
iamtoruk merged commit 9a40cc6 into main Oct 13, 2026
19 checks passed
@iamtoruk
iamtoruk deleted the fix/windows-tray-volta-cli branch October 13, 2026 08:10
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.

此前#1532提到的系统托盘无法正常识别volta 管理的node环境 在最新版本v0.9.27依旧存在

1 participant