fix: derive the Studio serving patterns from the route contract
`/studio/releases` answered a plain-text 404 from nginx. The route existed, the chunk was built, and the SPA could reach the screen by client-side navigation — but a hard load or a reload never got that far, because the web server had never been told the path exists. The public half of the serving contract derives its patterns from the route registry. The Studio half was a hand-maintained array, and it failed the way hand-maintained arrays fail: the comment above `^/studio/assets$` records that exact bug being fixed once already, and adding a route repeated it immediately. Both halves now come from the same source, so a Studio route that exists is served without anyone having to remember. Deriving them yields one pattern per route rather than the old alternation that folded the four document sub-screens together. Same matched set, and it no longer needs a human to keep the grouping honest.
This commit is contained in:
@@ -9,6 +9,10 @@ const publicRoutePaths = Object.values(TECH_LOG_ROUTE_REGISTRY)
|
||||
.filter((route) => route.layoutGroup === "PUBLIC")
|
||||
.map((route) => route.path);
|
||||
|
||||
const contract = createTechLogServingContract({ publicRoutePaths });
|
||||
const studioRoutePaths = Object.values(TECH_LOG_ROUTE_REGISTRY)
|
||||
.filter((route) => route.layoutGroup === "STUDIO")
|
||||
.map((route) => route.path);
|
||||
|
||||
const contract = createTechLogServingContract({ publicRoutePaths, studioRoutePaths });
|
||||
|
||||
await writeTechLogServingArtifact({ distRoot: "dist", contract });
|
||||
|
||||
Reference in New Issue
Block a user