Skip to content

Integration of interactive charts into dashboard for code coverage insights visualization#3

Open
Swapnendu003 wants to merge 14 commits intokeploy:mainfrom
Swapnendu003:charts
Open

Integration of interactive charts into dashboard for code coverage insights visualization#3
Swapnendu003 wants to merge 14 commits intokeploy:mainfrom
Swapnendu003:charts

Conversation

@Swapnendu003
Copy link
Copy Markdown

Integrated interactive and visually appealing charts into the metrics dashboard to provide better insights into repository data. This includes components for test coverage trends, mostly. The charts improve overall UX by making key metrics easier to understand at a glance, aligning the dashboard with the updated light theme and Keploy’s design system.

…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>
Signed-off-by: Swapnendu003 <swaps.b003@gmail.com>
Signed-off-by: Swapnendu003 <swaps.b003@gmail.com>
@Hermione2408 Hermione2408 requested a review from Copilot August 4, 2025 08:09
Copy link
Copy Markdown

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

This PR integrates interactive charts and visualizations into the metrics dashboard to provide better insights into code coverage data. The changes introduce a comprehensive set of components for displaying coverage analytics, file heatmaps, and trend charts while maintaining consistency with Keploy's light theme design system.

  • Adds comprehensive coverage visualization components including heatmaps, charts, and analytics
  • Implements interactive dashboard components with filtering, sorting, and search capabilities
  • Establishes TypeScript configuration and utility functions for the frontend application

Reviewed Changes

Copilot reviewed 78 out of 88 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
poc-frontend/tsconfig.json TypeScript configuration for Next.js application
poc-frontend/tailwind.config.js Tailwind CSS configuration with grid extensions
poc-frontend/src/utils/*.ts Utility modules for error analysis and cookie management
poc-frontend/src/types/*.ts TypeScript type definitions for data structures
poc-frontend/src/services/*.ts API service layer and authentication logic
poc-frontend/src/components/*.tsx UI components including visualizations and dashboard elements
poc-frontend/src/app/settings/* Settings page implementation
Comments suppressed due to low confidence (1)

poc-frontend/src/components/CoverageVisualizations/FileHeatmap.tsx:361

  • Use let or const instead of var for variable declarations to follow modern JavaScript best practices and avoid potential hoisting issues.
        text: 'File Coverage Distribution',

Comment on lines +48 to +56
export const setUserData = (userData: any): void => {
setCookie(USER_DATA_KEY, JSON.stringify(userData));
};

export const getUserData = (): any | undefined => {
const data = getCookie(USER_DATA_KEY);
if (data) {
try {
return JSON.parse(data);
Copy link

Copilot AI Aug 4, 2025

Choose a reason for hiding this comment

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

The userData parameter uses any type which reduces type safety. Consider defining a proper interface for user data to provide better type checking and IDE support.

Suggested change
export const setUserData = (userData: any): void => {
setCookie(USER_DATA_KEY, JSON.stringify(userData));
};
export const getUserData = (): any | undefined => {
const data = getCookie(USER_DATA_KEY);
if (data) {
try {
return JSON.parse(data);
export const setUserData = (userData: UserData): void => {
setCookie(USER_DATA_KEY, JSON.stringify(userData));
};
export const getUserData = (): UserData | undefined => {
const data = getCookie(USER_DATA_KEY);
if (data) {
try {
return JSON.parse(data) as UserData;

Copilot uses AI. Check for mistakes.
Comment on lines +48 to +56
export const setUserData = (userData: any): void => {
setCookie(USER_DATA_KEY, JSON.stringify(userData));
};

export const getUserData = (): any | undefined => {
const data = getCookie(USER_DATA_KEY);
if (data) {
try {
return JSON.parse(data);
Copy link

Copilot AI Aug 4, 2025

Choose a reason for hiding this comment

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

The return type uses any which reduces type safety. Consider defining a proper interface for user data and using that type instead of any.

Suggested change
export const setUserData = (userData: any): void => {
setCookie(USER_DATA_KEY, JSON.stringify(userData));
};
export const getUserData = (): any | undefined => {
const data = getCookie(USER_DATA_KEY);
if (data) {
try {
return JSON.parse(data);
export const setUserData = (userData: UserData): void => {
setCookie(USER_DATA_KEY, JSON.stringify(userData));
};
export const getUserData = (): UserData | undefined => {
const data = getCookie(USER_DATA_KEY);
if (data) {
try {
return JSON.parse(data) as UserData;

Copilot uses AI. Check for mistakes.
};
};

const requestCache: Record<string, {timestamp: number, promise: Promise<any>}> = {};
Copy link

Copilot AI Aug 4, 2025

Choose a reason for hiding this comment

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

The Promise type uses any which reduces type safety. Consider using generic types or more specific return types for cached promises.

Copilot uses AI. Check for mistakes.
}) => {
const [sidebarCollapsed, setSidebarCollapsed] = useState(false);
const [activeTab, setActiveTab] = useState<'metrics' | 'repositories' | 'tests' | 'settings'>('metrics');
const [userProfile, setUserProfile] = useState<any>(null);
Copy link

Copilot AI Aug 4, 2025

Choose a reason for hiding this comment

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

The userProfile state uses any type. Consider defining a proper interface for user profile data to improve type safety.

Copilot uses AI. Check for mistakes.
Comment on lines +6 to +11
declare global {
interface Window {
echarts?: any;
}
}

Copy link

Copilot AI Aug 4, 2025

Choose a reason for hiding this comment

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

Global Window interface augmentation should be placed in a separate type declaration file (e.g., types/global.d.ts) rather than in a component file to improve maintainability and reusability.

Suggested change
declare global {
interface Window {
echarts?: any;
}
}

Copilot uses AI. Check for mistakes.

const FileHeatmap: React.FC<FileHeatmapProps> = ({ files: propFiles }) => {

const files = propFiles && propFiles.length > 0 ? propFiles : generateMockFiles(1247);
Copy link

Copilot AI Aug 4, 2025

Choose a reason for hiding this comment

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

The magic number 1247 for mock files generation should be extracted as a named constant to improve code readability and maintainability.

Suggested change
const files = propFiles && propFiles.length > 0 ? propFiles : generateMockFiles(1247);
const files = propFiles && propFiles.length > 0 ? propFiles : generateMockFiles(MOCK_FILE_COUNT);

Copilot uses AI. Check for mistakes.
Comment on lines +9 to +10
const SettingsPage = () => {
const [user, setUser] = useState<any>(null);
Copy link

Copilot AI Aug 4, 2025

Choose a reason for hiding this comment

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

The user state uses any type. Consider defining a proper interface for user data to improve type safety and provide better IntelliSense support.

Suggested change
const SettingsPage = () => {
const [user, setUser] = useState<any>(null);
interface User {
name?: string;
email?: string;
// Add other user properties as needed
}
const SettingsPage = () => {
const [user, setUser] = useState<User | 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.

2 participants