Skip to content

mcp-data-platform-v1.40.2

Choose a tag to compare

@github-actions github-actions released this 12 Mar 17:19
· 258 commits to main since this release
b5d01fa

Thumbnail Capture Quality Fixes

This release fixes four distinct quality issues with the asset thumbnail capture system introduced in v1.40.0.

JSX Asset Rendering

JSX assets now produce rendered dashboard thumbnails instead of blank or raw-source captures. A new buildJsxThumbnailHtml function transpiles JSX via sucrase and scaffolds a complete HTML document with an import map and auto-mount — the same rendering pipeline used by JsxRenderer — with a 2-second ready delay to allow async esm.sh module loads before capture.

Desktop-Scale Viewport for HTML Assets

HTML iframe captures now render at 1280×960 and scale down to the 400×300 thumbnail via html2canvas, so desktop-designed dashboard layouts appear realistic instead of being squeezed into a mobile-width viewport. New RENDER_WIDTH / RENDER_HEIGHT constants control the pre-scale dimensions.

Markdown Prose Rendering

Markdown thumbnails previously rendered blank because the DomCapture component relied on Tailwind prose classes that weren't available in the off-screen container. The fix replaces Tailwind classes with self-contained inline CSS styles (.thumb-prose) and switches from left: -9999 positioning to visibility: hidden so layout flow is preserved for html-to-image.

Thumbnail Regeneration on Save

Editing and saving an asset's content now triggers automatic thumbnail regeneration. A thumbnailStale flag is set on successful save, which remounts the ThumbnailGenerator with the updated content via a React key change. The flag resets on capture completion or failure through new onDone / onFailed callbacks.

Changed Files

  • ui/src/components/AssetViewer.tsx — thumbnailStale state, save-triggered regen, onDone/onFailed wiring
  • ui/src/components/ThumbnailGenerator.tsx — JSX content type routing, RENDER_WIDTH/HEIGHT viewport, Markdown inline styles
  • ui/src/lib/thumbnail.ts — buildJsxThumbnailHtml, RENDER_WIDTH/HEIGHT constants, html2canvas scale config