---
title: "v1.8.5"
description: "Consent checks read the banner's own choice, so analytics and embeds follow what the visitor accepted, and 1.x stays on Payload 3.93.x so the bundled patches apply."
url: https://docs.systhema.app/changelog/v1.8.5
version: changelog
docs_index: https://docs.systhema.app/llms.txt
---

## Highlights

1.8.5 is a patch release. It fixes two bugs in 1.8. Most sites need no code change; a site that imports `vanilla-cookieconsent` itself must switch to the Systhema consent API (see [Upgrade](#upgrade)).

### Consent checks read the banner's own choice

A site could ask a second copy of `vanilla-cookieconsent` whether the visitor had accepted a category. That copy was never initialized, so it always answered "no". Analytics, Google Consent Mode updates and embeds that were gated this way stayed off, even after the visitor accepted.

1.8.5 adds a consent API that reads the instance the Systhema banner started:

- `acceptedCategory(category)` and `acceptedService(service, category)` return the stored choice. Both return `false` on the server and before the banner starts.
- `onConsentChange(callback)` reports the initial state and every change. It returns an unsubscribe function.
- `useConsent(category)` re-renders a React client component when the category changes.

Import it from `@systhemaui/react`, from `@systhemaui/next/consent` in a Next.js app, or use the same methods on the `SysthemaJS` global with plain HTML. `@systhemaui/next/consent` needs `@systhemaui/react` 1.8.5 or later; the main `@systhemaui/next` entry is unchanged.

The state lives in the module that renders the banner, never on `window`, so no other script can fake a consent. A copy bundled apart from the banner always returns `false`, so a mismatch fails closed. A returning visitor's saved choice is readable as soon as the banner starts, before the banner's own callbacks run.

A new doctor check, `cookie-consent-versions`, warns when the lockfile resolves more than one version of `vanilla-cookieconsent` (pnpm, npm and Yarn). See [Gating third-party scripts](../guides/cookie-consent/index.md#gating-third-party-scripts).

### 1.x stays on Payload 3.93.x

The bundled pnpm patches for `@payloadcms/richtext-lexical` and `@payloadcms/ui` target Payload 3.93.0. With a `^3.93.0` range, a fresh install resolved 3.94.x, where the patched file is renamed and the patch failed to apply. The range is now `~3.93.0` in `@systhemaui/payload`, the Payload template, the patch keys and the CLI. `systhema upgrade` and `systhema doctor` use the same pin, so a project gets Payload patch releases only. 1.x is the LTS line and makes no Payload minor bump.

Both fixes were verified against real consumer projects.

## Upgrade

Run the upgrade, then the doctor:

```bash
systhema upgrade
systhema doctor
```

There are no codemods, token migrations or breaking changes.

- If your site imports `vanilla-cookieconsent` itself, switch those calls to the Systhema consent API above and remove `vanilla-cookieconsent` from your own `package.json`. Reinstall, so only one copy, 3.3.0, remains. `systhema doctor --only cookie-consent-versions` confirms it.
- The `~3.93.0` range on `@payloadcms/*` is intended. Do not widen it on 1.x: the bundled patches only apply to 3.93.x.

## Changes

- fix(astro,core,elements,next,react): read active banner consent (#1494)
- fix(payload,cli): keep 1.x on payload 3.93.x so the bundled patches apply (#1333)

## Packages affected

`@systhemaui/core`, `@systhemaui/react`, `@systhemaui/next`, `@systhemaui/payload`, `@systhemaui/cli`. The other packages are versioned with them and have no changes.
