Skip to content

plugin.json: mark comment/divider entries with "type": "separator" - #764

Merged
dwertheimer merged 1 commit into
mainfrom
plugin-json-separator-markers
Jul 30, 2026
Merged

plugin.json: mark comment/divider entries with "type": "separator"#764
dwertheimer merged 1 commit into
mainfrom
plugin-json-separator-markers

Conversation

@dwertheimer

Copy link
Copy Markdown
Collaborator

Several plugin.json files use bare objects as visual section dividers:

{ "note": "================== DEBUGGING SETTINGS ========================" }

They 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

This 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 on type === 'separator' rather than on a missing jsFunction.

25 entries across 9 plugins — 12 in plugin.settings, 13 in plugin.commands. No setting values, defaults, keys, or command definitions change; every file still parses.

plugin settings commands
dbludeau.TodoistNoteplanSync 3 1
deleteme.testPluginDownload 2 1
dwertheimer.Forms 2 1
dwertheimer.TaskAutomations 2
dwertheimer.TaskSorting 3 1
np.CallbackURLs 1
np.TOC 1 1
shared.AI 1 7
dwertheimer.Favorites 1 1

(Favorites' two are in #763, which is where the divider convention came from.)

One thing deliberately left alone

np.Tidy plugin.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

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>
@dwertheimer
dwertheimer merged commit 77c7ea4 into main Jul 30, 2026
4 checks passed
@dwertheimer
dwertheimer deleted the plugin-json-separator-markers branch July 30, 2026 19:02
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>
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