Skip to content

Conversation

@arunjaindev
Copy link
Contributor

@arunjaindev arunjaindev commented Dec 23, 2025

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.

Fixes https://github.com/devtron-labs/sprint-tasks/issues/2746

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

@github-actions
Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n

Copy link
Contributor

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 refactors the app details functionality by consolidating duplicate types from multiple locations into the common library, modernizing the data fetching approach using React Query hooks, and cleaning up component logic.

Key changes include:

  • Migration from imperative API calls with manual polling to declarative React Query hooks for app details, resource tree, external links, and deployment status
  • Consolidation of duplicate AppDetails, ResourceTree, and PodMetaData types into imports from the common library
  • Removal of the AppDetailsEmptyState component in favor of the more generic GenericEmptyState component
  • Refactoring of the AppContext to use proper React types and removal of unused HOC pattern

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/config/constantMessaging.ts Removed unused SELECT_ANOTHER_ENVIRONMENT constant
src/components/v2/index.tsx Replaced custom empty state with GenericEmptyState component and improved code formatting
src/components/v2/appDetails/k8Resource/nodeDetail/nodeDetail.util.tsx Moved PodMetaData import to common library and removed unused import
src/components/v2/appDetails/appDetails.type.ts Removed duplicate type definitions now imported from common library
src/components/v2/appDetails/AppDetails.component.tsx Removed unnecessary type conversion for clusterId prop
src/components/externalLinks/ExternalLinks.utils.tsx Unified AppDetails type from common library
src/components/externalLinks/ExternalLinks.type.ts Consolidated type imports and removed duplicate AppDetails types
src/components/external-apps/ExternalAppService.ts Moved ResourceTree import to common library
src/components/common/Contexts/AppContext.tsx Updated types to use proper React types and removed unused HOC
src/components/common/ClusterMetaDataBar/types.ts Changed clusterId type from string to number
src/components/common/AppDetailsEmptyState.tsx Deleted file - replaced with GenericEmptyState usage
src/components/app/types.ts Removed duplicate type definitions, added new hook-related types
src/components/app/service.ts Major refactor to use React Query hooks for data fetching with automatic polling
src/components/app/details/triggerView/TriggerView.tsx Improved conditional rendering using spread operator
src/components/app/details/cdDetails/CDDetails.tsx Removed unused imports
src/components/app/details/appDetails/appDetails.type.ts Simplified types by importing from common library and hook return types
src/components/app/details/appDetails/appDetails.service.ts Improved URL building using utility function
src/components/app/details/appDetails/SourceInfo.tsx Refactored to use React Query hooks for deployment status details
src/components/app/details/appDetails/AppDetails.tsx Major refactor replacing manual polling with React Query hooks and simplifying state management
src/components/ApplicationGroup/Details/EnvCDDetails/EnvCDDetails.tsx Removed unused imports
.eslintignore Removed service.ts from ignore list (now passes linting)

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

@github-actions
Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n

@github-actions
Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n

@shivani170 shivani170 changed the base branch from hotfix-v0.43.0 to main December 29, 2025 08:04
@github-actions
Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n

@github-actions
Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n

@github-actions github-actions bot added PR:Ready-to-Review PR:Ready-to-Review and removed PR:Issue-verification-failed PR:Issue-verification-failed labels Jan 5, 2026
vivek-devtron
vivek-devtron previously approved these changes Jan 7, 2026
@sonarqubecloud
Copy link

@arunjaindev arunjaindev merged commit 4898c08 into main Jan 15, 2026
10 checks passed
@arunjaindev arunjaindev deleted the refactor/app-details branch January 15, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR:Ready-to-Review PR:Ready-to-Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants