Skip to content

Serve the board index at /leaderboard.json - #181

Merged
ralyodio merged 1 commit into
mainfrom
board-index-route
Sep 6, 2026
Merged

Serve the board index at /leaderboard.json#181
ralyodio merged 1 commit into
mainfrom
board-index-route

Conversation

@ralyodio

@ralyodio ralyodio commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #180, caught on the live site.

/leaderboard.json returned the feed route's {"error": "no such feed: leaderboard"}. Next matches on path segments, so /leaderboard.json is a sibling of /leaderboard, not a child, and the catch-all under leaderboard/[[...path]] never saw it. Everything under /leaderboard/ was fine the whole time, including the same index at /leaderboard/index.json.

The package documents <base>.json as 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.json and /leaderboard/[[...path]] both appear in the route table) and against the live site.

🤖 Generated with Claude Code

https://claude.ai/code/session_0144uEVbZK3jdaQkwcLYTXPE

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
@ralyodio
ralyodio merged commit 859cb75 into main Sep 6, 2026
3 checks passed
@ralyodio
ralyodio deleted the board-index-route branch September 6, 2026 03:15
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