-
Notifications
You must be signed in to change notification settings - Fork 34
Refactor: Sandbox monitoring performance improvements and clean up #155
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ring charts - Removed the legacy live updates lifecycle management and integrated live polling directly within the React component. - Updated chart components to utilize the new `setCustomRange` method for handling zoom events. - Enhanced performance by optimizing ECharts imports and configurations for better tree-shaking. - Adjusted opacity settings for live indicators to improve visual clarity. - Cleaned up unused code and improved overall readability of the chart components.
} | ||
|
||
return snapToAxis(max * scaleFactor) | ||
} |
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.
Bug: Inconsistent Y-axis Scaling Due to Hardcoded Multiplier
The calculateYAxisMax
function uses a hardcoded 1.1
multiplier for Y-axis max calculation when the data's maximum value exceeds the provided limit
. This bypasses the configurable scaleFactor
for padding in this specific scenario, leading to inconsistent Y-axis scaling behavior.
there is still one issue with polling lifecycle management when the tab is in background. investigating |
Note
Replaces legacy chart stack with a single ECharts-based team metrics chart and shared context, centralizes metrics fetching in a core API, and removes old chart/util code.
TeamMetricsChart
(features/.../charts/team-metrics-chart/*
) andTeamMetricsCharts
wrapper to render both concurrent and start-rate charts.TeamMetricsChartsProvider
(charts-context.tsx
) with SWR-driven data and timeframe state fromuseTimeframe
.concurrent-chart.client.tsx
andstart-rate-chart.client.tsx
to useTeamMetricsChart
, newcalculateCentralTendency
, andtransformMetrics
.TeamMetricsCharts
inapp/dashboard/.../@monitoring/page.tsx
.useTeamMetrics
+ registry withuseTimeframe
; manage live updates viauseEffect
intimeframe-store.tsx
.getTeamMetricsCore
(overfetch, zero-fill, logging) and use it inapi/teams/[teamId]/metrics/route.ts
andserver/sandboxes/get-team-metrics.ts
.get-team-metrics-memo
.use-header-metrics-swr.tsx
) and header cards to use server-filled data; adjust 30‑day range usingMAX_DAYS_AGO
.calculateCentralTendency
,calculateYAxisMax
(new params), andtransformMetrics
.ui/charts/*
,use-breakpoint.ts
) and old utils (features/.../charts/utils.tsx
,start-rate-chart.tsx
).usage/chart-config.tsx
(commonXAxisProps.interval
).Written by Cursor Bugbot for commit e3c30be. This will update automatically on new commits. Configure here.
Completes ENG-3081