From c1278d2e456f68f1fa2da085abfc871a3538b403 Mon Sep 17 00:00:00 2001 From: olli Date: Wed, 12 Nov 2025 16:58:04 +0100 Subject: [PATCH] feat: Implement cache management for Git repository contributions and commits --- assets/js/components/GitContributionChart.vue | 18 +-- assets/js/views/ProjectManagement.vue | 52 +++++++ composer.json | 1 + composer.lock | 2 +- src/Controller/GitRepositoryController.php | 143 +++++++++++++----- .../GitRepositoryCacheListener.php | 62 ++++++++ 6 files changed, 230 insertions(+), 48 deletions(-) create mode 100644 src/EventListener/GitRepositoryCacheListener.php diff --git a/assets/js/components/GitContributionChart.vue b/assets/js/components/GitContributionChart.vue index 277f261..a1854e2 100644 --- a/assets/js/components/GitContributionChart.vue +++ b/assets/js/components/GitContributionChart.vue @@ -130,9 +130,6 @@ const contributionGrid = computed(() => { contributionMap[day.date] = day.count }) - // Debug: Log contribution map - console.log('Contribution map sample:', Object.entries(contributionMap).slice(0, 10)) - let col = 1 let currentDate = new Date(firstSunday) const lastDay = new Date(currentYear.value, 11, 31) @@ -173,11 +170,6 @@ const contributionGrid = computed(() => { currentDate.setDate(currentDate.getDate() + 1) } - // Debug: Log grid sample - const gridWithCommits = grid.filter(g => g.count > 0) - console.log('Grid cells with commits:', gridWithCommits.length) - console.log('Sample cells with commits:', gridWithCommits.slice(0, 5)) - return grid }) @@ -309,11 +301,6 @@ async function loadContributions() { const data = await response.json() contributionData.value = data.contributions || [] - - // Debug: Log the data to check format - console.log('Contribution data received:', contributionData.value.slice(0, 5)) - console.log('Total days:', contributionData.value.length) - console.log('Days with commits:', contributionData.value.filter(d => d.count > 0).length) } catch (err) { console.error('Error loading contributions:', err) error.value = err.message @@ -433,6 +420,11 @@ defineExpose({ transition: all 0.15s ease; min-height: 13px; min-width: 13px; + border: 1px solid rgba(0, 0, 0, 0.06); +} + +:global(.dark) .contribution-cell { + border: 1px solid rgba(255, 255, 255, 0.08); } .contribution-cell:not(.intensity-empty):hover { diff --git a/assets/js/views/ProjectManagement.vue b/assets/js/views/ProjectManagement.vue index 2711bc0..e386aff 100644 --- a/assets/js/views/ProjectManagement.vue +++ b/assets/js/views/ProjectManagement.vue @@ -711,6 +711,15 @@ :use-grouping="false" class="w-10rem" /> +