Repository navigation
Conversation
|
The following comment was made by an LLM, it may be inaccurate: |
There was a problem hiding this comment.
Looks good. I ran the issue's reproduction on the base and on this branch under happy-dom. On the base, every live-block delta serializes the whole block with innerHTML; with this branch that no longer happens. For a block with several session links, the node tree built from the DOM is identical to the one the old serialize-and-parse path produced, so keys and reconcile behave the same. The markdown tests in packages/session-ui (116) and the package typecheck pass. I did not measure in Chromium or the desktop app.
Public API: unchanged. createMarkdownRenderer now takes a DOM element instead of an HTML string, but it is internal to session-ui and has a single caller.
One optional suggestion: a small test that spies on the innerHTML getter while a live block is updated would stop the round-trip from creeping back in.
Related: #54305
Issue for this PR
Closes #54428
Type of change
What does this PR do?
Live blocks currently parse HTML for decoration, serialize the decorated DOM, then parse it again for the Solid renderer. Read the decorated DOM directly instead, preserving word keys, animation and store reconciliation. Keep the old HTML-parser repair for decoration-created nested links and session buttons in raw-text/select elements, and normalize session-link text fragments to preserve keys.
This addresses the V2 DOM round-trip identified in the issue; the store-walk change in #54427 is separate.
How did you verify your code works?
Screenshots / recordings
Internal rendering-path change; no intended visual change.
Checklist
Added by the opencode bot (AI-generated).
Related: #54305