fix(report): render charts for single-role runs and missing validator metrics#204
Draft
meyer9 wants to merge 1 commit into
Draft
fix(report): render charts for single-role runs and missing validator metrics#204meyer9 wants to merge 1 commit into
meyer9 wants to merge 1 commit into
Conversation
… metrics The run-comparison charts page assumed every run had both sequencer and validator metrics. For sequencer-only runs (no metrics-validator.json) two things broke: - ChartSelector fabricated a validator series for every run; fetching its missing metrics 404'd and rejected the whole Promise.all batch, blanking the page. It now emits a role series only when that role's metrics exist, and useMultipleDataSeries degrades an individual failed fetch to an empty series instead of failing the batch. - Grouping fell back to the 'role' dimension, which collapses to a single value when only one role is present, so it was dropped from the available variables. The default then pointed at an unavailable dimension and the role memo threw on variables.role[0]. useBenchmarkFilters now falls back to the first available variable (e.g. TransactionPayload) and guards the role lookup, so you can compare by transaction payload with a single role.
Collaborator
🟡 Heimdall Review Status
|
This was referenced Jul 20, 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 run-comparison charts page assumed every run has both sequencer and validator metrics. For sequencer-only runs (no
metrics-validator.json) the charts page broke in two ways. This PR makes it degrade gracefully so you can always compare runs — including grouping by Transaction Payload when only one role is present.Problems fixed
Missing-validator blanked the whole page.
ChartSelectorfabricated both asequencerand avalidatorseries for every run. Fetching the non-existent validator metrics 404'd, and that rejected the entirePromise.allbatch inuseMultipleDataSeries, so no charts rendered.result.sequencerMetrics/result.validatorMetrics), and an individual failed fetch degrades to an empty series instead of failing the batch.ChartGridalready skips empty series.Group-by broke with a single role. The default group-by is
role, but a dimension with only one value is dropped from the available variables. The default then pointed at an unavailable dimension, and therolememo threw onvariables.role[0](undefined), breaking every non-role group-by.useBenchmarkFiltersfalls back to the first available variable (e.g.TransactionPayload) when the requested group-by isn't available, and guards the role lookup with a data-derived fallback. So comparing by Transaction Payload works with a single role.Changed files
report/src/components/ChartSelector.tsx— only emit role variants that have metrics; bind UI to the effective group-by.report/src/hooks/useBenchmarkFilters.ts—effectiveByMetricfallback + saferolememo.report/src/utils/useDataSeries.ts— per-series graceful failure instead of batch rejection.report/src/pages/RunComparison.tsx— keep completed runs chartable regardless of thesuccessflag.Testing
tsc --noEmit: no new errors in the changed files.eslint: clean on the changed files.Opened as draft for review.