feat: release-awareness — update banner + changelog page#294
Conversation
Adds a 'new version available' banner on the home screen and an admin 'What's New' changelog page listing recent Paca releases from GitHub. - Backend: public GET /api/v1/version and /api/v1/releases, backed by a best-effort GitHub Releases client with Valkey caching. Config via ReleaseConfig (PACA_VERSION / RELEASE_UPSTREAM_REPO / RELEASE_FORK_REPO / cache TTL / timeout); all env-driven with safe defaults. - Frontend: UpdateBanner on home; changelog page under Administration (sidebar 'What's New'); version-api / changelog-api query hooks. - i18n: new keys (home.updateBanner, nav.changelog, admin.changelog) across all 9 locales. English stays the default. Everything is best-effort: if the GitHub API is unreachable the banner simply doesn't render and the page lists nothing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Important
Two things to address before merging: link URLs in the changelog renderer should be restricted to safe schemes, and the new release-check environment variables should be documented in services/api/.env.example.
Reviewed changes — adds a dismissible home-screen update banner and an Administration "What's New" changelog page, backed by new public /api/v1/version and /api/v1/releases endpoints that cache GitHub releases in Valkey.
- Add
VersionHandlerand public/api/v1/version+/api/v1/releasesroutes — queries GitHub releases for an upstream repo and optional fork, caches results, and performs lenient semver comparison for update detection. - Add
UpdateBannerto the home screen — conditionally rendered when an update is available and dismissible per release set vialocalStorage. - Add
/admin/changelogroute and page — lists recent releases with a minimal custom Markdown renderer. - Add
ReleaseConfigwith env-driven defaults —PACA_VERSION,RELEASE_UPSTREAM_REPO,RELEASE_FORK_REPO,RELEASE_CHECK_CACHE_TTL,RELEASE_CHECK_TIMEOUT. - Add i18n keys across all 9 locales for the banner, navigation, and changelog page.
ℹ️ No automated tests for VersionHandler
The new handler owns version parsing, cache read/write paths, and two GitHub-dependent public endpoints, but it ships without unit or handler tests. A few small tests for parseVersion/isNewer and the cache-miss/cache-hit branches would guard against regressions once release-check behavior becomes load-bearing.
Kimi K2 (free via Pullfrog for OSS) | 𝕏
| nodes.push( | ||
| <a | ||
| key={key++} | ||
| href={m[5]} |
There was a problem hiding this comment.
| href={m[5]} | |
| Link URLs from release notes are emitted as `<a href>` values without scheme validation. A compromised GitHub release could include a `javascript:` link that executes in the app's origin when clicked. Restrict rendered links to URLs starting with `http://` or `https://` and fall back to plain text for anything else. |
| }, | ||
| }, | ||
| Release: ReleaseConfig{ | ||
| Version: env("PACA_VERSION", "dev"), |
There was a problem hiding this comment.
| Version: env("PACA_VERSION", "dev"), | |
| The new release-check env vars (`PACA_VERSION`, `RELEASE_UPSTREAM_REPO`, `RELEASE_FORK_REPO`, `RELEASE_CHECK_CACHE_TTL`, `RELEASE_CHECK_TIMEOUT`) are not documented in `services/api/.env.example` yet. Add them so deployers can discover the defaults and disable checks by setting the repo values to empty. |
|
Thanks for the awesome PR! 🙌 Could you please fix the CI failures and resolve the problems that pullfrog raised? If you're busy, just let me know—I'd be happy to jump in and help out to get this merged. Thanks again! |
|
I'm heading out on a trip early tomorrow morning and won't be back until the following Saturday! I'll have to look into it when I get back! |
|
Enjoy your trip! No worries at all. If you'd like me to finish this up, just say the word! |

What
Adds two related, opt-in features around Paca releases:
Why
Self-hosters currently have no in-app way to know a new Paca version shipped, or what changed in it. This surfaces both without leaving the app.
Changes
GET /api/v1/versionandGET /api/v1/releases, backed by a best-effort GitHub Releases client with Valkey caching. NewReleaseConfig, env-driven with safe defaults:PACA_VERSION(defaultdev),RELEASE_UPSTREAM_REPO(defaultPaca-AI/paca),RELEASE_FORK_REPO(default empty), plus cache TTL and timeout.UpdateBanneron the home screen; a changelog page under Administration (sidebar item "What's New");version-api/changelog-apiquery hooks.home.updateBanner,nav.changelog,admin.changelog) across all 9 locales.Behavior / scope
PACA_VERSIONdefaults todev(unparseable), so the banner never shows on unversioned builds.Testing
go build ./...passes; frontendtsc -b --noEmitpasses.🤖 Generated with Claude Code