Repository navigation
fix: remove hydration error and Scalar spec.url deprecation warning - #588
Merged
Merged
Conversation
The Feedback widget read localStorage in its useState initializers, so the server rendered nothing while the first client render returned the Ask AI button. React logged error #418 on every doc page and re-rendered the tree on the client. Render the widget inside BrowserOnly so it mounts after hydration. Move the Scalar `url` option out of the deprecated `spec` object for both API reference pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
g-despot
approved these changes
Oct 30, 2026
g-despot
pushed a commit
that referenced
this pull request
Nov 2, 2026
* Scaffold Markdown export interfaces and plan Interface-only checkpoint for review: route-to-.md path mapping, the HTML-to-Markdown conversion contract, the postBuild plugin contract and the Accept-negotiation edge function contract. Every function throws "Not implemented"; nothing is registered in docusaurus.config.js or declared in netlify.toml, so builds and deploys are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add image rules to Markdown export contract; record review decisions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Serve a Markdown version of every docs page Build: a postBuild plugin (src/plugins/markdown-export) converts each rendered docs page to <route>.md, keeping every code tab variant with its label, admonitions as GitHub alerts, KaTeX source, images, and Mermaid source (exposed by a theme wrapper, since Mermaid renders in the browser). A conversion error fails the build. Discovery: docs pages get <link rel="alternate" type="text/markdown"> and a visually hidden notice. The markdown-negotiation edge function serves the .md to requests whose Accept header prefers text/markdown and falls back to the normal response when no .md exists. Tests run with node --test and in the PR workflow. The commented-out signalwire llms-txt config is removed; the package itself still needs `yarn remove`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: remove unused @signalwire/docusaurus-plugin-llms-txt dependency * Fix Markdown export defects found by QA of the rspack build - Table cells with block content keep one line per block, joined by <br>. - Cards that are one big link keep their content and get one link, labelled with the button text. - Font Awesome icons no longer leave empty `**` emphasis. - Admonition and details titles keep their links; bold inside a title is unwrapped instead of nested. - Mermaid source travels URI-encoded in data-markdown-content: the rspack HTML minifier turned the text `&<br>` into a <br> element. - DeploymentCards stage tabs are marked data-copy-exclude. - IdAnatomy hides its grid from screen readers and the export, and adds a visually hidden list grouped by part. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Export the Scalar REST API reference pages as Markdown Scalar renders /weaviate/api/rest and /engram/api/rest in the browser, so their HTML has nothing to convert. The plugin now converts each Scalar page's spec file (static/specs/*.json) with @scalar/openapi-to-markdown: - /weaviate/api/rest.md: introduction, then each tag's operations and a link to its file; /weaviate/api/rest/<tag>.md: the full reference for one tag. The whole document is about 490 KB, too large for one fetch. - /engram/api/rest.md: the whole reference, as its spec declares no tags. Both pages also get <link rel="alternate"> tags for the Markdown and the spec. The converter requires Node 22.19, so engines.node is raised. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix Markdown export issues found by the HTML/Markdown spot-check - Mark the "Questions and feedback" heading data-copy-exclude with a remark plugin. Its section body is already excluded, so 327 Markdown files and the "Copy page" output ended with an empty heading. - Cards with a title and description become `[Title](url): Description` instead of two links to the same URL. - Fragment links get the page URL, because Markdown headings lose custom heading IDs such as #no-vector. - Badge links under code blocks become one `See also:` line instead of links run together. - ErrorDocs step numbers are data-copy-exclude, so the Markdown no longer reads "1. 1". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Address review: redirected .md lookups, inline buttons, Node note - The edge function fetches the .md with redirect: "manual". A moved page's .md path can match a wildcard redirect (/weaviate/schema/* to /weaviate/manage-collections); following it served that page's HTML as Markdown with status 200, instead of the page's own redirect. - A button inside a paragraph keeps its text, so the quickstarts read "use the Ask AI feature" instead of "use the feature". - The README states the Node version the tests need. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Markdown export: unpadded tables and shortened vector literals Iteration 1 of the weval docs evaluation, to cut the tokens agents spend reading the Markdown pages without changing what they say. - Tables no longer pad each cell to its column's widest cell (remark-gfm tablePipeAlign: false). Padding was 53% of release-notes.md and 7% of the whole export. - A bracketed list of 16 or more numbers in a code block keeps its first three values and "...", with an italic sentence after the block. Across the build this matches only the 300- and 1,536-number embedding vectors, which were 72% of custom-vectors.md and 40% of hybrid.md. The snippets run as tests, so the source and HTML keep the full vectors. Measured on the same build/*.html, the 393 docs pages shrink by 10.2%: release-notes.md 28,044 -> 12,382 characters, custom-vectors.md 80,881 -> 21,965, env-vars.md 132,001 -> 49,332. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Markdown export: read the Scalar spec URL from configuration.url #588 moved Scalar's `url` out of the deprecated `spec` object, so the export found no API reference pages. Read `configuration.url`, and keep `spec.url` as the fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * [HUMAN] Pre-merge edits * Minor housekeeping edits * Keep // request paths on the docs origin --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What's being changed:
Fixes two console messages on docs.weaviate.io.
1. React hydration error #418 on every doc page (
src/components/Feedback/index.js)The Feedback ("Ask AI") widget read
localStoragein itsuseStateinitializers. On the server,isVisiblewasfalse, so the widget rendered nothing. In the browser's first render, it returned the Ask AI<button>. React loggedMinified React error #418(component stackat button) and re-rendered that tree on the client.The widget now renders inside Docusaurus's
<BrowserOnly>, so it mounts after hydration with its saved state. Both call sites insrc/theme/DocItem/Layout/index.jsare unchanged.2. Scalar deprecation warning on
/weaviate/api/restand/engram/api/rest(docusaurus.config.js)urlmoves fromconfiguration.spec.urltoconfiguration.url.@scalar/docusauruspassesconfigurationunchanged toScalar.createApiReference.Not in this PR: Scalar's
document validation errorswarning on the REST page. 26 Swagger definitions instatic/specs/weaviate-openapi.jsonhavepropertiesbut notype: object. Fixing that belongs upstream inweaviate/weaviateor in the overlay under_build_scripts/openapi/.Type of change:
How has this been tested?
docusaurus buildfor this branch and formain, served each build, and loaded pages in headless Chromium (Playwright). The test useddocusaurus buildrather thanyarn start.main/weaviate/weaviate/search/hybrid,/cloudmain)/weaviate/api/restspec.urldeprecation warning/engram/api/restmain)Hiding the widget (
feedbackWidgetVisible=falseinlocalStorage) and the expanded state were not tested.🤖 Generated with Claude Code