Repository navigation
Resolve bundled baselines vs writable overrides (lifecycle 3/6) - #32
Merged
Merged
Conversation
Lifecycle 3/6 (#6). A plugin id can exist as both a packaged core copy and a writable user copy; the backend loads at most one. Precedence now mirrors core's _is_bundled: a core copy that sits in a directory named after its id with "bundled": true always wins; otherwise the user copy shadows the packaged one. plugins:catalog rows gain activeSource ('bundled' | 'writable-override' | 'installed' | 'none'), the single copy the backend loads. installedVersion keeps meaning the user copy's version and bundled keeps meaning a qualifying baseline, so existing renderer behavior is unchanged. The scan and the rule move to a new electron-free module, src/main/plugin-precedence.ts, unit-tested under node:test. The scan sorts readdir entries for deterministic any-platform resolution; one documented divergence from the backend is that the desktop resolves two directories claiming the same id by sorted name.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 13 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
carochacs
reviewed
Oct 7, 2026
Author
|
Addressed both threads on review 5437437767 of #32 — no code changes, both findings verified as false positives.
Working tree untouched and clean; both threads left open as disagreements rather than resolved. Task list (1/5 completed)
|
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (7 files)
Reviewed by free · Input: 551.1K · Output: 42.8K · Cached: 541.7K |
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.

Closes #22. Part of #6 (plugin lifecycle).
A plugin id can exist as both a packaged core copy and a writable user copy; the backend loads at most one. This resolves which copy that is, mirrors core's
_is_bundledrule, and reports it per row.Behavior
_is_bundled): a core copy that sits in a directory named after its id with"bundled": trueis a bundled baseline and always wins; any other packaged copy yields to a writable user copy, because the backend scans the user plugins dir first.plugins:catalogrows gainactiveSource:'bundled'(packaged copy loads),'writable-override'(user copy shadows a packaged non-baseline),'installed'(user copy, no packaged one beneath), or'none'(nothing on disk). Exactly one value per id, always.installedVersionkeeps meaning "the user copy's version" andbundledkeeps meaning "a qualifying baseline exists", so the existing renderer state logic (pmCatalogState) is unchanged. Making the UI displayactiveSourceis issue Build a filterable plugin catalog and selection UI #4's screen work, out of scope here.Verification
npm run typecheck— clean.node --test tests/plugin-precedence.test.js— 15 pass (bundled only, override only, both present, override removed, plus scan determinism).node --test tests/plugin-catalog-view.test.js tests/plugin-installed-state.test.js tests/plugin-lifecycle.test.js tests/plugin-installer.test.js tests/plugin-catalog.test.js tests/plugin-selection.test.js tests/plugin-setup-state.test.js tests/config-paths.test.js— all pass..github/workflows/ci.ymlgained aRun plugin precedence testsstep; the YAML was re-parsed.Notes
installedVersionnames —activeSourcedistinguishes only between the core and user roots and is unaffected. Documented indocs/PLUGIN_CATALOG.md.src/main/plugin-precedence.tsso the decision is unit-testable undernode --test.big-pickle(free) | 𝕏