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