Files
handler/frontend/next.config.mjs
T
Claude 5d8c62450c Split the web UI into a page per section
The dashboard was a single route that swapped section components via a
`section` state field. Convert it to the App Router's multi-page model so
each left-nav selection is its own route (/, /repositories, /agents,
/schedules, /approvals, /servers, /activity, /shared, /login), making the
pages modular and independently updatable.

- Move the token gate + store provider + sidebar into a persistent frame
  (AppFrame + Shell) rendered by the root layout, so auth, the polling
  loop, and shared state survive client-side navigation.
- Sidebar items are now <Link> routes; the active item and the store's
  polled section are derived from the URL (lib/nav).
- Each section gets an app/<section>/page.tsx; Runs stays at root and keeps
  its full-height split layout, the rest render in the shared scroll frame.
- Emit per-route index.html (trailingSlash) so the FastAPI StaticFiles
  mount serves clean slash-terminated URLs with no SPA rewrite.
- Regenerate the bundled static export.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PsAeGVadULRzPhV2PRDttM
2026-07-22 19:34:33 +00:00

17 lines
791 B
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
// Static HTML/JS/CSS export. The Handler API (FastAPI) serves the built `out/`
// same-origin, exactly as it served the old Alpine shell — the browser calls the
// authed API with relative paths, so there is no separate frontend server to run.
output: "export",
reactStrictMode: true,
// Emit each route as `<route>/index.html` (not `<route>.html`) so the FastAPI static
// mount — Starlette's StaticFiles(html=True) — serves clean, slash-terminated URLs like
// `/repositories/` straight from disk, with no SPA rewrite or per-route server config.
trailingSlash: true,
// The export is served from disk with no image optimizer behind it.
images: { unoptimized: true },
};
export default nextConfig;