Skip to content

fix(tanstack): dedupe Set-Cookie by name + Domain + Path, not name alone - #642

Merged
guitavano merged 1 commit into
mainfrom
fix/dedupe-set-cookie-by-scope
Oct 9, 2026
Merged

guitavano merged 1 commit into
mainfrom
fix/dedupe-set-cookie-by-scope

Conversation

@aline-pereira

@aline-pereira aline-pereira commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Problem

deduplicateSetCookies (packages/tanstack/src/sdk/workerEntry.ts) keeps only the last Set-Cookie header per cookie name. A response that clears the same cookie under several scopes collapses to a single header, and the other scopes stay alive in the browser.

The browser keys its cookie jar by name + Domain + Path (RFC 6265 §5.3 step 11): a clear for the host-only cookie does not touch the Domain=example.com one, and vice-versa. Two Set-Cookie headers that differ in scope address two different cookies and must both reach the client.

Reproduction (measured on the site)

/telesales/sign-out on deco-sites/oficina-tanstack expires each session cookie under the three scopes the cookie might have been created with (host-only, Domain=www.<host>, Domain=<parent>), because the response that created it is not ours to inspect:

Set-Cookie: VtexIdclientAutCookie=; Path=/; Max-Age=0
Set-Cookie: VtexIdclientAutCookie=; Path=/; Max-Age=0; Domain=www.example.com
Set-Cookie: VtexIdclientAutCookie=; Path=/; Max-Age=0; Domain=example.com

Through the worker only the parent-domain clear survived, so the host-only admin token the telesales punchout lands stayed in the browser: the next operator on the machine inherited the session. The site currently answers that route ahead of the framework to dodge the dedupe (src/worker-entry.ts, TELESALES_SIGN_OUT_PATH).

Reference behavior

Fresh/deco-runtime never deduplicates Set-Cookie; the multi-scope clear is the site's own expireCookies (sdk/telesales/session-reset.ts, domainScopes) and reaches the browser intact.

Fix

  • New setCookieIdentity(setCookie) — name + Domain (lowercased, leading dot stripped) + Path; exported for tests.
  • deduplicateSetCookies keys on that identity. True duplicates (same identity) still collapse to the last one, which is the behavior the layers that append the same cookie (VTEX middleware, invoke handlers) rely on.

Tests

packages/tanstack/src/sdk/workerEntry.test.ts — 3 new tests: identity differs by scope; identity ignores domain case/leading dot and the value; end-to-end through createDecoWorkerEntry a three-scope clear survives while a same-scope duplicate collapses.

bunx vitest run packages/tanstack/src/sdk/workerEntry.test.ts: the 3 new tests pass; the 3 failures in that file (draft preview (pull-based) ×2, CDN-Cache-Control … defaults to no-store) are pre-existing on main (same result on a clean checkout). tsc --noEmit for packages/tanstack clean; biome check clean on the touched files.

Found while validating deco-sites/oficina-tanstack#479.

🤖 Generated with Claude Code


Summary by cubic

Fixes Set-Cookie deduplication so multi-scope cookie clears reach the browser intact instead of collapsing to a single scope.

deduplicateSetCookies in packages/tanstack/src/sdk/workerEntry.ts kept only the last Set-Cookie header per cookie name, so a sign-out that clears the same cookie under host-only, Domain=www.<host>, and Domain=<parent> scopes left the other scopes' cookies alive in the browser. Deduplication now keys on name + Domain + Path, matching how browsers key their cookie jar (RFC 6265 §5.3); Domain is case-insensitive and ignores a leading dot. True duplicates (same name, domain, and path) still collapse to the last header.

Adds three tests covering scope identity, domain normalization, and end-to-end deduplication through createDecoWorkerEntry.

Written for commit fa6f891. Summary will update on new commits.

View guided diff Turn on auto-fix

`deduplicateSetCookies` kept only the last `Set-Cookie` per cookie NAME. A
response that clears the same cookie under several scopes (host-only,
`Domain=host`, `Domain=parent` — the usual sign-out pattern, since the
scope VTEX/the edge used is unknown) collapsed to whichever came last, and
the other scopes stayed alive in the browser.

The browser keys its jar by name + Domain + Path (RFC 6265 §5.3), so that
is the identity used now. Domain is case-insensitive and ignores a leading
dot (§5.2.3); Path is compared as sent. True duplicates (same identity)
still collapse to the last one.

Found while validating deco-sites/oficina-tanstack#479: /telesales/sign-out
emits three clears per cookie and only the parent-domain one survived.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@aline-pereira
aline-pereira requested a review from a team October 8, 2026 22:15

Copy link
Copy Markdown
Contributor Author

Second measured case, same root cause — /logout on www.oficina.com (production, Fresh) emits two clears for the VTEX ID refresh token that differ only in Path:

Set-Cookie: vid_rt=; Path=/; Max-Age=0 ...
Set-Cookie: vid_rt=; Path=/api/vtexid/refreshtoken/webstore; Max-Age=0 ...

Keyed by name alone they collapsed into one, so the refresh token scoped to /api/vtexid/refreshtoken/webstore survived the logout. With name + Domain + Path both headers reach the browser (covered by the Path=/ vs Path=/account identity test in this PR).

@guitavano
guitavano merged commit e07b94f into main Oct 9, 2026
1 check passed
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 7.77.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

tlgimenes added a commit to deco-sites/demo-storefront that referenced this pull request Oct 14, 2026
…_liveness

Set-Cookie dedupe keyed on the cookie name alone, so a response that clears one
cookie under several scopes (host-only, Domain=www.host, Domain=parent) kept only
the last clear and the other scopes stayed signed in. It now keys on name +
Domain + Path, the way the browser keys its cookie jar: the v7 fix
(decocms/blocks#642) the copied worker code was forked before. True duplicates
(same name and scope) still collapse to the last one.

/deco/_liveness answers OK again (no-store, edge cache bypassed), as v7 did.
Deploy probes and uptime monitors poll it; every other v7 admin path still
answers 404.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
tlgimenes added a commit to deco-sites/storefront-tanstack that referenced this pull request Oct 14, 2026
…_liveness

Set-Cookie dedupe keyed on the cookie name alone, so a response that clears one
cookie under several scopes (host-only, Domain=www.host, Domain=parent) kept only
the last clear and the other scopes stayed signed in. It now keys on name +
Domain + Path, the way the browser keys its cookie jar: the v7 fix
(decocms/blocks#642) the copied worker code was forked before. True duplicates
(same name and scope) still collapse to the last one.

/deco/_liveness answers OK again (no-store, edge cache bypassed), as v7 did.
Deploy probes and uptime monitors poll it; every other v7 admin path still
answers 404.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
tlgimenes added a commit to deco-sites/demo-storefront that referenced this pull request Oct 19, 2026
* chore(parity): deterministic pixel/snapshot baseline harness

Ported from storefront-tanstack's harness (same TanStack/Shopify lineage)
and adapted to this site:

- ports 5340 (site) / 5347 (upstream record/replay proxy)
- cases re-checked against this site's routes and markup: home, landing
  pages, PLP, search, PDP (variants, single, out of stock, not found),
  offline, login, account, 404 paths, /sitemap.xml (served by the /*
  catch-all on v7), trailing-slash redirects, robots.txt, favicon
- flows: search from the side menu, sort, header SPA nav, mega menu,
  home -> PDP SPA nav, variant select, add to cart + minicart quantity and
  remove, login link, mobile menu
- analytics: records window.DECO.events.dispatch (this site has no
  analytics SDK) into each snapshot
- record also saves the v7 editor-form schema (/live/_meta) as the
  reference for the v8 form review
- approvals start empty: storefront-tanstack's sign-offs do not carry over
- PLP filter / show-more / PLP -> PDP flows are marked blocked: on v7
  (main and live) every PLP and search page renders "12 of 0 results"

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* test(parity): scroll the shelf card into view before the home -> PDP click

The shelf's view_item_list fires from an IntersectionObserver; when the
click itself scrolled the card into view, the event raced the SPA
navigation and landed on '/' or on the PDP path from run to run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* chore: run the v7-to-v8 migration

Output of the deco-v7-to-v8-migration skill's script, unedited, run against
@decocms/[email protected] (installed first, as the skill requires; the v7
apps stay installed so the script could vendor their loaders).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* content: migrate saved blocks to the next major

- Remove v7 app blocks (deco-shopify, deco-htmx, deco-analytics, site): apps
  are code now. The Shopify store comes from SHOPIFY_STORE_NAME and
  SHOPIFY_STOREFRONT_ACCESS_TOKEN (the values the deco-shopify block held);
  its encrypted admin token is never used at runtime, so it isn't
  re-encrypted.
- Remove the site editor preview blocks (names ending in .tsx are invalid),
  Shortcuts - 01 (its section doesn't exist) and the unreferenced navbar
  loader block.
- Drop fields no type declares, which deco check rejects (FAQ/CampaignTimer
  layout and copy extras, theme extras, LinkTree icons that aren't sprites,
  SearchResult layout columns/variant). Each one was checked against this
  site's own types (deco check lists it as unknown), not taken on trust from
  storefront-tanstack, whose v7 content these blocks are identical to.
- The product page slug was a requestToParam block in a string field; the
  product details block reads the :slug route param itself.
- Wrap the data arguments of blocks that render nothing (the theme's font,
  the SEO sections' jsonLD) in lazy, so they aren't fetched.
- Remove v7's generate.digests.json (blocks-cli's codegen cache).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* refactor: move commerce, Shopify, image, JSON-LD and device code into the site

The v7 packages (apps-commerce, apps-shopify, blocks/hooks, blocks/sdk)
have no v8 equivalent for what the site imported from them, so it is
site code now, copied from the 7.64.3 sources this site ran:

- src/vendor/commerce: commerce types (with the Cart v2 types), useOffer,
  formatPrice, useVariantPossibilities, filters, productToAnalyticsItem.
- src/vendor/shopify: the content's loaders plus cart, user and sign-in
  flows, with the Storefront API calls sent through the v8 client
  (createShopifyClient, same endpoint and API version).
- src/vendor/blocks: Image (decoims.com URLs, with quality=high, which v7
  set through registerImageQuality("high")), JSON-LD, and LiveControls
  (v7's editor bridge and the "." shortcut to Studio).
- src/sdk/device.ts: v7's user-agent patterns.
- The Lazy wrapper's leftovers go: LoadingFallback exports and
  Section.Placeholder. The PDP gallery is keyed by the product, as v7's
  Lazy wrapper remounted it, and the filter drawer closes on navigation.
- Google Fonts keeps v7's 10 s fetch timeout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* feat: server functions replace /deco/invoke for the site's actions

v8 has no invoke endpoint. Each key the browser called through v7's invoke
proxy (src/runtime.ts) is now its own createServerFn in
src/server/site.functions.ts, imported by its call site:
notifyMe, shipping simulate, newsletter subscribe, wishlist read/toggle,
addresses read/submit. Inputs are validated with zod; handlers take the
request and response headers explicitly instead of RequestContext.

Cart and user keep v7's GET reads (and the root's SSR prefetch). Per-shopper
reads answer Cache-Control: private, no-store, and a document render with no
cart cookie answers an empty cart without creating one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* feat: render pages with the next-major CMS (TanStack Start, descriptors)

- src/cms.ts: createCMS with explicit params only; the site reads its own
  DECO_SITE / DECO_SITE_TOKEN and OTEL_EXPORTER_OTLP_* and passes them.
- .deco/index.ts: the block map under the v7 type names only (sections as
  descriptors, Shopify loaders, productByHandle, SEO, device/random
  matchers); src/views.ts renders each descriptor.
- src/open-page.server.ts + page.functions.ts + page-route.tsx: matchRoute,
  one streamed promise per block, v7's route options (pendingMs 60s,
  skuId ignored, query string kept). The Shopify PLP gets the page URL from
  the page being rendered instead of the x-deco-page-url header hack.
- src/runtime: the root document (DECO.events bus, 7.64's data-event
  observer and NavigationProgress, LiveControls) and the page view, which
  keeps v7's <main id="main-content"> landmark between Header and Footer
  (splitPageSections and its test are kept).
- src/head.ts: v7's head builder with the site SEO defaults; the home keeps
  its og:url fallback.
- src/server/edge-cache.ts + cache-profiles.ts + worker-entry.ts: v7's
  createDecoWorkerEntry behaviour as site code, with the site's enforced
  Content-Security-Policy (v7's securityHeaders) and no x-powered-by.
  Signed-in shoppers are detected by the cookie sign-in really sets
  (secure_customer_sig; v7 looked for customerAccessToken).
- v7's admin routes, setup, invoke proxy and section-loader registry go;
  /deco/*, /live/* and /.decofile answer 404.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* chore: v8 dependencies, build and Workers config

- Depend on @decocms/blocks and @decocms/apps-shopify ^8.1.0-next.7 from
  npm; drop @decocms/tanstack, blocks-admin, blocks-cli, apps-commerce,
  apps-vtex (only a generated, unreferenced invoke.gen.ts used it) and the
  packages nothing imports any more (@tanstack/store, react-store,
  preact-render-to-string, ts-morph).
- predev/prebuild run deco schema && deco content (&& deco check); build
  is tsr generate && vite build. .deco/blocks.gen.ts is generated and
  gitignored.
- vite: no decoVitePlugin or meta.gen stub; a build hash for edge-cache
  keys and a reload when deco serve rewrites the content module.
- wrangler: v7's fast deploy (DECO_FAST_DEPLOY + DECO_KV) becomes the hosted
  CMS (DECO_SITE var + DECO_SITE_TOKEN secret, off until the secret is set);
  telemetry goes to the same collector through OTEL_EXPORTER_OTLP_ENDPOINT
  (+ OTEL_EXPORTER_OTLP_HEADERS secret). Removed with nothing left to read
  them: DECO_KV, SITES_KV (v7's withABTesting split), CF_VERSION_METADATA,
  the DECO_OTEL_* vars.
- Remove package-lock.json: it was stale (7.52.1) next to bun.lock.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* docs: describe the site on the next major; blank hosted env in parity runs

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* fix(forms): keep v7's SEO forms and product pickers

Compared .deco/schema.gen.json with the v7 admin schema the baseline saved
(parity/baseline/forms/live-meta.json):

- SeoV2, SeoPLPV2 and SeoPDPV2 declare v7's fields, titles and descriptions
  (Canonical URL, OG Image, Theme Color, Title/Description Override, Disable
  indexing, Structured Data, Omit variants, ...). The SeoPDPV2 block on the
  product page drops a saved `jsonLDs: [{}]` no v7 form declared.
- shopify/loaders/RelatedProducts.ts is vendored (7.64.3) and registered:
  v7 offered it in every product picker. Loaders are registered in v7's
  order, which is the picker's order.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* fix(css): keep the stylesheet byte-identical to v7

The utilities only removed code generated (the Lazy placeholders, the home
route's fallback, including its mt-2) are listed inline; vendored, runtime
and server code stay out of Tailwind's scan as v7's node_modules did. The
built app-*.css now has v7's exact bytes and hash.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* fix(parity): no cf-cache-status on edge-cache hits; home og:url keeps the query

- v7 stored pages serialized (responseCache), so a HIT carried only the
  stored headers; Cloudflare's Cache API adds cf-cache-status to a matched
  response, which the wrapper now drops.
- The home's og:url fallback is v7's pageUrl, query string included.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* fix(render): resolve every block before the page renders, so sections hydrate

Sections whose block awaited upstream data (search result, product
details, shelves, the home hero) were streamed as a late resolution of the
block's promise. In the browser that promise never settled: the section's
server markup stayed on screen but never hydrated, so the product cards'
scroll reveal never ran (an empty product grid without reduced motion) and
the section had no event handlers. The parity harness, which captures with
reduced motion, didn't show it.

Every block is awaited on the server now, as v7 resolved every non-deferred
section before rendering. Measured on /men, /clearance, a product page and
the home: every block is fulfilled after hydration and the cards reveal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* test(parity): pending approvals (--strict) and replace rules

- A rule with "status": "pending" applies like an approval but is reported
  as PENDING; compare --strict fails until the product owner removes it.
- A "replace" rule says the new value is the baseline with listed strings
  replaced, for URLs v7 built on a placeholder origin.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* test(parity): list the explained v7 -> v8 differences as pending

Not approved: every rule carries "status": "pending" and the reason, so
compare reports them as PENDING and --strict fails until the product owner
signs each off.

- ssr-jsonld-first-html: JSON-LD of formerly Lazy sections is in the first
  server HTML.
- plp-page-url: the listing loader gets the page URL, so JSON-LD and
  analytics URLs are on the site's origin instead of https://localhost.
- home-mobile-no-cart-cookie / home-utm-mobile-from-cache: v7 created a cart
  during the first SSR of an isolate (shared QueryClient) and served that
  page private.

parity/pending/ holds live screenshots of the v8 listing and search pages
(Shopify live, reduced motion) next to v7's recorded ones: v7 showed
"12 of 0 results" on every listing and search page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* test(parity): pending rule for the home shelf images desktop flows now load

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* style: prettier on the files the migration touched

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* fix(drafts): a malformed pointer is no draft; only a valid one skips the edge cache

cms.forDraft throws on a pointer that doesn't parse, so ?__draft=junk would
answer 500; it now gets the release. The edge cache bypassed on the raw
?__draft param, so any request could skip the cache and reach the origin;
like v7, only a pointer the CMS accepts on a preview-allowed host does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* fix: keep the vendored GraphQL documents byte-identical; prettier ignores them

Prettier reflowed the Storefront API documents in queries.ts, which changes
every request body sent upstream (the parity replay missed all 257 calls).
They stay as v7 sent them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* docs(parity): pending differences, behaviour changes and editor-form review for the product owner

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* test(parity): drop screenshot-triggered HAR misses that flake on the home

Chromium's full-page capture (captureBeyondViewport) sometimes re-runs
<picture> source selection against a transient narrow frame, so the
home's mobile <source> candidates (Hero slides, Banner) are requested and
aborted on some desktop captures of the same build and not on others.
v7's baseline happened to record them; v8 passed 2 of 3 reruns.

volatileHarMisses drops the listed entries from harMisses on both sides
for the listed cases (harness noise, not an approval; pixels and
thirdPartyRequests still compare). PARITY_DEBUG_MISSES=1 prints the full
URL of every aborted third-party request.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* docs(parity): last compare, the home flake resolved, editor protocol check

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* test(parity): full-URL harMisses, visible volatile drops, honest counts, pending baselines

- harMisses are keyed by the full URL: decoims.com/image names the image in
  its query, so origin + path lumped every image of the page into one entry.
- volatileHarMisses lists the four mobile <source> URLs and carries a pending
  status: a drop that changes a result is reported PENDING and fails --strict.
- The summary counts ok, PENDING and DIFF separately.
- record --capture-only re-captures the baseline from its fixtures (pass 2).
- pendingBaselines: cases whose whole page differs from v7 compare against a
  pinned v8 capture (record-pending --rule <id> records what v7's fixtures
  lack into the rule's dir), reported PENDING, never ok; --no-pending
  compares every case with v7.
- The live-captured v8 listing screenshots are superseded by that capture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* fix(listing): an upstream error lists nothing instead of dropping the section

A failed Storefront API call made the whole SearchResult section vanish
(header straight to the newsletter). The loader now logs it and returns the
empty listing v7 showed: breadcrumb, filters, sort bar, 0 results.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* fix(telemetry,drafts): v7's service identity, error sampling and preview hosts

- version_metadata is back; service.name (DECO_SITE_NAME),
  deployment.environment.name (DECO_ENV_NAME) and service.version (the Workers
  version id) go in telemetry.resource, as v7's instrumentWorker set them.
- The CMS block keeps v7's error sampling (0.1, DECO_OTEL_ERROR_PROMOTION_RATE)
  and its preview hosts (demo-storefront.deco.site and
  demo-storefront.deco-cx.workers.dev), plus localhost:5173 for vite dev.
- createCMS gets dev: import.meta.env.DEV (ignored by 8.1.0-next.7).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* chore: drop v7 migration text, the dead Deno deploy files and VTEX safe cookies

- README: no more @decocms/start migration CLI or MIGRATION_REPORT.md.
- pdp README: the router sets defaultPreload, not createDecoRouter.
- worker-entry: no migration-script notes; the CSP comment states what v7 and
  v8 send (no frame-ancestors, no X-Frame-Options).
- Dockerfile (Deno/Fresh) and deploy/ (Argo CD) were already dead on main.
- Safe cookies: _deco_bucket only; this Shopify site sets no VTEX cookies.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* fix(css): keep DaisyUI's .stack, which the README's old migration text generated

Tailwind scans the README too: deleting the migration section dropped the
word "stack" and with it DaisyUI's .stack rules, so the stylesheet's hash
(and the Link preload header of every page) changed. Listed inline; the
built app-*.css is v7's exact bytes again (app-CIckAda9.css).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* test(parity): pin v8's listing pages as the pending baseline listing-gets-page-url

record-pending recorded only what v7's fixtures lack (the per-URL collection
and search queries, live at the fixed time) and captured the 25 cases in
replay. The store's catalog was replaced on 2026-10-10, so the old collections
are empty: v8 differs from v7 in the breadcrumb, the listing JSON-LD and the
view_item_list list name. The v8 live captures from before the change (products,
filters, sort) are kept beside it. Not approved.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* test(parity): shelf-images rule on full-URL harMisses; editor protocol check script

- home-shelf-images-load names the six images by their full URLs now that
  harMisses carry the query (same images, same pending status).
- PARITY_DEBUG_MISSES=1 also prints the body of an upstream request that has
  no recording.
- parity/editor-check.mjs drives deco serve the way the site editor does
  (describe, schema.get, blocks.list, a refused stale apply, an edit vite dev
  renders, the restore) and logs each step.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* docs(parity): honest counts, new self-compares, pending baseline, editor check log

- Final compare v8-10: 25 ok, 50 PENDING, 0 DIFF; 2 upstream misses (an intent
  preload in pdp-variant-select), explained. v7-self-3/4 on the current
  harness: 75 ok each, 0 misses.
- Run flags (--strict, --no-pending, record --capture-only, record-pending),
  pending baselines, the volatile list's pending status, and the v7/v8 env
  split in the determinism table.
- Pending: listing-gets-page-url with the catalog change, the clickjacking
  decision; behaviour changes updated for telemetry and drafts.
- The editor protocol check is parity/editor-check.mjs; all 12 steps passed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* chore(deps): @decocms/* 8.1.0

@decocms/blocks and @decocms/apps-shopify ^8.1.0-next.7 -> ^8.1.0 (bun.lock
resolves 8.1.0). The regenerated schema references ImageObject/VideoObject
for the recursive image/video arrays (was a bare object) and pairs the
preloadStrategy literals with defaults.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* chore(deps): @decocms/* 8.1.1

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* fix(dev): reload open pages after the server has the saved content

The site-content-reload plugin sent the client full-reload on the SSR hot
update of .deco/blocks.gen.ts, before the worker re-imported the content.
The reloaded page rendered the previous save, so the site editor's local
preview stayed one edit behind (every edit after the first, reproduced 3/4
saves stale on the capybara scratch site).

src/cms.ts now sends "site:content-updated" from its hot.accept once the new
content is in the CMS, and the plugin reloads open pages on that event.
Checked with deco serve + vite dev: 5/5 single saves and 4/4 bursts show the
saved content on the one reload (was 1/4).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* fix(dev): decoContent() from @decocms/blocks/vite replaces the content reload template code

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* fix(edge): keep every scope of a sign-out cookie clear; answer /deco/_liveness

Set-Cookie dedupe keyed on the cookie name alone, so a response that clears one
cookie under several scopes (host-only, Domain=www.host, Domain=parent) kept only
the last clear and the other scopes stayed signed in. It now keys on name +
Domain + Path, the way the browser keys its cookie jar: the v7 fix
(decocms/blocks#642) the copied worker code was forked before. True duplicates
(same name and scope) still collapse to the last one.

/deco/_liveness answers OK again (no-store, edge cache bypassed), as v7 did.
Deploy probes and uptime monitors poll it; every other v7 admin path still
answers 404.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* chore(deps): @decocms/blocks 8.2.2 (decoContent())

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* chore(deps): @decocms/apps-shopify 8.2.2, one copy of @decocms/blocks

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* chore(deps): @decocms/blocks 8.2.3, @decocms/apps-shopify 8.2.3

decoContent() already replaced the reload snippet in #133; this moves both
packages to 8.2.3 together (one copy of @decocms/blocks in the lockfile)
and regenerates the schema (only its version stamp changes).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* fix(parity): call the Shopify listing loader as production does, pixel-identical listing pages

v7 (main) never passed the page URL to the listing loader, so every category,
search and catch-all page renders "0 results" with an empty breadcrumb; v8
passed it, which changed the breadcrumb and JSON-LD on 25 cases. The migration
is back-end only, so the loader is now called without the URL, as v7 did.
Full compare vs the v7 baseline: 0 differing pixels in all 77 screenshots
(75 cases, mobile + desktop). Drops the listing-gets-page-url pinned baseline
and the plp-page-url rules, which no longer apply.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

* test(parity): the product owner keeps production's listings for the cutover

Records the product owner's decision of 2026-10-17, "Match prod now, fix
right after", as `approvedDecisions` `listing-match-prod`: the migration calls
the Shopify listing loader without the page URL, as production does, and a
follow-up PR (fix/listing-page-url) passes it again right after the cutover.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016ZsmzpZ2zahRBoATBb2tBu

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants