Skip to content

0.3.5 — fix every visualization fence on DSH 0.1.5 Hosts

Choose a tag to compare

@shaomingbo shaomingbo released this 12 Sep 08:23
· 1 commit to main since this release

Root cause

The published 0.1.5 frontends wrap the fence <pre> in a [data-code-block-content] seat inside md-code-block, so the language banner is the seat's previous sibling instead of the <pre>'s. The legacy DOM adapter — the only renderer seam on Hosts that lack the conversation.chat.assistant.codeBlock slot — resolved the banner with pre.previousElementSibling, which is null in that markup, so it returned no target for every code block and kept the raw source visible. Data tables (csv, tsv, json-table), Mermaid, Vega-Lite, and dsh-svg were all affected, and because the adapter fails open nothing was logged.

Fix

  • Resolve the claim anchor from the md-code-block shell, prefer the [data-code-block-banner] seat for the fence language, and accept both Host generations: the pre-0.1.5 markup (banner and <pre> as siblings) and the 0.1.5 markup (banner plus a [data-code-block-content] seat wrapping the <pre>).
  • Regression coverage: a real code-block DOM fixture captured from a running 0.1.5-rc.2 Web GUI, plus a nested-seat case and a fail-open case. 81 tests pass.
  • The verified installer matrix now includes 0.1.5-rc.2 (exact versions only: 0.1.2-alpha.3, 0.1.5-rc.1, 0.1.5-rc.2).
  • lib/ is rebuilt from src/ (bundled CSS-module class hashes are regenerated by the build).

Verified

  • 0.1.5-rc.2 Host (legacy DOM adapter, candidate build): csv renders the data table and Mermaid renders its preview; the Host block is hidden only after a valid preview exists.
  • 0.1.2-rc.1 Host: the pre-0.1.5 sibling markup still claims and renders — no regression on the previous generation.

Install or upgrade

npx --yes github:shaomingbo/dsh-visualization#v0.3.5

Restart DSH and hard-refresh the Web GUI afterwards.