From 834982d423f6a2a56af5393573ec32399f5b7f05 Mon Sep 17 00:00:00 2001 From: Fusion Date: Tue, 19 May 2026 13:12:48 +0200 Subject: [PATCH] fix: fetch up to 10000 commits instead of default 100 The backend defaults to returning only 100 commits. Update frontend to explicitly request up to 10000 commits to show full history for most repositories. --- apps/web/src/api/git_repositories.ts | 9 +++++++-- apps/web/src/pages/git-history.tsx | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/web/src/api/git_repositories.ts b/apps/web/src/api/git_repositories.ts index 864a30f..5102e69 100644 --- a/apps/web/src/api/git_repositories.ts +++ b/apps/web/src/api/git_repositories.ts @@ -71,9 +71,14 @@ export interface CommitHistoryResponse { export async function getRepositoryHistory( projectId: string, repoId: string, - branch?: string + branch?: string, + limit?: number ): Promise { - const params = branch ? `?branch=${encodeURIComponent(branch)}` : ""; + const searchParams = new URLSearchParams(); + if (branch) searchParams.set("branch", branch); + if (limit) searchParams.set("limit", String(limit)); + const queryString = searchParams.toString(); + const params = queryString ? `?${queryString}` : ""; const response = await apiClient.get(`/projects/${projectId}/repositories/${repoId}/history${params}`); return response.data; } diff --git a/apps/web/src/pages/git-history.tsx b/apps/web/src/pages/git-history.tsx index 503ca22..0e0b769 100644 --- a/apps/web/src/pages/git-history.tsx +++ b/apps/web/src/pages/git-history.tsx @@ -18,7 +18,7 @@ export const GitHistoryPage = () => { if (!projectId || !repoId) return; setStatus("loading"); try { - const data = await getRepositoryHistory(projectId, repoId, selectedBranch || undefined); + const data = await getRepositoryHistory(projectId, repoId, selectedBranch || undefined, 10000); setCommits(data.commits); setBranches(data.branches); if (data.branches.length > 0 && !selectedBranch) {