fix: Config tab sidebar navigation stays on config for app and route clicks
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user