Skip to content

FIX: redirect legacy /targets to target registry - #2713

Merged
Roman Lutz (romanlutz) merged 3 commits into
microsoft:mainfrom
onlyysaurabh:fix/issue-2702-legacy-targets-redirect
Sep 21, 2026
Merged

Roman Lutz (romanlutz) merged 3 commits into
microsoft:mainfrom
onlyysaurabh:fix/issue-2702-legacy-targets-redirect

Conversation

@onlyysaurabh

Copy link
Copy Markdown
Contributor

Description

When target management was relocated to the Converter/Target Registry layout under /registry/targets in #2685, /targets was removed from top-level routes without a compatibility redirect. As reported in #2702, incoming traffic to /targets fell through to the wildcard * route and redirected to Home (/).

This PR:

  1. Adds <Route path="/targets" element={<Navigate to="/registry/targets" replace />} /> to frontend/src/App.tsx.
  2. Updates viewFromPath to recognize /targets as registry during route settlement.
  3. Adds a regression unit test in frontend/src/App.test.tsx verifying the redirect to /registry/targets and the layout's active view attribute.

Closes #2702

Tests and Documentation

  • Unit tests: Added test case redirects legacy /targets to the target registry in frontend/src/App.test.tsx.
  • Ran npm test -- App.test.tsx (77 passed, 77 total).
  • Ran npm run type-check (tsc --noEmit: 0 errors).
  • Ran npm run lint (eslint: 0 warnings, 0 errors).
  • Documentation: No documentation updates required (restores backward compatibility for legacy URLs).

- Add backwards-compatible redirect from /targets to /registry/targets
- Update viewFromPath to recognize /targets as registry during route settlement
- Add unit test in App.test.tsx asserting redirect and layout attribute

Closes microsoft#2702
Assert the canonical target registry URL and ensure one Back navigation returns to the preceding route.

Co-authored-by: Copilot App <[email protected]>
@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Sep 21, 2026
Merged via the queue into microsoft:main with commit f7877f6 Sep 21, 2026
41 checks passed
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.

BUG Legacy /targets links redirect to Home instead of Target Registry

2 participants