Conversation
|
🚅 Deployed to the rivet-pr-4499 environment in rivet-frontend
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR Review: refactor: uplift metricsOverall this is a solid refactor — the two-tier overview/detail architecture is a clear improvement, and several correctness bugs are fixed along the way. A few issues worth addressing before merge. Bugs / Issues1. N+1 detail query per chart card (high priority) Each // metrics-page.tsx — hoist this:
const { data: detailData, ... } = useNamespaceDetailMetrics({ namespaces: selectedNamespaces, brushDomain });
// then pass detailData/detailStartAt/detailEndAt/detailResolution as props to MetricsChart2. Stale overview window after long sessions
Consider computing the window inside a callback that runs on each refetch, or at minimum include a dependency on the refetch timestamp. 3. Dead exports (minor)
Minor Issues4. Double clamping of MAX_BRUSH_RANGE_MS
5. Resolution target not met for large brush selections
6. Extra blank lines There are double blank lines after the Positive Changes
|

Description
This pull request implements a dual-chart system for metrics visualization with brush-based zooming functionality. The changes introduce an overview chart showing 7 days of data with a brush selector, and a detail chart that displays the selected time range with higher resolution data.
Key changes include:
Type of change
How Has This Been Tested?
The changes have been tested by:
Checklist: