Skip to content

Fix generated reference card hydration#583

Draft
danielporterda wants to merge 1 commit into
mainfrom
generated-hydration-fix
Draft

Fix generated reference card hydration#583
danielporterda wants to merge 1 commit into
mainfrom
generated-hydration-fix

Conversation

@danielporterda
Copy link
Copy Markdown
Contributor

Summary

  • Replace generated reference-card wrapper anchors with div cards whose titles are the only links.
  • Update generated-card CSS plus downstream reference normalizers for the new x2mdx-ref-card-title markup.
  • Refresh affected checked-in generated reference pages and characterization fixtures, and fix the equivalent raw anchor markup on the PQS download page.

Root cause

The live crawl found Minified React error #418 on generated/reference pages. The shared x2mdx card macro emitted <a class="x2mdx-ref-card"> around nested block content. That invalid anchor structure caused the server-rendered DOM and hydrated React tree to diverge.

Validation

  • direnv exec /Users/danielporter/control/.worktrees/cf-docs-generated-hydration-fix python3 -m pytest tests/test_daml_json.py tests/test_openrpc.py tests/test_canton_protobuf_generator.py tests/test_asyncapi.py tests/test_json_api_openapi.py -q
  • direnv exec /Users/danielporter/control/.worktrees/cf-docs-generated-hydration-fix npx mintlify validate from docs-main
  • git diff --check
  • Chromium replay of all 40 original hosted Minified React error #418 URLs against local Mintlify preview http://localhost:3017: checked: 40, badCount: 0

Notes

npm run generate:all-reference-docs is still blocked on current main by the existing docs navigation shape mismatch: the wrappers expect navigation.dropdowns, while docs-main/docs.json now uses navigation.products. The checked-in generated output in this PR was kept targeted to the card markup change.

@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 19, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
cantonfoundation 🟢 Ready View Preview May 19, 2026, 1:50 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

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