-
Notifications
You must be signed in to change notification settings - Fork 57
refactor: app details #3027
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: app details #3027
Conversation
|
Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n |
There was a problem hiding this 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, andPodMetaDatatypes into imports from the common library - Removal of the
AppDetailsEmptyStatecomponent in favor of the more genericGenericEmptyStatecomponent - Refactoring of the
AppContextto 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.
fix: improve URL parameter handling for login redirection
…SourceInfo components
|
Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n |
…board into refactor/app-details
|
Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n |
…s/dashboard into chore/retain-filter
|
Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n |
feat: temporarily add option from params in selected filters
|
Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n |
… refactor related props
…ve deployment status query
…d in SourceInfo component
…to include pipeline and external app checks
…deployment status
…selected node status
…utton interactions
… refactor/app-details
…ppDetails button to use link component
|



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
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
Checklist: