Router parsers scan the whole module, so a stray <Route> or {path} decoy becomes a route
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript
- Lĩnh vực
- tooling
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 0
- Fork
- 0
- Merge trung bình
- 2 giờ 48 phút
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của usabl-dev/usabl
-
area: engine bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
Stop hook allows a stop on an unknown verdict, and the self-check prints IDLE for a null verdictĐang mởarea: assistants bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
area: engine bug security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Overlay: browser context failures are counted per plugin, not per browser, and close is not sharedĐang mởarea: overlay bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
-
area: engine enhancement performance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Tất cả issue của usabl-dev/usabl
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Automattic/data-liberation-agent#953 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
README に GitHub の組織のバッジを足すĐang mởdocumentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
funmary-app/funmary#399 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:curator enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
CassioDalla/Scrinalia#150 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
status: needs-triage v1-bug-bash
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
a2ui-project/a2ui#3533 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend enhancement priority:P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
geolens-io/geolens#3310 ·
Maintainer thường phản hồi trong vòng 1 ngày