Repository navigation
Gather the palette's people only on prerendered pages - #89
Merged
Merged
Conversation
The on-demand 404 rendered Layout, which awaited loadPeople() on every request: a feed fetch, a raw XML scan, image optimisation per person and database queries. Built pages still gather them; the 404's palette opens on episodes instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 55 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This branch was successfully deployed
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.
Why
We want to merge
media-redesigninto main with confidence. Review found thatLayout.astroawaitsloadPeople()for the search palette. That call fetches the feed, scans the raw XML, optimises an image per person and queries the database.[...notFound].astroisprerender = false, so every 404 on Vercel did all of that at request time. People should only be gathered at build time.What changed
Layout.astrocallsloadPeople()only whenAstro.isPrerenderedis true. Otherwise it passes[]. With no people,SearchDialogopens on the first eight episodes, which it already did for an empty list.getShowInfo()in the layout is not new on this branch (it is on main), so it is unchanged.Verification
pnpm lintpassed.pnpm test:unitpassed 30 files and 273 tests.pnpm buildpassed..vercel/output/static/index.htmlandabout/index.htmlboth carry a non-emptypeopleprop on the SearchDialog island (80 people on the home page).loadPeopleon a 404. I copied.vercel/output/functions/_render.func, added a call counter to the bundledloadPeople, and sent requests through the entry'sfetchhandler./no-such-page404,/also/missing404,/api/nope404. 0 calls. The HTML carriespeople: [].true): the same requests make 1 call per HTML 404, and the HTML includes people.tests/e2e/not-found.spec.tson chromium against a dev server on :4333 passed 3 of 3.🤖 Generated with Claude Code