Skip to content

feat(admin): add a cached Instatic version checker and update badge - #663

Draft
ntrance wants to merge 1 commit into
CoreBunch:mainfrom
ntrance:feat/admin-update-notices
Draft

ntrance wants to merge 1 commit into
CoreBunch:mainfrom
ntrance:feat/admin-update-notices

Conversation

@ntrance

@ntrance ntrance commented Oct 20, 2026 •

Copy link
Copy Markdown

Admins currently have to visit GitHub to discover new Instatic releases. This adds a native Updates entry with a header badge, dashboard status and a release page linking to the official changelog.

Feature

  • Compare the declared running build version (compiled artifact, deployment environment or package manifest, with the source displayed) against the latest stable release from the real CoreBunch/Instatic GitHub API endpoint.
  • Share a six-hour server cache, deduplicate concurrent requests and use conditional ETag requests. Explicit checks have a one-minute minimum interval; failures back off for at least five minutes and honour GitHub retry/rate-limit headers.
  • Share authenticated client state across workspaces, load release notes on demand, and show unavailable or stale results explicitly. Release notes are rendered as plain text.
  • Gate the endpoints and UI with site.read; retain the existing Origin check for manual refresh. No dependency checks, automatic installation, new packages or database changes.

Validation

  • Bun 1.4.2: bun --bun run build and bun run lint passed.
  • A live native-service check returned GitHub's official v0.0.21 release and changelog; both response schemas validated, and summary/details shared the same successful check timestamp.
  • bun test --timeout 20000: 7,163 passed, 0 failed, across 782 files (119.65 seconds).
  • Implementation files only: no test files, fixtures, generated bundles or site data are included.

Opened as a draft following the repository's contribution convention.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant