Skip to content

chat: keep single-plugin sources installed after a reload - #333641

Merged
Connor Peet (connor4312) merged 2 commits into
mainfrom
connor4312/333543
Aug 31, 2026
Merged

Connor Peet (connor4312) merged 2 commits into
mainfrom
connor4312/333543

Conversation

@connor4312

Copy link
Copy Markdown
Member

chat: keep single-plugin sources installed after a reload

A plugin installed with "Install from Source" from a repository that has only a plugin manifest,
and no marketplace index, disappeared from the customizations view after a window reload. The
plugin stayed on disk and stayed recorded in installed.json, but the full descriptor was never
recovered, thus the installed-plugins observable discarded the entry.

  • Moves the single-plugin manifest fallback into the hydration step, where the recorded install
    directory of the entry is known. The fallback applied only to non-shorthand references before,
    thus it could not run for the GitHub shorthand references that "Install from Source" makes.
  • Reads the manifest from the recorded install directory instead of a repository path derived
    again from the marketplace reference. This also corrects a path mismatch for owner/repo#ref
    sources, whose clone is in github.com/owner/repo while the derived path added a ref_<ref>
    segment.
  • Makes _readPluginsForInstalledEntry do only the marketplace lookup.
  • Adds a regression test for a single-plugin GitHub repository that survives a restart.

Fixes #333543

(Commit message generated by Copilot)

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

A plugin installed with "Install from Source" from a repository that has only a plugin manifest,
and no marketplace index, disappeared from the customizations view after a window reload. The
plugin stayed on disk and stayed recorded in installed.json, but the full descriptor was never
recovered, thus the installed-plugins observable discarded the entry.

- Moves the single-plugin manifest fallback into the hydration step, where the recorded install
  directory of the entry is known. The fallback applied only to non-shorthand references before,
  thus it could not run for the GitHub shorthand references that "Install from Source" makes.
- Reads the manifest from the recorded install directory instead of a repository path derived
  again from the marketplace reference. This also corrects a path mismatch for `owner/repo#ref`
  sources, whose clone is in `github.com/owner/repo` while the derived path added a `ref_<ref>`
  segment.
- Makes _readPluginsForInstalledEntry do only the marketplace lookup.
- Adds a regression test for a single-plugin GitHub repository that survives a restart.

Fixes #333543

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 31, 2026 20:58
@connor4312
Connor Peet (connor4312) enabled auto-merge (squash) August 31, 2026 20:58
joshspicer
joshspicer previously approved these changes Aug 31, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

Review tier: Balanced
Findings: 1 Medium severity · 1 Low severity

New issues introduced by this change (2)
Severity Finding
Medium severity src/​vs/​workbench/​contrib/​chat/​common/​plugins/​pluginMarketplaceService.ts — This fallback also runs when marketplace lookup succeeded but the stored plugin no longer matches…
Low severity src/​vs/​workbench/​contrib/​chat/​test/​common/​plugins/​pluginMarketplaceService.test.ts — The PR specifically calls out the owner/repo#ref path mismatch, but this test uses an unqualified…
What changed in this PR

Restores single-plugin source installations after reload by hydrating metadata from the recorded install directory.

Changes:

  • Adds manifest fallback during installed-plugin hydration.
  • Adds restart regression coverage.
File Description
pluginMarketplaceService.ts Recovers metadata from installed manifests.
pluginMarketplaceService.test.ts Tests restart hydration.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.ts Outdated
Found in review.

- Applies the manifest fallback only when the marketplace supplies no plugins. A marketplace that
  resolves but no longer lists an entry, such as after a rename, must not fall back, because a
  marketplace plugin directory usually holds a manifest too and reading it rebuilt the entry as a
  direct source rooted at the marketplace repository, which sent later updates to the wrong
  repository and path.
- Makes the restart test use a `#ref` reference, so the recorded clone directory and the directory
  derived from the reference differ. The test now proves that hydration reads the recorded
  install directory.
- Adds a test that a marketplace plugin the marketplace no longer lists stays unhydrated.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@connor4312
Connor Peet (connor4312) merged commit a270c51 into main Aug 31, 2026
37 checks passed
@connor4312
Connor Peet (connor4312) deleted the connor4312/333543 branch August 31, 2026 21:52
@vs-code-engineering vs-code-engineering Bot added this to the 1.137.0 milestone Aug 31, 2026
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.

Plugin disappears after reload

4 participants