Skip to content

Feature: Implementation of GitHub dashboard with authentication, repo management, and test coverage insights#1

Open
Swapnendu003 wants to merge 7 commits intokeploy:mainfrom
Swapnendu003:coverage_features
Open

Feature: Implementation of GitHub dashboard with authentication, repo management, and test coverage insights#1
Swapnendu003 wants to merge 7 commits intokeploy:mainfrom
Swapnendu003:coverage_features

Conversation

@Swapnendu003
Copy link

Authentication & User Management

  • Secure sign in and sign out flows using JWT-based authentication.
  • GitHub OAuth integration using Personal Access Tokens (PAT) for secure API access.
  • User profile retrieval and display, with sensitive token data (access/refresh tokens) excluded from responses for security.
  • User settings page for managing profile information and notification preferences.
  • Avatar and user info display, with support for updating display name and email.

Dashboard

  • Overview of GitHub API metrics with a visually appealing dashboard.
  • Metrics cards for repositories, total tests, pass rate, and recent test activity.
  • Welcome message and summary of user activity.
  • Activity graphs and contribution stats, including GitHub contributions by year.

Repository Management

  • List, manage, and view details of connected GitHub repositories.
  • Grid and list view toggles for repositories.
  • Pagination, search, and refresh capabilities for large repository lists.
  • Language breakdown bars for each repository, with color-coded language indicators.
  • Loading skeletons for improved UX during data fetch.

Coverage Visualizations

  • Branch coverage listing and scanning for multiple branches.
  • Scan results table with status, coverage, and error display.
  • Coverage history with search, filtering, and detailed view.
  • Color-coded coverage metrics for quick insights.
  • Go Coverage:
    • Detects Go modules and packages automatically, including support for monorepos.
    • Runs coverage using go test with multiple fallback strategies (including gocov and go tool cover).
    • Aggregates per-file and total coverage, and parses coverage files for detailed metrics.
  • Python Coverage:
    • Detects Python project type (Poetry, Pipenv, Conda, requirements.txt, etc.) and installs dependencies accordingly.
    • Runs coverage using the appropriate test runner (pytest, unittest, etc.) based on project structure.
    • If standard coverage fails, estimates coverage heuristically by analyzing test and source files.

…t, and coverage insights

Signed-off-by: Swapnendu003 <swaps.b003@gmail.com>
…t, and coverage insights

Signed-off-by: Swapnendu003 <swaps.b003@gmail.com>
…t configs

Signed-off-by: Swapnendu003 <swaps.b003@gmail.com>
Signed-off-by: Swapnendu003 <swaps.b003@gmail.com>
…ror on homepage

Signed-off-by: Swapnendu003 <swaps.b003@gmail.com>
Signed-off-by: Swapnendu003 <swaps.b003@gmail.com>
@Hermione2408 Hermione2408 requested a review from Copilot June 30, 2025 07:59

This comment was marked as outdated.

Signed-off-by: Swapnendu003 <swaps.b003@gmail.com>
@Hermione2408 Hermione2408 requested a review from Copilot July 3, 2025 18:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Implements a full GitHub-integrated dashboard in the frontend, introducing authentication flows, repository management, and coverage visualizations with a suite of new components, services, and types.

  • Adds JWT- and OAuth-based authentication, cookie utilities, and protected client wrappers.
  • Introduces API service layer with caching, request IDs, and error handling.
  • Implements dashboard, repositories, coverage scan/history/compare UIs and related types/styles.

Reviewed Changes

Copilot reviewed 62 out of 72 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tsconfig.json Configures TypeScript compiler options for Next.js project.
src/utils/cookies.ts Provides cookie helpers and auth token management.
src/services/api.ts Centralizes axios setup, interceptors, caching, and endpoints.
src/types/* Defines interfaces for repos, jobs, dashboard data, and coverage.
src/components/* New UI components for auth, layout, wavy background, widgets.
src/app/* Adds pages and layouts for home, dashboard, repositories, settings.
tailwind.config.js Custom Tailwind grid columns extension.
Files not reviewed (1)
  • poc-frontend/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

poc-frontend/src/types/repository.ts:5

  • Having both camelCase and snake_case fields (fullName vs full_name, githubId vs github_id) is confusing; consolidate to a single naming convention and map incoming JSON appropriately.
  full_name?: string; 

import { getAuthToken } from '../utils/cookies';
import { API_BASE_URL } from '@/constants/routes';

const debounce = <F extends (...args: any[]) => any>(
Copy link

Copilot AI Jul 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The debounce helper is defined but never used—either remove it or apply it to search or refresh handlers to avoid dead code.

Copilot uses AI. Check for mistakes.
Comment on lines +35 to +36
ctx: any,
canvas: any;
Copy link

Copilot AI Jul 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid module-scoped mutable variables for canvas state; use refs or state inside the component to keep rendering context and dimensions encapsulated.

Suggested change
ctx: any,
canvas: any;
ctx: any;

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +20
useEffect(() => {
// Check if user is authenticated
if (!isAuthenticated()) {
// If not authenticated, redirect to login page
router.push('/');
}
}, [router]);

// If user is authenticated, render the protected component
if (isAuthenticated()) {
Copy link

Copilot AI Jul 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling isAuthenticated() twice may trigger redundant cookie reads; call it once, store the result in a variable, and reuse it.

Suggested change
useEffect(() => {
// Check if user is authenticated
if (!isAuthenticated()) {
// If not authenticated, redirect to login page
router.push('/');
}
}, [router]);
// If user is authenticated, render the protected component
if (isAuthenticated()) {
const authStatus = isAuthenticated();
useEffect(() => {
// Check if user is authenticated
if (!authStatus) {
// If not authenticated, redirect to login page
router.push('/');
}
}, [authStatus, router]);
// If user is authenticated, render the protected component
if (authStatus) {

Copilot uses AI. Check for mistakes.
const dropdownRef = useRef<HTMLDivElement>(null);
const searchInputRef = useRef<HTMLInputElement>(null);
const [debouncedSearch, setDebouncedSearch] = useState('');
const debounceTimerRef = useRef<NodeJS.Timeout | null>(null);
Copy link

Copilot AI Jul 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using NodeJS.Timeout in a browser environment can cause type mismatches; use number for setTimeout ID or update typing to Window or ReturnType.

Suggested change
const debounceTimerRef = useRef<NodeJS.Timeout | null>(null);
const debounceTimerRef = useRef<number | null>(null);

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant