Repository navigation
Change plugin and built-in ids to the @scope/name format - #64
Merged
Merged
Conversation
Plugin ids are a scope and a name, and built-in ids are @elsewise/ paths with kebab case segments. Plugins do not load until the plugin folders are nested by scope. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A plugin's folder is plugins/@scope/name. A folder outside a scope or a scope that cannot be read is reported as an invalid plugin. Panel source ids must start with a scope, and the example plugins and doc examples namespace their ids by the plugin's id. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
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
@scope/name.PluginIdaccepts a scope and a name, each lowercase letters, digits and hyphens, e.g.@elsewise/example-editor. Reverse-domain ids such asio.duobase.elsewise.examples.editorare refused.@elsewise/...paths. Everyelsewise.*andio.duobase.elsewise.*id (commands, command groups, context menu groups, toolbar items, settings panels, project and diff sources) is now slash-separated with kebab-case segments, e.g.@elsewise/file-tree/clipboard/copy-relative-path.plugins/@scope/nameon both the frontend and the daemon. A top-level folder outside a scope, or a scope folder that cannot be read, is reported as an invalid plugin and the other plugins still load.plugins.jsonstays a flat list of ids.app://elsewise/plugins/only serves@scope/namefolders. A flat path or a..in the id returns 404.CustomPanel['type']is`@${string}/${string}`, andaddPanelSourcesandisCustomPanelcheck for the leading@.@elsewise/example-*and@example/starter, and build their ids as${id}/name. Doc examples in@elsewise/frontend-pluginare namespaced by a plugin id, e.g.@example/plugin/rename.plugin.mjs removedeletes the scope folder when it is left empty.Notes
apps/desktopvalidates them with its ownJsonFileIdinstead ofPluginId./settings/local/%40example%2Fwords).localStoragekeys keep their dotted names.<data folder>/{frontend,daemon}/pluginsandplugins.jsonand reinstall its plugins; aplugins.jsonwith an old id is refused at start-up. User keymaps that bind old command ids need those keys renamed.Testing
plugin,core,frontend-plugin,desktop,daemonandweb.plugin,core,frontend-plugin,desktop,daemonandweb; the desktop Electron protocol tests pass.new-workspace-dialog.browser.test.tsxfails two tests on an unrelated default branch prefix, andscroll.browser.test.tsxis flaky; neither file is touched here. The visual tests were not run.🤖 Generated with Claude Code