docs.hanzo.ai: the Hanzo mark was the one icon React could not hydrate

/docs threw an uncaught "Minified React error #418" on every load, at 1280 and
at 390, on repeat runs - server HTML did not match the client. No other route
did.

The cause is one string. PROVIDER_ICONS holds vendored SVG markup injected with
dangerouslySetInnerHTML, and 51 of the 52 entries are HTML-serialized
(<path ...></path>) because they came from a fork of lobe-icons. The 52nd is
our own mark, taken straight from hanzoai/brand's logo.svg, which is XML:
<path ... /> with whitespace between elements. React 19 compares the bytes it
server-rendered against the parsed DOM, the HTML parser rewrites <path/> as
<path></path>, they differ, and hydration fails.

Measured both directions rather than argued:

  wire bytes  <svg ...> <path d="M22.21 67V44.6369H0V67H22.21Z" fill="..."/> ...
  parsed DOM  <svg ...> <path d="M22.21 67V44.6369H0V67H22.21Z" fill="..."></path> ...
  equal       false

and after: the old string does not survive an innerHTML round-trip, the new one
does, with all seven `d` attributes identical. Same geometry, same mark, HTML
serialization.

The rule is now written where the strings live, because the next icon pasted
in from a designer's export will be XML too.

Also: the "CLI" entry in content/docs/meta.json was the only one of 15 sidebar
links with no icon - visibly ragged against a column where everything else has
one. fumadocs' link syntax carries the icon in a leading bracket pair
([Icon][Text](url), core/src/source/page-tree/builder.ts:67); it was missing.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-08-05 16:46:41 -07:00
co-authored by Hanzo Dev
parent dd2600d6e8
commit f83b8300a9
2 changed files with 7 additions and 2 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -13,7 +13,7 @@
"embeddings",
"agents",
"prompts",
"[CLI](/docs/services/platform/getting-started/cli)",
"[SquareTerminal][CLI](/docs/services/platform/getting-started/cli)",
"sdks",
"mcp",
"openapi",