Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a “Git log” panel to the dashboard by introducing a backend /api/git/log endpoint and wiring a new frontend store + UI rendering path (replacing the previous “API metrics” dashboard column).
Changes:
- Backend: add
internal/gitlog(git command adapter + parser) and expose it viaGET /api/git/log. - Frontend: add
fetchGitLog, dashboard store plumbing, conventional-commit parsing, and a new Git log UI section inDashboard.svelte. - Docs/plans: document the new endpoint and record implementation notes.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
internal/gitlog/parser_test.go |
Adds unit tests for parsing git log output (binary/truncation/empty). |
internal/gitlog/parser.go |
Implements parsing of git log --numstat output into structured commits/files/stats. |
internal/gitlog/gitlog.go |
Adds git command reader, options normalization, error classification, and shared DTOs. |
internal/api/routes.go |
Registers /api/git/log route and wires GitCmdReader into the REST handler. |
internal/api/rest_types.go |
Adds REST-layer response DTOs for the git log payload and adds GitLogReader to RestHandler. |
internal/api/rest_git.go |
Implements GET /api/git/log handler, query param validation, timeout handling, and DTO conversion. |
internal/api/rest_git_test.go |
Adds API handler tests for payload, validation, and error mapping. |
frontend/src/lib/apiClient.js |
Adds fetchGitLog() plus normalization helpers for commits/files. |
frontend/src/lib/dashboardStore.js |
Replaces metrics-summary loading with git-log loading + auto-refresh + event-triggered refresh. |
frontend/src/lib/conventionalCommit.js |
Adds conventional-commit subject parser and type→badge-class mapping. |
frontend/src/views/Dashboard.svelte |
Replaces “API metrics” section with “Git log” section and styles + conventional badges. |
frontend/tests/apiClient.test.js |
Adds a test for fetchGitLog() normalization and request URL. |
frontend/tests/dashboardStore.test.js |
Updates dashboard store tests to use git log loading and auto-refresh instead of metrics. |
frontend/tests/dashboard.test.js |
Adds UI test coverage for rendering git log entries in the dashboard view. |
frontend/tests/conventionalCommit.test.js |
Adds unit tests for conventional-commit parsing helper. |
docs/reference/http-api.md |
Documents /api/git/log endpoint behavior and example response. |
AGENTS.md |
Adds implementation notes for the git log dashboard feature. |
.gestalt/plans/git-log-dashboard.org |
Adds/updates the implementation plan for the feature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
correct git log const placement
warn and degrade on git log api workdir error
20289df to
a3545f4
Compare
|
🎉 This PR is included in version 1.17.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
panel in dashboard showing current git log