Skip to content

Guard read-only omarchyPath assignment and expose appLibrary to omarchy.dock clones - #22011

Open
NessDan wants to merge 1 commit into
omacom:quattrofrom
NessDan:fix/shell-service-omarchypath-and-dock-clone
Open

NessDan wants to merge 1 commit into
omacom:quattrofrom
NessDan:fix/shell-service-omarchypath-and-dock-clone

Conversation

@NessDan

@NessDan NessDan commented Dec 6, 2026

Copy link
Copy Markdown

What changes

Fixes #22007 (see also #18826).

Two papercuts affect cloned and third-party service plugins in shell/shell.qml:

  1. if ("omarchyPath" in inst) inst.omarchyPath = shell.omarchyPath throws TypeError: Cannot assign to read-only property "omarchyPath" if a service plugin declares readonly property string omarchyPath, aborting the remainder of service initialization (inst.shell, inst.manifest, _services registration).
  2. createScopedPluginShell() only grants pluginAppLibraryFor() to plugins with kind "menu". Cloning omarchy.dock (manifest.omarchy.clonedFrom === "omarchy.dock", kind "service") leaves shell.appLibrary === null, preventing cloned docks from reusing the host app library.

Changes:

  • Add pluginHasAppLibraryAccess(manifest) returning true for "menu" plugins and clonedFrom === "omarchy.dock" plugins, and use it in both pluginShellCapabilityProfile() and createScopedPluginShell().
  • Wrap inst.omarchyPath = shell.omarchyPath in try { ... } catch (_e) {} so a read-only property never aborts service startup.

Verification

  • Verified the failure mode and fix against Omarchy 4.6.0rc3-1 (omarchy-shell service plugin lifecycle with custom.dock cloned from omarchy.dock).
  • Confirmed inst.shell = shell.pluginShellFor(manifest) wiring checked by test/shell.d/plugin-auth-boundary-test.sh remains intact.

Screenshots

No visible change: built-in plugins are unaffected; guards service startup when omarchyPath is declared read-only and provides the scoped appLibrary facade to cloned omarchy.dock services.


Filed by Gemini 4 Carbon via Antigravity.

@greptile-apps

greptile-apps Bot commented Dec 6, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 4/5RetriggerView in Greptile

[Medium impact] The changes affect bounded parts of the shell's installed-plugin workflow.

Fix the missing app-library methods before merging so cloned docks can open their app grid and activate windows.

Findings

  1. P1 Cloned dock actions throw ▶
Fix with agent prompt
### Issue 1
shell/shell.qml:659-660
After `omarchy plugin clone omarchy.dock`, the dock receives an `appLibrary` object that lacks methods it calls. Opening the app grid calls the missing `refreshVersions()` in `AppGrid.qml:58` and throws before `opened` becomes true, so the grid never appears. Clicking a running app calls the missing `dockClickMode()` in `Dock.qml:229` and stops before activating its window. The grid also expects `version()`.

Extend `PluginAppLibraryApi` and its host callbacks with these dock methods before giving it to dock clones.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

The PR lets service startup continue when omarchyPath is read-only and gives dock clones a scoped appLibrary.

  • Dock clones can use the host app library through their shell API.
  • Services keep starting when omarchyPath is read-only.

Reviews (1) · Last reviewed commit: "Guard read-only omarchyPath assignment a..." · Reviewed by Greptile

Comment thread shell/shell.qml
Comment on lines +659 to 660
appLibrary: shell.pluginHasAppLibraryAccess(manifest)
? shell.pluginAppLibraryFor(cacheKey, key) : null,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Cloned dock actions throw

After omarchy plugin clone omarchy.dock, the dock receives an appLibrary object that lacks methods it calls. Opening the app grid calls the missing refreshVersions() in AppGrid.qml:58 and throws before opened becomes true, so the grid never appears. Clicking a running app calls the missing dockClickMode() in Dock.qml:229 and stops before activating its window. The grid also expects version().

Extend PluginAppLibraryApi and its host callbacks with these dock methods before giving it to dock clones.

Prompt To Fix With AI
This is a comment left during a code review.
Path: shell/shell.qml
Line: 659-660

Comment:
**Cloned dock actions throw**

After `omarchy plugin clone omarchy.dock`, the dock receives an `appLibrary` object that lacks methods it calls. Opening the app grid calls the missing `refreshVersions()` in `AppGrid.qml:58` and throws before `opened` becomes true, so the grid never appears. Clicking a running app calls the missing `dockClickMode()` in `Dock.qml:229` and stops before activating its window. The grid also expects `version()`.

Extend `PluginAppLibraryApi` and its host callbacks with these dock methods before giving it to dock clones.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@omarchybot omarchybot added the enhancement New feature or request label Dec 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

shell/shell.qml: Service plugin omarchyPath assignment throws on read-only property & omarchy.dock clones receive appLibrary: null

2 participants