Skip to content

feat(plugin): show bundled release notes after an update - #533

Merged
Leo310 merged 5 commits into
mainfrom
feat/release-notes
Sep 27, 2026
Merged

Leo310 merged 5 commits into
mainfrom
feat/release-notes

Conversation

@Leo310

@Leo310 Leo310 commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

What

Users now see the release notes after updating. The layout follows Obsidian's own release notes. CHANGELOG.md becomes the single source for them and is backfilled from the 2.0.0–2.2.0 GitHub release bodies (dates added, inner ## headings demoted to ###).

  • "What's new" tab: opens in the main area, with the S2B wordmark, "What's new in X", "Released on DATE", and the latest release's notes in full. Below that, "Earlier releases" lists older versions as collapsible sections with their dates. #123 references become GitHub links; code spans and fenced blocks are left alone. There is also a link to all releases on GitHub.
  • After an update: a notice says "Smart Second Brain updated to X · See what's new" and opens the tab. Every version newer than the stored lastSeenVersion is included, so releases a user skipped roll up and start expanded.
  • Staying quiet: a fresh install records the running version and shows nothing. A pre-release build shows and records nothing, so a beta tester still gets the stable notes when the release lands. Data from before this feature announces only the running version.
  • On demand: the "Show release notes" command and a Troubleshooting → Maintenance row open the tab with only the latest release expanded.
  • Release workflow: the tag's ## X.Y.Z (YYYY-MM-DD) section is copied into the draft body, and a stable tag with no section fails before the build. A re-run of a stable draft rewrites its body from the changelog; a pre-release draft's hand-written body is left alone.
  • SvelteItemView.mountComponent now unmounts any component it mounted earlier, so a view can re-render when setState arrives.
  • Docs: AGENTS.md notes that the release section goes into CHANGELOG.md in the release commit, before tagging.

No network requests: the notes are bundled with ?raw (about 25 KB).

How I tested it

  • Unit tests in test/utils/releaseNotes.test.ts cover:
    • changelog parsing, including the optional date
    • semver ordering, including pre-releases
    • the announcement rules: roll-up, unknown last-seen, beta, downgrade, a version without notes
    • linkifying, including skipping code
    • a check that the bundled CHANGELOG has a section for manifest.json's version
  • Ran bun run check, format, lint and the full test suite; all pass.
  • Checked live in the slot vault on desktop Obsidian 1.14:
    • On reload the update notice appeared (this vault's data predates the field, so it announced 2.2.0).
    • The command opens the tab with the logo, title, date, the latest notes, and collapsed earlier releases.
    • showReleaseNotes(3) expands the latest plus two earlier releases without duplicating the component.
    • dev:errors was clean.
  • Not tried on mobile.
  • The workflow's awk extraction was run locally against the backfilled file.

AI assistance: Claude Code wrote this from Leo's brief (bundled changelog shown on update, collapsed older releases, S2B logo, layout modelled on Obsidian's release notes). The tab, notice and workflow change still need Leo's review and live test.

Checklist

  • bun run check, bun run format, bun run lint, and bun run test pass locally
  • I tried the change in a real Obsidian vault (or explained above why that isn't applicable)
  • I read CONTRIBUTING.md, including the section on AI assistance
  • If this adds a provider, a bundled skill, a built-in tool, or changes manifest.json: I noted that the docs site needs updating (see "Documentation" in CONTRIBUTING.md) — n/a

CHANGELOG.md becomes the single source of release notes, backfilled with
2.0.0-2.2.0. The plugin bundles it and, after an update, shows a notice
linking to a "What's new" modal with every section since the last-seen
version (skipped releases roll up). Fresh installs and pre-release builds
stay quiet. The full history is available from the "Show release notes"
command and a Troubleshooting settings row, with only the latest release
expanded.

The release workflow now copies the tag's section into the GitHub draft
and fails a stable tag that has no section.

Co-Authored-By: Claude <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Adds release notes display and update announcement logic.

The PR appears safe to merge; no outstanding findings remain.

Summary

The PR bundles CHANGELOG.md to show release notes in an Obsidian tab, announces stable updates, and uses the same changelog sections for draft GitHub releases.

  • Adds a command and settings entry for opening the notes on demand.
  • Adds tests for parsing, version selection, and reference links.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A["CHANGELOG.md"] --> B["Bundled release-notes tab"]
  A --> C["Release workflow"]
  D["Stored last-seen version"] --> E["Update announcement"]
  B --> E
  C --> F["Draft GitHub release body"]
Loading

Reviews (5) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..."

Comment thread src/utils/releaseNotes.ts Outdated
Modelled on Obsidian's own release notes: a main-area tab with the S2B
wordmark, "What's new in X", the release date and the latest notes in
full, then earlier releases as collapsible sections (the ones announced
after an update start expanded). Replaces the modal.

CHANGELOG headings carry the release date, `## X.Y.Z (YYYY-MM-DD)`; the
workflow's extraction accepts both forms. Linkifying `#123` now skips
fenced blocks and inline code. SvelteItemView.mountComponent unmounts a
previously mounted component, so a view can re-render on setState.

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread .github/workflows/release.yml Outdated
Comment thread src/views/releaseNotes/ReleaseNotesView.ts Outdated
Leo310 and others added 2 commits September 27, 2026 19:52
… renders

The release workflow now matches the version heading with the same shape
the plugin parses (`## X.Y.Z` or `## X.Y.Z (YYYY-MM-DD)`), so a mistyped
date fails the release instead of shipping notes the plugin can't find.
The pattern goes through ENVIRON (awk -v eats backslashes) and avoids
brace repetition for mawk.

The What's new view gives each render its own child Component, removed
on re-render, so markdown render children no longer accumulate on the
view while it stays open.

Co-Authored-By: Claude <noreply@anthropic.com>
Shared with the upcoming update-available check, which builds on the
same file.

Co-Authored-By: Claude <noreply@anthropic.com>
@Leo310
Leo310 merged commit ba22d0b into main Sep 27, 2026
3 checks passed
@Leo310
Leo310 deleted the feat/release-notes branch September 27, 2026 18:28
Leo310 added a commit that referenced this pull request Sep 27, 2026
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>
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