Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

fix(updater): bake the what's-new list into latest*.yml

chaitanyagiri3b8ebda7d8cd
diff --git a/build/release-notes.md b/build/release-notes.md
new file mode 100644
index 00000000..0ab3efb2
--- /dev/null
+++ b/build/release-notes.md
@@ -0,0 +1,4 @@
+- **The interface speaks Chinese.** Pick zh-CN in Settings.
+- **IME typing no longer sends early.** Enter picks your candidate.
+- **Fonts ship inside the app.** No Google Fonts fetch on launch.
+- **Settings has one Save button.** Connections get their own tab.
diff --git a/electron-builder.yml b/electron-builder.yml
index f240b1fb..20eacff7 100644
--- a/electron-builder.yml
+++ b/electron-builder.yml
@@ -11,6 +11,26 @@ publish:
owner: chaitanyagiri
repo: munder-difflin
+# Bake the update toast's "What's new" list straight into latest*.yml.
+#
+# Without this, electron-updater has nothing to read: parseUpdateInfo yaml-loads
+# the channel file, finds releaseNotes null, and falls back to computeReleaseNotes
+# over GitHub's releases.atom feed. That feed carries GitHub's RENDERED HTML of
+# RELEASE.md, not its markdown, so the digest sees no `##` headings at all and
+# scans for bullets instead. The only line in 53KB that looks like a bullet is
+# `* { box-sizing: border-box; }` inside RELEASE.md's <style> block, so the
+# toast's entire what's-new list was one CSS rule.
+#
+# A present releaseNotes means the feed is never consulted. That is the whole
+# point: the toast is drawn by the ALREADY RUNNING app, so a parser fix reaches
+# only people who have already upgraded, while this is a field every existing
+# client on every old version already reads.
+#
+# Keep this file short and free of HTML. It is sized for a 340px toast (5
+# bullets, 280 chars total), NOT for the release page, which stays RELEASE.md.
+releaseInfo:
+ releaseNotesFile: build/release-notes.md
+
# Notarize + staple after signing, but only when APPLE_* creds are in the env
# (the hook no-ops otherwise, so contributor builds still work). Root-level hook.
afterSign: build/notarize.cjs
diff --git a/test/release-notes.test.cjs b/test/release-notes.test.cjs
index f5872099..3982a98d 100644
--- a/test/release-notes.test.cjs
+++ b/test/release-notes.test.cjs
@@ -238,3 +238,35 @@ test('options are honoured so a roomier surface can ask for more', () => {
assert.equal(summarizeReleaseNotes(body, { maxBullets: 2 }).length, 2);
assert.ok(total(summarizeReleaseNotes(body, { maxChars: 60 })) <= 60);
});
+
+test('the notes file we actually ship fits the toast', () => {
+ // Guards the FILE, not the parser: build/release-notes.md is what
+ // releaseInfo.releaseNotesFile bakes into latest*.yml, and it is the thing a
+ // release runner edits by hand. A bullet that silently falls off the budget
+ // is invisible until someone reads a shipped toast.
+ const notes = fs.readFileSync(
+ path.join(__dirname, '..', 'build', 'release-notes.md'),
+ 'utf8'
+ );
+ const digest = summarizeReleaseNotes(notes);
+ const bullets = notes.split('\n').filter((l) => /^\s*-\s+/.test(l)).length;
+
+ assert.ok(bullets >= 3 && bullets <= RELEASE_NOTES_MAX_BULLETS, `${bullets} bullets in the file`);
+ assert.equal(digest.length, bullets, 'a bullet was dropped by the budget');
+ assert.ok(total(digest) <= RELEASE_NOTES_MAX_CHARS, `${total(digest)} chars over budget`);
+ assert.ok(!digest.some((l) => l.includes('…')), 'a shipped bullet is clipped mid-sentence');
+ assert.doesNotMatch(notes, /<[a-z]/i, 'the notes file must stay free of HTML');
+});
+
+test('electron-builder points the release notes at a file that exists', () => {
+ // Without this field electron-updater silently falls back to the atom feed,
+ // which is the whole bug. A typo here fails open and looks like nothing.
+ const cfg = fs.readFileSync(path.join(__dirname, '..', 'electron-builder.yml'), 'utf8');
+ const match = cfg.match(/^releaseInfo:\n\s+releaseNotesFile:\s*(\S+)\s*$/m);
+
+ assert.ok(match, 'releaseInfo.releaseNotesFile is missing from electron-builder.yml');
+ assert.ok(
+ fs.existsSync(path.join(__dirname, '..', match[1])),
+ `releaseNotesFile points at a missing file: ${match[1]}`
+ );
+});