From f3746f806c35c5cd483fa70283aecf851583815c Mon Sep 17 00:00:00 2001 From: null Date: Wed, 20 May 2026 00:42:15 -0500 Subject: [PATCH] bug: git token loop --- compose.yml | 4 ++-- frontend/src/app/git-projects/connections/page.tsx | 2 +- frontend/src/components/git/ForgejoConnectionForm.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compose.yml b/compose.yml index ba84529..a5f1f95 100644 --- a/compose.yml +++ b/compose.yml @@ -56,7 +56,7 @@ services: build: context: ./frontend args: - NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-auto} + NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8001} NEXT_PUBLIC_AUTH_MODE: ${AUTH_MODE} NEXT_PUBLIC_LOCAL_AUTH_TOKEN: ${LOCAL_AUTH_TOKEN} # Optional, user-managed env file. @@ -65,7 +65,7 @@ services: env_file: - ./frontend/.env environment: - NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-auto} + NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8001} NEXT_PUBLIC_AUTH_MODE: ${AUTH_MODE} NEXT_PUBLIC_LOCAL_AUTH_TOKEN: ${LOCAL_AUTH_TOKEN} depends_on: diff --git a/frontend/src/app/git-projects/connections/page.tsx b/frontend/src/app/git-projects/connections/page.tsx index 3767fb6..b9a01d6 100644 --- a/frontend/src/app/git-projects/connections/page.tsx +++ b/frontend/src/app/git-projects/connections/page.tsx @@ -52,7 +52,7 @@ export default function ForgejoConnectionsPage() { if (auth.isSignedIn) { fetchConnections(); } - }, [auth.isSignedIn, auth.getToken]); + }, [auth.isSignedIn]); const handleDelete = (connection: ForgejoConnection) => { setDeleteError(null); diff --git a/frontend/src/components/git/ForgejoConnectionForm.tsx b/frontend/src/components/git/ForgejoConnectionForm.tsx index e90bed8..dd936ab 100644 --- a/frontend/src/components/git/ForgejoConnectionForm.tsx +++ b/frontend/src/components/git/ForgejoConnectionForm.tsx @@ -150,7 +150,7 @@ export function ForgejoConnectionForm({ id="base_url" value={baseUrl} onChange={(e) => { - setBaseUrl(e.target.value); + setBaseUrl(e.target.value.trimEnd().replace(/\/+$/, "")); setTestResult(null); }} placeholder="https://git.example.com"