Repository navigation
Cover the rest of the legacy paths - #193
Merged
Merged
Conversation
Deploying nemar-website with
|
| Latest commit: |
ab8e372
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://549e2772.nemar-website.pages.dev |
| Branch Preview URL: | https://feat-legacy-path-coverage.nemar-website.pages.dev |
This was referenced Jul 26, 2026
Closed
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.
Extends the legacy rewrite (#190 §2) past
/dataexplorer/detail. Follow-up to #192.The gap
getLegacyRedirectmatched exactly one path. After cutover everything else on the legacy site would 404 on the new apex — including/dataexploreritself, likely the second-most-linked legacy URL after dataset pages.I probed the live legacy origin to find what actually exists rather than guessing:
Three outcomes, by whether the new site has a counterpart
/dataexplorer/detail?dataset_id=X/dataset/X/dataexplorer,/dataexplorer/*/discover/resources/tools/members/groups/citations/about/support/loginThat last row is the one worth checking against
src/pages/: redirecting them would hide current content behind the retired version. I verified the overlap by listing the new site's routes rather than assuming.302for the ww1-bound ones is deliberate. ww1 is temporary (the live notice retires it 30 September). A cached permanent redirect would outlive the host it points at, with no way to reach the clients holding it — the hazard from #183, which is also why the ww1 bounce in #192 is a 302.Explicit list, not a catch-all
LEGACY_ONLY_PREFIXESis enumerated rather than "anything the new site doesn't route". A catch-all would sweep up genuine 404s and any future route added here before its page lands, turning a clear error into a confusing round trip to a legacy site that also lacks the path.Testing
903 passing (19 new), typecheck / lint / build clean.
Covers each outcome, subpath matching, prefix-collision rejection (
/toolsmithand/resources-newmust not match), the both-sites paths staying untouched, and the ww1-referrer rule now applying across every legacy path rather than only dataset detail.Verified against a running server:
Still pending, not blocked by this
The ww1-bound redirects only become useful once the legacy server serves
ww1.nemar.org— today it 302s every non-apex hostname back tonemar.org, and its pages emit<base href="https://nemar.org/…">. Request sent to the SDSC admin (ApacheServerAlias+ HUBzero$live_site). This PR is safe to land meanwhile: those paths don't exist on this build, so the rules are unreachable until the apex moves.