Skip to content

feat(router,server,docs): file-based routing + single-source stability matrix (#149, #150) - #160

Merged
JosunLP merged 1 commit into
devfrom
feat/open-tickets-149-150
Jun 29, 2026
Merged

feat(router,server,docs): file-based routing + single-source stability matrix (#149, #150)#160
JosunLP merged 1 commit into
devfrom
feat/open-tickets-149-150

Conversation

@JosunLP

@JosunLP JosunLP commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Works through all open GitHub issues (#149, #150) in one branch.

Closes #149
Closes #150

#149 — File-based routing with typed loaders and actions

An opt-in, bundler-agnostic file-route convention that bridges router, ssr, and server. Programmatic routing (createRouter) stays fully supported and unchanged; no bundler is shipped — the input is a manifest (a bundler glob such as import.meta.glob, or a hand-written map for zero-build).

router

  • createFileRoutes(manifest, options?){ routes, entries } — plain RouteDefinitions createRouter() already consumes.
  • parseFilePath / filePathToRoutePatternroutes/users/[id]/+page.ts/users/:id, [...rest]*, (group) dropped; flat Next/Nuxt-style files supported.
  • sortEntriesBySpecificity — static beats dynamic, catch-all sorts last (correct first-match resolution).
  • Typed Load / Action contracts; createRouteData(router) / useRouteData() run load on client navigation with stale-response guarding.

ssr — the router bridge now recognises meta.load (adapting SSRContext) alongside the legacy meta.loader, so loaders run on the server before render via createSSRRouterContext.

servermountFileRoutes(app, entries, options?) / createFileRouteServerRoutes(entries, options?) expose each route's action over HTTP (eager no-action routes are skipped; lazy ones reply 405), with an optional JSON loader endpoint under dataPath. Composes with csrf().

Docs: new File-based Routing guide + sections in router.md / server.md + sidebar entry.

#150 — Reconcile version history + per-module stability changelog

The 1.11.0 date conflict and the version drift were already resolved in earlier PRs; this finishes the issue:

  • Single source of truth: scripts/stability-matrix.mjs (canonical data) + STABILITY.md (human-facing matrix with per-module status history).
  • The README "Modules at a glance" table and the docs introduction.md matrix now reference it and are validated against it by scripts/check-stability-matrix.mjs (bun run check:stability) — so the three surfaces can no longer silently drift.
  • CHANGELOG [Unreleased] gains a "Module status" section (per the issue's proposed shape); release-notes/index.md reconciled to list 1.14.2; release-process docs document the new gate.
  • Enforced in CI via tests/check-stability-matrix.test.ts (runs in bun test, mirroring how check:full-bundle is enforced).

Validation

All green locally:

  • bun run lint · bun run lint:types · bun run test:types
  • bun run build
  • bun test2984 pass / 0 fail
  • bun run check:full-bundle · bun run check:ai-guidance · bun run check:stability

🤖 Generated with Claude Code

…ns + single-source stability matrix (#149, #150)

Closes #149, #150.

#149 — Opt-in, bundler-agnostic file-route convention with typed load/action:
- router: createFileRoutes(manifest) → RouteDefinition[] from a bundler glob or
  hand-written map; parseFilePath / filePathToRoutePattern ([id]→:id, [...rest]→*,
  (group) dropped); specificity sorting; typed Load/Action contracts;
  createRouteData/useRouteData run load on client navigation.
- ssr: router-bridge now recognises meta.load (adapting SSRContext) alongside
  meta.loader, so loaders run on the server before render.
- server: mountFileRoutes / createFileRouteServerRoutes expose each route's
  action over HTTP (skips eager no-action routes, 405 for lazy ones), with an
  optional JSON loader endpoint; composes with csrf().
- Programmatic routing unchanged; no bundler shipped. Wired into full.ts.
- Tests: tests/router-file-routes.test.ts, tests/server-file-routes.test.ts.
- Docs: new guide/file-routing.md + router.md / server.md sections + sidebar.

#150 — Single-source stability matrix + per-module stability changelog:
- scripts/stability-matrix.mjs is the canonical data; STABILITY.md is the
  human-facing source of truth with per-module status history.
- README "Modules at a glance" and docs introduction.md matrix now reference and
  are validated against it by scripts/check-stability-matrix.mjs
  (bun run check:stability), so the surfaces cannot silently drift.
- CHANGELOG gains a "Module status" section; release-notes index reconciled to
  list 1.14.2; release-process docs document the new gate.
- Test: tests/check-stability-matrix.test.ts (runs in bun test, enforcing CI).

Gates: lint, lint:types, test:types, build, bun test (2984 pass),
check:full-bundle, check:ai-guidance, check:stability all green.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8a8169d3-cfa7-4959-87ce-e57662bc9e4f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/open-tickets-149-150

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added router Changes to the router module docs Changes to the documentation tests Chenges to the tests build Changes to the build and meta files ssr Changes to the ssr module server labels Jun 29, 2026
@JosunLP
JosunLP merged commit 559ff91 into dev Jun 29, 2026
9 checks passed
@JosunLP
JosunLP deleted the feat/open-tickets-149-150 branch June 29, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Changes to the build and meta files docs Changes to the documentation router Changes to the router module server ssr Changes to the ssr module tests Chenges to the tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant