Skip to content

Map React Router frontend features#4

Open
moritzscheele wants to merge 2 commits into
openclaw:mainfrom
moritzscheele:codex/react-router-mapper
Open

Map React Router frontend features#4
moritzscheele wants to merge 2 commits into
openclaw:mainfrom
moritzscheele:codex/react-router-mapper

Conversation

@moritzscheele
Copy link
Copy Markdown

@moritzscheele moritzscheele commented May 16, 2026

Summary

  • add a deterministic React mapper for packages with a React dependency
  • map React Router <Route path element> declarations to their rendered local components
  • map React page/component files under src/pages and src/components as UI-flow slices
  • discover common nested frontend package roots such as frontend/, client/, web/, and ui/
  • document the new mapping behavior

Why

Running Clawpatch from a repository root that contains a nested Vite/React frontend currently misses that frontend unless it is modeled as a workspace. Even when pointed directly at the frontend package, the mapper mostly sees package/config surfaces instead of the user-facing routes and components that need review.

This adds first-party mapper support so React frontends are represented as reviewable feature records without repo-local adapter scripts.

Validation

  • npx --yes pnpm@11.1.2 typecheck
  • npx --yes pnpm@11.1.2 lint
  • npx --yes pnpm@11.1.2 test
  • npx --yes pnpm@11.1.2 format:check
  • npx --yes pnpm@11.1.2 build
  • built CLI maps a real repo root with a nested frontend/ package to React route/component features

Update: FastAPI support

This branch now also maps FastAPI @app / @router routes, including common include_router(..., prefix=...) wiring. I validated it against a real repo with a FastAPI backend and nested React frontend: the built CLI mapped 61 FastAPI route features in that backend, alongside the existing Python source groups.

Add deterministic React mapping for packages with React dependencies, including nested frontend packages, React Router routes, and component slices.
Extend Python mapping with deterministic FastAPI route discovery, include_router prefix handling, docs, and regression coverage.
@moritzscheele moritzscheele marked this pull request as ready for review May 16, 2026 12:49
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