feat(parser): object-config React Router recognition (6F.5)#47
Merged
officialCodeWork merged 1 commit intoJul 15, 2026
Merged
Conversation
…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>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The field validation produced 0 route nodes on an app whose
createBrowserRouterconfig is an imported identifier, composed by spreading separately-declared route arrays, with every page element wrapped inLoadable(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 thecreateBrowserRouterargument and everychildrenproperty;as/satisfiesunwrapped; hop-boundedresolveLazyVariableunwraps wrapper helpers —Loadable(lazy(() => import()))resolves through to the imported page's default export, soroutes-tolands on the real componentnavigates-toeffects andjourneys("/")worked immediately once route nodes existed (the field'sjourneysregression 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.000pnpm typecheck: clean🤖 Generated with Claude Code