fix: Config tab sidebar navigation stays on config for app and route clicks
All checks were successful
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m11s
CI / docker (push) Successful in 58s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Successful in 36s

When on Config tab: clicking an app navigates to /config/:appId (shows
that app's config with detail panel). Clicking a route navigates to
/config/:appId (same app config, since config is per-app not per-route).
Clicking Applications header navigates to /config (all apps table).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-06 16:13:39 +02:00
parent c6a8a4471f
commit bb6a9c9269

View File

@@ -604,9 +604,12 @@ function LayoutContent() {
const appMatch = path.match(/^\/apps\/([^/]+)(?:\/(.+))?$/);
if (appMatch) {
const [, sAppId, sRouteId] = appMatch;
// Config tab only supports /config/:appId — fall back to exchanges for route-level
const tab = (scope.tab === 'config' && sRouteId) ? 'exchanges' : scope.tab;
navigate(sRouteId ? `/${tab}/${sAppId}/${sRouteId}` : `/${tab}/${sAppId}`, { state });
if (scope.tab === 'config') {
// Config tab: always navigate to /config/:appId (route click → same app config)
navigate(`/config/${sAppId}`, { state });
} else {
navigate(sRouteId ? `/${scope.tab}/${sAppId}/${sRouteId}` : `/${scope.tab}/${sAppId}`, { state });
}
return;
}