Files
webstudio/packages/sdk-components-react
Oleg Isonen bc29c51be8 fix: Recover Linux screenshots and fragment captures (#6589)
# Screenshot failures on Linux and fragment captures

On the reported Linux host, Chrome aborted before screenshot capture.
This PR keeps the normal launch unchanged and makes the existing second
attempt use Chrome's shared-memory fallback on Linux. The original host
is unavailable, so this is a best-effort recovery, not a proven fix for
that host.

On #6580's project, a fragment URL made Webstudio mark a navigation link
active in the browser while the server rendered it inactive. That
mismatch caused a React hydration warning, which the current MCP
screenshot tool correctly rejected. The link now renders consistently
during hydration and becomes active afterward. The exact project's
managed MCP responsive capture then succeeded twice at desktop and
mobile sizes; both PNG files existed.

Closes #6587
Closes #6580

## Work

- [x] Add a Linux-only fallback on the existing browser startup retry.
- [x] Add a regression test that fails without the Linux fallback.
- [x] Make initial fragment-link rendering match server and browser
during hydration; preserve active-link behavior afterward.
- [x] Add a hydration regression test that fails before and passes after
the fix.
- [x] Verify the exact-project managed MCP fragment capture at 1440×900
and 390×844, `waitUntil: load`, `waitForSelector: img`.
- [x] Review `docs/`: the existing link and screenshot instructions
remain accurate; no docs edit is needed.
- [x] Run focused Vision/CLI, link and router-link tests; relevant
typechecks, formatting, lint, builds, and diff checks.
- [x] Independently review the complete diff.
- [x] Review required CI checks: all checks on `e79053414e` passed
(visual regression was skipped by its workflow).

Remaining costs and limits: a Linux browser still makes the first
startup attempt before the fallback. The fragment capture still needs
the generated preview and browser startup. The original CLI 0.306.0
second-viewport timeout and the Linux reporter's host were not retested
with this patch. This PR does not add a diagnostic PNG on readiness
timeout or a new section-scroll control. We are closing these reports on
merge with those limits understood; if the symptoms recur, they need a
new report.
2026-10-24 01:16:54 +02:00
..

Webstudio React Components

Production React implementations of the Webstudio component library.

Component Registry Metadata

Webstudio component discovery uses a shadcn-compatible registry item shape with Webstudio-specific metadata stored in meta. The top-level registry fields stay compatible with shadcn conventions, while meta.runtime, meta.authoring, and meta.builder describe Webstudio component ids, props, content models, templates, insertion rules, and Builder/MCP guidance.

This package is not published as an installable shadcn registry yet; the shape is used internally by Builder and MCP discovery.

Package boundary

Owns React implementations of production components. Keep components portable across host applications: Builder-only editing UI and router integrations belong in separate packages. Put shared contracts in the SDK and framework integrations in adapters.