Skip to content

chore: move content from fe-lib#977

Closed
whoami-amrit wants to merge 14 commits into
developfrom
feat/oss-overviews
Closed

chore: move content from fe-lib#977
whoami-amrit wants to merge 14 commits into
developfrom
feat/oss-overviews

Conversation

@whoami-amrit

Copy link
Copy Markdown
Contributor

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

Copilot AI review requested due to automatic review settings December 9, 2025 08:29

Copilot AI left a comment

Copy link
Copy Markdown

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 moves shared utilities, types, constants, and components from fe-lib to the main codebase, organizing them into the appropriate directories under src/Pages-Devtron-2.0/Shared/ and adding utility files to src/Shared/.

Key Changes:

  • Added shared types (enums for time windows, prod/non-prod selection) and chart tooltip types
  • Added shared constants for pagination, time windows, and sorting options
  • Added shared React components for loading states and chart tooltips
  • Added new route constants for overview pages (apps, workflow, DORA metrics, pipeline insights)

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Shared/utils.ts Adds parseTimestampToDate utility function for date formatting
src/Pages-Devtron-2.0/Shared/utils.ts Adds parseTimestampToDate utility function (duplicate of above)
src/Pages-Devtron-2.0/Shared/types.ts Defines shared types and enums for time windows and chart tooltips
src/Pages-Devtron-2.0/Shared/constants.ts Defines pagination options, time window labels, and sorting configurations
src/Pages-Devtron-2.0/Shared/components.tsx Implements reusable chart components (loading state, tooltip, color indicator)
src/Pages-Devtron-2.0/Shared/index.ts Exports all shared modules for Pages-Devtron-2.0
src/Pages-Devtron-2.0/index.ts Adds export for new Shared module
src/Common/Constants.ts Adds route constants for new overview pages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +4 to +8

export const parseTimestampToDate = (timestamp: string): string => {
const dateObj = dayjs(timestamp)
return dateObj.format(DATE_TIME_FORMATS.DD_MMM)
}

Copilot AI Dec 9, 2025

Copy link

Choose a reason for hiding this comment

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

The parseTimestampToDate function is duplicated in both src/Shared/utils.ts and src/Pages-Devtron-2.0/Shared/utils.ts. This creates code duplication and maintenance overhead. Consider keeping the function in only one location (preferably src/Shared/utils.ts as it's more general) and importing it from there when needed in Pages-Devtron-2.0.

Suggested change
export const parseTimestampToDate = (timestamp: string): string => {
const dateObj = dayjs(timestamp)
return dateObj.format(DATE_TIME_FORMATS.DD_MMM)
}
import { parseTimestampToDate } from '../../../Shared/utils'

Copilot uses AI. Check for mistakes.
Comment thread src/Shared/utils.ts
Comment on lines +5 to +8
export const parseTimestampToDate = (timestamp: string): string => {
const dateObj = dayjs(timestamp)
return dateObj.format(DATE_TIME_FORMATS.DD_MMM)
}

Copilot AI Dec 9, 2025

Copy link

Choose a reason for hiding this comment

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

The parseTimestampToDate function is duplicated in both src/Shared/utils.ts and src/Pages-Devtron-2.0/Shared/utils.ts. This creates code duplication and maintenance overhead. Consider keeping the function in only one location (preferably here in src/Shared/utils.ts as it's more general) and importing it when needed in Pages-Devtron-2.0.

Copilot uses AI. Check for mistakes.

import { ChartTooltipProps } from './types'

export const LoadingDonutChart = () => (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These can go in global Shared itself

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.

4 participants