From 53d25dafd84b18c41b58b9062566d494c5bbd0d7 Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 27 Apr 2026 04:11:34 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20final=20cleanup=20=E2=80=94=20disable=20?= =?UTF-8?q?radial=20menu,=20document=20auth=20pattern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit B14: Comment out RadialMenu render — all 5 wedges show "coming soon" toasts with no functional actions. Code preserved for when actions are wired. B5: Add detailed JSDoc to fetchAuthState explaining the redirect:manual pattern and its dependencies on Caddy/Authentik configuration. B9: Investigated — user-select CSS errors come from MapLibre's own maplibre-gl.css, not our code. WONTFIX (library issue). Caddy changes (CT 101): B6: Fixed recon.echo6.co header stripping bug — same pattern as navi B8: Added /api/traffic/* to @authed_user (TomTom API must be authed) --- src/api.js | 13 ++++++++++++- src/components/MapView.jsx | 3 ++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/api.js b/src/api.js index 4548dce..fe8fd02 100644 --- a/src/api.js +++ b/src/api.js @@ -292,7 +292,18 @@ export async function fetchLandclass(lat, lon, signal) { /** * Check authentication state via whoami endpoint. - * Uses redirect: manual to detect auth without triggering navigation. + * + * PATTERN: Uses fetch with redirect:'manual' to detect Authentik SSO state + * without triggering browser navigation. When unauthenticated, Caddy's + * forward_auth returns a 302 redirect to Authentik. With redirect:'manual', + * the browser exposes this as resp.type === 'opaqueredirect' instead of + * following the redirect. + * + * DEPENDENCIES: + * - /api/auth/whoami must be in Caddy's @authed_user path matcher + * - Authentik proxy outpost must return 302 (not 401) for unauthed requests + * - If Authentik changes to return 401, update the status check below + * * @returns {Promise<{authenticated: boolean, username: string|null}>} */ export async function fetchAuthState() { diff --git a/src/components/MapView.jsx b/src/components/MapView.jsx index d4e11f8..6da9442 100644 --- a/src/components/MapView.jsx +++ b/src/components/MapView.jsx @@ -1504,7 +1504,7 @@ const MapView = forwardRef(function MapView(_, ref) { > Z {zoomLevel.toFixed(1)} - {/* Radial context menu */} + {/* Radial menu disabled until actions are wired setRadialMenu((m) => ({ ...m, open: false }))} /> + */} ) })