chore: remove broken roadmap redirect from navigation - #2774
Merged
Conversation
🧪 Review environmenthttps://vcbxouxfl5fiku2d46d42qt6ha0wwagf.lambda-url.ca-central-1.on.aws/ |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the legacy /features/roadmap internal redirect endpoint and its related navigation endpoint references, to prevent users from hitting a broken redirect path.
Changes:
- Removed the
/features/roadmapinternal redirect route registration fromapp/main/views/index.py. - Removed
redirect_roadmapfrom navigation endpoint exclusion lists inHeaderNavigationandOrgNavigation(app/navigation.py).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| app/navigation.py | Drops redirect_roadmap from navigation endpoint lists so the removed endpoint is no longer referenced there. |
| app/main/views/index.py | Removes the /features/roadmap redirect route decorator so that endpoint is no longer registered. |
Suppressed comments (2)
app/main/views/index.py:378
- With the /features/roadmap route removed, requests to /features/roadmap will now fall through to the catch-all page_content route and trigger WordPress lookups. Because get_page_by_slug_with_cache does not cache misses, a missing slug results in at least 2 WP calls per request (initial lookup + _try_alternate_language) before returning 404, which can create unnecessary upstream load if this URL is still being hit.
# --- Internal Redirects --- #
@main.route("/features/email", endpoint="redirect_email")
@main.route("/features/sms", endpoint="redirect_sms")
@main.route("/features/letters", endpoint="redirect_letters")
def old_page_redirects():
app/main/views/index.py:378
- This change removes the explicit /features/roadmap redirect behavior, but there’s no regression test covering that /features/roadmap no longer 500s (similar redirect routes are covered in tests/app/main/views/test_index.py). Adding a test that requests /features/roadmap and asserts a non-500 outcome (ideally a stable status like 404 or a specific redirect) would prevent this bug from reappearing.
# --- Internal Redirects --- #
@main.route("/features/email", endpoint="redirect_email")
@main.route("/features/sms", endpoint="redirect_sms")
@main.route("/features/letters", endpoint="redirect_letters")
def old_page_redirects():
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
456
to
460
| "new_password", | ||
| "redirect_contact", | ||
| "redirect_service_dashboard", | ||
| "redirect_terms", | ||
| "redirect_roadmap", | ||
| "redirect_email", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary | Résumé
This pull request removes the internal redirect and navigation references for the
/features/roadmaproute, effectively deprecating or removing the roadmap feature from the application's navigation and routing.Navigation and routing updates:
/features/roadmapinternal redirect route fromindex.py, so users can no longer access it via that endpoint."redirect_roadmap"from bothHeaderNavigationandOrgNavigationinnavigation.py, so the roadmap is no longer present in the application's navigation menus. [1] [2]Test instructions | Instructions pour tester la modification
/features/roadmapdoes not result in a 500 error