feat(ui): all-time weekly contribution graph + date range timespan support

Add AllTimeGraph component showing one circle per week across the full
history (earliest event to today). Uses the /sources endpoint to find
the earliest date, then fetches daily counts and aggregates to weekly.
Clicking a week navigates to /activity/YYYY-MM-DD..YYYY-MM-DD.

Update parseTimespan to handle both date-only (YYYY-MM-DD) and full
ISO datetime strings in range expressions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-05 17:13:49 +03:00
parent 822def3227
commit 1ca85fe632
3 changed files with 146 additions and 20 deletions

View File

@@ -4,7 +4,7 @@ import Col from 'react-bootstrap/Col';
import Row from 'react-bootstrap/Row';
import { fetchProjects, fetchLanguages, type ProjectSummary, type Source } from '../api/client';
import { ContributionGraph } from '../components/ContributionGraph';
import { ContributionGraph, AllTimeGraph } from '../components/ContributionGraph';
export function DashPage() {
const projectsQ = useQuery({
@@ -27,6 +27,7 @@ export function DashPage() {
</Col>
</Row>
<ContributionGraph />
<AllTimeGraph />
{projectsQ.isLoading && <p>loading...</p>}
{projectsQ.isError && (
<p>error: {(projectsQ.error as Error).message}</p>