Fix command palette: agent ID propagation, result selection, and scope tabs
All checks were successful
CI / build (push) Successful in 59s
CI / docker (push) Successful in 46s
CI / deploy (push) Successful in 25s

- Propagate authenticated agent identity through write buffers via
  TaggedExecution/TaggedDiagram wrappers so ClickHouse rows get real
  agent IDs instead of empty strings
- Add execution_id to text search LIKE clause so selecting an execution
  by ID in the palette actually finds it
- Clear status filter to all three statuses on palette selection so the
  chosen execution/agent isn't filtered out
- Add disabled Routes and Exchanges scope tabs with "coming soon" state

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-03-13 17:13:14 +01:00
parent 64b03a4e2f
commit 86e016874a
16 changed files with 151 additions and 69 deletions

View File

@@ -22,12 +22,14 @@ export function CommandPalette() {
(result: PaletteResult) => {
if (result.type === 'execution') {
const exec = result.data as ExecutionSummary;
execSearch.setStatus(['COMPLETED', 'FAILED', 'RUNNING']);
execSearch.setText(exec.executionId);
execSearch.setRouteId('');
execSearch.setAgentId('');
execSearch.setProcessorType('');
} else if (result.type === 'agent') {
const agent = result.data as AgentInstance;
execSearch.setStatus(['COMPLETED', 'FAILED', 'RUNNING']);
execSearch.setAgentId(agent.agentId);
execSearch.setText('');
execSearch.setRouteId('');

View File

@@ -11,7 +11,7 @@ interface ResultsListProps {
}
export function ResultsList({ results, isLoading, onSelect }: ResultsListProps) {
const { selectedIndex, query } = useCommandPalette();
const { selectedIndex, query, scope } = useCommandPalette();
const listRef = useRef<HTMLDivElement>(null);
useEffect(() => {
@@ -21,6 +21,24 @@ export function ResultsList({ results, isLoading, onSelect }: ResultsListProps)
items?.[selectedIndex]?.scrollIntoView({ block: 'nearest' });
}, [selectedIndex]);
if (scope === 'routes' || scope === 'exchanges') {
const label = scope === 'routes' ? 'Route' : 'Exchange';
return (
<div className={styles.results}>
<div className={styles.emptyState}>
<svg className={styles.emptyIcon} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
<path d="M12 6v6l4 2" />
<circle cx="12" cy="12" r="10" />
</svg>
<span className={styles.emptyText}>{label} search coming soon</span>
<span className={styles.emptyHint}>
This feature is planned for a future release
</span>
</div>
</div>
);
}
if (isLoading && results.length === 0) {
return (
<div className={styles.results}>

View File

@@ -10,16 +10,18 @@ const SCOPES: { key: PaletteScope; label: string; disabled?: boolean }[] = [
{ key: 'all', label: 'All' },
{ key: 'executions', label: 'Executions' },
{ key: 'agents', label: 'Agents' },
{ key: 'routes', label: 'Routes', disabled: true },
{ key: 'exchanges', label: 'Exchanges', disabled: true },
];
export function ScopeTabs({ executionCount, agentCount }: ScopeTabsProps) {
const { scope, setScope } = useCommandPalette();
function getCount(key: PaletteScope): number {
function getCount(key: PaletteScope): string | number {
if (key === 'all') return executionCount + agentCount;
if (key === 'executions') return executionCount;
if (key === 'agents') return agentCount;
return 0;
return '\u2014';
}
return (
@@ -27,7 +29,13 @@ export function ScopeTabs({ executionCount, agentCount }: ScopeTabsProps) {
{SCOPES.map((s) => (
<button
key={s.key}
className={scope === s.key ? styles.scopeTabActive : styles.scopeTab}
className={
s.disabled
? styles.scopeTabDisabled
: scope === s.key
? styles.scopeTabActive
: styles.scopeTab
}
onClick={() => !s.disabled && setScope(s.key)}
>
{s.label}

View File

@@ -1,6 +1,6 @@
import { create } from 'zustand';
export type PaletteScope = 'all' | 'executions' | 'agents';
export type PaletteScope = 'all' | 'executions' | 'agents' | 'routes' | 'exchanges';
export interface PaletteFilter {
key: 'status' | 'route' | 'agent' | 'processor';