Repository navigation
fix: recover plugin directory when omarchy strips __sourceDir - #14
Merged
Merged
Conversation
omarchy 4.0.4 hands third-party plugins a sanitized manifest without
__sourceDir, so pluginDir resolved to "" and the catalog silently loaded
empty ("0 resources", no error). Derive the plugin directory from the
plugin's own entry point URL as a fallback, which also keeps pre-4.0.4
shells on the manifest path.
Co-Authored-By: Claude Code <noreply@anthropic.com>
This was referenced Sep 17, 2026
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.
Problem
After upgrading to omarchy 4.0.4, QOpen opens with "0 resources" even though
~/.config/qopen/config.jsonis intact andbin/qopen api catalogworksstandalone.
Root cause
omarchy 4.0.4 hardened the third-party plugin API and now injects a sanitized
manifest via
publicPluginManifest(), which deletes__sourceDirforthird-party plugins:
QOpen derived its backend path from that field:
so
pluginDirbecame"",backendPathbecame"",requestCatalogReload()returned early, and the catalog stayed at itsempty initial value — no error banner, just an empty list.
Fix
pluginDirnow falls back to the plugin's own entry point URL, exposed bythe host-injected
pluginRegistryAPI (file:///.../qopen.launcher/QOpen.qml→ directory). Shells before 4.0.4 keep the existing
__sourceDirpath, sobehavior is unchanged there.
Verification
python -m json.tool manifest.jsonOKpython -m py_compile bin/qopenOKpython -m unittest discover -s tests -v— 47 tests OK (incl. newsource-level regression test for the fallback)
omarchy plugin validate .— exit 0qmlcachegen --only-bytecodeon all five QML files OKgit diff --checkclean🤖 Generated with Claude Code