open-design-landing-deck can render cropped with black area on the right in artifact preview
Summary
open-design-landing-deck can render incorrectly inside the Open Design artifact preview.
In the stable desktop app, the generated HTML opens, but the preview does not show the deck cleanly: the page can appear cropped / not fully visible, with a black area on the right side.
Why this looks like a host preview bug
This does not look like a simple malformed artifact.
open-design-landing-deck is not a conventional fixed-canvas deck. It is a full-viewport horizontal swipe deck that relies on:
position: fixed100vw / 100vh- a horizontally translated flex track
- slide movement via
transform: translateX(-idx * 100vw)
The template explicitly assumes a browser-style viewport.
Relevant implementation details
The template itself sets up a full-screen horizontal track, for example in design-templates/open-design-landing-deck/example.html:
#deck { position: fixed; inset: 0; height: 100vh; display: flex; ... }.slide { width: 100vw; height: 100vh; flex: 0 0 100vw; ... }- runtime script:
deck.style.width = (total * 100) + 'vw' - runtime script:
deck.style.transform = 'translateX(' + (-idx * 100) + 'vw)'
Open Design preview, however, renders the artifact inside a sandboxed iframe and wraps it in a preview viewport / scale shell in apps/web/src/components/FileViewer.tsx.
The host also injects extra deck behavior from apps/web/src/runtime/srcdoc.ts.
That means this template is effectively running inside:
- a sandboxed iframe
- a host-managed preview viewport
- an outer scaling shell
This is likely where the incompatibility appears.
Additional evidence
The template already contains explicit comments about cooperating with Open Design's host-driven navigation, which suggests this surface is known to be special:
- it installs its own
od:slidemessage handler - it uses a
MutationObserverto stay in sync with host bridge class changes
So this is not just a generic HTML deck; it is already trying to compensate for host preview behavior.
Expected behavior
The generated open-design-landing-deck artifact should render fully within the preview canvas without cropping or a black area on the right.
Actual behavior
The HTML opens, but the preview can appear partially visible / cropped, with a black region on the right side.
Likely root cause
A compatibility issue between:
- the template's full-viewport assumptions (
fixed,100vw,100vh, horizontaltranslateXtrack) - and Open Design's iframe + preview scaling shell + injected deck bridge
Suggested investigation areas
apps/web/src/components/FileViewer.tsx- preview viewport sizing / scale shell
apps/web/src/runtime/srcdoc.ts- injected deck bridge behavior
design-templates/open-design-landing-deck/example.html- dependency on
window.innerWidth,100vw,100vh, fixed positioning
- dependency on
Nice-to-have regression coverage
Add a preview regression case for a full-viewport horizontal deck template like open-design-landing-deck to ensure:
- slide 1 is fully visible
- no black gutter appears on the right
- host-driven navigation keeps the translated track aligned with the preview viewport
Source: nexu-io/open-design