TOF-441: Flatten redirect chains and fix internal links to redirected URLs - #174
Open
tylergoerzen-mxp with Copilot wants to merge 6 commits into
Open
TOF-441: Flatten redirect chains and fix internal links to redirected URLs#174tylergoerzen-mxp with Copilot wants to merge 6 commits into
tylergoerzen-mxp with Copilot wants to merge 6 commits into
Conversation
… URLs Co-authored-by: tylergoerzen-mxp <259741734+tylergoerzen-mxp@users.noreply.github.com>
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Co-authored-by: tylergoerzen-mxp <259741734+tylergoerzen-mxp@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Flatten redirect chains and fix internal links to redirect sources
TOF-441: Flatten redirect chains and fix internal links to redirected URLs
Aug 18, 2026
Contributor
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| docs.json | Flattens redirect destinations, including the previously reported wildcard-matching onboarding routes. |
| changelogs.mdx | Replaces redirected documentation links with canonical destinations. |
| guides/guides-by-workflow/build-tracking-strategy.mdx | Updates onboarding links to avoid wildcard redirect sources. |
| troubleshooting/faqs.mdx | Rewrites internal links to their final canonical pages. |
Reviews (5): Last reviewed commit: "Merge branch 'main' into copilot/tof-441..." | Re-trigger Greptile
The URL rewrites preserved #fragments that no longer match a heading on the new destination, so 15 links landed at the top of the right page or, in two cases, on the wrong page entirely. Each replacement was checked against the target page's actual headings. Notable: two changelog links pointed at /docs/reports for company profiles and activation metrics, which live on group-analytics; and /docs/reports#custom-buckets was a self-link to an anchor that no longer exists, now pointing at /docs/features/custom-buckets. Also repoint 17 redirect destinations aimed at onboarding-playbook subpages that do not exist. Only guides/strategic-playbooks/ onboarding-playbook.mdx is real, and the PR already sent the content links there, so the map now agrees with them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Rec #22's acceptance is zero chains, loops, or duplicate sources. The earlier pass fixed the 24 caused by fragment-matching; 40 remained where a destination matched a wildcard source such as /changelogs/* or an exact source that had itself been repointed. Resolved each destination through the redirect graph to its final landing page. Where the inherited #anchor no longer exists on that page, dropped the anchor rather than hard-coding a dead one (9 cases). Rule count unchanged at 873 — flattened only, nothing deleted, so external backlinks on old routes still resolve. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
docs.jsoncarried 873 redirect rules, and hundreds of them pointed at another redirect source rather than a live page. Content files also linked directly to redirect sources instead of canonical URLs.Relates to: https://linear.app/mixpanel/issue/TOF-441/aeo-qw4-flatten-redirect-chains-and-fix-internal-links-to-redirect
Why this matters for AEO
Redirect chains are invisible to a human clicking a link and expensive for everything else.
This is the least glamorous item in the plan and the most mechanically verifiable: the acceptance criterion is a number, and the number is now zero.
Result
Rule count is deliberately unchanged. Old routes may hold external backlinks, so this flattens destinations rather than deleting anything.
Changes
docs.json— every chained destination resolved through the graph to its final landing page, in one pass rather than per-hopCorrections made during review
24 chains survived the first pass because the flattening matched on the full destination string including its
#fragment, so anything with an anchor never matched its source. A second pass strips the fragment before lookup.15 links kept an anchor that no longer exists on the new destination. These were already stale on
main— the old page was deleted and the fragment rode through the redirect — but the rewrite would have hard-coded them. Each replacement was verified against the target page's actual headings. Two were landing on the wrong page entirely:/docs/reports#company-profilesand#activation-metricsboth belong togroup-analytics.9 anchors were dropped rather than guessed where the heading is genuinely gone. A link to the top of the right page beats a link to a dead anchor.
17 redirect destinations pointed at
onboarding-playbooksubpages that do not exist. Onlyguides/strategic-playbooks/onboarding-playbook.mdxis real. The PR had already repointed the content links there; the map itself was still dangling.Note on sequencing
PR #180 adds a CI gate that fails the build on new chains, loops, and duplicate sources. That gate can only be enforced once this merges. Merge this first.