feat(recipes): add recipe gallery fed by the OSS catalog - #50
Open
SPIKESPIGEL404 wants to merge 1 commit into
Open
feat(recipes): add recipe gallery fed by the OSS catalog#50SPIKESPIGEL404 wants to merge 1 commit into
SPIKESPIGEL404 wants to merge 1 commit into
Conversation
Adds /recipes and /recipes/[slug], rendered from the OSS repo's committed `dist/recipes/index.json`. The catalog is fetched at request time with a 10 minute revalidate, the same way the provider registry is read: no prebuild step and no cross-repo dispatch, so a recipe merged upstream reaches the site without a docs deploy. `BITROUTER_REPO=../bitrouter pnpm dev` previews one before it is merged. The gallery reuses the model catalog's shell — filter rail, toolbar, table and card views — with every filter, count and figure derived from the catalog itself rather than authored here. The models page's usage chart is deliberately not copied: it is fed by hardcoded arrays, and nothing on this page is allowed to be mock data. In its place is a summary computed from the recipes on screen. The detail page shows baseline vs recipe vs delta per metric, with the provenance line (evaluation, harness, config, runs, date, who measured it) directly under the numbers, the prerequisites derived from the registry, the copyable `bitrouter.yaml`, and the recipe's own long-form body. Deltas are coloured by direction of benefit rather than sign, so a −32.8% cost move and a −1.1 point accuracy move never read the same. Also adds Recipes to the header nav and the footer's Product column, sitemap entries for the gallery and every recipe, and a `Recipes` i18n namespace. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Jul 26, 2026
SPIKESPIGEL404
added a commit
that referenced
this pull request
Jul 26, 2026
sitemap.ts no longer imports @/lib/recipes-server (recipes pages stay on main's older gallery until #50 lands) and drops the zh entries, the footer loses the Recipes link and points CLI/MCP/Compare at their new docs homes, matching the deleted i18n plumbing. Fixes the CI Module-not-found error.
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.
Adds
/recipesand/recipes/[slug], rendered from the OSS repo's committeddist/recipes/index.json.Depends on bitrouter/bitrouter#756 — that PR adds the catalog. Until it merges this builds fine and the gallery renders its empty state (the fetch 404s and is logged, not thrown).
How it syncs
The catalog is fetched at request time with a 600s revalidate, the same way
lib/providers-server.tsreads the provider registry: no prebuild script, norepository_dispatch, no docs deploy. Merge a recipe upstream and it appears here within one revalidation window.BITROUTER_REPO=../bitrouter pnpm devpreviews one from a local checkout before it is merged.Layout
The gallery reuses the model catalog's shell — filter rail, toolbar, table and card views, footer count line. Every filter, count and figure is derived from the catalog itself; no option lists are authored here, so a new objective or harness appears the moment a recipe uses it.
The models page's 14-day usage chart is deliberately not copied: it is fed by hardcoded
CHART_*arrays inmodels-data.ts, and nothing on this page is mock data. In its place is a summary computed from the recipes on screen — published count, best measured saving, harnesses covered, evaluations used.The detail page shows baseline vs recipe vs delta per metric, with provenance (evaluation, harness, config, runs, date, who measured it) directly under the numbers, prerequisites derived from the registry (
moonshotai — API key,openai-codex — sign-in), the copyablebitrouter.yaml, and the recipe's long-form body.Deltas are coloured by direction of benefit, not sign — a −32.8% cost move is green and a −1.1 point accuracy move is amber.
Also
Recipesi18n namespace (en + zh).next buildpasses.Note for the reviewer
The working tree of this repo currently holds an unrelated in-flight docs restructure (new
content/docs/overview/,models-and-routing/, the/comparepage removal). None of it is in this branch — this commit is 16 files, 1732 insertions, zero deletions. Three files it touches (app/sitemap.ts,components/landing/footer-nav.ts,footer-nav.test.ts) also carry edits from that work; only the recipe hunks were staged, so expect a small conflict there when the restructure lands.🤖 Generated with Claude Code