claude code vibe feat: add SSR'd /compare/[a]-vs-[b] head-to-head GPU comparison pages#314
Open
functionstackx wants to merge 1 commit intomasterfrom
Open
claude code vibe feat: add SSR'd /compare/[a]-vs-[b] head-to-head GPU comparison pages#314functionstackx wants to merge 1 commit intomasterfrom
functionstackx wants to merge 1 commit intomasterfrom
Conversation
Issue #267. New top-level route that renders any pair of GPUs from the HW_REGISTRY as a focused, indexable head-to-head comparison. - `/compare/[slug]` is server-rendered (`force-dynamic`) and reads from the same `cachedQuery` blob cache used by `/api/v1/benchmarks`, so the existing `/api/v1/invalidate` endpoint (which calls `purgeAll()` → `blobPurge()` + `revalidateTag('db')`) also flushes the compare pages on each ingest. No time-based revalidation. - Slug = `<a>-vs-<b>`. Canonical = alphabetical; non-canonical slugs redirect (307) to canonical so we get one URL per pair. - JSON-LD `ItemList` of `Product` entries with vendor, architecture, TDP, and best-in-class throughput / TTFT / TPOT pulled from the actual benchmark data — consumable by search engines and LLMs. - Reuses `<InferenceProvider>` + `<InferenceChartDisplay>` so the chart, table, controls, PNG/CSV export, pan/zoom, and unofficial-run overlay path all carry over unchanged. - Server picks `(precision, sequence)` defaults that maximise overlap between the two GPUs in the pair (so `/compare/h100-vs-h200` lands on FP8 instead of the global FP4 default which has no Hopper data). New `initialModel` / `initialSequence` / `initialPrecisions` props on `GlobalFilterProvider` take effect only when the URL has no override. - `InferenceProvider` gains `initialActiveHwTypes` to seed the legend filter from the slug. The existing `pendingActiveHwTypes` consumer now understands bare GPU prefixes (e.g. `h100`) in addition to full framework-suffixed hwKeys, so we can pass `[a, b]` without knowing which framework configs exist. - OG image generator at `/compare/[slug]/opengraph-image` produces a vendor-coloured side-by-side `A vs B` PNG. - Sitemap includes all C(n, 2) canonical pairs. - 14 unit tests for slug parse / canonicalize / pair-enumeration. Verified in Playwright: - /compare/h100-vs-h200 → FP8 auto-selected, H100/H200 active in legend, others dimmed; both charts render real data. - /compare/b200-vs-mi355x (cross-vendor) → both shown, real data. - /compare/h200-vs-h100 → 307 → /compare/h100-vs-h200. - /compare/a100-vs-h100 → 404. - OG image renders correctly. Co-authored-by: functionstackx <functionstackx@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Closes #267
Summary
Adds a new top-level
/compare/[slug]route that renders any pair of GPUs fromHW_REGISTRYas a focused, indexable, link-shareable head-to-head comparison.force-dynamic) with JSON-LDItemListofProductentries — vendor, arch, TDP, best-in-class throughput/TTFT/TPOT pulled from actual benchmark data.cachedQueryblob cache as/api/v1/benchmarks, so/api/v1/invalidate→purgeAll()already flushes compare pages. No time-based revalidation.<a>-vs-<b>, canonical = alphabetical; non-canonical 307 to canonical.<InferenceProvider>+<InferenceChartDisplay>— chart, table, controls, PNG/CSV, pan/zoom, unofficial-run overlay path all preserved.(precision, sequence)defaults that maximise overlap between the pair —/compare/h100-vs-h200lands on FP8 automatically, not the FP4 site-wide default which has no Hopper data./compare/[slug]/opengraph-image.Test plan
pnpm typecheckcleanpnpm lintcleanpnpm test:unit— all 1745 app tests pass (3 pre-existingpackages/dbTLS failures unrelated)/compare/h100-vs-h200renders real H100/H200 data with FP8 auto-selected/compare/b200-vs-mi355x— cross-vendor pair renders both with real data/compare/h200-vs-h100→ 307 →/compare/h100-vs-h200/compare/a100-vs-h100→ 404/compare/…?unofficialrun=…on Vercel preview🤖 Generated with Claude Code