diff --git a/benchmarks/aggregator-head-lag.yml b/benchmarks/aggregator-head-lag.yml
index 522c50c5..376f2c01 100644
--- a/benchmarks/aggregator-head-lag.yml
+++ b/benchmarks/aggregator-head-lag.yml
@@ -97,6 +97,7 @@ source: https://github.com/ChainBench/OpenChainBench/tree/main/harnesses/aggrega
chart:
default_panel_by_chain:
solana: first_share
+ hide_headline_by_chain: [solana]
metric_panels:
- id: first_share
diff --git a/src/components/benchmark-body.tsx b/src/components/benchmark-body.tsx
index 8264afaa..7076a45d 100644
--- a/src/components/benchmark-body.tsx
+++ b/src/components/benchmark-body.tsx
@@ -311,6 +311,10 @@ export function BenchmarkBody({
// while Base keeps the head lag headline. A ?view= in the URL wins on
// first paint; after that the chain tab drives it like a fresh visit.
const defaultPanelByChain = Object.values(variants)[0]?.chart?.defaultPanelByChain;
+ const hideHeadline = Boolean(
+ effectiveChain &&
+ Object.values(variants)[0]?.chart?.hideHeadlineByChain?.includes(effectiveChain),
+ );
const urlViewPinned = useRef(Boolean(urlView));
useEffect(() => {
if (!defaultPanelByChain) return;
@@ -866,6 +870,7 @@ export function BenchmarkBody({
mainDescription={benchmark.panelMainDescription}
activeId={activePanelId}
onSelect={setActivePanelId}
+ hideMain={hideHeadline}
/>
) : null;
})()}
@@ -914,6 +919,7 @@ export function BenchmarkBody({
mainDescription={benchmark.panelMainDescription}
activeId={activePanelId}
onSelect={setActivePanelId}
+ hideMain={hideHeadline}
/>
) : null;
})()}
diff --git a/src/components/metric-view-tabs.tsx b/src/components/metric-view-tabs.tsx
index 0419a5f6..8bd25ccd 100644
--- a/src/components/metric-view-tabs.tsx
+++ b/src/components/metric-view-tabs.tsx
@@ -23,12 +23,15 @@ export function MetricViewTabs({
mainDescription,
activeId,
onSelect,
+ hideMain = false,
}: {
panels: MetricPanel[];
mainLabel: string;
mainDescription?: string;
activeId: string | null;
onSelect: (id: string | null) => void;
+ /** Drop the headline tab (spec chart.hide_headline_by_chain). */
+ hideMain?: boolean;
}) {
const active = activeId == null ? null : panels.find((p) => p.id === activeId);
const activeDescription =
@@ -40,12 +43,14 @@ export function MetricViewTabs({
View
- onSelect(null)}
- />
+ {!hideMain && (
+ onSelect(null)}
+ />
+ )}
{panels.map((p) => (
;
+ hide_headline_by_chain?: string[];
};
}): Benchmark["chart"] {
if (!spec.chart) return undefined;
@@ -46,6 +47,7 @@ export function chartFromSpec(spec: {
defaultRange: spec.chart.default_range,
windowLabel: spec.chart.window_label,
defaultPanelByChain: spec.chart.default_panel_by_chain,
+ hideHeadlineByChain: spec.chart.hide_headline_by_chain,
};
}
diff --git a/src/lib/spec-schema.ts b/src/lib/spec-schema.ts
index 84071083..eb01a897 100644
--- a/src/lib/spec-schema.ts
+++ b/src/lib/spec-schema.ts
@@ -491,6 +491,13 @@ export const SpecSchema = z
z.string().regex(/^[a-z][a-z0-9_]*$/),
)
.optional(),
+ /** Chains whose headline view is removed from the view switcher
+ * (the chain must have a default_panel_by_chain entry). Solana on
+ * aggregator-head-lag: the headline is a relative lag whose leader
+ * reads 1 ms by construction, so only the panels are offered. */
+ hide_headline_by_chain: z
+ .array(z.string().regex(/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/))
+ .optional(),
})
.strict()
.optional(),
diff --git a/src/types/benchmark.ts b/src/types/benchmark.ts
index 87b0c61f..77a60292 100644
--- a/src/types/benchmark.ts
+++ b/src/types/benchmark.ts
@@ -344,6 +344,8 @@ export type Benchmark = {
windowLabel?: string;
/** Chain dimension value -> metric panel id to open on. */
defaultPanelByChain?: Record;
+ /** Chains whose headline view tab is not offered. */
+ hideHeadlineByChain?: string[];
};
/** When true the bench page renders a stacked bar chart (absolute + %
* share over time) below the main chart. Set via `stacked_share: true`