Skip to content

Change plugin and built-in ids to the @scope/name format - #64

Merged
Pante merged 2 commits into
mainfrom
refactor/plugin-scoped-ids
Nov 30, 2026
Merged

Pante merged 2 commits into
mainfrom
refactor/plugin-scoped-ids

Conversation

@Pante

@Pante Pante commented Nov 29, 2026

Copy link
Copy Markdown
Member

Summary

  • Plugin ids are @scope/name. PluginId accepts a scope and a name, each lowercase letters, digits and hyphens, e.g. @elsewise/example-editor. Reverse-domain ids such as io.duobase.elsewise.examples.editor are refused.
  • Built-in ids are @elsewise/... paths. Every elsewise.* and io.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 are stored nested by scope. A plugin's folder is plugins/@scope/name on 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.json stays a flat list of ids.
  • app://elsewise/plugins/ only serves @scope/name folders. A flat path or a .. in the id returns 404.
  • Panel source ids must start with a scope. CustomPanel['type'] is `@${string}/${string}`, and addPanelSources and isCustomPanel check for the leading @.
  • Examples follow the format. The example plugins and the starter are @elsewise/example-* and @example/starter, and build their ids as ${id}/name. Doc examples in @elsewise/frontend-plugin are namespaced by a plugin id, e.g. @example/plugin/rename.
  • plugin.mjs remove deletes the scope folder when it is left empty.

Notes

  • Theme and keymap ids are still plain file names, so apps/desktop validates them with its own JsonFileId instead of PluginId.
  • Settings panel ids contain slashes, so the settings routes carry them percent-encoded (/settings/local/%40example%2Fwords).
  • The protobuf packages, the WebSocket subprotocols, the app id and the two localStorage keys keep their dotted names.
  • An existing checkout has to clear <data folder>/{frontend,daemon}/plugins and plugins.json and reinstall its plugins; a plugins.json with an old id is refused at start-up. User keymaps that bind old command ids need those keys renamed.

Testing

  • Typecheck and lint pass in plugin, core, frontend-plugin, desktop, daemon and web.
  • Node tests pass in plugin, core, frontend-plugin, desktop, daemon and web; the desktop Electron protocol tests pass.
  • Web browser tests: the settings, appearance, dock and workspace route suites pass. new-workspace-dialog.browser.test.tsx fails two tests on an unrelated default branch prefix, and scroll.browser.test.tsx is flaky; neither file is touched here. The visual tests were not run.

🤖 Generated with Claude Code

Pante and others added 2 commits November 29, 2026 12:26
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>
@claude

claude Bot commented Nov 29, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@Pante
Pante added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit 37ba6d6 Nov 30, 2026
31 checks passed
@Pante
Pante deleted the refactor/plugin-scoped-ids branch November 30, 2026 02:22
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.

1 participant