Repository navigation
fix(router): match the current URL when probing it - #288
Conversation
The probe action navigates with skipLocationChange and the router's default onSameUrlNavigation 'ignore'. For the URL the app is already on, Angular emits NavigationSkipped before recognizing routes, so the probe answered matched: false with an "ignored" reason, which reads as "no route matches this URL". The probe now passes onSameUrlNavigation 'reload', so the current URL is recognized; the probe still stops right after recognition and the URL stays the same.
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to Probing the active URL now reaches route recognition and reports a match while preserving the router URL. No merge-blocking behavior is established. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review details
Pre-merge checks |
|
What and why
The
navigatetool'sprobeaction and the panel's Probe in app button are documented as running the real matcher without navigating. #250 stopped a probe of the current URL from hanging for 10s, but the answer it now gives is still wrong. With the defaultonSameUrlNavigation: 'ignore', Angular emitsNavigationSkippedbefore route recognition, so probing the URL the app is already on returned:{ "matched": false, "reason": "Navigation to /users/8 was ignored because it is the same as the current Router URL." }That reads as "no route matches this URL", and no route, params or guards come back. Probing the current route is a natural thing to do when checking why it renders the wrong thing.
The probe now passes
onSameUrlNavigation: 'reload'along withskipLocationChange. The router recognizes the current URL, the probe aborts right afterRoutesRecognizedas it does for any other URL, androuter.urlstays the same.How it was verified
The real-Router test added in #250 now expects
matched: true(and still no timeout, with the URL unchanged). Onmainit fails withmatched: false. With the fix it passes. All package tests pass. Like the other probe tests, it is skipped before Angular 20.2.pnpm commit:check(commit messages follow the guidelines)pnpm format:checkpnpm typecheck(includes thengctemplate checks)pnpm test:devtools(all passing)pnpm skills:check(when.claude/changed): not changedno-docs)pnpm extension:buildandextension/uicommitted (whenapp/changed): not changedSummary by CodeRabbit