Skip to content

Optimisations by claude#3077

Open
abhibhaw wants to merge 4 commits intodevelopfrom
optimisations-by-claude
Open

Optimisations by claude#3077
abhibhaw wants to merge 4 commits intodevelopfrom
optimisations-by-claude

Conversation

@abhibhaw
Copy link
Copy Markdown
Member

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 # (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

abhibhaw and others added 2 commits March 16, 2026 23:27
Phase 3 of resource tree rewrite for dashboard:
- Add ETag header tracking in useGetDTAppDetails resource tree query
- Send If-None-Match header on polls, skip IndexStore update on 304
- Revert poll interval to 30s (safe default until NATS pipeline is validated)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 17, 2026 06:28
@github-actions
Copy link
Copy Markdown

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

Copy link
Copy Markdown
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 appears to target frontend “optimizations” by reducing resource-tree payload fetching via ETag-based conditional requests, and by documenting EA Mode (Hyperion) frontend behavior for contributors.

Changes:

  • Added an ETag-based conditional fetch for the Devtron app “resource tree” query to short-circuit on HTTP 304.
  • Introduced a React useRef to persist the last seen ETag across resource-tree refetches.
  • Extended CLAUDE.md with EA Mode (Hyperion) route/behavior notes.

Reviewed changes

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

File Description
src/components/app/service.ts Implements conditional resource-tree fetching (ETag/304) inside useGetDTAppDetails.
CLAUDE.md Adds contributor documentation describing EA Mode frontend behavior and routing.

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

Comment thread src/components/app/service.ts Outdated
appId,
envId,
])
return { result: previousData } as any
Comment thread src/components/app/service.ts Outdated
Comment on lines +136 to +137
const response = await fetch(`${window.__ORCHESTRATOR_ROOT__}/${url}`, { signal, headers })

Comment thread src/components/app/service.ts Outdated
Comment on lines 81 to 84
const queryClient = useQueryClient()
const resourceTreeQueryKey = 'dt-app-resource-tree'
const resourceTreeETagRef = useRef<string>('')

Comment thread CLAUDE.md

## EA Mode (Hyperion) Frontend Behavior

> **Deep reference**: See [EA_MODE_REFERENCE.md](../EA_MODE_REFERENCE.md) Section G for full frontend-backend mapping.
getQueryData returns raw queryFn data (pre-select), so return it
directly instead of wrapping in { result: previousData } which caused
select() to extract the full API envelope as the tree.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

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

Raw fetch() bypassed CoreAPI, breaking auth (missing credentials: 'include'),
error handling (401/403/500), and license validation in production.
ETag/304 optimization removed — incompatible with CoreAPI without extending
APIOptions in devtron-fe-common-lib first.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

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

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR:Issue-verification-failed PR:Issue-verification-failed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants