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

@@ -2,6 +2,9 @@ import type { NextConfig } from 'next'
const nextConfig: NextConfig = {
output: 'standalone',
env: {
NEXT_PUBLIC_BUILD_ID: Date.now().toString(),
},
serverExternalPackages: ['@prisma/client', 'minio'],
typescript: {
// We run tsc --noEmit separately before each push