Add Cmd+K command palette for searching executions and agents
All checks were successful
CI / build (push) Successful in 59s
CI / docker (push) Successful in 56s
CI / deploy (push) Successful in 26s

Backend: add routeId, agentId, processorType filter fields to SearchRequest
and ClickHouseSearchEngine. Expand global text search to match route_id and
agent_id columns.

Frontend: new command palette component (portal overlay, Zustand store,
TanStack Query search hook with 300ms debounce, filter chip parsing,
keyboard navigation, scope tabs). Search bar in SearchFilters and TopNav
now open the palette. Selecting a result writes filters to the execution
search store to drive the results table.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-03-13 16:28:16 +01:00
parent 6f415cb017
commit 64b03a4e2f
20 changed files with 1348 additions and 67 deletions

View File

@@ -1,5 +1,6 @@
import { Outlet } from 'react-router';
import { TopNav } from './TopNav';
import { CommandPalette } from '../command-palette/CommandPalette';
import styles from './AppShell.module.css';
export function AppShell() {
@@ -9,6 +10,7 @@ export function AppShell() {
<main className={styles.main}>
<Outlet />
</main>
<CommandPalette />
</>
);
}

View File

@@ -61,6 +61,43 @@
gap: 16px;
}
.searchTrigger {
display: flex;
align-items: center;
gap: 8px;
padding: 5px 12px 5px 10px;
background: var(--bg-raised);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
color: var(--text-muted);
font-size: 13px;
font-family: var(--font-body);
cursor: pointer;
transition: border-color 0.15s, color 0.15s;
}
.searchTrigger:hover {
border-color: var(--text-muted);
color: var(--text-secondary);
}
.searchTrigger svg {
width: 14px;
height: 14px;
opacity: 0.5;
}
.kbdKey {
font-family: var(--font-mono);
font-size: 11px;
padding: 1px 5px;
background: var(--bg-hover);
border: 1px solid var(--border);
border-radius: 4px;
color: var(--text-muted);
line-height: 1.4;
}
.envBadge {
font-family: var(--font-mono);
font-size: 11px;

View File

@@ -1,11 +1,13 @@
import { NavLink } from 'react-router';
import { useThemeStore } from '../../theme/theme-store';
import { useAuthStore } from '../../auth/auth-store';
import { useCommandPalette } from '../command-palette/use-command-palette';
import styles from './TopNav.module.css';
export function TopNav() {
const { theme, toggle } = useThemeStore();
const { username, logout } = useAuthStore();
const openPalette = useCommandPalette((s) => s.open);
return (
<nav className={styles.topnav}>
@@ -26,6 +28,14 @@ export function TopNav() {
</ul>
<div className={styles.navRight}>
<button className={styles.searchTrigger} onClick={openPalette}>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
<circle cx="11" cy="11" r="8" />
<path d="m21 21-4.35-4.35" />
</svg>
Search...
<kbd className={styles.kbdKey}>&#8984;K</kbd>
</button>
<span className={styles.envBadge}>PRODUCTION</span>
<button className={styles.themeToggle} onClick={toggle} title="Toggle theme">
{theme === 'dark' ? '\u2600\uFE0F' : '\uD83C\uDF19'}