feat(ui): add /dash route, shared nav, project dashboard with /v1/projects API

Restructure routes: / and /dash show a project overview dashboard,
/activity hosts the existing timeline, /cv remains. Shared Layout
component provides consistent nav header and footer across all routes.

New /v1/projects endpoint aggregates per-repo activity stats (commits,
issues, PRs, date range) from existing event data via SQL. Dashboard
ranks projects by weighted recency + volume score and renders a card
grid.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-05 15:19:49 +03:00
parent a71b4e6b84
commit a70fab4feb
11 changed files with 305 additions and 63 deletions

View File

@@ -3,7 +3,6 @@ import { useLocation } from 'react-router-dom';
import { useQuery } from '@tanstack/react-query';
import Alert from 'react-bootstrap/Alert';
import Col from 'react-bootstrap/Col';
import Container from 'react-bootstrap/Container';
import Row from 'react-bootstrap/Row';
import Spinner from 'react-bootstrap/Spinner';
@@ -34,13 +33,13 @@ export function CvPage() {
if (cvQ.isLoading) {
return (
<Container className="py-4">
<>
<CvHeader />
<div className="d-flex align-items-center gap-2">
<Spinner animation="border" role="status" size="sm" />
<span>loading cv</span>
</div>
</Container>
</>
);
}
@@ -50,7 +49,7 @@ export function CvPage() {
? ' (github limits unauthenticated requests to 60/hour per ip — try again shortly)'
: '';
return (
<Container className="py-4">
<>
<CvHeader />
<Alert variant="danger">
<Alert.Heading>cv unavailable</Alert.Heading>
@@ -62,7 +61,7 @@ export function CvPage() {
retry
</button>
</Alert>
</Container>
</>
);
}
@@ -72,15 +71,15 @@ export function CvPage() {
if (bodySections.length === 0 && navSections.length === 0) {
return (
<Container className="py-4">
<>
<CvHeader />
<Alert variant="warning">cv unavailable: no sections in config</Alert>
</Container>
</>
);
}
return (
<Container className="py-4">
<>
<CvHeader />
<Row>
<Col lg={9} className="cv-body">
@@ -103,6 +102,6 @@ export function CvPage() {
<CvTimeline data={data} />
</Col>
</Row>
</Container>
</>
);
}