Skip to content

Gather the palette's people only on prerendered pages - #89

Merged
RobbieTheWagner merged 1 commit into
media-redesignfrom
fix/404-people
Nov 30, 2026
Merged

RobbieTheWagner merged 1 commit into
media-redesignfrom
fix/404-people

Conversation

@RobbieTheWagner

Copy link
Copy Markdown
Member

Why

We want to merge media-redesign into main with confidence. Review found that Layout.astro awaits loadPeople() for the search palette. That call fetches the feed, scans the raw XML, optimises an image per person and queries the database. [...notFound].astro is prerender = false, so every 404 on Vercel did all of that at request time. People should only be gathered at build time.

What changed

  • Layout.astro calls loadPeople() only when Astro.isPrerendered is true. Otherwise it passes []. With no people, SearchDialog opens 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 lint passed. pnpm test:unit passed 30 files and 273 tests. pnpm build passed.
  • Built pages keep their people. .vercel/output/static/index.html and about/index.html both carry a non-empty people prop on the SearchDialog island (80 people on the home page).
  • The built Vercel function no longer calls loadPeople on a 404. I copied .vercel/output/functions/_render.func, added a call counter to the bundled loadPeople, and sent requests through the entry's fetch handler.
    • Gated (this PR): /no-such-page 404, /also/missing 404, /api/nope 404. 0 calls. The HTML carries people: [].
    • Control (gate forced to true): the same requests make 1 call per HTML 404, and the HTML includes people.
  • tests/e2e/not-found.spec.ts on chromium against a dev server on :4333 passed 3 of 3.

🤖 Generated with Claude Code

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>
@vercel

vercel Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
starpod Ready Ready Preview Nov 30, 2026 2:51pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 49cc054 and 97b7ba3.

Files selected for processing: 1

  • packages/starpod/src/layouts/Layout.astro
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@RobbieTheWagner
RobbieTheWagner merged commit 7387790 into media-redesign Nov 30, 2026
9 checks passed

This branch was successfully deployed

1 active deployment
Preview — 97b7ba3c Deployed Nov 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant