diff --git a/src/frontend/src/components/ui/alert.tsx b/src/frontend/src/components/ui/alert.tsx index 05c5b7fa71..59d183af35 100644 --- a/src/frontend/src/components/ui/alert.tsx +++ b/src/frontend/src/components/ui/alert.tsx @@ -32,10 +32,10 @@ const Alert = React.forwardRef< Alert.displayName = "Alert"; const AlertTitle = React.forwardRef< - HTMLParagraphElement, - React.HTMLAttributes + HTMLDivElement, + React.HTMLAttributes >(({ className, ...props }, ref) => ( -
{ + const keyboardEvent = event.event as KeyboardEvent | undefined; + if (keyboardEvent?.key === "Enter") { + const rowData = event.data as TraceListItem | undefined; + setTracePanelTraceId(rowData?.id ?? null); + setTracePanelOpen(true); + } + }, + [], + ); + + const traceTableRef = useRef(null); + + const applyRowTabIndices = useCallback((containerEl: HTMLElement | null) => { + if (!containerEl) return; + const bodyRows = containerEl.querySelectorAll( + ".ag-center-cols-container [role='row']", + ); + bodyRows.forEach((row, idx) => { + row.setAttribute("tabindex", idx === 0 ? "0" : "-1"); + }); + }, []); + const totalRuns = tracesData?.total ?? rows.length; const totalPages = Math.max( 1, @@ -306,7 +330,10 @@ export function FlowInsightsContent({