fix(ui): exchange selection uses state, not URL navigation
All checks were successful
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m0s
CI / docker (push) Successful in 55s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Successful in 37s

Row click no longer navigates to /exchanges/:app/:route/:id which was
changing the search scope. Instead, Dashboard calls onExchangeSelect
callback and ExchangesPage manages the selected exchange as local state.
The search criteria and scope are preserved when selecting an exchange.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-03-28 15:20:17 +01:00
parent 2f2e503447
commit 29f4be542b
2 changed files with 42 additions and 47 deletions

View File

@@ -176,7 +176,17 @@ function buildBaseColumns(): Column<Row>[] {
// ─── Dashboard component ─────────────────────────────────────────────────────
export default function Dashboard() {
export interface SelectedExchange {
executionId: string;
applicationName: string;
routeId: string;
}
interface DashboardProps {
onExchangeSelect?: (exchange: SelectedExchange) => void;
}
export default function Dashboard({ onExchangeSelect }: DashboardProps = {}) {
const { appId, routeId } = useParams<{ appId: string; routeId: string }>()
const navigate = useNavigate()
const [searchParams, setSearchParams] = useSearchParams()
@@ -228,8 +238,13 @@ export default function Dashboard() {
function handleRowClick(row: Row) {
setSelectedId(row.id)
// Navigate to the split view with diagram
navigate(`/exchanges/${row.applicationName}/${row.routeId}/${row.executionId}`)
if (onExchangeSelect) {
onExchangeSelect({
executionId: row.executionId,
applicationName: row.applicationName ?? '',
routeId: row.routeId,
})
}
}
function handleRowAccent(row: Row): 'error' | 'warning' | undefined {