Skip to content

fix(desktop): keep the rustcode on PATH at the app's version - #3486

Merged
LHagfoss merged 1 commit into
mainfrom
fix/desktop-path-rustcode-version
Nov 11, 2026
Merged

LHagfoss merged 1 commit into
mainfrom
fix/desktop-path-rustcode-version

Conversation

@LHagfoss

Copy link
Copy Markdown
Owner

What

rustcode server status already reported when the rustcode on PATH differs from the engine's version, with both paths (path-version-mismatch), and the Machines page already shows that warning. What was missing is a way to fix it in one step.

  • New rustcode server link-path points the rustcode a shell finds at the engine that runs it: a symlink on macOS and Linux (the next app update reaches it too), a copy on Windows (a running rustcode.exe is renamed aside first). The file is replaced in place through a staged sibling and a rename; PATH is never edited.
  • It does nothing when a shell already finds this version, leaves Homebrew's copy to brew upgrade lhagfoss/tap/rustcode (replacing its link would be undone by brew), and refuses a development build.
  • Machines page, This computer row: when the warning is path-version-mismatch, a "Use this app's version in a terminal" button runs it with the app's bundled engine (new server_link_path command, same shape as server_service_install) and reads the status again. The older ~/.rustcode/bin copy from the install script is therefore named in the app and fixable there, not left ahead of the app's silently.
  • docs/server.md documents link-path.

Changelog

The Machines page can point the rustcode in a terminal at the app's version in one step (rustcode server link-path).

Testing

  • cargo check --workspace --tests, cargo fmt --all -- --check, cargo test -p rustcode --lib -- service::path_binary (link plan and the replace-in-place step), cargo test -p rustcode-tui cli::tests.
  • apps/desktop: bun run check; src-tauri: cargo fmt --check, cargo clippy --all-targets -- -D warnings.

Closes #3411

Adds 'rustcode server link-path' and a 'Use this app's version in a terminal' action on the Machines page. It points the rustcode a shell finds at the engine that runs it (a symlink on macOS and Linux, a copy on Windows), leaves Homebrew's copy to brew upgrade, and refuses a development build. server status already names the mismatch with both paths.
@github-actions github-actions Bot added the fix A bug fix label Nov 11, 2026
@LHagfoss
LHagfoss merged commit a94482c into main Nov 11, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(desktop): keep the rustcode on PATH at the app's version

1 participant