Repository navigation
fix(settings): point telemetry help link at the real docs slug + anchor (#1474) - #1478
Merged
Merged
Conversation
…or (#1474) The "See the full payload" link in the in-panel Anonymous telemetry help paragraph (?p=admin&c=settings§ion=features) was pointing at `https://sbpp.github.io/updating/1.8-to-2.0/#telemetry`, which 404s. Two things were wrong: 1. Slug `1.8-to-2.0` — Astro derives slugs from filenames, and the docs file on disk is `docs/src/content/docs/updating/1-8-to-2-0.mdx` (dots become dashes). Deployed URL is `/updating/1-8-to-2-0/`. 2. Anchor `#telemetry` — the heading in that file is `## Anonymous telemetry`, which Starlight auto-slugs to `#anonymous-telemetry`. `#telemetry` matches no heading. Three sibling sites carried the same broken URL / matching source-file path drift: - `web/themes/default/page_admin_settings_features.tpl` (the user-reported link) - `AGENTS.md` "Build / extend the anonymous opt-out daily telemetry payload" row pointed at the wrong source-file path (`docs/src/content/docs/updating/1.8-to-2.0.mdx`, which doesn't exist) - `CHANGELOG.md` 2.0.0 Privacy subsection carried the same broken URL Regression guard ---------------- New `web/tests/integration/DocsUpgradeLinkRegressionTest.php` pins four contracts: 1. The canonical docs source file at `1-8-to-2-0.mdx` exists (a rename silently re-breaks every link). 2. That file carries the `## Anonymous telemetry` heading (a rename silently 404s every deep-link to `#anonymous-telemetry`). 3. No file under the documented scan roots (templates, page handlers, includes, scripts, API handlers, AGENTS.md, CHANGELOG.md) carries the literal `1.8-to-2.0` substring — catches both broken URLs AND broken source-file path refs in one sweep. 4. The specific template line uses the full corrected URL — a half-fix that gets one half right still fails. Pure file scanning, no DB/session/Smarty bring-up; same shape as `DeadJsCallSitesTest` / `ButtonClassChainTest`. Dev-stack symmetry ------------------ `docker-compose.yml` now mounts `./docs`, `AGENTS.md`, and `CHANGELOG.md` read-only into the web container (mirrors the existing `./docker:/var/www/html/docker:ro` pattern that lets `ProdApacheConfigTest` read production configs from inside the dev container). Without this, `./sbpp.sh test` would fail the new gate locally even though CI passes (CI's `actions/checkout@v4` sees the full repo on the runner). `docker/README.md` updated to describe the new mounts.
rumblefrog
force-pushed
the
fix/1474-telemetry-docs-link
branch
from
May 27, 2026 21:26
c2468f6 to
b6575b6
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Fixes #1474.
The Anonymous telemetry help paragraph in
?p=admin&c=settings§ion=featuresships a "See the full payload"link pointing at
https://sbpp.github.io/updating/1.8-to-2.0/#telemetry,which 404s. Two things are wrong:
1.8-to-2.0— Astro derives slugs from filenames, and thedocs source file on disk is
docs/src/content/docs/updating/1-8-to-2-0.mdx(dots become dashes). The deployed URL is
/updating/1-8-to-2-0/.#telemetry— the heading in that file is## Anonymous telemetry, which Starlight auto-slugs to#anonymous-telemetry.#telemetrymatches no heading.Three sibling sites carried the same broken URL or the matching
source-file path drift, all swept here:
web/themes/default/page_admin_settings_features.tpl— the actualuser-reported broken link.
AGENTS.md"Build / extend the anonymous opt-out daily telemetrypayload" row pointed at the wrong source file path
(
docs/src/content/docs/updating/1.8-to-2.0.mdx, which doesn't exist).CHANGELOG.md2.0.0 Privacy subsection — same broken URL.Regression guard
New
web/tests/integration/DocsUpgradeLinkRegressionTest.phppinsfour contracts:
testCanonicalDocsFileExistsAtFixedSlugPath— the docs sourcefile at
1-8-to-2-0.mdxexists. A rename silently re-breaks everypanel-side link pointing at the slug; pinning the canonical
filename here makes a future "let's clean up the slug" PR fail
the gate first.
testCanonicalDocsFileCarriesTheAnonymousTelemetryHeading—that file carries the
## Anonymous telemetryheading. A renameto
## Telemetrywould silently 404 every deep-link to#anonymous-telemetry.testNoPanelOrDocSourcesUseTheBrokenUpgradeSlug— no fileunder the documented scan roots (templates, page handlers,
includes, scripts, API handlers,
AGENTS.md,CHANGELOG.md)carries the literal
1.8-to-2.0substring. Catches both brokenURLs (
/updating/1.8-to-2.0/) and broken source-file pathreferences (
docs/src/content/docs/updating/1.8-to-2.0.mdx)with one assertion.
testTelemetryHelpLinkUsesCorrectUrlAndAnchor— the specifictemplate line uses the fully corrected URL. A half-fix that gets
one half right but the other wrong (slug right, anchor wrong, or
vice-versa) still fails.
Pure file scanning — no DB / session / Smarty bring-up. Extends
PHPUnit\Framework\TestCasedirectly (same shape asDeadJsCallSitesTest,IframeChromeAntiFoucBootloaderTest,ButtonClassChainTest).Dev-stack symmetry
docker-compose.ymlnow mounts./docs,AGENTS.md, andCHANGELOG.mdread-only into the web container. This mirrors theexisting
./docker:/var/www/html/docker:ropattern (added forProdApacheConfigTestso the dev container could read productionconfigs the runtime panel never touches). Without these mounts the
new gate would fail under
./sbpp.sh testlocally even though CIpasses — CI's
actions/checkout@v4sees the full repo on therunner.
docker/README.mdupdated to describe the new mounts.Test plan
./sbpp.sh phpstan— OK (252 files, no errors)./sbpp.sh test --filter=DocsUpgradeLinkRegressionTest— OK (4 tests, 13 assertions)./sbpp.sh test— 1075 tests pass; 6 pre-existing errors inPluginVersionResolveTest(dev container doesn't bind-mountgame/, same onmain)./sbpp.sh ts-check— clean./sbpp.sh composer api-contract— no difftestTelemetryHelpLinkUsesCorrectUrlAndAnchorANDtestNoPanelOrDocSourcesUseTheBrokenUpgradeSlug)I have read the CLA Document and I hereby sign the CLA