fix: show correct history chart data for registry/task-runner averages - #135
Merged
Conversation
The Performance Over Time history chart was showing package manager average data on the registry and task-runner average pages. While PR #134 fixed the bar charts by passing isRegistryRoute/isTaskExecutionRoute props, the underlying history data was still using the PM-only synthetic average. Changes: - useHistoryData: Extract the average computation into a reusable helper and compute three synthetic averages: 'average' (PM variations), 'registryAverage' (registry-clean, registry-lockfile), and 'taskRunnerAverage' (build, build-cache, run) - HistoryChart: When on the average variation, look up the route-specific synthetic key (registryAverage or taskRunnerAverage) instead of always using the PM average Co-authored-by: Darcy Clarke <darcy@darcyclarke.me>
darcyclarke
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Performance Over Time history chart was showing package manager average data on the registry and task-runner average pages. While PR #134 fixed the bar charts by passing
isRegistryRoute/isTaskExecutionRouteprops, the underlying history data was still using the PM-only synthetic average.Problem
When visiting
/registries/averageor/task-runners/average, the history chart looked uphistoryData.variations["average"]which was always computed from package management variations (clean,cache,lockfile, etc.). This meant the line graph showed PM average performance instead of registry/task-runner average performance.Changes
app/src/hooks/use-history-data.tscomputeSyntheticAveragehelper"average"— from PM variations (clean,node_modules,cache, etc.)"registryAverage"— from registry variations (registry-clean,registry-lockfile)"taskRunnerAverage"— from task-runner variations (build,build-cache,run)app/src/components/history-chart.tsxaveragevariation withisRegistryRoute, looks up"registryAverage"instead of"average"averagevariation withisTaskExecutionRoute, looks up"taskRunnerAverage"instead of"average""average"as beforeTesting
The fix ensures each average page's history chart matches its bar chart data source:
Co-authored-by: Darcy Clarke darcy@darcyclarke.me