Router parsers scan the whole module, so a stray <Route> or {path} decoy becomes a route
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- tooling
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 0
- Fork
- 0
- Merge medio
- 2h 48m
- PR unite (30g)
- 8
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di usabl-dev/usabl
-
area: engine bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
Stop hook allows a stop on an unknown verdict, and the self-check prints IDLE for a null verdictApertaarea: assistants bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
area: engine bug security
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Overlay: browser context failures are counted per plugin, not per browser, and close is not sharedApertaarea: overlay bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
-
area: engine enhancement performance
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Tutte le issue di usabl-dev/usabl
Issue simili
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixForse già presa @ItsDeadlyProgrammer l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
appsmithorg/appsmith#42471 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ehmpathy/rhachet-roles-bhrain#705 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Status: Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
mermaid-js/mermaid#8546 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
braintrustdata/braintrust-sdk-javascript#2659 ·
I maintainer di solito rispondono entro 1 giorno