Skip to content

fix(desktop): never clone a unified package's desktop half standalone on a local backend - #121475

Merged
OutThisLife merged 1 commit into
mainfrom
bb/100412-plugin-half
Sep 24, 2026
Merged

OutThisLife merged 1 commit into
mainfrom
bb/100412-plugin-half

Conversation

@OutThisLife

Copy link
Copy Markdown

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

  • neighbor vitest — reconcileDesktopPlugins was 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

… 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
OutThisLife enabled auto-merge (rebase) September 24, 2026 11:53
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

૮ >ﻌ< ა ci review

ran on ec5b927 — fix(desktop): never clone a unified package's desktop half s

debug info

CI timings

CI timings · View report · View job

Wall time 6m19s vs 9m17s (-32.0%). 4 job(s) slower, 3 faster,

  • Desktop core E2E / Desktop core E2E (Linux): +38.0s
  • Detect affected areas: -21.0s
  • JS & TS checks / JS & TS checks: +8.0s
  • Check no committed infographics / check-no-committed-infographics: +8.0s
  • Check no case-colliding filenames / check-case-collisions: -4.0s

@OutThisLife
OutThisLife merged commit 035171c into main Sep 24, 2026
31 checks passed
@OutThisLife
OutThisLife deleted the bb/100412-plugin-half branch September 24, 2026 11:59
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) comp/plugins Plugin system and bundled plugins labels Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

3 participants