Skip to content

The agent that grows with you

fix(desktop): the update dialog shows real release notes and PR titles

Teknium891a5dfb0dfe
diff --git a/apps/desktop/src/app/updates-overlay.tsx b/apps/desktop/src/app/updates-overlay.tsx
index 8567af69a46..dad9802d609 100644
--- a/apps/desktop/src/app/updates-overlay.tsx
+++ b/apps/desktop/src/app/updates-overlay.tsx
@@ -29,8 +29,9 @@ import type {
} from '@/global'
import { useI18n } from '@/i18n'
import { buildCommitChangelog, type CommitGroup, formatFullChangelogText } from '@/lib/commit-changelog'
-import { AlertCircle, Check, Copy, Terminal } from '@/lib/icons'
+import { AlertCircle, Check, Copy, ExternalLink, Terminal } from '@/lib/icons'
import { resolveUpdateCopy, rollbackRelease, type UpdateTarget } from '@/lib/update-copy'
+import { fetchUpdateNoteItems, updateNotesSource, updateNotesUrl, updateReleaseTag } from '@/lib/update-notes'
import { cn } from '@/lib/utils'
import {
$backendUpdateApply,
@@ -59,6 +60,112 @@ function totalItems(groups: readonly CommitGroup[]) {
return groups.reduce((sum, g) => sum + g.items.length, 0)
}
+/** Release notes (stable) or the latest merged PRs (main); undefined while loading. */
+function useUpdateNotes(status: DesktopUpdateStatus | null, updateAvailable: boolean) {
+ const enabled = Boolean(status?.supported && !status.error && updateAvailable)
+ const source = status && enabled ? updateNotesSource(status) : null
+ const [items, setItems] = useState<{ for: DesktopUpdateStatus; items: string[] } | null>(null)
+
+ useEffect(() => {
+ const notesSource = status && enabled ? updateNotesSource(status) : null
+
+ if (!status || !notesSource) {
+ return
+ }
+
+ let live = true
+
+ void fetchUpdateNoteItems(notesSource, status).then(next => live && setItems({ for: status, items: next }))
+
+ return () => {
+ live = false
+ }
+ }, [enabled, status])
+
+ return {
+ items: items?.for === status ? items.items : undefined,
+ kind: source?.kind,
+ url: source && status ? updateNotesUrl(source, status) : null
+ }
+}
+
+type UpdateNotesView = ReturnType<typeof useUpdateNotes>
+
+/** The dialog's change list: fetched notes when they exist, else the commit changelog; plus the onward link. */
+function UpdateChangeList({
+ commitGroups,
+ copyText,
+ notes: fetched,
+ rollback
+}: {
+ commitGroups: readonly CommitGroup[]
+ copyText?: () => string
+ notes: UpdateNotesView
+ rollback: boolean
+}) {
+ const { t } = useI18n()
+ const u = t.updates
+ // A rollback brings no new changes; the "improvements" fallback would claim some.
+ const notes = rollback ? null : fetched
+ const pending = Boolean(notes?.url) && notes?.items === undefined
+
+ const shown: readonly CommitGroup[] =
+ rollback || pending
+ ? []
+ : notes?.items?.length
+ ? [{ id: 'new', items: notes.items, label: u.changeLogNew }]
+ : commitGroups
+
+ return (
+ <div className="grid gap-3">
+ {pending && <Loader className="mx-auto size-5" label={u.checking} type="lemniscate-bloom" />}
+ {shown.map((group, index) => (
+ <div key={group.id}>
+ <div className="flex items-center justify-between gap-2">
+ <p className="text-[0.625rem] font-semibold text-muted-foreground">{group.label}</p>
+ {index === 0 && copyText && (
+ <CopyButton
+ appearance="icon"
+ buttonSize="icon-xs"
+ className="-my-1 size-5 shrink-0 text-muted-foreground/70 hover:text-foreground"
+ iconClassName="size-3"
+ label={u.copyFullLog}
+ side="left"
+ text={copyText}
+ />
+ )}
+ </div>
+ <ul className="mt-1.5 grid gap-1.5 text-xs text-foreground">
+ {group.items.map(item => (
+ <li className="flex items-start gap-2" key={item}>
+ <span aria-hidden className="mt-1.5 inline-block size-1 shrink-0 rounded-full bg-primary" />
+ <span className="line-clamp-2 leading-snug" title={item}>
+ {item}
+ </span>
+ </li>
+ ))}
+ </ul>
+ </div>
+ ))}
+ {notes?.url && (
+ <a
+ className="inline-flex items-center gap-1 text-xs text-primary underline-offset-2 hover:underline"
+ href={notes.url}
+ onClick={event => {
+ event.preventDefault()
+ void window.hermesDesktop?.openExternal?.(event.currentTarget.href)
+ }}
+ rel="noreferrer"
+ target="_blank"
+ >
+ <ExternalLink className="size-3" />
+ {notes.kind === 'release' ? u.releaseNotes : t.settings.about.channel.allChanges}
+ </a>
+ )}
+ </div>
+ )
+}
+
export function UpdatesOverlay() {
const open = useStore($updateOverlayOpen)
const target = useStore($updateOverlayTarget)
@@ -199,6 +306,7 @@ function IdleView({
}) {
const { t } = useI18n()
const u = t.updates
+ const notes = useUpdateNotes(status, updateAvailable)
if (!status && checking) {
return (
@@ -299,8 +407,9 @@ function IdleView({
fallback: { label: u.changeLogFallbackLabel, item: u.changeLogFallbackItem }
})
+ // Notes are their own summary and link onward, so the commit count tail would mismatch them.
const shownItems = totalItems(groups)
- const remaining = Math.max(0, behind - shownItems)
+ const remaining = notes.items?.length ? 0 : Math.max(0, behind - shownItems)
// Name what's being updated. In remote mode the overlay acts on the connected
// backend, not the local client — say so. When there are no commit rows to
@@ -317,7 +426,7 @@ function IdleView({
target,
shownItems,
channel: status?.channel === 'stable' ? 'stable' : 'main',
- latestTag: status?.latestTag ?? null,
+ latestTag: updateReleaseTag(status),
mechanism: status?.mechanism,
copy: u
})
@@ -333,35 +442,12 @@ function IdleView({
<DialogDescription className="text-center text-sm">{body}</DialogDescription>
</div>
- <div className="grid gap-3">
- {/* A rollback brings no new changes; the "improvements" fallback would claim some. */}
- {(rollbackTag ? [] : groups).map((group, index) => (
- <div key={group.id}>
- <div className="flex items-center justify-between gap-2">
- <p className="text-[0.625rem] font-semibold text-muted-foreground">{group.label}</p>
- {index === 0 && commits.length > 0 && (
- <CopyButton
- appearance="icon"
- buttonSize="icon-xs"
- className="-my-1 size-5 shrink-0 text-muted-foreground/70 hover:text-foreground"
- iconClassName="size-3"
- label={u.copyFullLog}
- side="left"
- text={handleCopyFullLog}
- />
- )}
- </div>
- <ul className="mt-1.5 grid gap-1.5 text-xs text-foreground">
- {group.items.map(item => (
- <li className="flex items-start gap-2" key={item}>
- <span aria-hidden className="mt-1.5 inline-block size-1 shrink-0 rounded-full bg-primary" />
- <span className="leading-snug">{item}</span>
- </li>
- ))}
- </ul>
- </div>
- ))}
- </div>
+ <UpdateChangeList
+ commitGroups={groups}
+ copyText={commits.length > 0 ? handleCopyFullLog : undefined}
+ notes={notes}
+ rollback={Boolean(rollbackTag)}
+ />
<div className="grid gap-2">
<Button className="font-semibold" onClick={onInstall} size="lg">
diff --git a/apps/desktop/src/i18n/ar_update_channel.ts b/apps/desktop/src/i18n/ar_update_channel.ts
index 0137befcdf3..9c3e5995de4 100644
--- a/apps/desktop/src/i18n/ar_update_channel.ts
+++ b/apps/desktop/src/i18n/ar_update_channel.ts
@@ -14,5 +14,6 @@ export const arUpdateChannel = {
latestRelease: (v: string) => `أنت على أحدث إصدار مستقر (${v}).`,
rollbackTitle: (v: string) => `العودة إلى الإصدار المستقر ${v}`,
rollbackBody: (v: string) => `هذا الإصدار أحدث من الإصدار المستقر ${v}. سيعيد التثبيت Hermes إلى ذلك الإصدار.`,
- rollbackAction: (v: string) => `العودة إلى ${v}`
+ rollbackAction: (v: string) => `العودة إلى ${v}`,
+ allChanges: 'عرض كل التغييرات'
}
diff --git a/apps/desktop/src/i18n/de_update_channel.ts b/apps/desktop/src/i18n/de_update_channel.ts
index 80bb6bc95d2..c3a7e3b3402 100644
--- a/apps/desktop/src/i18n/de_update_channel.ts
+++ b/apps/desktop/src/i18n/de_update_channel.ts
@@ -16,5 +16,6 @@ export const deUpdateChannel = {
rollbackTitle: (v: string) => `Zurück zum stabilen Release ${v}`,
rollbackBody: (v: string) =>
`Dieser Build ist neuer als das stabile Release ${v}. Die Installation setzt Hermes auf dieses Release zurück.`,
- rollbackAction: (v: string) => `Zurück auf ${v}`
+ rollbackAction: (v: string) => `Zurück auf ${v}`,
+ allChanges: 'Alle Änderungen ansehen'
}
diff --git a/apps/desktop/src/i18n/en_update_channel.ts b/apps/desktop/src/i18n/en_update_channel.ts
index c42326551ba..b0fddb9fe86 100644
--- a/apps/desktop/src/i18n/en_update_channel.ts
+++ b/apps/desktop/src/i18n/en_update_channel.ts
@@ -17,5 +17,6 @@ export const enUpdateChannel: UpdateChannelCopy = {
rollbackTitle: (v: string) => `Back to stable release ${v}`,
rollbackBody: (v: string) =>
`This build is newer than the stable release ${v}. Installing it moves Hermes back to that release.`,
- rollbackAction: (v: string) => `Roll back to ${v}`
+ rollbackAction: (v: string) => `Roll back to ${v}`,
+ allChanges: 'See all changes'
}
diff --git a/apps/desktop/src/i18n/es_update_channel.ts b/apps/desktop/src/i18n/es_update_channel.ts
index cc0a62cf8e8..2b6a09a8321 100644
--- a/apps/desktop/src/i18n/es_update_channel.ts
+++ b/apps/desktop/src/i18n/es_update_channel.ts
@@ -15,5 +15,6 @@ export const esUpdateChannel = {
rollbackTitle: (v: string) => `Volver a la versión estable ${v}`,
rollbackBody: (v: string) =>
`Esta compilación es más reciente que la versión estable ${v}. Al instalarla, Hermes vuelve a esa versión.`,
- rollbackAction: (v: string) => `Volver a ${v}`
+ rollbackAction: (v: string) => `Volver a ${v}`,
+ allChanges: 'Ver todos los cambios'
}
diff --git a/apps/desktop/src/i18n/fr_update_channel.ts b/apps/desktop/src/i18n/fr_update_channel.ts
index 3441ad5ae15..91c29ea22a8 100644
--- a/apps/desktop/src/i18n/fr_update_channel.ts
+++ b/apps/desktop/src/i18n/fr_update_channel.ts
@@ -16,5 +16,6 @@ export const frUpdateChannel = {
rollbackTitle: (v: string) => `Revenir à la version stable ${v}`,
rollbackBody: (v: string) =>
`Cette build est plus récente que la version stable ${v}. L’installer ramène Hermes à cette version.`,
- rollbackAction: (v: string) => `Revenir à ${v}`
+ rollbackAction: (v: string) => `Revenir à ${v}`,
+ allChanges: 'Voir toutes les modifications'
}
diff --git a/apps/desktop/src/i18n/ja_update_channel.ts b/apps/desktop/src/i18n/ja_update_channel.ts
index 36ca9ac6d98..44078718d08 100644
--- a/apps/desktop/src/i18n/ja_update_channel.ts
+++ b/apps/desktop/src/i18n/ja_update_channel.ts
@@ -16,5 +16,6 @@ export const jaUpdateChannel = {
rollbackTitle: (v: string) => `安定版リリース ${v} に戻す`,
rollbackBody: (v: string) =>
`このビルドは安定版リリース ${v} より新しいです。インストールすると Hermes はそのリリースに戻ります。`,
- rollbackAction: (v: string) => `${v} に戻す`
+ rollbackAction: (v: string) => `${v} に戻す`,
+ allChanges: 'すべての変更を見る'
}
diff --git a/apps/desktop/src/i18n/ru_update_channel.ts b/apps/desktop/src/i18n/ru_update_channel.ts
index 80ae4659767..730a1f62b83 100644
--- a/apps/desktop/src/i18n/ru_update_channel.ts
+++ b/apps/desktop/src/i18n/ru_update_channel.ts
@@ -15,5 +15,6 @@ export const ruUpdateChannel = {
latestRelease: (v: string) => `У вас последний стабильный релиз (${v}).`,
rollbackTitle: (v: string) => `Вернуться к стабильному релизу ${v}`,
rollbackBody: (v: string) => `Эта сборка новее стабильного релиза ${v}. Установка вернёт Hermes к этому релизу.`,
- rollbackAction: (v: string) => `Вернуться к ${v}`
+ rollbackAction: (v: string) => `Вернуться к ${v}`,
+ allChanges: 'Все изменения'
}
diff --git a/apps/desktop/src/i18n/types_update_channel.ts b/apps/desktop/src/i18n/types_update_channel.ts
index 80cb6cab185..856c98749cc 100644
--- a/apps/desktop/src/i18n/types_update_channel.ts
+++ b/apps/desktop/src/i18n/types_update_channel.ts
@@ -22,4 +22,6 @@ export interface UpdateChannelCopy {
rollbackBody: (version: string) => string
/** Updates overlay install button for that rollback. */
rollbackAction: (version: string) => string
+ /** Update dialog link to every change in a commit-line update. */
+ allChanges: string
}
diff --git a/apps/desktop/src/i18n/zh-hant_update_channel.ts b/apps/desktop/src/i18n/zh-hant_update_channel.ts
index fc68604b839..d5703d08d5a 100644
--- a/apps/desktop/src/i18n/zh-hant_update_channel.ts
+++ b/apps/desktop/src/i18n/zh-hant_update_channel.ts
@@ -14,5 +14,6 @@ export const zhHantUpdateChannel = {
latestRelease: (v: string) => `你正在使用最新的穩定版發布(${v})。`,
rollbackTitle: (v: string) => `回退到穩定版 ${v}`,
rollbackBody: (v: string) => `目前的組建比穩定版 ${v} 更新。安裝後 Hermes 將回退到該版本。`,
- rollbackAction: (v: string) => `回退到 ${v}`
+ rollbackAction: (v: string) => `回退到 ${v}`,
+ allChanges: '查看全部變更'
}
diff --git a/apps/desktop/src/i18n/zh_update_channel.ts b/apps/desktop/src/i18n/zh_update_channel.ts
index 21ab1e73143..49a27ddd1e5 100644
--- a/apps/desktop/src/i18n/zh_update_channel.ts
+++ b/apps/desktop/src/i18n/zh_update_channel.ts
@@ -14,5 +14,6 @@ export const zhUpdateChannel = {
latestRelease: (v: string) => `你正在使用最新的稳定版发布(${v})。`,
rollbackTitle: (v: string) => `回退到稳定版 ${v}`,
rollbackBody: (v: string) => `当前构建比稳定版 ${v} 更新。安装后 Hermes 将回退到该版本。`,
- rollbackAction: (v: string) => `回退到 ${v}`
+ rollbackAction: (v: string) => `回退到 ${v}`,
+ allChanges: '查看全部更改'
}
diff --git a/apps/desktop/src/lib/update-notes.test.ts b/apps/desktop/src/lib/update-notes.test.ts
new file mode 100644
index 00000000000..8bc97263d94
--- /dev/null
+++ b/apps/desktop/src/lib/update-notes.test.ts
@@ -0,0 +1,62 @@
+import { describe, expect, it } from 'vitest'
+
+import { extractReleaseHighlights, latestMergedPrTitles, updateNotesSource } from './update-notes'
+
+describe('update notes', () => {
+ it('summarizes a release as its highlight headlines, and falls back to the first bullet list', () => {
+ const major = [
+ '# Hermes Agent v0.22.0',
+ '> The Threshold Release.',
+ '## ✨ Highlights',
+ '- **A first launch that sets itself up** — Open the desktop app ([#1](https://x/pull/1) — @a)',
+ '- **Connectors: Hermes works inside your apps** — The agent can now act.',
+ '- Plain [linked](https://x) bullet with `code` ([#2](https://x/pull/2))',
+ '## ⚠️ Upgrade notes',
+ '- **Python 3.14 is the runtime** for managed installs.'
+ ].join('\n')
+
+ const patch = [
+ '**What this patch ships:**',
+ '- **Updates now follow tagged releases.** A source install updates to releases.',
+ '- **Reasoning survives resume.** Signed thinking replays.',
+ '## Updating',
+ '- Desktop app: updates itself.'
+ ].join('\n')
+
+ expect(extractReleaseHighlights(major)).toEqual([
+ 'A first launch that sets itself up',
+ 'Connectors: Hermes works inside your apps',
+ 'Plain linked bullet with code'
+ ])
+ expect(extractReleaseHighlights(patch)).toEqual(['Updates now follow tagged releases', 'Reasoning survives resume'])
+ expect(
+ extractReleaseHighlights(
+ '## Updating\r\n- Docker: pull :stable\r\n## Security Fixes\r\n**Auth**\r\n- Spoofed headers reset limits (#1)'
+ )
+ ).toEqual(['Spoofed headers reset limits'])
+ expect(extractReleaseHighlights(`## Highlights\n- **${'word '.repeat(60)}**`)[0]).toMatch(/^.{1,140}$/)
+ })
+
+ it('lists the newest merged PRs, pinned to the update when its commit list is complete', () => {
+ const pulls = [
+ { title: 'closed unmerged', merged_at: null, merge_commit_sha: 'aaaaaaa1' },
+ { title: 'older', merged_at: '2026-10-14T01:00:00Z', merge_commit_sha: 'bbbbbbb1' },
+ { title: 'newest', merged_at: '2026-10-14T03:00:00Z', merge_commit_sha: 'ccccccc1' },
+ { title: 'installed already', merged_at: '2026-10-13T00:00:00Z', merge_commit_sha: 'ddddddd1' }
+ ]
+
+ expect(latestMergedPrTitles(pulls, [], null)).toEqual(['newest', 'older', 'installed already'])
+ // Backend rows carry 7-char SHAs; the update holds only these two commits.
+ expect(latestMergedPrTitles(pulls, [{ sha: 'ccccccc' }, { sha: 'bbbbbbb' }], 2)).toEqual(['newest', 'older'])
+ // An incomplete list (more behind than listed) cannot exclude anything.
+ expect(latestMergedPrTitles(pulls, [{ sha: 'ccccccc' }], 300)).toHaveLength(3)
+
+ expect(updateNotesSource({ channel: 'stable', sourceVersion: '0.22.0' })).toEqual({
+ kind: 'release',
+ tag: 'v0.22.0'
+ })
+ expect(updateNotesSource({ branch: 'main' })).toEqual({ kind: 'prs' })
+ expect(updateNotesSource({ branch: 'my-feature' })).toBeNull()
+ expect(updateNotesSource({ channel: 'stable', rollback: true, sourceVersion: '0.21.0' })).toBeNull()
+ })
+})
diff --git a/apps/desktop/src/lib/update-notes.ts b/apps/desktop/src/lib/update-notes.ts
new file mode 100644
index 00000000000..0b8bad887f7
--- /dev/null
+++ b/apps/desktop/src/lib/update-notes.ts
@@ -0,0 +1,186 @@
+/**
+ * "What's in this update" for the updates overlay, read from public GitHub.
+ *
+ * Stable channel: the release's own notes (Highlights headlines, else its first
+ * bullet list). Main: the newest merged PR titles. Both are best-effort; the
+ * caller keeps the commit changelog when nothing comes back.
+ */
+
+const REPOSITORY = 'NousResearch/hermes-agent'
+const API = `https://api.github.com/repos/${REPOSITORY}`
+const SITE = `https://github.com/${REPOSITORY}`
+const MAX_ITEMS = 5
+const MAX_CHARS = 140
+
+export type UpdateNotesSource = { kind: 'release'; tag: null | string } | { kind: 'prs' }
+
+interface NotesStatus {
+ branch?: string
+ channel?: string
+ commits?: readonly { sha?: string }[]
+ behind?: null | number
+ currentSha?: string
+ latestTag?: null | string
+ rollback?: boolean
+ sourceVersion?: string
+ targetSha?: string
+}
+
+interface PullRow {
+ title?: string
+ merged_at?: null | string
+ merge_commit_sha?: null | string
+}
+
+/** The release a stable update installs: packaged feeds name a tag, source checks a version. */
+export function updateReleaseTag(status: NotesStatus): null | string {
+ return status.latestTag || (status.channel === 'stable' && status.sourceVersion ? `v${status.sourceVersion}` : null)
+}
+
+/** Which notes describe this update; null when neither fits (custom branch, canary, rollback). */
+export function updateNotesSource(status: NotesStatus): null | UpdateNotesSource {
+ if (status.rollback) {
+ return null
+ }
+
+ if (status.channel === 'stable') {
+ return { kind: 'release', tag: updateReleaseTag(status) }
+ }
+
+ return status.branch === 'main' || status.channel === 'main' ? { kind: 'prs' } : null
+}
+
+const isSha = (value?: string): value is string => Boolean(value && /^[0-9a-f]{7,40}$/i.test(value))
+
+/** Where "more info" lives: the release page, or the compare view of exactly this update. */
+export function updateNotesUrl(source: UpdateNotesSource, status: NotesStatus): string {
+ if (source.kind === 'release') {
+ return source.tag ? `${SITE}/releases/tag/${encodeURIComponent(source.tag)}` : `${SITE}/releases/latest`
+ }
+
+ return isSha(status.currentSha) && isSha(status.targetSha)
+ ? `${SITE}/compare/${status.currentSha}...${status.targetSha}`
+ : `${SITE}/commits/main`
+}
+
+function clip(text: string): string {
+ const flat = text.replace(/\s+/g, ' ').trim()
+
+ return flat.length <= MAX_CHARS ? flat : `${flat.slice(0, MAX_CHARS - 1).replace(/\s+\S*$/, '')}…`
+}
+
+function plain(markdown: string): string {
+ return markdown
+ .replace(/!?\[([^\]]*)\]\([^)]*\)/g, '$1')
+ .replace(/\*\*|__|`/g, '')
+ .replace(/\s*\([^()]*#\d+[^()]*\)\s*$/, '')
+ .replace(/[\s.:;,]+$/, '')
+}
+
+// How-to-install and credits sections are not "what changed".
+const SKIPPED_SECTION = /updating|upgrad|install|contributor|changelog/i
+
+/** Up to five headlines: the Highlights section's bullets, else the body's first change list. */
+export function extractReleaseHighlights(body: string, max = MAX_ITEMS): string[] {
+ const lines = body.split(/\r?\n/)
+ const start = lines.findIndex(line => /^#{1,6}\s.*highlights/i.test(line))
+ const items: string[] = []
+ let skipped = false
+
+ for (const line of start >= 0 ? lines.slice(start + 1) : lines) {
+ const heading = /^#{1,6}\s+(.*)$/.exec(line)
+
+ if (heading) {
+ if (start >= 0 || items.length > 0) {
+ break
+ }
+
+ skipped = SKIPPED_SECTION.test(heading[1])
+
+ continue
+ }
+
+ const bullet = skipped ? null : /^[-*]\s+(.+)$/.exec(line)
+
+ if (!bullet) {
+ continue
+ }
+
+ // A bold lead-in is the item's own headline; the prose after it is detail.
+ const text = clip(plain(/^\*\*(.+?)\*\*/.exec(bullet[1])?.[1] ?? bullet[1]))
+
+ if (text && items.push(text) >= max) {
+ break
+ }
+ }
+
+ return items
+}
+
+/**
+ * The newest merged PRs. A complete commit list pins them to this update exactly
+ * (a merged PR's merge_commit_sha is a commit on main); otherwise the newest
+ * merges stand in for it.
+ */
+export function latestMergedPrTitles(
+ pulls: readonly PullRow[],
+ commits: readonly { sha?: string }[],
+ behind: null | number | undefined,
+ max = MAX_ITEMS
+): string[] {
+ const shas = commits.map(commit => commit.sha).filter(isSha)
+ const complete = shas.length > 0 && behind === shas.length
+
+ return pulls
+ .filter(pull => pull.merged_at && pull.title?.trim())
+ .filter(pull => !complete || shas.some(sha => pull.merge_commit_sha?.startsWith(sha)))
+ .sort((a, b) => String(b.merged_at).localeCompare(String(a.merged_at)))
+ .slice(0, max)
+ .map(pull => clip(pull.title ?? ''))
+}
+
+async function getJson(url: string): Promise<unknown> {
+ const response = await fetch(url, {
+ headers: { Accept: 'application/vnd.github+json' },
+ signal: AbortSignal.timeout(8000)
+ })
+
+ if (!response.ok) {
+ throw new Error(`GitHub answered ${response.status} for ${url}`)
+ }
+
+ return response.json()
+}
+
+const cache = new Map<string, Promise<string[]>>()
+
+/** The notes' items; [] when GitHub is unreachable or has none. Cached per target. */
+export function fetchUpdateNoteItems(source: UpdateNotesSource, status: NotesStatus): Promise<string[]> {
+ const key =
+ source.kind === 'release' ? `release:${source.tag ?? 'latest'}` : `prs:${status.currentSha}:${status.targetSha}`
+
+ const cached = cache.get(key)
+
+ if (cached) {
+ return cached
+ }
+
+ const pending = (
+ source.kind === 'release'
+ ? getJson(source.tag ? `${API}/releases/tags/${encodeURIComponent(source.tag)}` : `${API}/releases/latest`).then(
+ release => extractReleaseHighlights(String((release as { body?: unknown })?.body ?? ''))
+ )
+ : // Recently updated closed PRs hold the newest merges; one request, no auth.
+ getJson(`${API}/pulls?state=closed&base=main&sort=updated&direction=desc&per_page=100`).then(pulls =>
+ latestMergedPrTitles(Array.isArray(pulls) ? pulls : [], status.commits ?? [], status.behind)
+ )
+ ).catch(() => {
+ cache.delete(key)
+
+ return []
+ })
+
+ cache.set(key, pending)
+
+ return pending
+}
diff --git a/apps/desktop/src/store/updates.ts b/apps/desktop/src/store/updates.ts
index 2374e287dff..39b02311b7a 100644
--- a/apps/desktop/src/store/updates.ts
+++ b/apps/desktop/src/store/updates.ts
@@ -525,6 +525,9 @@ export function mapBackendCheck(res: BackendUpdateCheckResponse): DesktopUpdateS
sourceVersion: res.rollback_to ?? undefined,
behind: behind === null || behind < 0 ? null : behind,
currentVersion: res.current_version,
+ channel: res.channel,
+ branch: res.branch ?? undefined,
+ latestTag: res.source_version && !res.rollback_to ? `v${res.source_version}` : undefined,
targetSha: res.update_available ? `backend:${res.current_version}` : undefined,
commits: res.commits,
fetchedAt: Date.now()
diff --git a/apps/desktop/src/types/hermes.ts b/apps/desktop/src/types/hermes.ts
index 03d0befe152..5f002689f9c 100644
--- a/apps/desktop/src/types/hermes.ts
+++ b/apps/desktop/src/types/hermes.ts
@@ -1606,6 +1606,11 @@ export interface BackendUpdateCheckResponse {
update_available: boolean
/** A stable release this build already contains: applying it moves back. */
rollback_to?: null | string
+ /** Update-available only; absent on older backends. */
+ channel?: string
+ branch?: null | string
+ /** Stable: the release version the update installs, e.g. `0.22.0`. */
+ source_version?: null | string
can_apply: boolean
update_command: string | null
message: string | null
diff --git a/hermes_cli/web_routers/actions.py b/hermes_cli/web_routers/actions.py
index cfec1d08549..a5e7608bb06 100644
--- a/hermes_cli/web_routers/actions.py
+++ b/hermes_cli/web_routers/actions.py
@@ -346,7 +346,9 @@ async def check_hermes_update(force: bool = False, profile: Optional[str] = None
message=f"This build is newer than stable release v{status.get('sourceVersion')}. "
"Updating moves it back to that release.")
# "What's changed" for the desktop's remote update overlay; best-effort
- # (empty list on any failure).
+ # (empty list on any failure). Channel + release name pick its notes source.
+ payload.update(channel=status.get("channel") or "main", branch=status.get("branch"),
+ source_version=status.get("sourceVersion"))
payload["commits"] = [{**row, "sha": row["sha"][:7], "at": row["at"] // 1000}
for row in status.get("commits", [])[:20]]
return payload
diff --git a/locales/_keys.desktop.json b/locales/_keys.desktop.json
index 0a378467490..1bdf27a2ec0 100644
--- a/locales/_keys.desktop.json
+++ b/locales/_keys.desktop.json
@@ -2568,6 +2568,7 @@
"sessionImport.subtitle",
"sessionImport.title",
"sessionImport.you",
+ "settings.about.channel.allChanges",
"settings.about.channel.branch",
"settings.about.channel.change",
"settings.about.channel.description",