Skip to content

Add a What's new sheet after updating - #213

Closed
claude[bot] wants to merge 1 commit into
mainfrom
claude/whats-new-sheet
Closed

claude[bot] wants to merge 1 commit into
mainfrom
claude/whats-new-sheet

Conversation

@claude

@claude claude Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

What & why

Before: after updating, nothing in Blurt says what changed. The only release notes are the auto-generated list of PR titles on the GitHub release.

After: the first launch after an update opens a sheet with the new version's highlights from CHANGELOG.md (up to three features, each with an SF Symbol, title and one sentence, then a Fixes list). "See all releases" links to GitHub Releases, and Return / Continue dismisses it. Help → What's New in Blurt reopens it for the running version, or the newest entry before it.

How: the rules live in the engine, as value types with tests:

  • Changelog parses CHANGELOG.md (format documented in a comment at the top of the file). Changelog.whatsNewAtLaunch(current:lastSeen:isConfigured:hasRunBefore:) decides what to show and whether to record the version.
  • LastSeenVersionStore stores the version on a new DefaultsKey.lastSeenVersion, so Reset Blurt clears it.
  • The shell only loads the file, applies the decision in AppDelegate, and renders WhatsNewSheet. The sheet follows the APIKeyEditorSheet layout: 440 pt wide, 20 pt padding, glassButtonStyleCompat(prominent: true), which is .borderedProminent.

Bundling: a postCompileScripts phase in project.yml ("Bundle CHANGELOG.md") copies the repo-root file into the app's Resources. Its inputs and outputs are declared, so it only re-runs when the file changes. I didn't use a resource entry because the file sits outside the target's sources, and a resource entry would add a repo-root group whose name depends on the checkout directory.

About the .pbxproj change: I couldn't run xcodegen here, so I did not regenerate the project. I wrote the .pbxproj changes by hand to match what xcodegen produces: the new source file plus the new phase. The object IDs come from XcodeProj's own deterministic reference algorithm, which I checked against existing IDs in this project. The xcodegen drift check on CI is what confirms the result is byte-identical. If you'd rather, running xcodegen generate locally should produce no diff.

Fresh install vs. upgrade:

  • Every launch of a build with this feature records a version, except an upgrade whose launch finds setup unfinished. That one waits for a configured launch.
  • A fresh install's first run is never configured. It records its version without showing anything, so a later launch never reads it as an upgrade.
  • A configured launch with nothing stored is an install from before this feature. To tell it apart from a reinstall or a UI-test launch, the decision checks whether an update check has ever completed (LastUpdateCheckStore). If one has, the sheet shows the current version's entry once, since the previous version isn't known. If not, it only records.
  • A downgrade, or a relaunch of the same version, does nothing.

Because v0.1.57 is already out, anyone updating to the next build sees the 0.1.57 notes, unless that release adds its own entry first. AGENTS.md now says to add the entry before the bump.

How it was tested

This was written in a Linux sandbox with no Swift toolchain, so nothing Swift was built or run locally. CI on macos-26 is the authority on whether it builds and the tests pass.

Locally I ran:

  • scripts/check-invariants.sh and its --self-test: pass.
  • scripts/check.sh --portable: passes; swift-format, SwiftLint, actionlint, zizmor, shellcheck and shfmt were not installed, so those were skipped.
  • prettier and markdownlint on CHANGELOG.md, AGENTS.md and project.yml: pass.

New engine suites: ChangelogTests (including a parse of the real CHANGELOG.md), WhatsNewLaunchTests (one test per launch case) and LastSeenVersionStoreTests. PersistedSettingsTests now covers the new key. The sheet itself hasn't been looked at on a Mac yet.

  • scripts/check.sh passes (or CI will, if I'm not on a Mac)
  • I read AGENTS.md and this doesn't reintroduce anything deliberately removed
  • Docs updated if behavior changed

🤖 Generated with Claude Code

The first launch after an update opens on the new version's release notes,
and Help > What's New in Blurt reopens them. The notes come from a
hand-written CHANGELOG.md at the repo root, copied into the app bundle by a
build phase and parsed by the engine's Changelog.

- Changelog / ChangelogEntry: the CHANGELOG.md format (version + date
  heading, up to 3 headline features with an optional SF Symbol, a Fixes
  list), newest first.
- Changelog.whatsNewAtLaunch: the launch decision. Shows every entry since
  the last version seen; a fresh install records its version without
  showing anything; an install from before this feature (no version
  stored, but an update check has completed) shows the current notes once.
- LastSeenVersionStore, on a new DefaultsKey case, so Reset covers it.
- project.yml: a "Bundle CHANGELOG.md" post-compile script phase.
- AGENTS.md: add the CHANGELOG entry before a release bump.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@alexkroman

Copy link
Copy Markdown
Collaborator

Implemented in #214

@alexkroman alexkroman closed this Sep 30, 2026
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.

2 participants