share-card: apply all 4 dimensions (was chain-only) - #1545
Merged
Conversation
The share-section UI (client) mirrors the whole live dimension filter set into the share-card URL (chain / region / venue / kind), but the route.tsx handler was only reading `?chain=` and ignoring the other three. A reader on /benchmarks/foo?region=us-east&venue=polymarket clicked Export and got a cross-region + cross-venue aggregate PNG that did not match what they were staring at on the dashboard. Fix: validate every declared dimension against the spec option list (same guard as chain), pass the full filter set to getBenchmark(), and concatenate the pill label with ' , ' so a Solana + US-East pin renders as 'Solana , US-East' on the card watermark. Applies to all 5 templates (ranking, leaderboard, snapshot, headline, compare) since they share this route.
Flotapponnier
added a commit
that referenced
this pull request
Jul 27, 2026
…1545) (#1546) The share-section UI (client) mirrors the whole live dimension filter set into the share-card URL (chain / region / venue / kind), but the route.tsx handler was only reading `?chain=` and ignoring the other three. A reader on /benchmarks/foo?region=us-east&venue=polymarket clicked Export and got a cross-region + cross-venue aggregate PNG that did not match what they were staring at on the dashboard. Fix: validate every declared dimension against the spec option list (same guard as chain), pass the full filter set to getBenchmark(), and concatenate the pill label with ' , ' so a Solana + US-East pin renders as 'Solana , US-East' on the card watermark. Applies to all 5 templates (ranking, leaderboard, snapshot, headline, compare) since they share this route.
Flotapponnier
added a commit
that referenced
this pull request
Jul 27, 2026
…1545) (#1548) The share-section UI (client) mirrors the whole live dimension filter set into the share-card URL (chain / region / venue / kind), but the route.tsx handler was only reading `?chain=` and ignoring the other three. A reader on /benchmarks/foo?region=us-east&venue=polymarket clicked Export and got a cross-region + cross-venue aggregate PNG that did not match what they were staring at on the dashboard. Fix: validate every declared dimension against the spec option list (same guard as chain), pass the full filter set to getBenchmark(), and concatenate the pill label with ' , ' so a Solana + US-East pin renders as 'Solana , US-East' on the card watermark. Applies to all 5 templates (ranking, leaderboard, snapshot, headline, compare) since they share this route.
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.
Export as Image PNG was rendering the aggregate view even when the user had filtered by region / venue / kind on the dashboard. The share-section client mirrored all 4 params into the URL, but the server-side route.tsx only read chain. Fix parses all 4, validates against spec.dimensions, and shows a combined pill label.