feat(ui): add maintenance page for task management
Some checks failed
CI / build-and-test (push) Failing after -31m53s

* Implement maintenance page with task and log display
* Add backfill and metadata retry functionality
* Integrate grid component for project display in thoughts page
* Update types for maintenance tasks and logs
* Enhance sidebar and shell for new maintenance navigation
This commit is contained in:
2026-04-26 23:13:41 +02:00
parent b39cd3ba72
commit 927a118338
48 changed files with 2228 additions and 868 deletions

View File

@@ -2,10 +2,25 @@ export type AccessEntry = {
key_id: string;
last_accessed_at: string;
last_path: string;
remote_addr: string;
user_agent: string;
request_count: number;
};
export type RequestAggregate = {
key: string;
request_count: number;
};
export type AccessMetrics = {
total_requests: number;
unique_principals: number;
unique_ips: number;
unique_agents: number;
top_ips: RequestAggregate[];
top_agents: RequestAggregate[];
};
export type StatusResponse = {
title: string;
description: string;
@@ -17,6 +32,7 @@ export type StatusResponse = {
connected_window: string;
oauth_enabled: boolean;
entries: AccessEntry[];
metrics: AccessMetrics;
};
export type NavItem = {
@@ -26,7 +42,7 @@ export type NavItem = {
disabled?: boolean;
};
export type ShellPage = 'dashboard' | 'projects' | 'thoughts' | 'skills' | 'guardrails' | 'files';
export type ShellPage = 'dashboard' | 'projects' | 'thoughts' | 'learnings' | 'skills' | 'guardrails' | 'files' | 'maintenance';
export type Project = {
id: string;
@@ -49,10 +65,21 @@ export type ThoughtMetadata = {
source: string;
metadata_status: string;
metadata_error?: string;
attachments?: ThoughtAttachment[];
};
export type ThoughtAttachment = {
file_id: string;
name: string;
media_type: string;
kind?: string;
size_bytes: number;
sha256?: string;
};
export type Thought = {
id: string;
guid?: string;
content: string;
metadata: ThoughtMetadata;
project_id?: string;
@@ -61,6 +88,14 @@ export type Thought = {
updated_at: string;
};
export type ThoughtLink = {
id: number;
from_id: number;
to_id: number;
relation: string;
created_at: string;
};
export type SearchResult = {
id: string;
content: string;
@@ -109,3 +144,66 @@ export type ThoughtStats = {
top_topics: { key: string; count: number }[];
top_people: { key: string; count: number }[];
};
export type Learning = {
id: string;
summary: string;
details: string;
category: string;
area: string;
status: string;
priority: string;
confidence: string;
action_required: boolean;
source_type?: string;
source_ref?: string;
tags?: string;
project_id?: string;
related_thought_id?: string;
related_skill_id?: string;
reviewed_at?: string;
reviewed_by?: string;
created_at: string;
updated_at: string;
};
export type MaintenanceTask = {
id: string;
name: string;
category?: string;
priority: string;
frequency_days?: number;
next_due?: string;
last_completed?: string;
notes?: string;
created_at: string;
updated_at: string;
};
export type MaintenanceLog = {
id: string;
task_id: string;
completed_at: string;
performed_by?: string;
cost?: number;
notes?: string;
next_action?: string;
};
export type BackfillResult = {
model: string;
scanned: number;
embedded: number;
skipped: number;
failed: number;
dry_run: boolean;
};
export type MetadataRetryResult = {
scanned: number;
retried: number;
updated: number;
skipped: number;
failed: number;
dry_run: boolean;
};