Skip to content

Fix broken docs anchors and fail the build on anchor drift - #99

Merged
xinaesthete merged 1 commit into
mainfrom
claude/hopeful-antonelli-c78f36
Jul 31, 2026
Merged

Fix broken docs anchors and fail the build on anchor drift#99
xinaesthete merged 1 commit into
mainfrom
claude/hopeful-antonelli-c78f36

Conversation

@xinaesthete

@xinaesthete xinaesthete commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

What changed

Two links pointed at a stale heading slug in the vis docs:

  • docs/docs/vis/mdv-integration.mdx:104 (same-page link)
  • docs/docs/vis/mdv-release-checklist.mdx:237 (cross-page link)

Both used #issue-56-channel--extension-apis, but the heading at mdv-integration.mdx:108 reads ## Issue #56 channel and extension APIs and slugifies to #issue-56-channel-and-extension-apis. The &and rewording moved the slug and left the links behind.

Also set onBrokenAnchors: 'throw' in docs/docusaurus.config.ts.

Why

The broken anchors were emitting a Docusaurus found broken anchors! warning on main — pre-existing, not from any feature branch.

onBrokenLinks was already 'throw', so a bad path failed the build while a bad fragment only warned. That asymmetry is what let this drift sit unnoticed. Turning onBrokenAnchors up to 'throw' closes the gap, so heading renames that orphan a link fail CI instead of scrolling past in the build log.

Notes for reviewers

  • Enabling onBrokenAnchors: 'throw' doubles as the verification here: the build passing with it on proves there are zero broken anchors site-wide, not just that these two were fixed.
  • Verified with cd docs && pnpm build[SUCCESS] Generated static files in "build"., no broken-anchor warning.
  • Heads-up when reproducing: pnpm build in docs/ fails in a clean checkout (Can't resolve '@spatialdata/vis') until the workspace packages are built. Run the root pnpm build first. Unrelated to this change.
  • Docs-only, no package source touched, so no changeset.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Corrected Issue #56 cross-reference links in the integration guide and release checklist.
    • Added validation to detect broken page anchors during documentation builds.

The heading in docs/vis/mdv-integration.mdx was reworded from "&" to
"and" at some point, changing its slug to
`#issue-56-channel-and-extension-apis`, but two links still pointed at
the old `#issue-56-channel--extension-apis`. Update both.

`onBrokenLinks` was already 'throw', so a bad path failed the build
while a bad fragment only warned. Set `onBrokenAnchors: 'throw'` to
close that gap — this class of drift now fails CI instead of scrolling
past in the build log. The build passing with it enabled also confirms
there are no other broken anchors in the site.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cc6a4e95-4168-4390-a685-c161ac2c28a5

📥 Commits

Reviewing files that changed from the base of the PR and between ed2979d and d30e766.

📒 Files selected for processing (3)
  • docs/docs/vis/mdv-integration.mdx
  • docs/docs/vis/mdv-release-checklist.mdx
  • docs/docusaurus.config.ts

📝 Walkthrough

Walkthrough

The change corrects two Issue #56 documentation anchors and configures Docusaurus to throw errors when it finds broken anchors.

Changes

MDV anchor validation

Layer / File(s) Summary
Correct anchors and enable validation
docs/docs/vis/mdv-integration.mdx, docs/docs/vis/mdv-release-checklist.mdx, docs/docusaurus.config.ts
The MDV links now use the #issue-56-channel-and-extension-apis anchor. Docusaurus now uses onBrokenAnchors: 'throw'.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes both the anchor fixes and the build configuration change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/hopeful-antonelli-c78f36

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@xinaesthete
xinaesthete merged commit e350636 into main Jul 31, 2026
6 checks passed
@xinaesthete
xinaesthete deleted the claude/hopeful-antonelli-c78f36 branch July 31, 2026 12:45
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