perf: migrate pages to Cache Components via root layout opt-out

Remove the per-route 'export const instant = false' opt-outs now that the root layout carries the single Cache Components opt-out. Child pages inherit the opt-out, so admin/mod/radio leaf pages that only access cached or DB data stay instant while runtime-dependent pages remain dynamic. Update the staff-smoke contract test to assert the root-layout contract.
This commit is contained in:
openhands committed 2026-08-07 18:51:45 +02:00
1 parent b25e7b00dd
commit 51ef7602ca
203 files changed
+16 -811

No files matched your search

-4
View File
@@ -1,9 +1,5 @@
import { redirect } from "next/navigation";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
/**
* Legacy URL — the canonical edit UI lives at /admin/users/edit/[id]
* and is gated by PERMS.USERS_EDIT.
-4
View File
@@ -1,9 +1,5 @@
import { redirect } from "next/navigation";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
/** Legacy route — redirects to /admin/users/show/[id] */
export default async function UserLegacyPage({
params,
-4
View File
@@ -14,10 +14,6 @@ import { UserEditForm } from "../../[id]/user-edit-form";
import { UserQuickActions } from "../../[id]/user-quick-actions";
import { UserRooms } from "../../[id]/user-rooms";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function UserEditPage({
params,
}: {
@@ -9,10 +9,6 @@ import { Badge } from "@/components/ui/badge";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function MultiAccountsPage({
searchParams,
}: {
-4
View File
@@ -8,10 +8,6 @@ import { canAccess, PERMS } from "@/lib/permissions";
import { CreateUserDialog } from "./_components/create-user-dialog";
import { UsersTable } from "./users-table";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function UsersPage({
params: paramsPromise,
searchParams,
-4
View File
@@ -13,10 +13,6 @@ import { UserActivityLog } from "../../[id]/user-activity-log";
import { UserQuickActions } from "../../[id]/user-quick-actions";
import { UserRooms } from "../../[id]/user-rooms";
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
export default async function UserShowPage({
params,
}: {