From d67555246e0ff15cd81e341a6a7253f488590abc Mon Sep 17 00:00:00 2001 From: Cato <41178744+catomean@users.noreply.github.com> Date: Tue, 27 Oct 2026 23:30:47 +0100 Subject: [PATCH] fix(screen): the footnote is a div, so a panel or form in it does not break hydration (#49) ChatScreen wrapped the footnote in a
. Substrata puts a key panel, a paragraph and a form in it; browsers close the
while parsing the server HTML, React hydrates a different tree and throws error #418 on /chat. Reproduced in a Substrata dev build (In HTML,
cannot be a descendant of
) and confirmed gone with a div. Class and styles unchanged. --- CHANGELOG.md | 4 ++++ dist/react/ChatApp.d.ts | 2 +- dist/react/ChatApp.d.ts.map | 2 +- dist/react/Screen.d.ts | 2 +- dist/react/Screen.d.ts.map | 2 +- dist/react/Screen.js | 2 +- dist/react/Screen.js.map | 2 +- src/react/ChatApp.tsx | 2 +- src/react/Screen.tsx | 4 ++-- test/render.test.js | 23 +++++++++++++++++++++++ 10 files changed, 36 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09afd76..5fc79f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### The footnote is a `div`, not a `p` (0.21.1) + +- `ChatScreen`'s `footnote` was wrapped in a `
`. A product that put a panel, a form or its own paragraph in it (Substrata's "Send evidence" and key panel) produced HTML a browser repairs while parsing, so React found a different tree in the browser than the server sent and threw hydration error #418 on every load of `/chat` (found 2026-10-27, reproduced in a development build: "In HTML,
cannot be a descendant of
"). The wrapper is now a `
{footnote}
} + {footnote != null &&may not contain a
or a