fix(desktop): never clone a unified package's desktop half standalone on a local backend - #121475
Merged
Merged
Conversation
… on a local backend The install dialog gated the package path on the agent install succeeding in the same click (`agentInstalled && desktopHalfFromPackage`). A package already on disk answers "Plugin '<name>' already exists. Use force reinstall" without Force, so the retry fell through to installDesktopPlugin and cloned desktop-plugins/<git-name>/ beside the package copy the app had already materialised as desktop-plugins/<manifest-name>/. Two folders, one plugin id: the on-disk duplicate from #100412 (since e1a6679 an error row instead of a competing live instance, but still created by the install flow). The package path now applies whenever the repo is a unified package, the backend is local and the Agent box is ticked, whatever the agent install returned. reconcileDesktopPlugins() is idempotent, so a retry touches nothing; the desktop success toast is raised only when the agent half landed or a copy was actually materialised, so a refused install shows the agent error alone. A failed fresh install no longer leaves a standalone desktop clone behind for the next successful install to duplicate. Remote backends keep the separate clone (their plugins/ folder is not readable from this machine); the Desktop-UI-only tick is unchanged. Fixes #100412 (install-time half; runtime half landed in #118902). Tests: two invariants in plugin-install-modal.test.tsx, the first red on main (installDesktopPlugin called on the refused retry), the second guarding the remote-backend clone. (cherry picked from commit 9fbd3a9)
OutThisLife
enabled auto-merge (rebase)
September 24, 2026 11:53
૮ >ﻌ< ა ci reviewran on ec5b927 — fix(desktop): never clone a unified package's desktop half s debug infoCI timingsCI timings · View report · View jobWall time 6m19s vs 9m17s (-32.0%). 4 job(s) slower, 3 faster,
|
12 tasks done
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
Installing a hybrid plugin onto a local gateway cloned a second desktop copy when the agent install reported that the package already existed. The desktop half is now materialised from the unified package whether or not that install just succeeded. Remote gateways still clone standalone. Nothing is reported as installed when there is nothing to materialise.
Test plan
reconcileDesktopPluginswas not called on the refused local retry; 8 passed after.Supersedes
#101046 (cherry-picked, authorship kept: OcuClaw). #100485 was not taken. The loader duplicate-id guard is already on main.
Auto-merge: rebase. Reviewed head
ec5b9273e5f3. Local installs stop cloning a second folder. Remote installs are unchanged.Fixes #100412