Cookbook covers: classical artwork cards#5228
Open
NicholasKissel wants to merge 1 commit into
Open
Conversation
|
🚅 Deployed to the rivet-pr-5228 environment in rivet-frontend
|
Member
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Contributor
PR Review: Cookbook covers — classical artwork cards\n\nOverview: Replaces 1231 lines of generative SVG cover art with real classical artwork images. The index page gets animated filter transitions via framer-motion, and detail pages get a new two-column layout with an artwork hero rail. Good overall quality — a few issues worth addressing before merge.\n\n---\n\n### Potential Bugs\n\n1. Font weight regression in fonts.css — All six Perfectly Nineties at-font-face declarations have their font-weight changed from 900/800/600 to normal. When multiple at-font-face blocks share the same family + weight, the browser uses the last one — so Black, Extrabold, and Semibold all collapse to a single variant. Any site code that still requests font-weight: 900 or 600 with this family will silently render the wrong variant. If Perfectly Nineties is still in use elsewhere this is a regression; if it is now fully unused, the correct fix is to remove all six at-font-face blocks entirely rather than collapsing them.\n\n2. Slug mismatch: ai-agent-workspace vs. ai-agent-workspaces — covers.ts keys on ai-agent-workspace (singular) but the PR description says the guide is AI Agent Workspaces (plural). If the content collection slug is ai-agent-workspaces, the lookup fails silently and the card renders without artwork. Worth double-checking against the actual file name in the cookbook content collection.\n\n3. Index image optimization width is too large — index.astro requests width: 1100 for card images. At the xl breakpoint with max-w-7xl + 4-column grid + gaps, cards are roughly 280-300 px wide. Serving 1100 px webp images for 300 px display slots wastes around 4x bandwidth. A width of 400-500 px would be appropriate for these cards (the detail page hero at width: 640 is more reasonable).\n\n---\n\n### Minor Issues\n\n4. transform: scale() on an object-fit: cover image is unusual — Several covers in CookbookCard.tsx apply both objectPosition and transform: scale(1.55) to the img element. object-fit: cover already crops; stacking a CSS transform produces a visual zoom-within-zoom whose interaction with object-position is browser-dependent. A background-image approach (or CSS transform on a wrapping div) would be more predictable for future maintainers adding new artwork.\n\n5. No eager loading on the detail page hero cover — The cover image in the sidebar of [...slug].astro is above the fold and directly affects LCP. It has no loading or fetchpriority attribute, defaulting to lazy. Adding loading=eager fetchpriority=high would improve perceived performance on detail pages with a cover.\n\n6. format detection assumes only .jpg/.png — The endsWith png check would misclassify .jpeg, .webp, .avif. All current images are JPEG so this is low risk now, but a URL parse is more robust if the artwork set grows.\n\n7. live-cursors cover path inconsistency — covers.ts points live-cursors at website/images/thinking/think.jpg (and ai-agent at thinking/thinker.jpg). All other entries use website/images/cookbook/. The header comment says all new images are under website/images/cookbook/, which is misleading as written.\n\n---\n\n### What is Good\n\n- Net -995 lines — deleting the generative SVG system is a real simplification.\n- Copy button upgrade — moving from singleton id=copy-skill-btn to class-based .copy-skill-btn with data-copy correctly supports both the mobile and desktop copy buttons on the same page.\n- Promise.all for async image ops — correctly parallelises the getImage calls across all cookbook entries.\n- AnimatePresence mode=popLayout — correct mode so exiting cards leave layout immediately and surviving cards animate without a hold.\n- Decorative alt attribute — artwork images are correctly marked as decorative.\n- astro.config.mjs domain allowlist — adding assets.rivet.dev fixes both the cookbook images and the pre-existing homepage hero 403s in dev. |
e2fcfdd to
dc9bf98
Compare
dc9bf98 to
98225d8
Compare
24cc99d to
a2734e6
Compare
98225d8 to
a0f8dcf
Compare
a0f8dcf to
1d89fde
Compare
1d89fde to
105ff1d
Compare
b970268 to
b143eb4
Compare
b143eb4 to
38455e9
Compare
This was referenced Jun 12, 2026
38455e9 to
ab283d3
Compare
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.

Replaces the generative SVG poster covers on the cookbook index with classical artwork cards, and gives the cookbook detail pages a matching artwork-hero treatment. All artwork is public domain or CC0, verified against each museum's open-access designation (sourcing notes in
.context/research/cookbook-cover-image-candidates.mdin the workspace).Index page
AnimatePresence+ layout).Detail pages
Artwork set
New images are uploaded to the
rivet-assetsR2 bucket underwebsite/images/cookbook/. Covers are optimized at build time throughgetImage(webp), withassets.rivet.devadded to Astro'simage.domains(also fixes homepage hero artwork 403s in the dev server).Verification
pnpm buildpasses, including the docs code-block typecheck.Note: the parent PR picked up three unblocking fixes found along the way: the broken
pool-configuration.mdxSDK snippet (now typechecked against@rivetkit/engine-api-full), a missinginspector_tabsfield in the rivetkit-wasm actor config bridge that brokecargo buildfor the wasm crate, and@nocheckmarkers on the protocol-shape pseudo-code blocks ininspector-tabs.mdx.🤖 Generated with Claude Code