Skip to content

fix/links: Fix broken heading links (19 reworded, Cody / Batch Changes / Code Insights) - #1871

Open
marcleblanc2 wants to merge 2 commits into
mainfrom
fix-reworded-anchors-cody-batch-insights
Open

fix/links: Fix broken heading links (19 reworded, Cody / Batch Changes / Code Insights)#1871
marcleblanc2 wants to merge 2 commits into
mainfrom
fix-reworded-anchors-cody-batch-insights

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Linear FE-499: Fix doc site issues

Smaller, more easily reviewed subset of fixes from #1861

#anchor links under docs/cody/, docs/batch-changes/ and docs/code-insights/ whose target heading was reworded. The section still exists; the link now uses the current heading's slug.

Review: for each row, the new heading should be the same topic as the old anchor's words. Rows where the heading was replaced rather than renamed (e.g. several anchors collapsed onto one #configuration or #upgrade-types section) are the ones worth a second look.

Left alone on purpose: /batch-changes/faq#how-can-i-use-github-expression-syntax---literally-in-my-batch-spec and /batch-changes/batch-spec-cheat-sheet#write-a-github-actions-workflow-that-includes-github-expression-syntax#1861 changed them, but they work: the headings contain a link and the checker slugged only the link text (fixed in #1858).

Held back: two links in docs/batch-changes/batch-spec-yaml-reference.mdx and docs/batch-changes/site-admin-configuration.mdx share lines with fixes in #1864; they go there instead.

Checker findings (npm run check-links -- --check-anchors, from #1858, with its heading-slug fix): 278 on main → 259 on this branch.

Verification

The docs site serves its not-found page with HTTP 200 (fix in progress), so status codes prove nothing. Instead, every changed link was fetched on this PR's Vercel preview and the rendered HTML checked for two ids: the target page's own first heading (taken from its MDX source — the 404 page never has it) and the link's #fragment. Script: node dev/verify-links-live.mjs --site <preview-url>, coming in #1858.

Old links point at the current production site so you can see the breakage; new links point at the preview and land on the heading.

Checked 19 changed links against https://sourcegraph-docs-git-fix-reworded-a-b4e9fa-sourcegraph-f8c71130.vercel.app: 19 resolve, 0 fail.
Page rendered = the target page's first heading id is present (the 404 page never has it); Anchor = the #fragment is an id on the page. Old links point at the current site.

All 19 links
File containing the link Old link (broken today) New link (preview) Page rendered Anchor found
docs/batch-changes/batch-spec-templating.mdx #template-helpers-functions #template-helper-functions
docs/batch-changes/batch-spec-templating.mdx #template-helpers-functions #template-helper-functions
docs/batch-changes/batch-spec-yaml-reference.mdx #outputs-value #stepsoutputsnamevalue
docs/batch-changes/configuring-credentials.mdx #types-of-access-tokens-used-by-batch-changes #types-of-credentials-used-by-batch-changes
docs/batch-changes/create-a-batch-change.mdx /batch-changes/create-a-batch-change#previewing-workspaces /batch-changes/create-a-batch-change#previewing-batch-spec-and-workspaces
docs/batch-changes/handling-errored-changesets.mdx #manual-retrying-by-re-applying-the-batch-change-spec #manual-retrying-of-errored-changesets
docs/batch-changes/reexecuting-batch-specs-multiple-times.mdx /batch-changes/batch-spec-yaml-reference#environmentarray /batch-changes/batch-spec-yaml-reference#stepsenv
docs/code-insights/explanations/automatically-generated-data-series.mdx /code-insights/references/common-use-cases#automatic-version-and-pattern-tracking /code-insights/references/common-use-cases#versions-and-patterns
docs/code-insights/explanations/code-insights-filters.mdx /code-search/working/search-contexts#beta-query-based-search-contexts /code-search/working/search-contexts#query-based-search-contexts
docs/code-insights/how-tos/creating-a-custom-dashboard-of-code-insights.mdx /code-insights/explanations/viewing-code-insights#dashboard-visibility-respects-insights-visibility /code-insights/explanations/viewing-code-insights#dashboard-visibility
docs/code-insights/how-tos/filtering-an-insight.mdx /code-search/working/search-contexts#beta-query-based-search-contexts /code-search/working/search-contexts#query-based-search-contexts
docs/code-insights/how-tos/filtering-an-insight.mdx /code-search/working/search-contexts#beta-query-based-search-contexts /code-search/working/search-contexts#query-based-search-contexts
docs/code-insights/language-insight-quickstart.mdx /code-insights/quickstart#1-enable-the-experimental-feature-flag /code-insights/quickstart#1-if-need-be-enable-the-experimental-feature-flag
docs/code-insights/references/common-use-cases.mdx /code-insights/references/common-reasons-code-insights-may-not-match-search-results#not-including-fork-no-and-archived-no-in-your-insight-query /code-insights/references/common-reasons-code-insights-may-not-match-search-results#for-versions-pre-340-not-including-forkno-and-archivedno-in-your-insight-query
docs/cody/capabilities/agentic-context-fetching.mdx #terminal-commands #terminal-access
docs/cody/capabilities/chat.mdx /cody/capabilities/supported-models#chat-and-commands /cody/capabilities/supported-models#chat-and-prompts
docs/cody/clients/cody-with-sourcegraph.mdx /cody/capabilities/supported-models#chat-and-commands /cody/capabilities/supported-models#chat-and-prompts
docs/cody/clients/install-jetbrains.mdx /cody/core-concepts/context/#context-fetching-mechanism /cody/core-concepts/context#cody-context-fetching-features
docs/cody/clients/install-vscode.mdx /cody/core-concepts/context/#context-fetching-mechanism /cody/core-concepts/context#cody-context-fetching-features

Amp threads

@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sourcegraph-docs Ready Ready Preview Sep 7, 2026 11:33pm UTC

Request Review

@marcleblanc2 marcleblanc2 changed the title Fix broken heading links (21 reworded, Cody / Batch Changes / Code Insights) Fix broken heading links (19 reworded, Cody / Batch Changes / Code Insights) Sep 7, 2026
@marcleblanc2 marcleblanc2 changed the title Fix broken heading links (19 reworded, Cody / Batch Changes / Code Insights) fix/links: Fix broken heading links (19 reworded, Cody / Batch Changes / Code Insights) Sep 9, 2026
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.

1 participant