fix: Cmd-K exchange selection reads exchangeId from URL params
ExchangesPage ignored the exchangeId URL parameter, so selecting an exchange from the command palette navigated to the right URL but never displayed the execution overlay. Now derives selection from URL params as fallback, and LayoutShell passes selectedExchange in state for exchange/attribute results. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -210,7 +210,21 @@ function LayoutContent() {
|
||||
|
||||
const handlePaletteSelect = useCallback((result: any) => {
|
||||
if (result.path) {
|
||||
navigate(result.path, { state: result.path ? { sidebarReveal: result.path } : undefined });
|
||||
const state: Record<string, unknown> = { sidebarReveal: result.path };
|
||||
|
||||
// For exchange/attribute results, pass selectedExchange in state
|
||||
if (result.category === 'exchange' || result.category === 'attribute') {
|
||||
const parts = result.path.split('/').filter(Boolean);
|
||||
if (parts.length === 4 && parts[0] === 'exchanges') {
|
||||
state.selectedExchange = {
|
||||
executionId: parts[3],
|
||||
applicationName: parts[1],
|
||||
routeId: parts[2],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
navigate(result.path, { state });
|
||||
}
|
||||
setPaletteOpen(false);
|
||||
}, [navigate, setPaletteOpen]);
|
||||
|
||||
Reference in New Issue
Block a user