Skip to content

feat(parser): object-config React Router recognition (6F.5)#47

Merged
officialCodeWork merged 1 commit into
developmentfrom
build/phase-6f/step-6f.5-object-routes
Jul 15, 2026
Merged

feat(parser): object-config React Router recognition (6F.5)#47
officialCodeWork merged 1 commit into
developmentfrom
build/phase-6f/step-6f.5-object-routes

Conversation

@officialCodeWork

Copy link
Copy Markdown
Owner

Summary

The field validation produced 0 route nodes on an app whose createBrowserRouter config is an imported identifier, composed by spreading separately-declared route arrays, with every page element wrapped in Loadable(lazy(() => import()))). This PR closes all three gaps:

  • routeArrayElements — a router config now resolves whether it's an array literal, an imported identifier (via go-to-definition), or spread-composed from other arrays; applied to both the createBrowserRouter argument and every children property; as/satisfies unwrapped; hop-bounded
  • resolveLazyVariable unwraps wrapper helpersLoadable(lazy(() => import())) resolves through to the imported page's default export, so routes-to lands on the real component
  • navigates-to effects and journeys("/") worked immediately once route nodes existed (the field's journeys regression was purely downstream of missing routes)

Milestone

With this, the field-patterns fixture is fully green with zero xfail marks — every shape from the 2026-07-15 validation (aliased barrels, RTK Query, object-config routes, lazy wrappers, wrapped tests) now scans correctly. Gate 6F's extractor criteria are met.

Verification

  • pnpm test: 209 tests green (4 new)
  • pnpm eval: 290 pass · 0 fail · 0 xfail · 0 unexpected-pass, gate OK, metrics 1.000
  • pnpm typecheck: clean

🤖 Generated with Claude Code

…preads, Loadable wrappers (6F.5)

The field app produced 0 route nodes: its createBrowserRouter config was an
imported identifier composed by spreading separately-declared route arrays,
with every page element wrapped in Loadable(lazy(() => import())).

- New routeArrayElements in routes.ts: a router config resolves whether it's
  an array literal, an imported identifier (go-to-definition), or
  spread-composed from other arrays; applied to the createBrowserRouter
  argument and every children property; as/satisfies unwrapped; hop-bounded.
- resolveLazyVariable unwraps wrapper helpers around the lazy call, so
  routes-to lands on the imported page's default export through
  Loadable(lazy(() => import())).
- navigates-to effects and journeys lit up as soon as route nodes existed.

Field-patterns golden: all 5 remaining xfails removed (3 routes, the
onClick→/users effect, the "/"→"/users" terminal journey). The fixture is now
fully green with zero marks — Gate 6F's extractor criteria are met.

4 new parser tests (209 total across packages). Eval 290 pass / 0 fail /
0 xfail / 0 unexpected-pass, gate OK, metrics 1.000.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@officialCodeWork
officialCodeWork merged commit 3667e7f into development Jul 15, 2026
1 check passed
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.

2 participants