Router parsers scan the whole module, so a stray <Route> or {path} decoy becomes a route
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- tooling
Research direction
Read the parseRouteTags, parseRouterFallback, and parseDataRouterRoutes implementations, plus the init and route-manifest call paths. Compare how parseDataRouterRoutes identifies its router input and trace how parsed routes are merged. Done means both parsers only attribute routes owned by the actual router, or leave attribution null when it cannot be identified; add regression coverage for decoy route text outside the router.
Written by the indexing model from the issue text.
Description
Follow-up to #226.
What is wrong
Two router parsers read path/component text from the entire module rather than the actual router:
parseRouteTags(used byinit) scans all<Route path element>JSX in the file. A stray or commented-out<Route path="/account" element={<Decoy />} />that is not the real router is still attributed, and viamergeParsedRoutesits non-null component wins over a data-router entry, soinitcan write/account -> Decoy.tsxinto the authoritative sidecar.parseRouterFallback(used byroute-manifest) scans the whole file forpath:/path=, so an unrelated{ path: '/decoy' }object becomes a route.
Both predate #226 (init used parseRouteTags alone before), which is why they were left out of that PR.
Why it matters
An invented or mis-attributed route can map a changed file to a screen it does not render, which is false coverage. init writes a draft a human reviews, but route-manifest feeds discovery directly.
Fix
Scope both parsers to the actual router element or the create*Router(...) argument (as parseDataRouterRoutes now does), or leave attribution null when the owning router cannot be identified.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 2h 48m
- Merged PRs (30d)
- 8
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from usabl-dev/usabl
-
area: engine bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Stop hook allows a stop on an unknown verdict, and the self-check prints IDLE for a null verdictOpenarea: assistants bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
area: engine bug security
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Overlay: browser context failures are counted per plugin, not per browser, and close is not sharedOpenarea: overlay bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
area: engine enhancement performance
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
lyswhut/lx-music-desktop#3026 ·
-
area: ci type: test
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
schlessera/brain-kit#2769 ·
Maintainers usually reply within 1 day
-
Read a vector index's quantization back on Neo4j 2026.10, which reports vector.quantization.typeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
liberation-data/drivine#231 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
alveusgg/alveusgg#2502 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day