Repository navigation
Conversation
…dex of them Next 16 passes the sitemap id as a Promise, so Number(id) was NaN and every chunk fell through to an empty urlset. The id is now awaited. generateSitemaps only serves /sitemap/<id>.xml, so the /sitemap.xml that robots.txt advertises was a 404. Next still reserves app/sitemap.xml for app/sitemap.ts, so the index lives at /sitemap-index.xml and a rewrite serves it at /sitemap.xml.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |



The sitemap is effectively empty in production today. This fixes the two causes.
Changes
idas a Promise, soNumber(id)wasNaNand every chunk fell through toreturn [].app/sitemap.tsnow awaits it./sitemap/0.xmlreturns its 14 static URLs again and chunks 1–4 run their API fetches./sitemap.xml:generateSitemapsonly serves/sitemap/<id>.xml, so the URLrobots.tsadvertises was a 404. A new route returns a sitemap index listing the chunks fromgenerateSitemaps().app/sitemap-index.xmlplus a rewrite: Next 16.3.4 still reservesapp/sitemap.xmlwhenapp/sitemap.tsexists, and a route there fails the build with "Conflicting route and metadata at /sitemap.xml". The rewrite innext.config.jsserves the index at/sitemap.xml. It is also reachable at/sitemap-index.xml.Verified
next build+next start, andnext devagainst a mock API:/sitemap.xmlreturns the index,/sitemap/0.xmlto/sitemap/4.xmlreturn the expected URLs,/sitemap/5.xmlis a 404./sitemap.xmlreturns the index, all five chunks return URLs, and/sitemap/5.xmlis a 404, so the rewrite holds there too.Known gap, not fixed here
Against the production API, chunks 1–4 return only a fraction of the content:
The API ignores
page_size(it returns 10–100 per page),fetchAllPagesstops after 8 seconds, and repeated paging draws 429s. A timeout or 429 ends the loop and the chunk is served short or empty with a 200. This predates the PR and was hidden while every chunk was empty. Closing it needs a backend change, such as a lightweight id-and-slug endpoint or honouring a largepage_size.🤖 Generated with Claude Code