feat(ui): implement OAuth login flow and dashboard components
Some checks failed
CI / build-and-test (push) Failing after -32m0s

* Add OAuth login handling in app and UI components
* Create new components for login and dashboard pages
* Refactor sidebar and navigation structure
* Introduce types for access entries and status responses
This commit is contained in:
2026-04-26 09:12:46 +02:00
parent bdc78cc2a3
commit 71845d38d3
22 changed files with 1440 additions and 334 deletions

111
ui/src/types.ts Normal file
View File

@@ -0,0 +1,111 @@
export type AccessEntry = {
key_id: string;
last_accessed_at: string;
last_path: string;
user_agent: string;
request_count: number;
};
export type StatusResponse = {
title: string;
description: string;
version: string;
build_date: string;
commit: string;
connected_count: number;
total_known: number;
connected_window: string;
oauth_enabled: boolean;
entries: AccessEntry[];
};
export type NavItem = {
id: string;
label: string;
description: string;
disabled?: boolean;
};
export type ShellPage = 'dashboard' | 'projects' | 'thoughts' | 'skills' | 'guardrails' | 'files';
export type Project = {
id: string;
name: string;
description: string;
created_at: string;
last_active_at: string;
};
export type ProjectSummary = Project & {
thought_count: number;
};
export type ThoughtMetadata = {
people: string[];
action_items: string[];
dates_mentioned: string[];
topics: string[];
type: string;
source: string;
metadata_status: string;
metadata_error?: string;
};
export type Thought = {
id: string;
content: string;
metadata: ThoughtMetadata;
project_id?: string;
archived_at?: string;
created_at: string;
updated_at: string;
};
export type SearchResult = {
id: string;
content: string;
metadata: ThoughtMetadata;
similarity: number;
created_at: string;
};
export type AgentSkill = {
id: string;
name: string;
description: string;
content: string;
tags: string[];
created_at: string;
updated_at: string;
};
export type AgentGuardrail = {
id: string;
name: string;
description: string;
content: string;
severity: 'low' | 'medium' | 'high' | 'critical';
tags: string[];
created_at: string;
updated_at: string;
};
export type StoredFile = {
id: string;
thought_id?: string;
project_id?: string;
name: string;
media_type: string;
kind: string;
size_bytes: number;
sha256: string;
created_at: string;
updated_at: string;
};
export type ThoughtStats = {
total_count: number;
type_counts: Record<string, number>;
top_topics: { key: string; count: number }[];
top_people: { key: string; count: number }[];
};