forked from Mike/freno-dev
nook: fill release notes the appcast lost from the archive
0.8.0 and 0.7.0 rendered as a version header over an empty row on /changelog and in releases.json, the feed the macOS app's Changelog pane renders. Older still, 0.6.0/0.6.2/0.6.3 were gone from the page outright. Both come from one gap. The appcast is the only live source and it is not a store: it holds just the DMGs the release machine keeps, and generate_appcast drops the description of any rebuilt item whose DMG ships no notes file of its own — so a release it still lists can arrive with nothing to show, and one it has aged out of vanishes. The checked-in archive was meant to cover that, but it stopped at 0.5.0, and mergeReleases skipped an archived version whenever the appcast mentioned it, so it could never heal a row that existed and was blank. The archive now carries every release that shipped notes, 0.9.0 down to 0.2.0, and withArchivedNotes fills an item only where the feed has nothing, leaving a published description alone. /changelog and releases.json run the same rule rather than two copies, so the page and the feed cannot disagree about what a release said. 0.6.1 and 0.3.1 stay absent by design — they shipped with no notes written. Tests: bun test src/routes/api/the-nook/ (51 pass; the 4 new cases fail on this branch's parent); bun test unchanged at 49 failures, all in src/server/security, which needs an .env a worktree does not carry. Proved end to end against the live appcast as published by the 0.9.0 release: 11 releases, all with sections. NOOK-305 Co-Authored-By: qwen3.8-flash <noreply@freno.me>
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -3,8 +3,12 @@
|
||||
*
|
||||
* The appcast already ships HTML release notes to the updater on every
|
||||
* launch, so this page renders exactly what Sparkle publishes: one source
|
||||
* of truth, no second place to write release notes. Doubles as the raw
|
||||
* material for the release-announcement job (marketing/README.md).
|
||||
* of truth, no second place to write release notes. The checked-in archive
|
||||
* fills an item the appcast lost its notes to — the feed is rebuilt from the
|
||||
* DMGs on every publish, and Sparkle drops the notes of an item whose DMG
|
||||
* carries none, which is how 0.8.0 and 0.7.0 came to render as blank rows.
|
||||
* Doubles as the raw material for the release-announcement job
|
||||
* (marketing/README.md).
|
||||
*
|
||||
* Layout: the version list lives in a fixed-height vertical scroller, so
|
||||
* expanding a release never shifts the page — history is browsed inside
|
||||
@@ -17,15 +21,20 @@ import { PageHead } from "~/components/PageHead";
|
||||
import { EdgeCacheHeaders } from "~/components/EdgeCacheHeaders";
|
||||
import SubdomainHeader from "~/components/SubdomainHeader";
|
||||
import { fetchAppcastReleases } from "~/routes/api/the-nook/_appcast";
|
||||
import { withArchivedNotes } from "~/routes/api/the-nook/_releases";
|
||||
import { ARCHIVED_RELEASES } from "~/routes/nook/changelog-archive";
|
||||
|
||||
const getReleases = query(async () => {
|
||||
"use server";
|
||||
// Appcast items are authoritative (they carry build numbers); releases
|
||||
// older than the appcast's retention come from the checked-in archive,
|
||||
// recovered from the changelog file's git history. Both normalize to
|
||||
// AppcastRelease so the page renders one shape.
|
||||
const live = await fetchAppcastReleases();
|
||||
// Appcast items are authoritative (they carry build numbers), with the
|
||||
// archive filling any item whose notes the rebuilt feed lost. Releases the
|
||||
// appcast no longer lists at all come from the archive. Both normalize to
|
||||
// AppcastRelease so the page renders one shape, and the fill is the same
|
||||
// helper releases.json runs, so the two cannot tell different stories.
|
||||
const live = withArchivedNotes(
|
||||
await fetchAppcastReleases(),
|
||||
ARCHIVED_RELEASES
|
||||
);
|
||||
const liveVersions = new Set(live.map((r) => r.version));
|
||||
const archived = ARCHIVED_RELEASES.filter(
|
||||
(r) => !liveVersions.has(r.version)
|
||||
|
||||
Reference in New Issue
Block a user