Skip to content

Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.

fix(ui): stop prerendering the root layout's repo list (#2260) (#2261)

Punk Dev Robot7ff6ef81d00e
diff --git a/packages/web/src/app/layout.tsx b/packages/web/src/app/layout.tsx
index 817657328..e22bf7b75 100644
--- a/packages/web/src/app/layout.tsx
+++ b/packages/web/src/app/layout.tsx
@@ -22,6 +22,13 @@ import "@/styles/globals.css";
// Serif display face for the docs/wiki reading surfaces (--font-serif token).
const lora = Lora({ subsets: ["latin"], variable: "--font-lora", display: "swap" });
+// The layout asks the API for the repo list at request time. Without this,
+// Next prerenders the static routes (`/settings`, `not-found`) at build time —
+// where no API answers — and serves that frozen `reposUnavailable: true`
+// forever: visiting Settings flips the sidebar to "Can't reach the API" on a
+// healthy server, and it sticks until a hard reload (#2260).
+export const dynamic = "force-dynamic";
+
export const metadata: Metadata = {
title: {
default: "repowise",