feat: version guard — prompt stale clients to refresh after deploys
All checks were successful
Build and Push Docker Image / build (push) Successful in 7m42s

- Inject NEXT_PUBLIC_BUILD_ID at build time via next.config.ts
- /api/version static route returns current build ID
- VersionGuard client component checks on tab focus + every 5 min
- Shows persistent toast with Refresh button (no auto-reload)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 10:54:52 +01:00
parent a358e9940d
commit 8427999578
4 changed files with 59 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
import { NextResponse } from 'next/server'
export const dynamic = 'force-static'
export function GET() {
return NextResponse.json({ buildId: process.env.NEXT_PUBLIC_BUILD_ID })
}