Router parsers scan the whole module, so a stray <Route> or {path} decoy becomes a route
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- typescript
- Área
- tooling
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 2 h 48 min
- PR fusionados (30 d)
- 8
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de usabl-dev/usabl
-
area: engine bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
-
Stop hook allows a stop on an unknown verdict, and the self-check prints IDLE for a null verdictAbiertoarea: assistants bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
area: engine bug security
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Overlay: browser context failures are counted per plugin, not per browser, and close is not sharedAbiertoarea: overlay bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
-
area: engine enhancement performance
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Todos los issues de usabl-dev/usabl
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Nimblesite/SharpLsp#468 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Bundled uv is never updated and trusts the compromised eMudhra certificatesPosiblemente ocupada @FabienDanieau la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
bg_wait's blocking mode (stopOnAttention: false) is under-documented and effectively undiscoverableAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
nicobailon/pi-subagents#3019 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
db-ux-design-system/core-web#8613 ·
Los mantenedores suelen responder en 1 día