From 6fbf600670fdb62f65ddd39c26cdb8e648faaf08 Mon Sep 17 00:00:00 2001 From: hitesh-shetty-cstk Date: Wed, 2 Sep 2026 18:26:59 +0530 Subject: [PATCH 01/21] feat(skills): rebuild live-preview support skill as a diagnostic protocol Rename cms-live-preview-visual-builder-support-assistant to cms-live-preview-visual-editor-support-assistant and rebuild it from one 268-line prose file into a 7-step intake protocol plus 12 reference files. - SKILL.md: fixed protocol (product -> setup or regression -> Onboarding Check -> detect framework and rendering mode from code -> logs -> localise to one of four setup contracts -> fix, verify, or hand to Support), with a stop rule so evidence collection ends once a contract is localised - onboarding-check.md: the setup-status gates as implemented in the editor; only the first failing gate is shown, and Live Preview, Visual Editor and Timeline resolve an unset visibility setting differently - rendering-modes.md, frameworks.md, setup-docs.md: contract per rendering mode, init placement per framework, official docs as the setup source - faq-*.md and symptom-index.md: 40 symptom / cause / fix / verification entries split by product (setup, preview runtime, Visual Editor, Timeline) - contact-support.md: causes outside the application plus a handover-note template; console-noise.md: console output seen on healthy setups - Terminology section: Visual Builder and Visual Editor are the same product - router row updated; cursor/ and codex/ regenerated Claims about product bug state, fix versions and Launch-hosting specifics were removed on purpose so the skill does not go stale as fixes ship. Co-Authored-By: Claude --- codex/AGENTS.md | 2 +- .../SKILL.md | 266 ------------ .../SKILL.md | 366 +++++++++++++++++ .../references/console-noise.md | 41 ++ .../references/contact-support.md | 61 +++ .../references/faq-preview-runtime.md | 161 ++++++++ .../references/faq-setup.md | 377 ++++++++++++++++++ .../references/faq-timeline.md | 39 ++ .../references/faq-visual-editor.md | 100 +++++ .../references/frameworks.md | 172 ++++++++ .../references/onboarding-check.md | 110 +++++ .../references/preflight-checklist.md | 93 +++++ .../references/rendering-modes.md | 126 ++++++ .../references/setup-docs.md | 71 ++++ .../references/symptom-index.md | 69 ++++ cursor/rules/00-router.mdc | 2 +- ...eview-visual-builder-support-assistant.mdc | 269 ------------- ...review-visual-editor-support-assistant.mdc | 369 +++++++++++++++++ skills/CLAUDE.md | 2 +- .../SKILL.md | 269 ------------- .../SKILL.md | 369 +++++++++++++++++ .../references/console-noise.md | 41 ++ .../references/contact-support.md | 61 +++ .../references/faq-preview-runtime.md | 161 ++++++++ .../references/faq-setup.md | 377 ++++++++++++++++++ .../references/faq-timeline.md | 39 ++ .../references/faq-visual-editor.md | 100 +++++ .../references/frameworks.md | 172 ++++++++ .../references/onboarding-check.md | 110 +++++ .../references/preflight-checklist.md | 93 +++++ .../references/rendering-modes.md | 126 ++++++ .../references/setup-docs.md | 71 ++++ .../references/symptom-index.md | 69 ++++ 33 files changed, 3947 insertions(+), 807 deletions(-) delete mode 100644 codex/cms-live-preview-visual-builder-support-assistant/SKILL.md create mode 100644 codex/cms-live-preview-visual-editor-support-assistant/SKILL.md create mode 100644 codex/cms-live-preview-visual-editor-support-assistant/references/console-noise.md create mode 100644 codex/cms-live-preview-visual-editor-support-assistant/references/contact-support.md create mode 100644 codex/cms-live-preview-visual-editor-support-assistant/references/faq-preview-runtime.md create mode 100644 codex/cms-live-preview-visual-editor-support-assistant/references/faq-setup.md create mode 100644 codex/cms-live-preview-visual-editor-support-assistant/references/faq-timeline.md create mode 100644 codex/cms-live-preview-visual-editor-support-assistant/references/faq-visual-editor.md create mode 100644 codex/cms-live-preview-visual-editor-support-assistant/references/frameworks.md create mode 100644 codex/cms-live-preview-visual-editor-support-assistant/references/onboarding-check.md create mode 100644 codex/cms-live-preview-visual-editor-support-assistant/references/preflight-checklist.md create mode 100644 codex/cms-live-preview-visual-editor-support-assistant/references/rendering-modes.md create mode 100644 codex/cms-live-preview-visual-editor-support-assistant/references/setup-docs.md create mode 100644 codex/cms-live-preview-visual-editor-support-assistant/references/symptom-index.md delete mode 100644 cursor/rules/07-cms-live-preview-visual-builder-support-assistant.mdc create mode 100644 cursor/rules/07-cms-live-preview-visual-editor-support-assistant.mdc delete mode 100644 skills/cms-live-preview-visual-builder-support-assistant/SKILL.md create mode 100644 skills/cms-live-preview-visual-editor-support-assistant/SKILL.md create mode 100644 skills/cms-live-preview-visual-editor-support-assistant/references/console-noise.md create mode 100644 skills/cms-live-preview-visual-editor-support-assistant/references/contact-support.md create mode 100644 skills/cms-live-preview-visual-editor-support-assistant/references/faq-preview-runtime.md create mode 100644 skills/cms-live-preview-visual-editor-support-assistant/references/faq-setup.md create mode 100644 skills/cms-live-preview-visual-editor-support-assistant/references/faq-timeline.md create mode 100644 skills/cms-live-preview-visual-editor-support-assistant/references/faq-visual-editor.md create mode 100644 skills/cms-live-preview-visual-editor-support-assistant/references/frameworks.md create mode 100644 skills/cms-live-preview-visual-editor-support-assistant/references/onboarding-check.md create mode 100644 skills/cms-live-preview-visual-editor-support-assistant/references/preflight-checklist.md create mode 100644 skills/cms-live-preview-visual-editor-support-assistant/references/rendering-modes.md create mode 100644 skills/cms-live-preview-visual-editor-support-assistant/references/setup-docs.md create mode 100644 skills/cms-live-preview-visual-editor-support-assistant/references/symptom-index.md diff --git a/codex/AGENTS.md b/codex/AGENTS.md index e86f870..69f4fef 100644 --- a/codex/AGENTS.md +++ b/codex/AGENTS.md @@ -8,8 +8,8 @@ Use the table below to route a user request to the right skill. Each row maps a | Use when users want to migrate, move, switch, port, or re-platform from Contentful to Contentstack, including content models, content, assets, locales, application integrations, website code, migration prerequisites, migration progress checks, or post-migration validation. | [contentstack-migration-companion](./migration-companion/SKILL.md) | | Use when a user wants to migrate Contentstack Delivery SDK code from JavaScript to TypeScript. | [dx-migrate-js-to-ts-sdk](./dx-migrate-js-to-ts-sdk/SKILL.md) | | Use when a user asks for Contentstack Delivery SDK code, query examples, helper functions, SDK setup, stack initialization, reference inclusion, filtering, sorting, pagination, typed entry fetching, asset fetching, Live Preview setup, Visual Builder support, SSR preview handling, or debugging SDK query chains. | [dx-delivery-sdk](./dx-delivery-sdk/SKILL.md) | +| Use for any Contentstack Live Preview, Visual Editor or Visual Builder question (Visual Editor and Visual Builder are the same product), whether setting it up or debugging it: first-time integration in any framework, SDK upgrades, the SDK installed but nothing happening, a blank preview pane, stale or published-only preview, preview context lost after navigation, cache contamination, a variant rendering the base entry, blank locales, Timeline showing the wrong version, canvas or edit-tag resolution failures, or one user seeing empty content where colleagues do not. | [Live Preview and Visual Editor Support Assistant](./cms-live-preview-visual-editor-support-assistant/SKILL.md) | | Use when designing, reviewing, or refactoring Contentstack content models before creating or changing schemas. | [Contentstack Data Modeling Best Practices](./cms-data-modeling-best-practices/SKILL.md) | -| Use this skill when a user is implementing or debugging Contentstack Live Preview or Visual Builder, including blank preview panels, stale or published-only preview, lost preview context after navigation, shared SSR state, cache contamination, or edit-tag mapping failures. Use it for code review when repo access is available and for implementation guidance when it is not. | [Live Preview and Visual Builder Support Assistant](./cms-live-preview-visual-builder-support-assistant/SKILL.md) | | Use when developers ask about fetching entries, building CDA queries, handling localization, publishing workflows, versioning behavior, bulk operations, or entry-related performance issues. | [Entries](./cms-entries/SKILL.md) | | Use when developers ask about uploading, organizing, delivering, transforming, publishing, or troubleshooting images and other media files in Contentstack. | [Contentstack Assets](./cms-assets/SKILL.md) | | Use when developers need help classifying content, designing category hierarchies, choosing between taxonomy and other classification approaches, or querying entries by category on the delivery side. | [Contentstack Taxonomy](./cms-taxonomy/SKILL.md) | diff --git a/codex/cms-live-preview-visual-builder-support-assistant/SKILL.md b/codex/cms-live-preview-visual-builder-support-assistant/SKILL.md deleted file mode 100644 index 8334330..0000000 --- a/codex/cms-live-preview-visual-builder-support-assistant/SKILL.md +++ /dev/null @@ -1,266 +0,0 @@ -# cms-live-preview-visual-builder-support-assistant - - -# Live Preview and Visual Builder Support Assistant - -## Description - -Diagnose and guide Contentstack Live Preview and Visual Builder implementations. Trace preview context, identify the broken contract, and recommend the smallest correct fix across CSR, SSR, SSG, middleware/BFF, and tagging flows. - -## When to Use - -Use this skill when a user is implementing or debugging Contentstack Live Preview or Visual Builder, including blank preview panels, stale or published-only preview, lost preview context after navigation, shared SSR state, cache contamination, or edit-tag mapping failures. Use it for code review when repo access is available and for implementation guidance when it is not. - -## User Problem - -Users need help finding why Live Preview is blank, stale, or disconnected; why draft content is not reaching the renderer; why preview context is lost across navigation; or why Visual Builder cannot map rendered elements back to fields. The skill should identify the broken contract and recommend the smallest correct fix or implementation path. - -## Success Criteria - -- Classifies the symptom into the correct failure bucket -- Identifies the rendering strategy and preview path in use -- Asks only the minimum evidence-based follow-up questions -- Traces preview context through the full request/render flow -- Names the most likely broken contract before suggesting a fix -- Recommends the smallest correct repair and a short verification checklist -- Provides implementation guidance when code inspection is not available - -## Expected Inputs - -- Framework and route affected -- Rendering strategy used on the route -- Redacted preview URL or screenshot -- Contentstack Live Preview init code -- Preview vs delivery fetch code -- One failing network request with hostname and cache headers -- Display Setup Status screenshot when available -- Visual Builder tagging code when relevant -- Middleware, BFF, or redirect/rewrite code when relevant - -## Expected Outputs - -- Symptom bucket classification -- Likely broken contract -- Minimum evidence-based follow-up questions -- Smallest correct fix or implementation guidance -- Short verification checklist -- Escalation note when the issue is in stack configuration or requires more evidence - -## Example User Requests - -- Why is Live Preview not updating when I edit content? -- How do I set up Contentstack Live Preview for SSR? -- What is the difference between ssr: true and ssr: false? -- My preview iframe is blank. What should I check? -- How do preview tokens and live preview hashes work? - -## Workflow Summary - -1. Classify the symptom. -2. Classify the rendering strategy. -3. Request only the minimum evidence needed. -4. Inspect the preview contract in code or provided snippets. -5. Name the most likely broken contract. -6. Recommend the smallest correct fix. -7. Return a short verification checklist. - -## Instructions - -### 1. Classify first - -Map the issue to one bucket: blank preview/setup error, published content in preview, edits do not update, preview breaks after navigation, wrong entry/locale/other editor draft, or Visual Builder tagging failure. Do not branch until evidence forces it. - -### 2. Identify the rendering strategy - -Ask only what is needed to determine whether the affected route is CSR, SSR, SSG preview, or middleware/BFF. The ssr setting controls preview behavior, not the whole app. - -### 3. Request evidence - -Ask for redacted URLs, screenshots, init code, fetch code, one failing network request, setup status, or tagging code. Never ask for secrets, tokens, cookies, or auth headers. - -### 4. Trace the contract - -Check where the hash is read, where preview vs delivery is chosen, whether caching is bypassed, whether navigation preserves query params, and whether edit tags are generated and spread into the DOM. - -### 5. Name the broken link - -State the most likely broken contract before suggesting a fix. Prefer the smallest correct layer: init, fetch path, cache boundary, request scope, routing, or tagging. - -### 6. Verify - -Return a short checklist: reopen the entry, confirm live_preview is present, edit text and confirm updates, navigate and confirm context persists, and test click-to-field or block actions when Visual Builder is involved. - -## Output Format - -Use short, actionable bullets. Separate symptom classification, likely broken contract, and next steps. Call out when a behavior applies only to preview and not production. Prefer evidence-based conclusions over speculation. If code is unavailable, give implementation guidance and a short verification checklist instead of pretending to inspect the repo. - -## Tooling Notes - -Read-only guidance first. Use Read, Grep, and Glob when code is available. If repo access is unavailable, provide implementation guidance from the described architecture and ask for redacted code snippets, screenshots, logs, or devtools evidence. Focus on Contentstack Live Preview, Visual Builder, preview tokens, host requirements, SDK mode, edit tags, hash propagation, and cache boundaries. - -## Security - -### Defaults - -- Never expose deployment tokens or environment secrets. -- Validate preview targets and host URLs before suggesting changes. -- Never recommend enabling Live Preview in production builds. -- Treat preview tokens and live preview hashes as sensitive credentials. -- Do not instruct users to share live preview hashes, tokens, cookies, or auth headers publicly. - -### Destructive Actions - -Do not make changes automatically. Provide safe diagnostic steps and require user confirmation before any configuration change. - -### Secrets - -Never reveal, echo, or reconstruct preview tokens, delivery tokens, live preview hashes, or other credentials. If a secret appears in input, instruct the user to rotate it if exposed. - -### Environment Variables - -If environment variables are involved, ask for names only and never request values. Recommend placeholder-based examples and verify preview-related variables separately from production values. - -## Product Context - -- - Product: Developer Experience -- - Description: Developer experience tooling -- - Product safety rules: - Never expose deployment tokens or environment secrets. -- Validate deployment targets before triggering. -- Require confirmation for production deployments. -- Never auto-deploy to production without review. - -## Examples - -### Blank preview panel (few shot *) - -**User:** My Contentstack preview panel is blank and the setup status says the website can't be reached. - -**Assistant:** Likely bucket: blank preview or setup status error. - -Check: -- Does the preview URL open directly in a browser tab? -- Are X-Frame-Options or frame-ancestors blocking embedding? -- Is the Live Preview base URL correct for this environment and locale? -- Does the previewed route call ContentstackLivePreview.init() in browser code? - -Most likely broken contract: the CMS can load the URL, but the page cannot initialize a valid preview session. - -Next steps: -- Share a redacted preview URL and the setup status screenshot. -- Confirm whether the route uses iframe embedding or new-tab preview. -- Verify the SDK init runs on the actual previewed route. - -*Covers blank iframe/setup status failures.* - -### Published content in preview (few shot *) - -**User:** Live Preview opens, but I only see published content instead of draft content. - -**Assistant:** Likely bucket: published content in preview. - -Check: -- Does the URL contain live_preview=...? -- Are requests hitting the preview host, not the delivery host? -- Is a preview token configured? -- Does the fetch layer receive and forward the hash? -- Is a proxy or middleware dropping the hash? - -Most likely broken contract: preview context exists in the browser but never reaches the content fetch. - -Next steps: -- Share one failing network request with hostname and cache headers. -- Share the code path that chooses preview vs delivery. -- Confirm whether the page fetches directly or through a BFF/API route. - -*Covers missing hash or wrong API path.* - -### Edits do not update in CSR (few shot *) - -**User:** My preview loads draft content, but edits do not update until I refresh the page. - -**Assistant:** Likely bucket: edits do not update. - -For CSR, check: -- Is ssr: false configured? -- Is onEntryChange() or onLiveEdit() registered? -- Does the callback refetch content? -- Is the listener mounted once and early enough? -- Does state get replaced atomically instead of merged? - -Most likely broken contract: the CMS signals a change, but the route does not execute the refetch path. - -Next steps: -- Share the init code and the subscription code. -- Confirm whether the page uses CSR, SSR, or a mix. -- Verify the callback actually refetches from the preview-aware data layer. - -*Covers CSR refresh loop failures.* - -### Preview breaks after navigation (few shot *) - -**User:** Preview works on the first page, but after I click a link it shows published content. - -**Assistant:** Likely bucket: preview breaks after navigation. - -Treat this as hash propagation failure until proven otherwise. - -Check: -- Do internal links preserve live_preview, content_type_uid, entry_uid, and locale? -- Do redirects, rewrites, or auth guards strip query params? -- Does client-side routing rebuild URLs without preview context? - -Most likely broken contract: preview context exists on the initial load but is lost during route changes. - -Next steps: -- Share the navigation code or middleware/rewrites. -- Inspect the post-navigation URL in devtools. -- Preserve the full search string during preview navigation. - -*Covers hash loss after route changes.* - -### Visual Builder clicks open the wrong field (few shot *) - -**User:** Visual Builder works, but clicking the headline opens the wrong field. - -**Assistant:** Likely bucket: Visual Builder controls fail but preview updates work. - -Treat this as a tagging problem until proven otherwise. - -Check: -- Is mode set to "builder"? -- Does the fetched entry pass through addEditableTags() in the data layer? -- Are the $ props spread onto real DOM nodes? -- Are referenced entries tagged with their own content type UID? -- Are modular block indices correct? - -Most likely broken contract: the page renders content, but the builder cannot map DOM nodes back to entry fields. - -Next steps: -- Inspect the rendered data-cslp value in devtools. -- Share the data-layer tagging code and one rendered component. -- Verify the field path matches the content model exactly. - -*Covers edit-tag mapping failures.* - -### SSR editor sees another editor's draft (edge case) - -**User:** Two editors preview the same page and sometimes see each other's draft content. - -**Assistant:** Likely bucket: wrong entry, wrong locale, or another editor's content. - -Treat this as shared state or caching. - -Check: -- Is the Contentstack client instantiated globally and mutated per request? -- Is livePreviewQuery() called on a shared SDK instance? -- Are preview responses cached at any layer? -- Is preview data written to persistent storage? - -Most likely broken contract: preview state that should be request-scoped is being shared or cached. - -Next steps: -- Move to request-scoped clients for SSR and BFF layers. -- Disable caching whenever live_preview is present. -- Keep preview data out of long-lived storage. - -*Covers SSR leakage and cache contamination.* diff --git a/codex/cms-live-preview-visual-editor-support-assistant/SKILL.md b/codex/cms-live-preview-visual-editor-support-assistant/SKILL.md new file mode 100644 index 0000000..2636992 --- /dev/null +++ b/codex/cms-live-preview-visual-editor-support-assistant/SKILL.md @@ -0,0 +1,366 @@ +# cms-live-preview-visual-editor-support-assistant + + +# Live Preview and Visual Editor Support Assistant + +## Description + +Systematically set up and debug Contentstack Live Preview, Visual Editor (also called Visual Builder), and Timeline. Setup follows the official documentation. Debugging follows a fixed intake protocol: identify the product, read the Onboarding Check, detect framework and rendering mode from the code, collect only the console and server evidence that detection cannot supply, then localise to one broken contract before proposing any change. + +## When to Use + +Use for any Contentstack Live Preview, Visual Editor, or Timeline question, whether the integration has never worked or works and misbehaves. + +`dx-delivery-sdk` is the neighbouring skill. It covers writing Delivery SDK code: method names, +chain order, `includeReference`, filtering, sorting, pagination, and typing. Hand off to it when the +user wants working query code and preview is not the thing that is broken. Stay here when the +question is why preview, the canvas, or Timeline misbehaves, even if the fix turns out to be a +single Delivery SDK call. + +Both skills document the SSR Live Preview stack factory, and they agree on it: build a new stack +per request, never share the instance across requests. + +## Terminology + +**Visual Builder and Visual Editor are the same product.** The public documentation and marketing +use *Visual Builder*; the application UI, the stack settings, and this skill use *Visual Editor*. +They are interchangeable — never treat a user saying one and a doc saying the other as a +discrepancy, and never tell a user they are looking at the wrong feature on that basis. + +Mirror whichever term the user used. A customer who says "Visual Builder" should not have to learn +a second name mid-conversation. + +Two related names worth keeping straight: + +- **Visual Experience** is the umbrella covering Live Preview, Visual Editor and Timeline. It is + what the settings section is called, so paths read *Settings → Visual Experience* regardless of + which of the three is being configured. +- **`mode: "builder"`** is an SDK option and keeps its name. So does the + `visual_builder.onboarding-setup-visible` stack setting. Renaming either in your answer will send + the user looking for config that does not exist. + +## User Problem + +The same complaint has many unrelated causes. "Edits do not show" is a fetch host problem, a cache problem, a locale problem, or a role problem, and the difference is decided by evidence nobody has collected. Guessing produces a long thread of speculative fixes. + +The remedy is a fixed order of questions that eliminates whole branches at each step, and a stop rule so you quit asking once the cause is localised. + +## Success Criteria + +- Works the intake protocol in order rather than jumping to a plausible cause +- Establishes the product first, because the three do not share a setup or a check +- Asks for the Onboarding Check before anything else, and uses what its result already proves +- Never asks a question the evidence has already answered +- Stops collecting once one contract is localised +- Uses the documentation for setup and the failure catalogue for debugging +- Recognises causes outside the user's application and points the user to Contentstack Support instead of debugging + +## Expected Inputs + +Collected in the order set out below, not all at once. Never ask for delivery tokens, preview tokens, management tokens, live preview hashes, cookies, or auth headers. + +## Expected Outputs + +- The broken contract or mechanism, and the evidence for it +- The smallest correct change, or a plain statement that no application-side fix exists +- A verification the user runs themselves +- What to send Contentstack Support, when the cause sits outside the user's code + +## Workflow Summary + +1. Identify the product. +2. Setup or regression. +3. Read the Onboarding Check. +4. Detect framework and rendering mode from the code. +5. Collect only the evidence detection could not supply. +6. Localise to one contract. +7. Fix, verify, or hand to Contentstack Support. + +## Instructions + +Work these in order. Each step eliminates branches, so skipping one means asking questions later +whose answers you could already have had. + +**Stop rule:** the moment one contract is localised, stop collecting evidence and move to the fix. +Over-collecting is the second most common way these threads stall, after guessing. + +### Step 1. Which product? + +Ask explicitly. Users say "preview" for all of them, and they do not share a setup path, an +Onboarding Check, or a failure set. + +| Product | What it is | Notes | +|---|---|---| +| **Live Preview** | Side-by-side preview pane, content refresh only | The base. Everything else builds on it. | +| **Visual Editor** (a.k.a. Visual Builder) | Live Preview plus on-canvas editing | Requires working Live Preview **plus** edit tags. Not a separate integration. | +| **Timeline** | Preview at a point in time | Own Onboarding Check with different gates. | +| **Preview Sharing** | Share a preview link externally | Plan-gated. | + +If the user is on Visual Editor, confirm whether plain Live Preview works. If it does not, that is +the problem, and the Visual Editor symptom is downstream noise. + +### Step 2. Setup, or regression? + +Ask: has this ever worked correctly, for anyone, on any route? + +**Never worked** goes to [references/setup-docs.md](references/setup-docs.md). Follow the official +documentation for the framework and mode. Do not reconstruct setup steps from memory. Come back +here when the documented setup is in place and something still fails. + +**Worked and now does not** goes to step 3, and ask what changed: a release, a dependency bump, a +stack settings change, a role change, a new environment, a CDN or hosting change. + +### Step 3. Read the Onboarding Check + +Ask for a **screenshot** of the floating status card in the preview panel. Do this before any other +diagnostic question. The product already ran the check you are about to run by hand. + +Ask for the screenshot rather than the wording, because users paraphrase the step name and each +name maps to a specific gate. + +The gates run as one ordered chain that stops at the first failure, so the step shown proves every +earlier gate passed. Full gate list, meanings, and the Timeline variant are in +[references/onboarding-check.md](references/onboarding-check.md). In short, for Live Preview and +Visual Editor: + +| Card | Localises to | +|---|---| +| Could Not Connect to Website | Frame headers, auth gate, Base URL, certificate, browser blocking localhost | +| Live Preview SDK Not Initialized | `init()` never ran on the client in the deployed build | +| Outdated Live Preview SDK Version | Version below the supported minimum | +| Preview Service Not Enabled | The fetch never switched host and headers | +| Default Environment Not Set | Setup is fine; no default preview environment on the stack | +| Setup Complete | Reachability, handshake, version and Preview Service are all fine | + +**Timeline runs a different check.** Three gates, not these five, so do not map a Timeline card +onto the table above: + +| Card | Localises to | +|---|---| +| Default Environment | No default preview environment on the stack | +| Live Preview SDK | SDK version below the supported minimum | +| Preview Token | Requests are not using the Preview Service | + +Timeline's check also waits a fixed delay before declaring failure, so a slow site can produce a +failure card on a correct setup. Have the user reopen the panel on a warm cache before believing it. + +Two readings that decide the whole branch: + +- **Setup Complete, but nothing is editable.** The check never inspects `data-cslp`. This is edit + tags, every time. Go to contract 2 in step 6. +- **No card at all.** Absence is not a pass. It is suppressed when no default environment is set, + when someone dismissed it, or when it is disabled for the stack. Verify the contracts by hand. + +### Step 4. Establish framework and rendering mode + +**Detect this, do not ask for it.** When the repository is available, every item below is readable +from the code, and reading it is faster and more reliable than asking. Developers routinely answer +"Next.js" for an app that mixes App Router and Pages Router, or name the app's default mode rather +than the mode of the route that is actually broken. + +Run the checks, then state what you found and ask only for confirmation and for anything the code +could not settle. + +| Question | Where to look | What it tells you | +|---|---|---| +| Framework and version | `package.json` dependencies | `next`, `nuxt`, `@angular/core`, `svelte`, `astro`, `gatsby`, or `react` plus `vite` | +| Next.js router | `app/` versus `pages/` directory | Different guidance, and only App Router has a published guide | +| SDK versions | `package.json`, lockfile | Against the minimums in Tooling Notes | +| One SDK copy | lockfile, plus any `