fix: use absolute asset paths and prevent route-level runtime navigation
Some checks failed
CI / build (push) Has been cancelled
CI / docker (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / deploy-feature (push) Has been cancelled
CI / cleanup-branch (push) Has been cancelled

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) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-13 11:24:15 +02:00
parent e57343e3df
commit 6b558b649d
2 changed files with 6 additions and 2 deletions

View File

@@ -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 });
}

View File

@@ -27,7 +27,7 @@ export default defineConfig({
optimizeDeps: {
include: ['swagger-ui-dist/swagger-ui-bundle'],
},
base: './',
base: '/',
build: {
outDir: 'dist',
},