Repository navigation
Description
Split out of #438 (closed as not-planned). Sibling of #450, but a distinct fault with a different mechanism — worth tracking separately.
Symptom
Dismissing the cookie banner writes consent but leaves the banner on screen:
element.click()on Reject →scf-cookie-consentis written tolocalStorage→ banner stays visible- On a fresh load with that key already present, the banner correctly never appears
So load-time gating works; runtime state propagation doesn't.
Evidence that the provider really did update
The stored payload is unmistakably rejectAll's own output:
{"version":"1","updatedAt":"2026-07-30T11:21:10.693Z","selections":{"strictly-necessary":true,"performance":false}}Only persistSelections writes that shape, and it calls setConsentState(state) before the storage write. So state was set on the same provider instance that renders the visible banner — and the banner still didn't hide.
Candidates already ruled out
- Context memo deps are complete —
packages/ui/src/components/CookieConsent/CookieConsentProvider.tsxlists bothconsentStateandshouldShowBannerin theuseMemodependency array. - Not a duplicate provider. The fiber chain reads
CookieConsentBanner → CookieConsentProvider → CookieConsentProvider → DatePickerProvider → Provider, which looks like a double mount but isn't:packages/scf-core/provider/cookie-consent/CookieConsentProvider.tsximports the ui one asCookieConsentProvider as BeyondCookieConsentProviderand renders it inside itself, so both fibers carry the same name by design. Thereduce-basedcomposeinprovider/index.tsxmounts it once. - Single banner — exactly one Reject button inside
#root. #S:0is not a second app — it's React's inert streaming-SSR placeholder (display: none, 0×0). It does contain a copy of the banner markup, which is misleading.
Single provider, correct deps, state set, one banner — and no re-render. That combination is odd enough that I'd want someone to read it with fresh eyes rather than accept my analysis.
Caveat on my own evidence
During part of my session a #S:0 placeholder was present that also contained a Reject button, so an unscoped querySelectorAll('button') could have targeted the wrong copy. The measurement I trust is the one scoped explicitly to document.querySelector('#root') — that wrote consent and left the #root banner visible. The unscoped variants should be re-run.
Why it matters
Consent UI that won't dismiss is a compliance-visible defect: the user's choice is recorded but the interface implies it wasn't, which invites repeat clicks and undermines the audit trail in consent_records.
Note this is reachable via a synthetic click today; with #450 unfixed a real user may not be able to trigger it at all, so fix #450 first — it may change or mask this behaviour.
Activity
thinkclay commentedon Sep 17, 2026
Verified on a production export of
main+ #783 (expo exportserved byexpo serve), with real pointer events (CDPmouse.down/mouse.upat the button's centre, notelement.click()), at 375×812 and at 1440×900:scf-cookie-consentin localStoragerejectAll's shape)opacity10So the banner does dismiss. What the original evidence measured was DOM presence:
CookieConsentBannerhides by settingopacity: 0andpointerEvents: 'none'on its container (packages/ui/src/components/CookieConsent/CookieConsentBanner.tsx, the outerView), and never unmounts — so Playwright'sisVisible(),querySelector, and "is the Reject button still in#root" all keep answering yes. The caveat in the description about the#S:0placeholder pointed the same way.Closing as not-a-bug for the dismissal. One thing it is worth carrying: an opacity-0 banner keeps three focusable buttons and a heading in the accessibility tree on every page after consent. That is a real a11y defect (and a candidate for the
/and/contactaccessibility misses in #774, box 4) — the banner should unmount, or at least setaria-hidden/display: nonewhen dismissed. Leaving that note on #774 rather than reopening this.fix(CookieConsent): a dismissed banner leaves the accessibility tree,…