Repository navigation
refactor(plugins): extract the shared content-pack registry and list store - #30697
Conversation
Pure refactor. Verify, bounded read, parse and per-plugin error handling move into PluginArtifactPackRegistry; language packs become one instance, so later data families reuse it instead of copying the file.
Pure refactor. Reconcile and error reporting walk one family list in the same order as before, so a new family is one entry.
…defaults Pure refactor. Declared artifact paths are a list of per-family rows, and the contributes default comes from the schema (prefault) instead of a second copy of the field list; the existing defaults test pins the result.
Pure refactor. The fetch generation, startup join window and content-change subscription move into createPluginContentListStore; language packs become one instance, and store fields are renamed to entries/fetchEntries.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
ELI5
Language packs are the only plugin "content pack" today, and their loading code is written specifically for them. This pulls the reusable parts out so the next kinds of pack (themes, icon themes, terminal themes) reuse them instead of copying ~300 lines each. Nothing a user sees changes.
What Changed
plugin-artifact-pack-registry.ts: the verify → bounded read → parse → per-plugin error loop, extracted fromplugin-language-pack-registry.ts; language packs are now one instance of it.plugin-content-pack-registry.ts: content families reconcile and report errors from one list, so a new family is one line.plugin-artifact-validation.ts/plugin-manifest.ts: declared artifact paths and thecontributesdefault come from one table per family instead of repeated field lists.store/plugin-content-list-store.ts: the renderer list store (fetch generation, startup join window, change subscription) extracted from the language-pack store. Its fields are namedentries/fetchEntries; the two hooks reading it are updated.Loading order, errors, the startup join window and change subscription behave exactly as before.
Why
Theme, icon-theme and terminal-theme packs are next. Without this, each would be a near-copy of the language-pack registry and store. Extracting now keeps those PRs about the new behavior.
Linked Issue
N/A (maintainer refactor).
Visual Proof
N/A — no UI or behavior change.
Testing
pnpm tc:node,tc:web,oxlint,check:code-quality:changed, localization coverage clean.Review
Agent skill upstream boundary
Notes
Behavior-preserving: no change for Linux/Windows/macOS, SSH, mobile, or older clients.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)