Skip to content

Conversation

@AbhishekA1509
Copy link
Member

Description

This pull request introduces improvements to AI agent context handling and debugging capabilities throughout the application, especially for resource and event listings, and updates a core dependency. The changes ensure that relevant context is consistently set and cleared, and that AI-powered explanations and debugging prompts are more informative and tailored to the user's current view. Additionally, some code cleanup and dependency updates are included.

AI Agent Context and Debugging Enhancements:

  • Added setting and clearing of AIAgentContext in ExternalFluxAppDetails to provide detailed context for AI explanations and ensure cleanup on component unmount. [1] [2] [3]
  • Improved construction of intelligenceConfig and debugAgentContext for AI explanations in resource and event lists, making prompts more descriptive and including relevant metadata. [1] [2] [3] [4]
  • Ensured consistent use of aiAgentContext in app details and status card components for more accurate AI-powered debugging. [1] [2]

Dependency Updates:

  • Updated @devtron-labs/devtron-fe-common-lib to version 1.22.0-beta-5 in package.json for improved features and bug fixes.

Code Cleanup:

  • Removed the unused EventList.tsx component and related type definitions from the codebase. [1] [2]
  • Minor import and type cleanup in resource browser components. [1] [2]

Configuration Changes:

  • Enabled Athena debug mode by adding FEATURE_ATHENA_DEBUG_MODE_ENABLE=true to .env.

Fixes # (issue)

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

@AbhishekA1509 AbhishekA1509 self-assigned this Jan 7, 2026
Copilot AI review requested due to automatic review settings January 7, 2026 09:42
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 pull request introduces an AI debug mode feature that enhances AI-powered explanations and debugging across the application. The main focus is on improving context handling for AI agents by setting and clearing AIAgentContext appropriately, and enriching AI prompts with detailed metadata about resources, events, and application states.

Key Changes:

  • Added debugAgentContext alongside intelligenceConfig for improved AI debugging capabilities with richer contextual information
  • Set and clear AIAgentContext in external app detail components (Helm, Argo, Flux) to provide AI with current application state
  • Updated dependency @devtron-labs/devtron-fe-common-lib from 1.22.0-beta-4 to 1.22.0-beta-5 and enabled Athena debug mode feature flag

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
package.json Updated devtron-fe-common-lib dependency to version 1.22.0-beta-5
yarn.lock Updated lockfile to reflect the new dependency version and checksums
.env Enabled FEATURE_ATHENA_DEBUG_MODE_ENABLE feature flag
src/index.tsx Added FEATURE_ATHENA_DEBUG_MODE_ENABLE to default environment configuration
src/config/routes.ts Refactored to use COMMON_URLS constants for external app routes
src/components/common/navigation/NavigationRoutes.tsx Added debugAgentContext state management to MainContext
src/components/v2/appDetails/ea/EAAppDetail.component.tsx Set and clear AIAgentContext for external Helm app details
src/components/externalArgoApps/ExternalArgoAppDetail.tsx Set and clear AIAgentContext for external Argo app details
src/Pages/App/Details/ExternalFlux/ExternalFluxAppDetails.tsx Set and clear AIAgentContext for external Flux app details
src/components/app/details/appDetails/AppDetails.tsx Removed optional chaining for appDetails properties in AIAgentContext
src/components/app/details/appDetails/AppStatusCard.tsx Added debugAgentContext with enriched metadata for AI debugging
src/components/v2/appDetails/k8Resource/nodeType/Node.component.tsx Added debugAgentContext for resource-level AI explanations
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/EventsTable.tsx Added debugAgentContext for event-level AI explanations with HTML-formatted prompts
src/components/ResourceBrowser/ResourceList/K8sResourceListTableCellComponent.tsx Enhanced AI context for resource browser events and resources
src/components/ResourceBrowser/ResourceList/EventList.tsx Removed unused EventList component
src/components/ResourceBrowser/Types.ts Removed unused EventListType interface

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

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 7, 2026

Base automatically changed from feat/ai-context to fix/ai-fixes January 12, 2026 10:14
@AbhishekA1509 AbhishekA1509 merged commit aa1de1c into fix/ai-fixes Jan 13, 2026
6 checks passed
@AbhishekA1509 AbhishekA1509 deleted the feat/debug-ai branch January 13, 2026 10:15
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.

3 participants