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\/([^/]+)(?:\/(.+))?$/);
|
const appMatch = path.match(/^\/apps\/([^/]+)(?:\/(.+))?$/);
|
||||||
if (appMatch) {
|
if (appMatch) {
|
||||||
const [, sAppId, sRouteId] = appMatch;
|
const [, sAppId, sRouteId] = appMatch;
|
||||||
// Config tab only supports /config/:appId — fall back to exchanges for route-level
|
if (scope.tab === 'config') {
|
||||||
const tab = (scope.tab === 'config' && sRouteId) ? 'exchanges' : scope.tab;
|
// Config tab: always navigate to /config/:appId (route click → same app config)
|
||||||
navigate(sRouteId ? `/${tab}/${sAppId}/${sRouteId}` : `/${tab}/${sAppId}`, { state });
|
navigate(`/config/${sAppId}`, { state });
|
||||||
|
} else {
|
||||||
|
navigate(sRouteId ? `/${scope.tab}/${sAppId}/${sRouteId}` : `/${scope.tab}/${sAppId}`, { state });
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user