Fix plugins lost after server restart in desktop app#435
Merged
Conversation
Signed-off-by: Yondon Fu <[email protected]>
The NSIS installer was missing UV_PROJECT_ENVIRONMENT when running uv sync, causing it to create the venv in the wrong location. Also adds --inexact to preserve plugin packages, copies patches.pth, and checks for venv existence in isSetupNeeded() since uv run now uses --no-sync. Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Yondon Fu <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #425 — Plugins install successfully but disappear after server restart in the Electron desktop app.
Root cause: Two issues combine to wipe installed plugins:
uv syncon first launch that removes the entire venv.uv run(used to spawn the server) does an implicit sync that destroys and recreates the venv on every start and respawn, wiping all plugin packages.Confirmed from reporter's logs:
Loaded 0 plugin(s)on every single startup across months, withRemoved virtual environment at:on everyuv runrespawn.Changes:
app/build/win/installer.nsh) — Download 0.9.11 specifically instead oflatest, matchingUV_VERSIONin config.ts--no-synctouv run(app/src/services/pythonProcess.ts) — Prevent implicit venv sync on server start/respawn. Safe becauseuv syncalready runs explicitly during Electron setup--inexactonuv sync(app/src/services/setup.ts) — When setup does run, preserve extra packages (plugins) not in the lockfileTest plan
npm run dist:win) and verify downloaded uv is 0.9.11uv run daydream-scope --no-browserstill works standalone🤖 Generated with Claude Code