cite-wide 0.3.0

Cite Wide moves to Obsidian 1.13: searchable settings, review-bot lint, and its first test suite

Every Cite Wide setting now shows up in Obsidian's settings search, and a new test suite checks that all 14 commands register on load.

Cite Wide moves to Obsidian 1.13: searchable settings, review-bot lint, and its first test suite

Why Care?

Obsidian 1.13 added a search box to Settings, but it only finds settings from plugins built on its new declarative settings API. Cite Wide's tab predated that API, so typing "Jina" or "citations folder" into settings search found nothing. As of 0.3.0, every Cite Wide setting is searchable, and Obsidian draws the tab itself instead of the plugin building it one element at a time.

A report also came in that Cite Wide's commands weren't loading in Obsidian 1.14.4. We could not reproduce it: in a Node harness that copies how the 1.14.4 app loads plugins and registers settings tabs, all 14 commands register. That check now runs as a test on every build, so a regression would fail the build instead of reaching users.

What's New?

  • Searchable settings. The Jina.ai API key, citations folder, and auto-save toggle all appear in Obsidian's settings search. The API key status line updates as you type, and the "How to use URL citation extraction" walkthrough is now a set of searchable rows.

  • Sentence-case commands and buttons. "Extract Citation from URL" is now "Extract citation from URL", and so on. Command IDs didn't change, so your hotkeys still work.

  • The review bot's own lint, run locally. eslint-plugin-obsidianmd (the rule set Obsidian's marketplace review bot uses) now gates pnpm build, and every finding is fixed.

  • A test suite. pnpm test runs 11 tests on Node's built-in runner with no new dependencies and no network calls.

  • Requires Obsidian 1.13 or later. minAppVersion moved from 1.8.10 to 1.13.0, which is why this is 0.3.0 and not a patch.

How the settings tab works now

CiteWideSettingTab no longer overrides display(). It returns a list of definitions from getSettingDefinitions(). Obsidian renders that list and indexes it for search. Two small overrides connect it to the plugin:

  • getControlValue(key) reads plugin.settings[key].

  • setControlValue(key, value) writes the value, keeps the side effects the old onChange handlers had (the Jina key goes to the URL service, the folder to the citation-file service), and saves.

The API key status line is two rows, each with a visible predicate. When the key changes, refreshDomState() switches them in place without a re-render, so the key field keeps focus while you type.

The missing-commands report

What we checked:

  • onload() against an obsidian stub whose addSettingTab() calls getSettingDefinitions() right away, as the installed 1.14.4 app.js does. All 14 commands registered, both with and without a data.json.

  • The 1.14.4 runtime's Plugin base class, loadPlugin, and the settings modal's addSettingTab. None of them would reject Cite Wide's onload().

  • The 1.13.1 typings, which add Plugin.settings?: unknown. Cite Wide's settings!: declaration now fails type-checking against them (TS2612). Our compiled main.js doesn't emit that field, and the 1.14.4 runtime doesn't define settings on Plugin, so this isn't a runtime cause. The field is initialized from the defaults now anyway.

No definite cause was found. If the console error from the affected vault shows something else, it goes in a follow-up entry.

Under the Hood

  • Toolchain: obsidian pinned to 1.13.1; eslint ^10.12.0; @typescript-eslint/* 8.71.1; esbuild 0.28.2; @types/node ^22.20.5; added eslint-plugin-obsidianmd ^0.4.2 and @eslint/plugin-kit ^0.7.3. TypeScript stays at 6.0.3 (typescript-eslint supports <6.1.0), and @types/node stays on 22 (Obsidian 1.13+ can still run on Electron 39 / Node 22).

  • Lint cleanup: 122 inline element.style assignments in the three list modals moved into named classes in src/styles/citations.css, with the same values, scoped under .cite-wide-modal. fetch became requestUrl. vault.delete became fileManager.trashFile. Debug console.log calls were removed. The deprecated getNewHexId() alias was dropped. An unused src/utils/logger.ts left over from a starter template was deleted.

  • Test harness, copied from Image Gin: scripts/run-tests.mjs uses esbuild to bundle tests/*.test.ts with obsidian aliased to tests/stubs/obsidian.ts, then runs them with node --test.

  • Commits on development: 2005c58 toolchain and lint, 599e13b test harness and acceptance spec (red), e5c500d settings tab rewrite and the 0.3.0 version bump.

What's Next

  • Confirm in Obsidian 1.14.4 that the commands appear and that settings search finds "Jina".

  • Tag 0.3.0 after the release notes move from Draft to Published.