From 6b558b649d5f7ab7c8561024a3bce8d35b3710b4 Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Mon, 13 Apr 2026 11:24:15 +0200 Subject: [PATCH] fix: use absolute asset paths and prevent route-level runtime navigation Change vite base from './' to '/' so asset paths are absolute. With relative paths, direct navigation to multi-segment URLs like /runtime/app/instance resolved assets to /runtime/assets/ which 404'd. Also fix sidebar navigation: clicking a route while on the runtime tab no longer navigates to /runtime/{appId}/{routeId} (which the runtime page interprets as an instanceId). It stays at /runtime/{appId}. Co-Authored-By: Claude Opus 4.6 (1M context) --- ui/src/components/LayoutShell.tsx | 6 +++++- ui/vite.config.ts | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/src/components/LayoutShell.tsx b/ui/src/components/LayoutShell.tsx index 16b7ca46..270e1609 100644 --- a/ui/src/components/LayoutShell.tsx +++ b/ui/src/components/LayoutShell.tsx @@ -640,8 +640,10 @@ function LayoutContent() { if (appMatch) { const [, sAppId, sRouteId] = appMatch; if (scope.tab === 'apps') { - // Deployments tab: navigate to /apps/:appId navigate(`/apps/${sAppId}`, { state }); + } else if (scope.tab === 'runtime') { + // Runtime tab has no route-level view — stay at app level + navigate(`/runtime/${sAppId}`, { state }); } else { navigate(sRouteId ? `/${scope.tab}/${sAppId}/${sRouteId}` : `/${scope.tab}/${sAppId}`, { state }); } @@ -653,6 +655,8 @@ function LayoutContent() { const [, sAppId, sRouteId] = exchangeMatch; if (scope.tab === 'apps') { navigate(`/apps/${sAppId}`, { state }); + } else if (scope.tab === 'runtime') { + navigate(`/runtime/${sAppId}`, { state }); } else { navigate(sRouteId ? `/${scope.tab}/${sAppId}/${sRouteId}` : `/${scope.tab}/${sAppId}`, { state }); } diff --git a/ui/vite.config.ts b/ui/vite.config.ts index b4e74e8d..af041a4d 100644 --- a/ui/vite.config.ts +++ b/ui/vite.config.ts @@ -27,7 +27,7 @@ export default defineConfig({ optimizeDeps: { include: ['swagger-ui-dist/swagger-ui-bundle'], }, - base: './', + base: '/', build: { outDir: 'dist', },