Feature: Implementation of GitHub dashboard with authentication, repo management, and test coverage insights#1
Conversation
…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>
Signed-off-by: Swapnendu003 <swaps.b003@gmail.com>
There was a problem hiding this comment.
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>( |
There was a problem hiding this comment.
The debounce helper is defined but never used—either remove it or apply it to search or refresh handlers to avoid dead code.
| ctx: any, | ||
| canvas: any; |
There was a problem hiding this comment.
Avoid module-scoped mutable variables for canvas state; use refs or state inside the component to keep rendering context and dimensions encapsulated.
| ctx: any, | |
| canvas: any; | |
| ctx: any; |
| 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()) { |
There was a problem hiding this comment.
Calling isAuthenticated() twice may trigger redundant cookie reads; call it once, store the result in a variable, and reuse it.
| 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) { |
| const dropdownRef = useRef<HTMLDivElement>(null); | ||
| const searchInputRef = useRef<HTMLInputElement>(null); | ||
| const [debouncedSearch, setDebouncedSearch] = useState(''); | ||
| const debounceTimerRef = useRef<NodeJS.Timeout | null>(null); |
There was a problem hiding this comment.
Using NodeJS.Timeout in a browser environment can cause type mismatches; use number for setTimeout ID or update typing to Window or ReturnType.
| const debounceTimerRef = useRef<NodeJS.Timeout | null>(null); | |
| const debounceTimerRef = useRef<number | null>(null); |
Authentication & User Management
Dashboard
Repository Management
Coverage Visualizations
go testwith multiple fallback strategies (includinggocovandgo tool cover).