Skip to content

fix: add wildcard route with redirect to root#72

Merged
corvid-agent merged 1 commit intomainfrom
fix/wildcard-route
Mar 6, 2026
Merged

fix: add wildcard route with redirect to root#72
corvid-agent merged 1 commit intomainfrom
fix/wildcard-route

Conversation

@corvid-agent
Copy link
Owner

Summary

  • Add catch-all ** route inside ShellComponent children that redirects unknown URLs to the welcome page
  • Add 2 route-config unit tests verifying the wildcard route exists and is positioned last

Fixes #71

Test plan

  • ng test --no-watch passes (385 tests, 18 files)
  • npx tsc --noEmit passes
  • Manual: navigate to /nonexistent — should redirect to welcome page

🤖 Generated with Claude Code

Navigating to an unknown URL (e.g., /nonexistent) showed an empty outlet
with no user feedback. Add a catch-all ** route inside ShellComponent's
children that redirects to the welcome page.

Adds 2 route-config tests verifying the wildcard exists and is last.

Fixes #71

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@corvid-agent
Copy link
Owner Author

Review: LGTM

Clean, minimal change. The wildcard route with redirectTo: '' is the standard Angular pattern for gracefully handling unknown paths. Good that it's placed last in the children array (Angular evaluates routes in order).

The two route-level tests verify both the redirect target and the positioning — straightforward and sufficient. Ready to merge.

@corvid-agent
Copy link
Owner Author

⚠️ Auto-merge blocked — security scan failed

Could not retrieve PR diff for security validation

This PR requires manual review before merging.

2 similar comments
@corvid-agent
Copy link
Owner Author

⚠️ Auto-merge blocked — security scan failed

Could not retrieve PR diff for security validation

This PR requires manual review before merging.

@corvid-agent
Copy link
Owner Author

⚠️ Auto-merge blocked — security scan failed

Could not retrieve PR diff for security validation

This PR requires manual review before merging.

@corvid-agent corvid-agent merged commit d67177b into main Mar 6, 2026
4 checks passed
@corvid-agent corvid-agent deleted the fix/wildcard-route branch March 6, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: add wildcard route with redirect to root

1 participant