mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-28 11:17:07 +00:00
fix: bind the node-update changelog to the advertised release version (#1492)
The changelog tab fetched release notes once and held them in component state without tying them to a version, and the endpoint did not report which release the notes belonged to. When a newer release surfaced while the sheet stayed mounted, reopening the changelog could show the previous version's notes, and a GitHub/Docker Hub fallback or independent cache timing could leave the notes out of sync with the advertised latest version. The release-notes endpoint now returns the release version (normalized tag_name). The changelog keys its loaded notes to the advertised latest version, refetching when that version changes, and labels the notes with the version they belong to so the displayed content is always explicit.
This commit is contained in:
@@ -1070,6 +1070,9 @@ fleetRouter.get('/update-status/release-notes', authMiddleware, async (req: Requ
|
||||
const forceRefresh = req.query.recheck === 'true';
|
||||
const release = await getLatestRelease(forceRefresh);
|
||||
res.json({
|
||||
// Bind the notes to the release they belong to so the frontend can tell
|
||||
// when the advertised latest version has moved past the loaded notes.
|
||||
version: release ? release.tag_name.replace(/^v/, '') : null,
|
||||
releaseNotes: release?.body ?? null,
|
||||
htmlUrl: release?.html_url ?? null,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user