Skip to content

studio: sync with Studio SDK 2.0, fix end-to-end audit issues, add CSR/SSR and 404 guides (0.3.1) - #29

Merged
timbenniks-contentstack merged 4 commits into
contentstack:nextfrom
sumitjain-cstk:studio/sync-sdk-2.0
Nov 2, 2026
Merged

timbenniks-contentstack merged 4 commits into
contentstack:nextfrom
sumitjain-cstk:studio/sync-sdk-2.0

Conversation

@sumitjain-cstk

Copy link
Copy Markdown
Contributor

Summary

Brings the studio skill in line with @contentstack/studio-react 2.0.1 (the current npm release) and releases it as 0.3.1 on top of 0.3.0.

  • Studio SDK 2.0 sync: the Studio team's guide fixes, checked against the released SDK. Error names such as COMPONENT_NOT_REGISTERED, STACK_NOT_FOUND_ON_HOST and URL_MATCHED_NO_ENTRY, SSR styles, RSC entry, and router triggers.
  • End-to-end audit fixes, 39 issues. The skill was followed as a customer would on a Next.js 16 / React 19 storefront.
    • Builds that looked finished but were wrong:
      • A required primitive-library step in every plan.
      • One Section-per-region rule.
      • The preview hash is reset in resolveComposition, so drafts don't leak to visitors.
      • Field projection and .url image bindings.
      • Section Slot nodes omit the slot key.
      • A dev-server restart rule.
      • An SEO-safe page swap.
    • SDK code examples:
      • registerLazyComponent.
      • Required items / properties.
      • The styles group object.
      • isStudioEditorMode / isCompositionNotFound imported from studio-react.
      • SDK built-in type names.
    • New paths: an existing catch-all route, Live Preview without the Delivery SDK, Next 16 proxy.ts / Turbopack, Tailwind v4 @theme, interactive rich-text embeds, caching, and the canvas layout and headers.
    • Compositions, MCP and auth:
      • One canonical list recipe.
      • A wire-shape table for the CMA and the Compositions API.
      • The compositions content type as JSON.
      • Expected validator warnings.
      • The MCP snapshot, --scope and the hosted connector.
      • The csdx token export.
      • The delivery-token probe path.
  • New guides:
    • csr-and-ssr-requirements covers what a CSR or SSR page needs in Live Preview, Visual Editor and the canvas.
    • handle-404-pages covers the 404 branch on Next.js App / Pages Router, Remix and React Router, decided by isCompositionNotFound only.
  • 1.x → 2.0 upgrade guidance in upgrade-studio-sdk. It was checked by installing 1.9.0 and 2.0.1 side by side, and separates what 2.0 actually changed from older rules that behave the same in both.

Versions are bumped to 0.3.1 in all five manifests, with a CHANGELOG.md entry.

Verification

  • node scripts/validate.mjs passes (24 skills, 7 manifests).
  • Every relative link and anchor under skills/studio/ resolves.
  • Changed TS/TSX examples type-check (tsc --noEmit, strict) against studio-react 2.0.1, delivery-sdk 5.6.1 and live-preview-utils 4.5.3. Next.js / Remix imports used small stubs.
  • All 90 SDK imports in the skill, the studioSdk.init options and the 14 prop types match 2.0.1.

Not covered

  • No CI job that type-checks every code block yet; many blocks are fragments.
  • Not confirmed against a live stack: the hosted claude.ai MCP connector's behaviour, the Freeform flag path, and whether install-live-preview's stackSdk: stack (vs stack.config) breaks CSR draft refetches.
  • The compositions schema stores number static values as text, while the SDK types expect numbers. Changing it is a schema decision.

🤖 Generated with Claude Code

sumitjain-cstk and others added 4 commits October 30, 2026 20:53
…gent-skills into studio/sync-sdk-2.0

Resolve version conflicts: ship Studio SDK 2.0 changes as 0.3.1 on top of released 0.3.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fix all 39 issues from the Studio skill audit (Next.js 16, studio-react
2.0.1): primitive-library plan step, one Section-per-region rule, preview
hash reset in resolveComposition, field projection and image bindings,
Section Slot node shape, SDK 2.0.1 registration snippets, catch-all and
no-Delivery-SDK install paths, canonical list recipe, wire-shape table,
compositions CT as JSON, MCP snapshot/scope, and consistency fixes.

Add two guides: csr-and-ssr-requirements and handle-404-pages, routed
from skills-index. Snippets typechecked against studio-react 2.0.1 and
live-preview-utils 4.5.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
upgrade-studio-sdk: separate what 2.0 actually changed (verified by
installing 1.9.0 and 2.0.1 side by side) from older rules that behave the
same on both, and stop pointing at CHANGELOG files the npm packages don't
ship. wire-studio-state: state APIs need studio-react 1.8.0+.
discover-sections-from-ct: built-in type name `text`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sumitjain-cstk
sumitjain-cstk requested a review from a team as a code owner October 30, 2026 17:57
@snyk-io

snyk-io Bot commented Oct 30, 2026

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@timbenniks-contentstack
timbenniks-contentstack merged commit aa7ea39 into contentstack:next Nov 2, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants