Repository navigation
Conversation
A manifest that passes through a QML model exposes kinds as an array-like sequence, not an Array. Every host-side gate built on Array.isArray(manifest.kinds) then fails, so third-party (and cloned) plugins get shell.appLibrary === null and their menus show an empty Apps list. Route all kind checks through Util.kindsContain, which searches plain arrays and array-like sequences alike. Fixes omacom#15617 Fixes omacom#15483 Fixes omacom#15595
[Medium impact] The PR appears safe to merge; no actionable defects were found. SummaryMakes plugin kind checks accept both arrays and array-like QML sequences.
No actionable issues found. Tests were inspected but not run during this review. Reviews (1) · Last reviewed commit: "shell: accept array-like manifest kinds ..." · Reviewed by Greptile |
|
I read this change at 73e7a61 against It has not been classified yet. Every item gets two separate classifications, one from Claude Opus 5.5 and one from the configured reviewer, Codex Medium. Claude read it as a bug fix. Codex Medium could not be asked, because omabot's daily limit on second-opinion reviews was already used up. One model's answer does not count as a classification, so this stays unlabelled and unverified. Two things the maintainer will need when it comes round again, both checked against the source:
Next: it waits for the second classification. You don't need to do anything for now. |
|
Closing since the linked issues were closed. |
Fixes #15617, fixes #15483, fixes #15595
Problem
A plugin manifest that passes through a QML model exposes
kindsas an array-like sequence rather than a realArray, soArray.isArray(manifest.kinds)is false. Every host-side kind gate used that check, so for third-party and cloned pluginsshell.manifestHasKind(manifest, "menu")returned false andcreateScopedPluginShellhanded the pluginappLibrary: null— a clonedomarchy.menuopens with an empty Apps list ("Nothing here yet") even though its manifest declares"kinds": ["menu", "bar-widget"], and third-party menu plugins never receiveshell.appLibrary. First-party plugins were unaffected because their manifests stay plain JSON objects.Fix
Util.kindsContain(kinds, kind)searches both real arrays and array-like sequences (length+ indexed access);Util.manifestHasKinddelegates to it.Array.isArray(...kinds)gate inshell/shell.qml(manifestHasKind,isBarOptionManifest, service lookup/sync,isBarWidgetPanelPlugin,computePanelEntries,listPlugins) andshell/services/PluginRegistry.qml(isEnabled,activeCloneFor,restoreCloneSource,setEnabled) now routes through the helper. The strictArray.isArrayvalidation of raw manifest JSON at scan time is unchanged, and the array fast-path in the helper keeps plain arrays onindexOf.Test
New
test/shell.d/plugin-kinds-sequence-test.sh:kindsContainfromUtil.qmland runs it under node against a simulated QML sequence (Array.isArray === false), verifying sequence and plain-array lookup plus null/empty/non-array-like rejection;Util.manifestHasKinddelegates to it and that no host file gates a kind check onArray.isArray(...kinds)outside the two intentional sites (raw-JSON validation and the array fast-path), so the pattern cannot silently return.Verified the test fails on clean
quattroand passes with the fix. Related suites (plugin-clone-test,plugin-enable-test,plugin-registry-contract-test,bar-widget-contract-test,plugin-manifest-scan-test) pass;menu-plugin-testfails identically (exit 127) on cleanquattro, a pre-existing environment issue.