Skip to content

fix(bench): resolve {{}} placeholders on overlay fast path - #571

Merged
Flotapponnier merged 1 commit into
devfrom
fix/bench-template-overlay
Jun 19, 2026
Merged

fix(bench): resolve {{}} placeholders on overlay fast path#571
Flotapponnier merged 1 commit into
devfrom
fix/bench-template-overlay

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Bug: bench pages (FAQ, abstract, seo_intro, findings, disclaimer, per_chain_explainer) rendered literal {{p50:geckoterminal}} / {{name:slug}} tokens instead of the live values.

Root cause: overlayEditorial in spec.ts copies the raw YAML editorial fields onto the stored benchmark without running them through renderTemplate. Three call sites (lines 111, 270, 333) all hit this path. The materialise-worker path DOES call renderBenchmarkText, so a freshly materialised snapshot rendered correctly, but the fast overlay path (used when a YAML edit ships ahead of the next materialise sweep) leaked the raw tokens.

Fix: have overlayEditorial run its output through renderBenchmarkText before returning. Single line change downstream of the three call sites = single source of truth for editorial template resolution. Tests still pass (87/87). Type + lint clean.

Affects every bench page on the site. After deploy, FAQ + seo_intro + disclaimer + abstract + findings + per_chain explainer all read correctly substituted across aggregator-head-lag and every other bench.

@Flotapponnier
Flotapponnier merged commit 7256e1f into dev Jun 19, 2026
1 check passed
@Flotapponnier
Flotapponnier deleted the fix/bench-template-overlay branch June 19, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant