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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user