Add query bar, maintenance panel, and heartbeat system

- Query bar with organized/grouped search results in portal
- Maintenance panel UI for triggering and viewing maintenance status
- Heartbeat service with periodic maintenance and dirty-tracking
- Query organizer for grouping search results by tag/kind/parent
- Slide-up animation for query panel
This commit is contained in:
2026-02-03 00:55:08 +01:00
parent f65653e260
commit af568f81c2
11 changed files with 785 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
import type { CortexNode, CortexEdge, GraphData, NodeWithConnections, SearchResult, NodeKind, EdgeType } from './types';
import type { CortexNode, CortexEdge, GraphData, NodeWithConnections, SearchResult, NodeKind, EdgeType, GroupedQueryResult } from './types';
const BASE = '/api';
@@ -41,4 +41,13 @@ export const api = {
search: (text: string, options?: Record<string, any>) =>
request<SearchResult[]>('/search', { method: 'POST', body: JSON.stringify({ text, options }) }),
queryOrganized: (text: string) =>
request<GroupedQueryResult>('/query/organize', { method: 'POST', body: JSON.stringify({ text }) }),
getMaintenanceStatus: () =>
request<Record<string, any>>('/maintenance/status'),
runMaintenance: () =>
request<Record<string, any>>('/maintenance/run', { method: 'POST' }),
};