feat: add git history visualization frontend

- Add API client functions for commit history and detail endpoints
- Create GitHistoryPage with commit list, graph visualization, and detail panel
- Add branch selector for viewing different branches
- Integrate history view into repository list with History button
- Add comprehensive CSS styles for history page layout

Quality gates: typecheck ✓, lint ✓, build ✓
This commit is contained in:
Fusion
2026-05-19 12:44:37 +02:00
parent 8b70daed53
commit 0926e4de83
5 changed files with 557 additions and 1 deletions
+9 -1
View File
@@ -1,5 +1,5 @@
import { useCallback, useEffect, useRef, useState } from "react";
import { useParams } from "react-router-dom";
import { useNavigate, useParams } from "react-router-dom";
import {
createRepository,
@@ -16,6 +16,7 @@ type UrlValidationStatus = "idle" | "validating" | "valid" | "needs-parsing" | "
export const GitRepositoriesPage = () => {
const { projectId } = useParams<{ projectId: string }>();
const navigate = useNavigate();
const [status, setStatus] = useState<RepoStatus>("loading");
const [repositories, setRepositories] = useState<GitRepository[]>([]);
const [showCreate, setShowCreate] = useState(false);
@@ -188,6 +189,13 @@ export const GitRepositoriesPage = () => {
<p className="muted">{repo.path}</p>
</div>
<div className="repository-actions">
<button
className="secondary-button small"
onClick={() => navigate(`/projects/${projectId}/repositories/${repo.id}/history`)}
type="button"
>
History
</button>
{deleteConfirmId === repo.id ? (
<div className="delete-confirm">
<span>Are you sure?</span>