Skip to content

fix(docs): correct relative link depths across docs site#2170

Open
JasonTame wants to merge 3 commits into
microsoft:mainfrom
JasonTame:fix/docs-relative-link-depths
Open

fix(docs): correct relative link depths across docs site#2170
JasonTame wants to merge 3 commits into
microsoft:mainfrom
JasonTame:fix/docs-relative-link-depths

Conversation

@JasonTame

@JasonTame JasonTame commented Jul 12, 2026

Copy link
Copy Markdown

Description

Fixes 462 broken relative links across 54 doc pages. Astro renders page.md at /page/, adding an extra URL segment — so relative links need one more ../ than the filesystem suggests. Links using insufficient depth (e.g. ../reference/foo/ instead of ../../reference/foo/) resolved to 404s.

Fixes #2168

Type of change

  • Bug fix
  • Documentation

Testing

  • Tested locally
  • npm run build passes with starlight-links-validator reporting all internal links valid
  • Verified sample pages in browser (enterprise/apm-policy, integrations/ide-tool-integration, consumer/deploy-a-bundle)

Spec conformance (OpenAPM v0.1)

  • N/A -- this PR does not change OpenAPM-observable behaviour.

@JasonTame

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@JasonTame

JasonTame commented Jul 12, 2026

Copy link
Copy Markdown
Author

I recognise this is quite a wide change - I'm happy to break it up into smaller PRs if you prefer?

I do think the real 'solution' is to avoid reference links entirely and use absolute links, that'll be easier to test (your existing link validator plugin will handle it) and easier to write.

@JasonTame JasonTame marked this pull request as ready for review July 12, 2026 10:43
Copilot AI review requested due to automatic review settings July 12, 2026 10:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 54 out of 54 changed files in this pull request and generated no comments.

@danielmeppiel

Copy link
Copy Markdown
Collaborator

APM Review Panel: ship_now

Fixes 462 broken relative links across 54 doc pages, restoring the entire docs funnel to a navigable state.

cc @JasonTame @sergio-sisternes-epam -- a fresh advisory pass is ready for your review.

All nine panelists converge on an unambiguous ship signal. Six active reviewers examined the diff and found zero correctness defects, zero security surface changes, zero runtime code changes, and zero breaking-change risk. The doc-writer verified that all changed lines are link-depth corrections, and the docs build reports all internal links valid. Three conditional panelists correctly recused from this docs-only change.

The only substantive nit surfaced independently by the DevX UX and OSS growth reviewers is that common-errors.md uses raw filesystem paths as link display text instead of human-readable labels. This is pre-existing, not introduced by this PR, and outside the stated link-depth correction scope. Mixing cosmetic copy polish into a 54-file mechanical fix would expand the review surface for no correctness gain.

Strategically, this PR is invisible to users but load-bearing for adoption. Broken internal links erode trust when a prospective user is evaluating APM. Shipping this quickly is the right call.

Aligned with: OSS community driven: restoring 462 navigable doc links serves every community member evaluating or onboarding to APM; pragmatic as npm: docs that work on click are table-stakes ergonomics.

Growth signal. This is high-leverage invisible funnel repair across introduction, guides, enterprise, and troubleshooting pages. No launch beat is needed, but the fix should ship before outreach that drives traffic to the docs.

Panel summary

Persona B R N Takeaway
Python Architect 0 0 1 Pure docs link-depth fix; no runtime code, no architectural surface. Ship.
CLI Logging Expert 0 0 0 No CLI logging, output UX, or terminal-output contract surface touched.
DevX UX Expert 0 0 1 All link-depth corrections are directionally correct for Astro routing; no reader-intent regressions found.
Supply Chain Security Expert 0 0 0 No supply-chain surface touched, no security guidance misdirected, and no external URLs introduced.
OSS Growth Hacker 0 0 1 Fixing 462 broken links removes friction across the docs funnel.
Doc Writer 0 0 1 All changed lines are link-depth corrections; the build validates every internal link.

B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.

Top 2 follow-ups

  1. [DevX UX Expert] Replace raw filesystem-path link text in common-errors.md with human-readable labels -- troubleshooting pages are high-intent; scannable labels reduce time-to-resolution.
  2. [Doc Writer] Clarify why the PR's 462-link count differs from 416 changed lines -- some lines contain multiple links, so the counts are consistent, but a note could help future archaeology.

Architecture

classDiagram
    direction LR
    class AstroBuild {
        <<BuildTool>>
        +render(page.md) URL
    }
    class MarkdownPage {
        <<Static>>
        +relativeLinkDepth int
    }
    class StarlightLinksValidator {
        <<StaticAnalysis>>
        +validate(site) Report
    }
    note for MarkdownPage "PR scope: 54 docs pages; add one ../ per relative link"
    AstroBuild ..> MarkdownPage : renders
    StarlightLinksValidator ..> AstroBuild : validates output
    class MarkdownPage:::touched
    classDef touched fill:#fff3b0,stroke:#d47600
Loading
flowchart TD
    A["Author updates 54 docs pages"] --> B{"Each relative link gains one ../"}
    B --> C["Correct link depth in docs source"]
    C --> D["Astro renders page.md at /page/"]
    D --> E["Starlight validator confirms internal links"]
    E --> F["No runtime code touched"]
Loading

Recommendation

Ship now. Every panelist agrees, no correctness or security findings exist, and the docs build reports all internal links valid. The human-readable link-text polish in common-errors.md can ride in a future docs PR.


Full per-persona findings

Python Architect

  • [nit] Design patterns: none apply to a docs-only link correction.
    This is a straight-line mechanical correction across Markdown files. No classes, modules, runtime paths, or canonical-authority boundaries are touched.

CLI Logging Expert

No findings.

DevX UX Expert

  • [nit] common-errors.md uses filesystem paths as link text instead of human-readable labels at docs/src/content/docs/troubleshooting/common-errors.md.
    This pre-existing issue hurts scannability but is not introduced by this PR.
    Suggested: Replace path-style link text with human-readable labels in a follow-up.

Supply Chain Security Expert

No findings.

OSS Growth Hacker

  • [nit] common-errors.md uses raw path strings as link display text at docs/src/content/docs/troubleshooting/common-errors.md:24.
    Human labels would improve high-intent troubleshooting navigation, but this is pre-existing.
    Suggested: Use human-readable labels in a follow-up.

Auth Expert -- inactive

The PR touches only documentation files; no auth, token, credential, or authorization surface is affected.

Doc Writer

  • [nit] The PR body's 462-link figure is not directly inferable from 416 changed lines because some lines contain multiple links.
    This is cosmetic PR-description phrasing, not a shipped docs defect.

Test Coverage Expert -- inactive

Documentation-only PR -- no runtime code paths to defend.

Performance Expert -- inactive

The changed files are Starlight Markdown; no source, cache, transport, loop, or hot-path code is changed.

This panel is advisory. It does not block merge. Re-apply the panel-review label after addressing feedback to re-run.

Replace raw path-shaped link text with readable labels so the corrected destinations are also scannable. Addresses the DevX UX panel follow-up.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@danielmeppiel

Copy link
Copy Markdown
Collaborator

APM Review Panel: ship_now

Fixes 462 broken relative links across 54 doc pages, restoring full navigability of the Starlight docs site.

cc @JasonTame @sergio-sisternes-epam -- a fresh advisory pass is ready for your review.

All nine panel personas converged on an unconditional ship signal. Six active reviewers and three correctly inactive specialists confirm the change is documentation-only with zero runtime surface. The doc-writer validated that every destination resolves and the build is clean. The one actionable nit from the first pass -- raw path-shaped display text in common-errors.md -- was folded in 44252a9, so no residual work remains.

Strategically this is low-risk, high-trust maintenance. A docs site with 462 dead links erodes the first-click experience for every new visitor; fixing it is pure conversion hygiene. The link-occurrence count (462) and changed-source-line count (416) differ because some source lines contain multiple links; this is not a shipped defect.

Aligned with: OSS community driven: working internal links are table-stakes for contributor onboarding; pragmatic as npm: users expect every docs link to land.

Panel summary

Persona B R N Takeaway
Python Architect 0 0 0 Docs-only link-depth corrections; no runtime architecture surface touched. Ship.
CLI Logging Expert 0 0 0 No CLI logging, terminal output, or diagnostic rendering surface touched. Ship.
DevX UX Expert 0 0 0 Link-depth fixes are correct and the link-label fold improves scannability. Ship.
Supply Chain Security Expert 0 0 0 No external URLs added and no security guidance redirected. Ship.
OSS Growth Hacker 0 0 0 No conversion-surface concerns remain after the fold. Ship.
Doc Writer 0 0 0 All destinations are valid, the build is clean, and no PR-caused doc issues remain.

B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.

Architecture

classDiagram
    direction LR
    class AstroBuild {
        <<BuildPipeline>>
        +collectPages() List~MarkdownPage~
        +renderSite() void
    }
    class MarkdownPage {
        <<ValueObject>>
        +filePath str
        +relativeLinks List~str~
        +depth int
    }
    class StarlightLinksValidator {
        <<Validator>>
        +validateLinks(pages) List~BrokenLink~
        +checkDepth(link, source) bool
    }
    AstroBuild *-- MarkdownPage : collects
    AstroBuild ..> StarlightLinksValidator : invokes
    StarlightLinksValidator ..> MarkdownPage : inspects
    class MarkdownPage:::touched
    classDef touched fill:#fff3b0,stroke:#d47600
Loading
flowchart TD
    A[54 docs pages with incorrect relative links] --> B[Correct link depth prefixes]
    B --> C[Use readable labels for troubleshooting links]
    C --> D[Astro build]
    D --> E[Starlight link validation]
    E --> F[All internal links valid]
Loading

Recommendation

Ship after the parent orchestrator resolves the current branch conflict. Zero panel findings remain, the docs build is green, and all specialists agree. No panel follow-ups remain.


Full per-persona findings

Python Architect

No findings.

CLI Logging Expert

No findings.

DevX UX Expert

No findings.

Supply Chain Security Expert

No findings.

OSS Growth Hacker

No findings.

Auth Expert -- inactive

All 54 touched files are documentation; no auth, token, credential, host-classification, or authorization surface changed.

Doc Writer

No findings.

Test Coverage Expert -- inactive

Documentation-only PR -- no runtime code paths to defend.

Performance Expert -- inactive

Documentation-only PR -- no performance-relevant source changed.

Folded in this run

  • (panel) Replace raw path-shaped link display text in common-errors.md with human-readable labels -- resolved in 44252a99ed4688753184e755883d7ad32d95b8c7.

Deferred (out-of-scope follow-ups)

  • (panel) Explain the difference between 462 link occurrences and 416 changed source lines in PR metadata -- scope boundary: the PR fixes shipped documentation links; review-metadata archaeology does not change user-facing behavior and the counts are already consistent.

Lint contract

uv run --extra dev ruff check src/ tests/ and uv run --extra dev ruff format --check src/ tests/ were silent. Pylint R0801 and the auth-signal boundary check also passed. npm run build completed with all internal links valid.

CI

Latest head 44252a9: GitHub reports license/cla successful, the only check currently emitted while the branch conflict remains. No CI fix iterations were needed.

Mergeability status

Captured from gh pr view 2170 --json mergeable,mergeStateStatus,statusCheckRollup after the push.

PR head SHA CEO stance iters folds defers Copilot rounds CI mergeable mergeStateStatus notes
#2170 44252a9 ship_now 1 1 1 2 green CONFLICTING DIRTY needs rebase

Convergence

1 outer iteration; 2 Copilot rounds with zero inline comments. Final panel stance: ship_now.

Ready for maintainer review after conflict resolution.

This panel is advisory. It does not block merge. Re-apply the panel-review label after addressing feedback to re-run.

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] Broken relative links across docs

3 participants