This was generated by AI during triage.
Parent
What to build
Update the route scanner and codegen to recognize error page files and separate them from regular routes.
Error page convention: A route file whose basename (minus extension) is a 3-digit HTTP status code in the 4xx–5xx range (e.g., 404.tsx, 500.tsx). Files like 200.tsx or 301.tsx remain regular routes. Error pages live in src/routes/ alongside regular routes — no new directory.
Route scanner (route-scanner.ts): scanRoutes should return error page entries separately from regular route entries. Error pages must not appear in the regular routes array.
Codegen (routes.gen.ts): The generated manifest should emit error pages as a separate export:
export const errorPages = {
404: () => import("./routes/404"),
500: () => import("./routes/500"),
};
Type codegen (framework.gen.d.ts): No new type registry needed — error pages already get type checking through defineErrorPage + TemplateRegistry.
Acceptance criteria
Blocked by
None — can start immediately.
Parent
What to build
Update the route scanner and codegen to recognize error page files and separate them from regular routes.
Error page convention: A route file whose basename (minus extension) is a 3-digit HTTP status code in the 4xx–5xx range (e.g.,
404.tsx,500.tsx). Files like200.tsxor301.tsxremain regular routes. Error pages live insrc/routes/alongside regular routes — no new directory.Route scanner (
route-scanner.ts):scanRoutesshould return error page entries separately from regular route entries. Error pages must not appear in the regular routes array.Codegen (
routes.gen.ts): The generated manifest should emit error pages as a separate export:Type codegen (
framework.gen.d.ts): No new type registry needed — error pages already get type checking throughdefineErrorPage+TemplateRegistry.Acceptance criteria
scanRoutesexcludes error pages from the regular routes arrayerrorPagesexport inroutes.gen.tswith lazy imports keyed by status code/404is gone from the routes array)200.tsx,42.tsx) remain regular routesBlocked by
None — can start immediately.