Serve the board index at /leaderboard.json - #181
Merged
Conversation
Next matches on path segments, so /leaderboard.json is a sibling of /leaderboard rather than a child: the catch-all under leaderboard/[[...path]] never saw it and the request fell through to the feed route, which answered 'no such feed: leaderboard'. Only visible in production, because a test that calls the route handler directly bypasses the router that makes the decision. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0144uEVbZK3jdaQkwcLYTXPE
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.
Follow-up to #180, caught on the live site.
/leaderboard.jsonreturned the feed route's{"error": "no such feed: leaderboard"}. Next matches on path segments, so/leaderboard.jsonis a sibling of/leaderboard, not a child, and the catch-all underleaderboard/[[...path]]never saw it. Everything under/leaderboard/was fine the whole time, including the same index at/leaderboard/index.json.The package documents
<base>.jsonas the index, and on a framework that hands every path to one handler it is. On Next it needs its own route file, which is what this adds.Worth noting how it slipped through: the pre-merge test called the route handler directly, which bypasses the router that makes this decision. Verified now by building (
/leaderboard.jsonand/leaderboard/[[...path]]both appear in the route table) and against the live site.🤖 Generated with Claude Code
https://claude.ai/code/session_0144uEVbZK3jdaQkwcLYTXPE