Repository navigation
feat(plugin): notice when a new version is available - #534
Conversation
Once a day, a while after startup, fetch the plugin's manifest.json from the default branch on GitHub (the same file Obsidian's own update check reads) and show "Smart Second Brain X is available · Update" once per newer stable version. Update opens Settings -> Community plugins. It stays quiet on pre-release builds (BRAT delivers those), for versions whose minAppVersion the running Obsidian doesn't meet, and while Obsidian's own "Automatically check for plugin updates" is on. A "Check for updates" toggle under Settings -> General -> Privacy turns it off; nothing about the user or the vault is sent. The README's privacy line now discloses the request. Adds utils/version.ts (shared with the release-notes PR). Co-Authored-By: Claude <noreply@anthropic.com>
|
The request-to-notice flow moves to runUpdateCheck() in utils/updateCheck.ts behind injected dependencies, with tests for the daily gate, once-per-version, the opt-out and Obsidian step-aside (no request at all), and failures. A response that arrives after the plugin unloads, or after the user turned the check off, no longer announces. The Update link falls back to the obsidian://show-plugin URI when the internal settings API throws, not only when it is missing. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
# Conflicts: # src/main.ts # src/stores/dataStore.svelte.ts # src/types/plugin.ts
Comments Outside DiffThese findings sit on lines the diff does not cover, so they could not be posted inline. Each one leaves this list once its file changes.
|
A reworked chat composer (growing input, attachment preview tiles, Take photo on mobile, a single jump-to-bottom button, and a composer that keeps up with the iOS keyboard), agents that keep their memory index and skills up to date (#513-#519), release notes shown in the plugin after an update (#533), and a notice when a new version is available (#534). Co-Authored-By: Claude <noreply@anthropic.com>
s2b-dev/smart-second-brain#534 adds a once-a-day request to GitHub for the plugin's version number. List it under "What leaves your machine" and explain what it sends, when it skips itself, and where to turn it off. Co-authored-by: Claude <noreply@anthropic.com>
What
A notice tells users a new version of the plugin is available. Obsidian only offers plugin updates when someone opens Community plugins, unless they've turned on its own automatic check (off by default), so most users otherwise pick up fixes late.
manifest.jsonfrom the default branch on GitHub, the same file Obsidian's own update check reads, so the notice fires exactly when Obsidian would offer the update.app.settingAPI ever moves, it falls back toobsidian://show-plugin?id=smart-second-brain.minAppVersionthe running Obsidian doesn't meet, since Obsidian wouldn't install its2b-dev/site.utils/version.ts(version comparison), byte-identical to the copy in feat(plugin): show bundled release notes after an update #533, so the two PRs merge cleanly in either order.How I tested it
test/utils/updateCheck.test.tscover:minAppVersion, pre-release buildbun run check,format,lintand the fulltestsuite; all pass.dev:errorswas clean.obsidian://show-plugin, opened throughwindow.openor the OS, did not visibly open anything in the slot vaults, which is why the internal settings API is the primary route.AI assistance: Claude Code wrote this from Leo's brief (a notice when a new version is available, as a separate PR from #533). The step-aside for Obsidian's own check and the settings route for Update were changes Claude made after testing live. The notice, its defaults and the privacy wording still need Leo's review and live test.
Checklist
bun run check,bun run format,bun run lint, andbun run testpass locallymanifest.json: I noted that the docs site needs updating (see "Documentation" in CONTRIBUTING.md). The privacy page needs the new request disclosed; PR to follow.