diff --git a/.env.example b/.env.example index aa138d0..786f925 100644 --- a/.env.example +++ b/.env.example @@ -26,6 +26,6 @@ LOCAL_AUTH_TOKEN= # --- frontend settings --- # REQUIRED: Public URL used by the browser to reach the API. -# Use `auto` to target the same host currently serving Pipeline on port 8000. +# Use `auto` to target the same host currently serving Pipeline on port 8001. # Example (explicit override): NEXT_PUBLIC_API_URL=https://mc.example.com NEXT_PUBLIC_API_URL=auto diff --git a/README.md b/README.md index 9c2b66b..ec9993a 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ Before startup: - Set `LOCAL_AUTH_TOKEN` to a non-placeholder value (minimum 50 characters) when `AUTH_MODE=local`. - Ensure `BASE_URL` matches the public backend origin if you are not using `http://localhost:8000`. -- `NEXT_PUBLIC_API_URL=auto` (default) resolves to `http(s)://:8000`. +- `NEXT_PUBLIC_API_URL=auto` (default) resolves to `http(s)://:8001`. - Set an explicit URL when your API is behind a reverse proxy or non-default port. ### 2. Start Mission Control diff --git a/frontend/.env.example b/frontend/.env.example index c5f1ad1..3de0593 100644 --- a/frontend/.env.example +++ b/frontend/.env.example @@ -1,5 +1,5 @@ # Base URL for frontend -> backend calls. -# Use `auto` to target the same host currently serving Mission Control on port 8000. +# Use `auto` to target the same host currently serving Mission Control on port 8001. # Example explicit override: https://mc.example.com NEXT_PUBLIC_API_URL=auto diff --git a/frontend/README.md b/frontend/README.md index a80e069..cdc90c9 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -46,7 +46,7 @@ The frontend reads configuration from standard Next.js env files (`.env.local`, Base URL of the backend API (or `auto`). -- Default: `auto` (resolved in browser as `http(s)://:8000`) +- Default: `auto` (resolved in browser as `http(s)://:8001`) - Used by the generated API client and helpers (see `src/lib/api-base.ts` and `src/api/mutator.ts`). Example: @@ -143,7 +143,7 @@ If you’re working on self-hosting, prefer running compose from the repo root s ### `NEXT_PUBLIC_API_URL` and remote hosts -If unset or set to `auto`, the client uses `http(s)://:8000`. +If unset or set to `auto`, the client uses `http(s)://:8001`. If your backend is on a different host/port, set `NEXT_PUBLIC_API_URL` explicitly. Fix: diff --git a/frontend/src/components/git/ForgejoIssuesTable.tsx b/frontend/src/components/git/ForgejoIssuesTable.tsx index 110ed4d..483e2e7 100644 --- a/frontend/src/components/git/ForgejoIssuesTable.tsx +++ b/frontend/src/components/git/ForgejoIssuesTable.tsx @@ -1,6 +1,6 @@ "use client"; -import { useMemo } from "react"; +import { useMemo, useState } from "react"; import { type ColumnDef, getCoreRowModel, useReactTable } from "@tanstack/react-table"; import { XCircle } from "lucide-react"; diff --git a/frontend/src/lib/api-base.test.ts b/frontend/src/lib/api-base.test.ts index 3d6176c..b327b16 100644 --- a/frontend/src/lib/api-base.test.ts +++ b/frontend/src/lib/api-base.test.ts @@ -16,12 +16,12 @@ describe("getApiBaseUrl", () => { it("auto-resolves from browser host when set to auto", () => { vi.stubEnv("NEXT_PUBLIC_API_URL", "auto"); - expect(getApiBaseUrl()).toBe("http://localhost:8000"); + expect(getApiBaseUrl()).toBe("http://localhost:8001"); }); it("auto-resolves from browser host when unset", () => { vi.stubEnv("NEXT_PUBLIC_API_URL", ""); - expect(getApiBaseUrl()).toBe("http://localhost:8000"); + expect(getApiBaseUrl()).toBe("http://localhost:8001"); }); }); diff --git a/frontend/src/lib/api-base.ts b/frontend/src/lib/api-base.ts index 3ba5722..4e874ec 100644 --- a/frontend/src/lib/api-base.ts +++ b/frontend/src/lib/api-base.ts @@ -12,7 +12,7 @@ export function getApiBaseUrl(): string { const protocol = window.location.protocol === "https:" ? "https" : "http"; const host = window.location.hostname; if (host) { - return `${protocol}://${host}:8000`; + return `${protocol}://${host}:8001`; } }