feat: version guard — prompt stale clients to refresh after deploys
All checks were successful
Build and Push Docker Image / build (push) Successful in 7m42s
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:
7
src/app/api/version/route.ts
Normal file
7
src/app/api/version/route.ts
Normal 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 })
|
||||
}
|
||||
Reference in New Issue
Block a user