feat(TRUEREF-0015): implement web UI repository dashboard

- Repository list with state badges, stats, and action buttons
- Add repository modal for GitHub URLs and local paths
- Live indexing progress bar polling every 2s
- Confirm dialog for destructive actions
- Repository detail page with versions and recent jobs
- Settings page placeholder

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Giancarmine Salucci
2026-03-23 09:07:06 +01:00
parent 542f4ce66c
commit 90d93786a8
11 changed files with 1254 additions and 4 deletions

View File

@@ -0,0 +1,26 @@
import type { PageServerLoad } from './$types';
import { error } from '@sveltejs/kit';
export const load: PageServerLoad = async ({ fetch, params }) => {
const id = params.id;
const res = await fetch(`/api/v1/libs/${encodeURIComponent(id)}`);
if (res.status === 404) {
error(404, 'Repository not found');
}
if (!res.ok) {
error(res.status, 'Failed to load repository');
}
const repo = await res.json();
// Fetch recent jobs
const jobsRes = await fetch(`/api/v1/jobs?repositoryId=${encodeURIComponent(id)}&limit=5`);
const jobsData = jobsRes.ok ? await jobsRes.json() : { jobs: [] };
return {
repo,
recentJobs: jobsData.jobs ?? []
};
};