Conversation
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>
|
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.
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
fetchfor the Devtron app “resource tree” query to short-circuit on HTTP 304. - Introduced a React
useRefto persist the last seen ETag across resource-tree refetches. - Extended
CLAUDE.mdwith 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.
| appId, | ||
| envId, | ||
| ]) | ||
| return { result: previousData } as any |
| const response = await fetch(`${window.__ORCHESTRATOR_ROOT__}/${url}`, { signal, headers }) | ||
|
|
| const queryClient = useQueryClient() | ||
| const resourceTreeQueryKey = 'dt-app-resource-tree' | ||
| const resourceTreeETagRef = useRef<string>('') | ||
|
|
|
|
||
| ## 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>
|
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>
|
Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n |
|



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