plugin.json: mark comment/divider entries with "type": "separator" - #764
Merged
Conversation
Several plugin.json files use bare objects as visual section dividers, e.g.
{ "note": "================== DEBUGGING SETTINGS ========================" }
These have no "key" (in plugin.settings) and no "jsFunction" (in plugin.commands), so
anything walking those arrays has to infer "this is not a real entry" from an absence.
Two things go wrong today:
- updateSettingData() logs "plugin.settings[N] has no valid key; skipping" for every one
of them on every settings update
- the app throws on plugin.commands entries that have no jsFunction
Marking them "type": "separator" gives both an explicit, positive signal to skip on,
which is what the existing separator entries already use. 25 entries across 9 plugins
(12 in plugin.settings, 13 in plugin.commands); no behaviour or setting values change.
Deliberately NOT changed: np.Tidy plugin.settings[13] is a command object
("openCalendarNoteInSplit", with name/description/hidden/arguments) sitting in the
settings array. Marking it a separator would hide a real mistake, so it is left for
@jgclark to move to plugin.commands.
No version bumps: this is metadata only, so each plugin can pick it up on its next
release rather than forcing one now.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
jgclark
added a commit
that referenced
this pull request
Jul 30, 2026
) Several plugin.json files use bare objects as visual section dividers, e.g. { "note": "================== DEBUGGING SETTINGS ========================" } These have no "key" (in plugin.settings) and no "jsFunction" (in plugin.commands), so anything walking those arrays has to infer "this is not a real entry" from an absence. Two things go wrong today: - updateSettingData() logs "plugin.settings[N] has no valid key; skipping" for every one of them on every settings update - the app throws on plugin.commands entries that have no jsFunction Marking them "type": "separator" gives both an explicit, positive signal to skip on, which is what the existing separator entries already use. 25 entries across 9 plugins (12 in plugin.settings, 13 in plugin.commands); no behaviour or setting values change. Deliberately NOT changed: np.Tidy plugin.settings[13] is a command object ("openCalendarNoteInSplit", with name/description/hidden/arguments) sitting in the settings array. Marking it a separator would hide a real mistake, so it is left for @jgclark to move to plugin.commands. No version bumps: this is metadata only, so each plugin can pick it up on its next release rather than forcing one now. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Several
plugin.jsonfiles use bare objects as visual section dividers:{ "note": "================== DEBUGGING SETTINGS ========================" }They have no
key(inplugin.settings) and nojsFunction(inplugin.commands), so anything walking those arrays has to infer "this is not a real entry" from an absence. Two things go wrong today:updateSettingData()logsplugin.settings[N] has no valid key; skippingfor every one of them, on every settings updateplugin.commandsentries that have nojsFunctionThis marks them
"type": "separator"— an explicit, positive signal to skip on, which is what the existing separator entries in these same files already use. @eduard, this means the app can skip ontype === 'separator'rather than on a missingjsFunction.25 entries across 9 plugins — 12 in
plugin.settings, 13 inplugin.commands. No setting values, defaults, keys, or command definitions change; every file still parses.(Favorites' two are in #763, which is where the divider convention came from.)
One thing deliberately left alone
np.Tidyplugin.settings[13]is a command object sitting in the settings array:{ "hidden": true, "name": "openCalendarNoteInSplit", "description": "Open calendar note in a split window (for callback)", ... }It trips the same "no valid key" warning, but marking it a separator would paper over a real mistake — it looks like it belongs in
plugin.commands. Left for @jgclark to decide.Note on versions
No version bumps. This is metadata only and touches several authors' plugins, so each can pick it up on its next release rather than being forced into one now. Say the word if you'd rather I bump them.
🤖 Generated with Claude Code