Files
Jyotisha/frontend/src/app/layout.tsx
T
Jesse_Chen 50e1a4aca5 fix(web): reload stale clients instead of spinning after a release
Homepage bootstrap never escaped the loading shell when a new web image changed chunk hashes. Stamp deploymentId, stop caching chat HTML, and hard-reload failed chunk loads once.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 10:29:43 +08:00

52 lines
1.5 KiB
TypeScript

import type { Metadata, Viewport } from "next";
import Script from "next/script";
import { Toaster } from "@/components/ui/sonner";
import { StaleClientRecovery } from "@/components/stale-client-recovery";
import "./globals.css";
import "./birth-time-choice.css";
export const dynamic = "force-dynamic";
export const metadata: Metadata = {
title: "Jyotisha · 印度占星",
description: "与 Mastra Agent 对话,基于星盘证据讨论事业、关系与时间窗口。",
};
export const viewport: Viewport = {
width: "device-width",
initialScale: 1,
viewportFit: "cover",
interactiveWidget: "resizes-content",
};
export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {
const enableReactDevTools = process.env.NODE_ENV === "development"
&& process.env.NEXT_PUBLIC_ENABLE_REACT_DEVTOOLS === "1";
return (
<html lang="zh-CN" suppressHydrationWarning>
<head>
{enableReactDevTools && (
<>
<Script
crossOrigin="anonymous"
src="https://unpkg.com/react-grab/dist/index.global.js"
strategy="lazyOnload"
/>
<Script
crossOrigin="anonymous"
src="https://unpkg.com/react-scan/dist/auto.global.js"
strategy="lazyOnload"
/>
</>
)}
</head>
<body>
<StaleClientRecovery />
{children}
<Toaster />
</body>
</html>
);
}