Skip to content

fix(replay): guard attachShadow so an unsupported shadow host does not kill playback - #4594

Merged
TueHaulund merged 5 commits into
mainfrom
posthog-self-driving/fixreplay-guard-attachshadow-when-2cb73d
Aug 26, 2026
Merged

fix(replay): guard attachShadow so an unsupported shadow host does not kill playback#4594
TueHaulund merged 5 commits into
mainfrom
posthog-self-driving/fixreplay-guard-attachshadow-when-2cb73d

Conversation

@posthog

@posthog posthog Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Problem

Replay playback dies — not degrades — for a recording containing a shadow host the player cannot attach a shadow root to.

attachShadow is called on every node marked as a shadow host. In the full-snapshot rebuild (rrweb-snapshot/src/rebuild.ts) that call is uncaught: rebuildFullSnapshot is reached via wrappedCastFn from Timer.rafCheck, and neither has a try/catch, so the throw escapes the rAF callback before the next frame is scheduled and the timer stops permanently. Dead player.

Two different things can refuse:

  • A real element — the browser accepts a host only when its tag is a valid shadow host name per the DOM spec (a fixed list, or a valid custom element name). A rebuilt host can be refused where the recorded one was not. This is what the field report shows: Firefox 153 / macOS, unhandled NotSupportedError: Element.attachShadow, with a deep buildNodeWithSN recursion in the stack — i.e. the full-snapshot path.
  • An RRMediaElement while the virtual DOM is in use (seeking / fast-forward) — it refuses unconditionally, throwing a plain Error.

The mutation and diff paths are already wrapped in try/catch, so there the throw abandons the rest of the batch/flush rather than ending playback. Still worth guarding, but the fatal case is the rebuild.

Corrections to the original write-up

  • The two causes originally given — a custom element name failing the plausibility check, or one whose customElements.define threw — are not the mechanism. attachShadow gates on the local name alone, so document.createElement('my-widget').attachShadow({mode:'open'}) succeeds even when the element was never defined and even when define threw. Verified in jsdom and Chrome.
  • The exact tag Firefox refused in the field is still unknown. The stack frames are minified and carry no tag name, so why Firefox 153 refuses a host the recording browser accepted is not yet explained.
  • Only two of the four real-DOM attachShadow call sites were originally identified.

Impact

Small but live and still recurring: 5 occurrences, 2 sessions, 1 user, all Firefox 153 / macOS, hitting the replay player. First seen 2026-08-21, last seen 2026-08-24. The error-tracking issue is Active, priority High, assigned to Team Replay. The same vendored rrweb powers every replay viewer, and the failure mode is a dead player, not a degraded one.

Changes

  • Add a shared attachShadowRootSafely helper that attempts the attach and reports whether it worked. It is exported from @posthog/rrweb-snapshot so the four call sites across the rrweb packages can share it rather than each keeping a copy of the same try/catch. Not public API — packages/rrweb/** is omitted from the publish matrix in release.yml and is bundled into the browser SDK at build time.
  • Guard all four real-DOM call sites:
    • rrweb-snapshot/src/rebuild.ts — full-snapshot rebuild (the fatal one)
    • rrweb/src/replay/index.ts — incremental mutations
    • rrdom/src/diff.ts — virtual-DOM → real-DOM diff, which also dereferenced shadowRoot! on the next line
    • rrdom/src/index.tsbuildFromNode, returning null so walk skips the subtree
  • Skip the shadow subtree instead of appending it to the light DOM. Once the attach is skipped, buildNodeWithSN's append chain fell through to node.appendChild(childNode), which puts shadow-scoped <style> nodes in the document where their rules apply to the whole replayed page. Verified: a refused host produced <nohyphen><style>.leaked { color: red }</style><div></div></nohyphen>.
  • Warn once per refused tag in the rebuild path, matching the adjacent warnedCustomElementNames pattern.
  • Add a no-restricted-syntax rule in the rrweb ESLint config so a new unguarded attachShadow fails lint (super. calls excluded — rrdom-nodejs needs one).
  • Tests, each verified to fail on main for the asserted reason: a rebuild.ts case that also pins the subtree is not inlined into the light DOM; an rrdom diff case; and an end-to-end replayer case in real Chromium covering the RRMediaElement path.

How this was tested

Each guard was verified by reverting it and confirming the test fails for the asserted reason, rather than only by watching it pass.

Check On main With the fix
rebuild.test.ts (jsdom) — full-snapshot path, the fatal one DOMException: NotSupportedError passes; outerHTML also pins that the shadow subtree is not inlined into the light DOM
rrdom/test/diff.test.ts (jsdom) — virtual → real diff DOMException passes; shadowRoot null, no children leaked
replayer.test.ts (real Chromium) — mutation path under the virtual DOM <video> host absent: the whole flush is abandoned and neither mutation batch reaches the DOM passes; host and light-DOM sibling render, only the shadow subtree is dropped

Also run:

  • Suites: rrweb replayer 57/57 in Chromium, rrdom 148/148, rrweb-snapshot 270 passed / 1 skipped (includes the puppeteer integration and shadow-dom suites).
  • tsc --noEmit clean in rrweb-snapshot, rrdom and rrweb; eslint 'packages/rrweb/*/src/**/*.ts' exit 0.
  • The new lint rule was checked in both directions: planting a bare attachShadow errors, and super.attachShadow overrides are ignored.
  • The light-DOM leak was demonstrated before fixing it — a refused host produced <nohyphen><style>.leaked { color: red }</style><div></div></nohyphen>.

Not covered: the exact tag Firefox refused in the field, and no run in Firefox or Safari — all browser evidence here is headless Chromium.

Release info Sub-libraries affected

Libraries affected

  • All of them
  • posthog-js (web)
  • posthog-js-lite (web lite)
  • posthog-node
  • posthog-react-native
  • @posthog/react-native-plugin
  • @posthog/react
  • @posthog/ai
  • @posthog/convex
  • @posthog/next
  • @posthog/nextjs-config
  • @posthog/nuxt
  • @posthog/openfeature-node-provider
  • @posthog/openfeature-web-provider
  • @posthog/rollup-plugin
  • @posthog/webpack-plugin
  • @posthog/types
  • @posthog/browser-common

Checklist

  • Tests for new code
  • Accounted for the impact of any changes across different platforms
  • Accounted for backwards compatibility of any changes (no breaking changes!)
  • Took care not to unnecessarily increase the bundle size

If releasing new changes

  • Ran pnpm changeset to generate a changeset file

🤖 Agent context

Autonomy: Fully autonomous for the original commits; the follow-up commit was authored during maintainer review.

  • Original two commits authored by Claude Opus 4.8 via PostHog Desktop, working from an inbox report.
  • A tag-name predicate was considered and rejected: the browser's shadow-host rule spans a fixed tag list plus the valid-custom-element-name production plus reserved names, so mirroring it is a maintenance liability. A try/catch around the real attachShadow is the reliable check.
  • Follow-up commit adds the two missing call sites, the light-DOM leak fix, the lint rule, and the tests, and corrects the mechanism described above.

Created with PostHog Desktop from this inbox report.

…t kill playback

The player calls attachShadow on any node marked as a shadow host, in the full
snapshot rebuild and in incremental mutations. Neither site checked that the
rebuilt tag accepts a shadow root, so a host that comes back as a tag the
browser refuses raised a NotSupportedError that escaped unhandled and aborted
the whole rebuild.

Add a shared attachShadowRootSafely helper that reports whether the attach
worked. The rebuild path skips the shadow root; the mutation path skips the
subtree and warns instead of dereferencing a null shadowRoot a line later.

Generated-By: PostHog Desktop
Task-Id: 8948b193-aacc-4857-a0cf-3b37113c8158
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Replay incident risk check

This diff touches code involved in past incidents. This is a heads-up, not a verdict: read the matched sections of INCIDENTS.md and answer their review questions before merging.

For a judgment on whether this diff has the same failure mode, run the replay-incident-risk skill locally: open a Claude session in the repo root and ask it to review your diff with that skill. Or run node .agents/skills/replay-incident-risk/check.mjs and answer the review questions for each matched class yourself.

Matched 3 past incident pattern(s) (diff vs origin/main):

## rrweb serialization and snapshot correctness [path match]
Serializer bugs corrupt replays silently: no exception, no volume change. In May 2026 a cssText spec quirk silently dropped layout styles for sites using CSS custom properties. Test against framework-generated CSS (Chakra/Panda, Emotion speedy, Tailwind) in a real browser.
  Touched paths:
    - packages/rrweb/rrdom/src/diff.ts
    - packages/rrweb/rrdom/src/index.ts
    - packages/rrweb/rrdom/test/diff.test.ts
    - packages/rrweb/rrweb-snapshot/src/rebuild.ts
    - packages/rrweb/rrweb-snapshot/src/utils.ts
    - packages/rrweb/rrweb-snapshot/test/rebuild.test.ts
  Read: .agents/skills/replay-incident-risk/INCIDENTS.md#class-4-rrweb-serialization-and-snapshot-correctness

## Replay reconstruction and player security [path match]
Recorded page content is untrusted input. Anything the replayer places in the top-level document sits outside the sandbox iframe: copying recorded attributes without an allowlist caused a stored XSS via canvas onerror (Jul 2026). Never copy on* handlers or src/srcset/href you did not construct.
  Touched paths:
    - packages/rrweb/rrweb/src/replay/index.ts
    - packages/rrweb/rrweb/test/replayer.test.ts
  Read: .agents/skills/replay-incident-risk/INCIDENTS.md#class-5-replay-reconstruction-and-player-security

## Masking, privacy, and consent [path match]
A masking or consent regression records data customers promised their users we would not store: passwords, PII, opted-out sessions. Nothing throws and no volume moves, so no alert can fire, and recorded data cannot be un-stored. Add a real-browser test asserting the sensitive value is absent from the emitted snapshot bytes.
  Touched paths:
    - packages/rrweb/rrweb-snapshot/src/rebuild.ts
    - packages/rrweb/rrweb-snapshot/src/utils.ts
    - packages/rrweb/rrweb-snapshot/test/rebuild.test.ts
  Read: .agents/skills/replay-incident-risk/INCIDENTS.md#class-8-masking-privacy-and-consent-proactive-no-incident-yet

This check is advisory. It flags resemblance to past incidents, not correctness.
For a judgment pass on whether this diff has the same failure mode, run the
`replay-incident-risk` skill in a Claude session from the repo root, or answer the
review questions in the matched sections of .agents/skills/replay-incident-risk/INCIDENTS.md yourself.

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Size Change: +14.4 kB (+0.07%)

Total Size: 20.2 MB

📦 View Changed
Filename Size Change
packages/browser/dist/rrweb.js 318 kB +359 B (+0.11%)
packages/rrweb/all/dist/rrweb-all.cjs 704 kB +865 B (+0.12%)
packages/rrweb/all/dist/rrweb-all.js 704 kB +865 B (+0.12%)
packages/rrweb/all/dist/rrweb-all.umd.cjs 708 kB +875 B (+0.12%)
packages/rrweb/all/dist/rrweb-all.umd.min.cjs 328 kB +360 B (+0.11%)
packages/rrweb/replay/dist/rrweb-replay.cjs 475 kB +865 B (+0.18%)
packages/rrweb/replay/dist/rrweb-replay.js 475 kB +865 B (+0.18%)
packages/rrweb/replay/dist/rrweb-replay.umd.cjs 478 kB +875 B (+0.18%)
packages/rrweb/replay/dist/rrweb-replay.umd.min.cjs 225 kB +360 B (+0.16%)
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.cjs 160 kB -11 B (-0.01%)
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.js 160 kB -11 B (-0.01%)
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.umd.cjs 162 kB -11 B (-0.01%)
packages/rrweb/rrdom/dist/rrdom.cjs 186 kB +232 B (+0.13%)
packages/rrweb/rrdom/dist/rrdom.js 185 kB +232 B (+0.13%)
packages/rrweb/rrdom/dist/rrdom.umd.cjs 187 kB +236 B (+0.13%)
packages/rrweb/rrdom/dist/rrdom.umd.min.cjs 85.5 kB +71 B (+0.08%)
packages/rrweb/rrweb-snapshot/dist/record.cjs 39 kB +63 B (+0.16%)
packages/rrweb/rrweb-snapshot/dist/record.js 37.3 kB +28 B (+0.08%)
packages/rrweb/rrweb-snapshot/dist/record.umd.cjs 82.9 kB +299 B (+0.36%)
packages/rrweb/rrweb-snapshot/dist/record.umd.min.cjs 37.4 kB +162 B (+0.44%)
packages/rrweb/rrweb-snapshot/dist/replay.cjs 149 kB +420 B (+0.28%)
packages/rrweb/rrweb-snapshot/dist/replay.js 149 kB +390 B (+0.26%)
packages/rrweb/rrweb-snapshot/dist/replay.umd.cjs 194 kB +654 B (+0.34%)
packages/rrweb/rrweb-snapshot/dist/replay.umd.min.cjs 86.1 kB +325 B (+0.38%)
packages/rrweb/rrweb-snapshot/dist/rrweb-********.cjs 3.95 kB +63 B (+1.62%)
packages/rrweb/rrweb-snapshot/dist/rrweb-********.js 2.32 kB +34 B (+1.49%)
packages/rrweb/rrweb-snapshot/dist/rrweb-********.umd.cjs 261 kB +822 B (+0.32%)
packages/rrweb/rrweb-snapshot/dist/rrweb-********.umd.min.cjs 109 kB +425 B (+0.39%)
packages/rrweb/rrweb-snapshot/dist/types-********.cjs 0 B -37.3 kB (removed) 🏆
packages/rrweb/rrweb-snapshot/dist/types-********.js 36.3 kB +169 B (+0.47%)
packages/rrweb/rrweb-snapshot/dist/types-********.umd.cjs 0 B -38.5 kB (removed) 🏆
packages/rrweb/rrweb-snapshot/dist/types-********.umd.min.cjs 0 B -17.2 kB (removed) 🏆
packages/rrweb/rrweb-snapshot/dist/types-D-2D-qhU.cjs 37.4 kB +37.4 kB (new file) 🆕
packages/rrweb/rrweb-snapshot/dist/types-D-2D-qhU.umd.cjs 38.7 kB +38.7 kB (new file) 🆕
packages/rrweb/rrweb-snapshot/dist/types-D-2D-qhU.umd.min.cjs 17.3 kB +17.3 kB (new file) 🆕
packages/rrweb/rrweb/dist/rrweb.cjs 688 kB +865 B (+0.13%)
packages/rrweb/rrweb/dist/rrweb.js 688 kB +865 B (+0.13%)
packages/rrweb/rrweb/dist/rrweb.umd.cjs 688 kB +875 B (+0.13%)
packages/rrweb/rrweb/dist/rrweb.umd.min.cjs 318 kB +360 B (+0.11%)
ℹ️ View Unchanged
Filename Size Change
packages/ai/dist/anthropic/index.cjs 41.3 kB 0 B
packages/ai/dist/anthropic/index.mjs 41 kB 0 B
packages/ai/dist/gemini/index.cjs 40.9 kB 0 B
packages/ai/dist/gemini/index.mjs 40.8 kB 0 B
packages/ai/dist/index.cjs 63.4 kB 0 B
packages/ai/dist/index.mjs 63.3 kB 0 B
packages/ai/dist/langchain/index.cjs 42.5 kB 0 B
packages/ai/dist/langchain/index.mjs 42.4 kB 0 B
packages/ai/dist/openai-agents/index.cjs 31.8 kB 0 B
packages/ai/dist/openai-agents/index.mjs 31.7 kB 0 B
packages/ai/dist/openai/index.cjs 93.3 kB 0 B
packages/ai/dist/openai/index.mjs 92.9 kB 0 B
packages/ai/dist/otel/index.cjs 18.4 kB 0 B
packages/ai/dist/otel/index.mjs 18.3 kB 0 B
packages/ai/dist/vercel/index.cjs 53.5 kB 0 B
packages/ai/dist/vercel/index.mjs 53.5 kB 0 B
packages/browser-common/dist/client.js 603 B 0 B
packages/browser-common/dist/client.mjs 0 B 0 B 🆕
packages/browser-common/dist/config.js 1.43 kB 0 B
packages/browser-common/dist/config.mjs 223 B 0 B
packages/browser-common/dist/constants.js 1.66 kB 0 B
packages/browser-common/dist/constants.mjs 219 B 0 B
packages/browser-common/dist/disposable.js 1.63 kB 0 B
packages/browser-common/dist/disposable.mjs 386 B 0 B
packages/browser-common/dist/extension-runtime.js 3.07 kB 0 B
packages/browser-common/dist/extension-runtime.mjs 1.83 kB 0 B
packages/browser-common/dist/extension.js 603 B 0 B
packages/browser-common/dist/extension.mjs 0 B 0 B 🆕
packages/browser-common/dist/index.js 3.08 kB 0 B
packages/browser-common/dist/index.mjs 170 B 0 B
packages/browser-common/dist/persistence.js 603 B 0 B
packages/browser-common/dist/persistence.mjs 0 B 0 B 🆕
packages/browser-common/dist/pubsub.js 2.23 kB 0 B
packages/browser-common/dist/pubsub.mjs 993 B 0 B
packages/browser-common/dist/token.js 603 B 0 B
packages/browser-common/dist/token.mjs 0 B 0 B 🆕
packages/browser-common/dist/types/compression.js 1.28 kB 0 B
packages/browser-common/dist/types/compression.mjs 93 B 0 B
packages/browser-common/dist/types/index.js 4.11 kB 0 B
packages/browser-common/dist/types/index.mjs 144 B 0 B
packages/browser-common/dist/types/network-recording.js 603 B 0 B
packages/browser-common/dist/types/network-recording.mjs 0 B 0 B 🆕
packages/browser-common/dist/types/remote-config.js 603 B 0 B
packages/browser-common/dist/types/remote-config.mjs 0 B 0 B 🆕
packages/browser-common/dist/types/surveys.js 4.55 kB 0 B
packages/browser-common/dist/types/surveys.mjs 2.17 kB 0 B
packages/browser-common/dist/utils/array-at-********.js 628 B 0 B
packages/browser-common/dist/utils/array-at-********.mjs 425 B 0 B
packages/browser-common/dist/utils/autocapture-utils.js 24 kB 0 B
packages/browser-common/dist/utils/autocapture-utils.mjs 18.5 kB 0 B
packages/browser-common/dist/utils/blocked-uas.js 2.1 kB 0 B
packages/browser-common/dist/utils/blocked-uas.mjs 598 B 0 B
packages/browser-common/dist/utils/cookie-utils.js 1.89 kB 0 B
packages/browser-common/dist/utils/cookie-utils.mjs 673 B 0 B
packages/browser-common/dist/utils/device-model-utils.js 1.98 kB 0 B
packages/browser-common/dist/utils/device-model-utils.mjs 678 B 0 B
packages/browser-common/dist/utils/element-utils.js 2.46 kB 0 B
packages/browser-common/dist/utils/element-utils.mjs 804 B 0 B
packages/browser-common/dist/utils/elements-chain-utils.js 2.77 kB 0 B
packages/browser-common/dist/utils/elements-chain-utils.mjs 1.23 kB 0 B
packages/browser-common/dist/utils/encode-utils.js 1.4 kB 0 B
packages/browser-common/dist/utils/encode-utils.mjs 205 B 0 B
packages/browser-common/dist/utils/event-utils.js 15.7 kB 0 B
packages/browser-common/dist/utils/event-utils.mjs 10 kB 0 B
packages/browser-common/dist/utils/general-utils.js 7.31 kB 0 B
packages/browser-common/dist/utils/general-utils.mjs 4.49 kB 0 B
packages/browser-common/dist/utils/globals.js 2.78 kB 0 B
packages/browser-common/dist/utils/globals.mjs 860 B 0 B
packages/browser-common/dist/utils/logger.js 3.4 kB 0 B
packages/browser-common/dist/utils/logger.mjs 1.61 kB 0 B
packages/browser-common/dist/utils/matcher-utils.js 2.85 kB 0 B
packages/browser-common/dist/utils/matcher-utils.mjs 1.33 kB 0 B
packages/browser-common/dist/utils/promise-utils.js 1.36 kB 0 B
packages/browser-common/dist/utils/promise-utils.mjs 169 B 0 B
packages/browser-common/dist/utils/property-utils.js 3.53 kB 0 B
packages/browser-common/dist/utils/property-utils.mjs 1.6 kB 0 B
packages/browser-common/dist/utils/prototype-utils.js 3.51 kB 0 B
packages/browser-common/dist/utils/prototype-utils.mjs 1.86 kB 0 B
packages/browser-common/dist/utils/regex-utils.js 1.45 kB 0 B
packages/browser-common/dist/utils/regex-utils.mjs 113 B 0 B
packages/browser-common/dist/utils/request-utils.js 6.73 kB 0 B
packages/browser-common/dist/utils/request-utils.mjs 4.19 kB 0 B
packages/browser-common/dist/utils/simple-event-emitter.js 1.76 kB 0 B
packages/browser-common/dist/utils/simple-event-emitter.mjs 553 B 0 B
packages/browser-common/dist/utils/stylesheet-loader.js 2.13 kB 0 B
packages/browser-common/dist/utils/stylesheet-loader.mjs 823 B 0 B
packages/browser-common/dist/utils/type-utils.js 1.59 kB 0 B
packages/browser-common/dist/utils/type-utils.mjs 267 B 0 B
packages/browser-common/dist/utils/url-targeting-utils.js 2.35 kB 0 B
packages/browser-common/dist/utils/url-targeting-utils.mjs 863 B 0 B
packages/browser-common/dist/utils/uuidv7.js 6.66 kB 0 B
packages/browser-common/dist/utils/uuidv7.mjs 5.18 kB 0 B
packages/browser/dist/all-external-dependencies.js 367 kB 0 B
packages/browser/dist/array.full.es5.js 473 kB 0 B
packages/browser/dist/array.full.js 597 kB 0 B
packages/browser/dist/array.full.no-********.js 647 kB 0 B
packages/browser/dist/array.js 267 kB 0 B
packages/browser/dist/array.no-********.js 301 kB 0 B
packages/browser/dist/conversations.js 68.2 kB 0 B
packages/browser/dist/crisp-chat-integration.js 2.03 kB 0 B
packages/browser/dist/customizations.full.js 15.9 kB 0 B
packages/browser/dist/customizations.js 15.8 kB 0 B
packages/browser/dist/dead-clicks-autocapture.js 18.2 kB 0 B
packages/browser/dist/default-extensions.js 264 kB 0 B
packages/browser/dist/element-inference.js 5.62 kB 0 B
packages/browser/dist/exception-autocapture.js 13.6 kB 0 B
packages/browser/dist/extension-bundles.js 149 kB 0 B
packages/browser/dist/external-scripts-loader.js 3.6 kB 0 B
packages/browser/dist/intercom-integration.js 2.08 kB 0 B
packages/browser/dist/lazy-********.js 191 kB 0 B
packages/browser/dist/logs.js 4.94 kB 0 B
packages/browser/dist/main.js 271 kB 0 B
packages/browser/dist/module.full.js 599 kB 0 B
packages/browser/dist/module.full.no-********.js 650 kB 0 B
packages/browser/dist/module.js 271 kB 0 B
packages/browser/dist/module.no-********.js 305 kB 0 B
packages/browser/dist/module.slim.js 133 kB 0 B
packages/browser/dist/module.slim.no-********.js 144 kB 0 B
packages/browser/dist/posthog-********.js 191 kB 0 B
packages/browser/dist/product-tours-preview.js 82.4 kB 0 B
packages/browser/dist/product-tours.js 124 kB 0 B
packages/browser/dist/recorder-v2.js 126 kB 0 B
packages/browser/dist/recorder.js 126 kB 0 B
packages/browser/dist/rrweb-plugin-console-record.js 6.99 kB 0 B
packages/browser/dist/rrweb-types.js 2.33 kB 0 B
packages/browser/dist/surveys-preview.js 80.9 kB 0 B
packages/browser/dist/surveys.js 101 kB 0 B
packages/browser/dist/tracing-headers.js 3.71 kB 0 B
packages/browser/dist/web-vitals-soft-navs.js 9.9 kB 0 B
packages/browser/dist/web-vitals-with-attribution-soft-navs.js 25.1 kB 0 B
packages/browser/dist/web-vitals-with-attribution.js 18.4 kB 0 B
packages/browser/dist/web-vitals.js 6.91 kB 0 B
packages/browser/react/dist/esm/index.js 22.5 kB 0 B
packages/browser/react/dist/esm/slim/index.js 18.9 kB 0 B
packages/browser/react/dist/esm/surveys/index.js 4.75 kB 0 B
packages/browser/react/dist/umd/index.js 25.9 kB 0 B
packages/browser/react/dist/umd/slim/index.js 21.8 kB 0 B
packages/browser/react/dist/umd/surveys/index.js 5.52 kB 0 B
packages/convex/dist/client/feature-flags/crypto.js 76 B 0 B
packages/convex/dist/client/feature-flags/evaluator.js 14.9 kB 0 B
packages/convex/dist/client/feature-flags/index.js 196 B 0 B
packages/convex/dist/client/feature-flags/match-********.js 5.08 kB 0 B
packages/convex/dist/client/feature-flags/types.js 44 B 0 B
packages/convex/dist/client/index.js 14.8 kB 0 B
packages/convex/dist/component/_generated/api.js 712 B 0 B
packages/convex/dist/component/_generated/component.js 212 B 0 B
packages/convex/dist/component/_generated/dataModel.js 230 B 0 B
packages/convex/dist/component/_generated/server.js 3.74 kB 0 B
packages/convex/dist/component/convex.config.js 1.66 kB 0 B
packages/convex/dist/component/crons.js 969 B 0 B
packages/convex/dist/component/lib.js 24.8 kB 0 B
packages/convex/dist/component/schema.js 1.17 kB 0 B
packages/convex/dist/component/version.js 67 B 0 B
packages/core/dist/cookie.js 5.34 kB 0 B
packages/core/dist/cookie.mjs 3.12 kB 0 B
packages/core/dist/error-tracking/chunk-ids.js 2.54 kB 0 B
packages/core/dist/error-tracking/chunk-ids.mjs 1.31 kB 0 B
packages/core/dist/error-tracking/coercers/dom-exception-coercer.js 2.3 kB 0 B
packages/core/dist/error-tracking/coercers/dom-exception-coercer.mjs 993 B 0 B
packages/core/dist/error-tracking/coercers/error-coercer.js 2.13 kB 0 B
packages/core/dist/error-tracking/coercers/error-coercer.mjs 888 B 0 B
packages/core/dist/error-tracking/coercers/error-event-coercer.js 2.37 kB 0 B
packages/core/dist/error-tracking/coercers/error-event-coercer.mjs 1.07 kB 0 B
packages/core/dist/error-tracking/coercers/event-coercer.js 1.82 kB 0 B
packages/core/dist/error-tracking/coercers/event-coercer.mjs 548 B 0 B
packages/core/dist/error-tracking/coercers/index.js 6.79 kB 0 B
packages/core/dist/error-tracking/coercers/index.mjs 326 B 0 B
packages/core/dist/error-tracking/coercers/object-coercer.js 4.04 kB 0 B
packages/core/dist/error-tracking/coercers/object-coercer.mjs 2.53 kB 0 B
packages/core/dist/error-tracking/coercers/primitive-coercer.js 1.67 kB 0 B
packages/core/dist/error-tracking/coercers/primitive-coercer.mjs 419 B 0 B
packages/core/dist/error-tracking/coercers/promise-rejection-event.js 2.59 kB 0 B
packages/core/dist/error-tracking/coercers/promise-rejection-event.mjs 1.25 kB 0 B
packages/core/dist/error-tracking/coercers/string-coercer.js 2.01 kB 0 B
packages/core/dist/error-tracking/coercers/string-coercer.mjs 820 B 0 B
packages/core/dist/error-tracking/coercers/utils.js 2.06 kB 0 B
packages/core/dist/error-tracking/coercers/utils.mjs 716 B 0 B
packages/core/dist/error-tracking/error-properties-builder.js 5.56 kB 0 B
packages/core/dist/error-tracking/error-properties-builder.mjs 4.23 kB 0 B
packages/core/dist/error-tracking/exception-steps.js 6.01 kB 0 B
packages/core/dist/error-tracking/exception-steps.mjs 3.84 kB 0 B
packages/core/dist/error-tracking/index.js 5.32 kB 0 B
packages/core/dist/error-tracking/index.mjs 222 B 0 B
packages/core/dist/error-tracking/parsers/base.js 2 kB 0 B
packages/core/dist/error-tracking/parsers/base.mjs 627 B 0 B
packages/core/dist/error-tracking/parsers/chrome.js 2.73 kB 0 B
packages/core/dist/error-tracking/parsers/chrome.mjs 1.32 kB 0 B
packages/core/dist/error-tracking/parsers/gecko.js 2.47 kB 0 B
packages/core/dist/error-tracking/parsers/gecko.mjs 1.13 kB 0 B
packages/core/dist/error-tracking/parsers/index.js 4.75 kB 0 B
packages/core/dist/error-tracking/parsers/index.mjs 2.1 kB 0 B
packages/core/dist/error-tracking/parsers/node.js 4.21 kB 0 B
packages/core/dist/error-tracking/parsers/node.mjs 2.95 kB 0 B
packages/core/dist/error-tracking/parsers/opera.js 2.26 kB 0 B
packages/core/dist/error-tracking/parsers/opera.mjs 746 B 0 B
packages/core/dist/error-tracking/parsers/safari.js 1.88 kB 0 B
packages/core/dist/error-tracking/parsers/safari.mjs 574 B 0 B
packages/core/dist/error-tracking/parsers/winjs.js 1.72 kB 0 B
packages/core/dist/error-tracking/parsers/winjs.mjs 426 B 0 B
packages/core/dist/error-tracking/release.js 1.42 kB 0 B
packages/core/dist/error-tracking/release.mjs 203 B 0 B
packages/core/dist/error-tracking/types.js 1.33 kB 0 B
packages/core/dist/error-tracking/types.mjs 131 B 0 B
packages/core/dist/error-tracking/utils.js 1.8 kB 0 B
packages/core/dist/error-tracking/utils.mjs 604 B 0 B
packages/core/dist/eventemitter.js 1.78 kB 0 B
packages/core/dist/eventemitter.mjs 571 B 0 B
packages/core/dist/featureFlagLocalEvaluation.js 15.3 kB 0 B
packages/core/dist/featureFlagLocalEvaluation.mjs 12.8 kB 0 B
packages/core/dist/featureFlagUtils.js 8.52 kB 0 B
packages/core/dist/featureFlagUtils.mjs 5.48 kB 0 B
packages/core/dist/gzip.js 5.73 kB 0 B
packages/core/dist/gzip.mjs 3.85 kB 0 B
packages/core/dist/index.js 23.2 kB 0 B
packages/core/dist/index.mjs 2.47 kB 0 B
packages/core/dist/logs/index.js 10.5 kB 0 B
packages/core/dist/logs/index.mjs 8.89 kB 0 B
packages/core/dist/logs/logs-utils.js 12.3 kB 0 B
packages/core/dist/logs/logs-utils.mjs 9.59 kB 0 B
packages/core/dist/logs/types.js 603 B 0 B
packages/core/dist/logs/types.mjs 0 B 0 B 🆕
packages/core/dist/metrics/config.js 1.95 kB 0 B
packages/core/dist/metrics/config.mjs 735 B 0 B
packages/core/dist/metrics/index.js 14.4 kB 0 B
packages/core/dist/metrics/index.mjs 12 kB 0 B
packages/core/dist/metrics/metrics-utils.js 3.86 kB 0 B
packages/core/dist/metrics/metrics-utils.mjs 1.97 kB 0 B
packages/core/dist/metrics/types.js 603 B 0 B
packages/core/dist/metrics/types.mjs 0 B 0 B 🆕
packages/core/dist/posthog-core-stateless.js 46.9 kB 0 B
packages/core/dist/posthog-core-stateless.mjs 43.7 kB 0 B
packages/core/dist/posthog-core.js 49.5 kB 0 B
packages/core/dist/posthog-core.mjs 43.9 kB 0 B
packages/core/dist/surveys/activation.js 2.2 kB 0 B
packages/core/dist/surveys/activation.mjs 572 B 0 B
packages/core/dist/surveys/events.js 4.21 kB 0 B
packages/core/dist/surveys/events.mjs 1.99 kB 0 B
packages/core/dist/surveys/index.js 6.54 kB 0 B
packages/core/dist/surveys/index.mjs 1.4 kB 0 B
packages/core/dist/surveys/keys.js 1.7 kB 0 B
packages/core/dist/surveys/keys.mjs 350 B 0 B
packages/core/dist/surveys/property-********.js 3.69 kB 0 B
packages/core/dist/surveys/property-********.mjs 2.14 kB 0 B
packages/core/dist/surveys/translations.js 9.09 kB 0 B
packages/core/dist/surveys/translations.mjs 6.83 kB 0 B
packages/core/dist/surveys/validation.js 3.06 kB 0 B
packages/core/dist/surveys/validation.mjs 1.51 kB 0 B
packages/core/dist/testing/index.js 2.93 kB 0 B
packages/core/dist/testing/index.mjs 79 B 0 B
packages/core/dist/testing/PostHogCoreTestClient.js 3.24 kB 0 B
packages/core/dist/testing/PostHogCoreTestClient.mjs 1.83 kB 0 B
packages/core/dist/testing/test-utils.js 2.83 kB 0 B
packages/core/dist/testing/test-utils.mjs 1.15 kB 0 B
packages/core/dist/tracing-headers.js 3.38 kB 0 B
packages/core/dist/tracing-headers.mjs 2.08 kB 0 B
packages/core/dist/types.js 8.35 kB 0 B
packages/core/dist/types.mjs 5.23 kB 0 B
packages/core/dist/utils/bot-detection.js 3.28 kB 0 B
packages/core/dist/utils/bot-detection.mjs 1.95 kB 0 B
packages/core/dist/utils/browser-utils.js 1.48 kB 0 B
packages/core/dist/utils/browser-utils.mjs 182 B 0 B
packages/core/dist/utils/bucketed-rate-limiter.js 4.23 kB 0 B
packages/core/dist/utils/bucketed-rate-limiter.mjs 2.22 kB 0 B
packages/core/dist/utils/index.js 15.9 kB 0 B
packages/core/dist/utils/index.mjs 3.05 kB 0 B
packages/core/dist/utils/json-utils.js 6.67 kB 0 B
packages/core/dist/utils/json-utils.mjs 4.45 kB 0 B
packages/core/dist/utils/logger.js 2.58 kB 0 B
packages/core/dist/utils/logger.mjs 1.29 kB 0 B
packages/core/dist/utils/number-utils.js 3.32 kB 0 B
packages/core/dist/utils/number-utils.mjs 1.68 kB 0 B
packages/core/dist/utils/promise-queue.js 2.48 kB 0 B
packages/core/dist/utils/promise-queue.mjs 1.25 kB 0 B
packages/core/dist/utils/string-utils.js 3.73 kB 0 B
packages/core/dist/utils/string-utils.mjs 1.97 kB 0 B
packages/core/dist/utils/type-utils.js 7.43 kB 0 B
packages/core/dist/utils/type-utils.mjs 3.28 kB 0 B
packages/core/dist/utils/user-agent-utils.js 17.7 kB 0 B
packages/core/dist/utils/user-agent-utils.mjs 14.2 kB 0 B
packages/core/dist/vendor/uuidv7.js 8.29 kB 0 B
packages/core/dist/vendor/uuidv7.mjs 6.72 kB 0 B
packages/mcp/dist/extensions/analytics-parameters.js 4.57 kB 0 B
packages/mcp/dist/extensions/analytics-parameters.mjs 2.54 kB 0 B
packages/mcp/dist/extensions/capture.js 3.85 kB 0 B
packages/mcp/dist/extensions/capture.mjs 2.49 kB 0 B
packages/mcp/dist/extensions/client-********.js 6.23 kB 0 B
packages/mcp/dist/extensions/client-********.mjs 3.71 kB 0 B
packages/mcp/dist/extensions/compatibility.js 5.36 kB 0 B
packages/mcp/dist/extensions/compatibility.mjs 3.4 kB 0 B
packages/mcp/dist/extensions/constants.js 4.77 kB 0 B
packages/mcp/dist/extensions/constants.mjs 2.53 kB 0 B
packages/mcp/dist/extensions/context-parameters.js 4.01 kB 0 B
packages/mcp/dist/extensions/context-parameters.mjs 2.12 kB 0 B
packages/mcp/dist/extensions/conversation-id.js 6.31 kB 0 B
packages/mcp/dist/extensions/conversation-id.mjs 3.58 kB 0 B
packages/mcp/dist/extensions/detect.js 3.77 kB 0 B
packages/mcp/dist/extensions/detect.mjs 1.49 kB 0 B
packages/mcp/dist/extensions/event-types.js 1.68 kB 0 B
packages/mcp/dist/extensions/event-types.mjs 459 B 0 B
packages/mcp/dist/extensions/exceptions.js 2.57 kB 0 B
packages/mcp/dist/extensions/exceptions.mjs 1.19 kB 0 B
packages/mcp/dist/extensions/headers.js 1.98 kB 0 B
packages/mcp/dist/extensions/headers.mjs 643 B 0 B
packages/mcp/dist/extensions/ids.js 2.01 kB 0 B
packages/mcp/dist/extensions/ids.mjs 637 B 0 B
packages/mcp/dist/extensions/instrument-********.js 4.79 kB 0 B
packages/mcp/dist/extensions/instrument-********.mjs 3.06 kB 0 B
packages/mcp/dist/extensions/instrument-highlevel.js 12.2 kB 0 B
packages/mcp/dist/extensions/instrument-highlevel.mjs 9.86 kB 0 B
packages/mcp/dist/extensions/instrumentation.js 26.5 kB 0 B
packages/mcp/dist/extensions/instrumentation.mjs 21.1 kB 0 B
packages/mcp/dist/extensions/intent.js 3.2 kB 0 B
packages/mcp/dist/extensions/intent.mjs 1.64 kB 0 B
packages/mcp/dist/extensions/internal.js 7.54 kB 0 B
packages/mcp/dist/extensions/internal.mjs 5.23 kB 0 B
packages/mcp/dist/extensions/lib-********.js 1.6 kB 0 B
packages/mcp/dist/extensions/lib-********.mjs 267 B 0 B
packages/mcp/dist/extensions/logger.js 1.72 kB 0 B
packages/mcp/dist/extensions/logger.mjs 380 B 0 B
packages/mcp/dist/extensions/mcp-********.js 4.68 kB 0 B
packages/mcp/dist/extensions/mcp-********.mjs 3.3 kB 0 B
packages/mcp/dist/extensions/mcp-sdk-compat.js 5.04 kB 0 B
packages/mcp/dist/extensions/mcp-sdk-compat.mjs 2.9 kB 0 B
packages/mcp/dist/extensions/output-instructions.js 6.11 kB 0 B
packages/mcp/dist/extensions/output-instructions.mjs 3.91 kB 0 B
packages/mcp/dist/extensions/posthog-events.js 11.4 kB 0 B
packages/mcp/dist/extensions/posthog-events.mjs 7.78 kB 0 B
packages/mcp/dist/extensions/posthog-mcp.js 6.94 kB 0 B
packages/mcp/dist/extensions/posthog-mcp.mjs 4.93 kB 0 B
packages/mcp/dist/extensions/request-headers.js 2.17 kB 0 B
packages/mcp/dist/extensions/request-headers.mjs 963 B 0 B
packages/mcp/dist/extensions/sanitization.js 4.49 kB 0 B
packages/mcp/dist/extensions/sanitization.mjs 2.86 kB 0 B
packages/mcp/dist/extensions/session-token.js 5.39 kB 0 B
packages/mcp/dist/extensions/session-token.mjs 3.62 kB 0 B
packages/mcp/dist/extensions/session.js 6.64 kB 0 B
packages/mcp/dist/extensions/session.mjs 4.12 kB 0 B
packages/mcp/dist/extensions/sink.js 4.37 kB 0 B
packages/mcp/dist/extensions/sink.mjs 2.67 kB 0 B
packages/mcp/dist/extensions/tools.js 3.51 kB 0 B
packages/mcp/dist/extensions/tools.mjs 1.63 kB 0 B
packages/mcp/dist/extensions/tracing-helpers.js 2.41 kB 0 B
packages/mcp/dist/extensions/tracing-helpers.mjs 772 B 0 B
packages/mcp/dist/extensions/transport-********.js 2.91 kB 0 B
packages/mcp/dist/extensions/transport-********.mjs 1.09 kB 0 B
packages/mcp/dist/extensions/truncation.js 11.4 kB 0 B
packages/mcp/dist/extensions/truncation.mjs 9.71 kB 0 B
packages/mcp/dist/index.js 8.78 kB 0 B
packages/mcp/dist/index.mjs 4.96 kB 0 B
packages/mcp/dist/types.js 603 B 0 B
packages/mcp/dist/types.mjs 0 B 0 B 🆕
packages/mcp/dist/version.js 1.21 kB 0 B
packages/mcp/dist/version.mjs 46 B 0 B
packages/next/dist/app/PostHogProvider.js 5.37 kB 0 B
packages/next/dist/client/ClientPostHogProvider.js 2.28 kB 0 B
packages/next/dist/client/hooks.js 172 B 0 B
packages/next/dist/client/PostHogPageView.js 1.76 kB 0 B
packages/next/dist/index.client.js 401 B 0 B
packages/next/dist/index.edge.js 570 B 0 B
packages/next/dist/index.js 554 B 0 B
packages/next/dist/index.react-server.js 420 B 0 B
packages/next/dist/middleware/postHogMiddleware.js 4.08 kB 0 B
packages/next/dist/pages.client.js 225 B 0 B
packages/next/dist/pages.edge.js 294 B 0 B
packages/next/dist/pages.js 347 B 0 B
packages/next/dist/pages/createPostHog.js 1.48 kB 0 B
packages/next/dist/pages/getServerSidePostHog.js 1.48 kB 0 B
packages/next/dist/pages/PostHogPageView.js 1.55 kB 0 B
packages/next/dist/pages/PostHogProvider.js 1.58 kB 0 B
packages/next/dist/server.edge.js 795 B 0 B
packages/next/dist/server/captureRequestError.js 5.26 kB 0 B
packages/next/dist/server/clientCache.edge.js 305 B 0 B
packages/next/dist/server/clientCache.js 1.54 kB 0 B
packages/next/dist/server/clientCache.node.js 305 B 0 B
packages/next/dist/server/createPostHog.js 1.44 kB 0 B
packages/next/dist/server/getPostHog.js 3.45 kB 0 B
packages/next/dist/server/onRequestError.js 1.39 kB 0 B
packages/next/dist/server/onRequestError.types.js 59 B 0 B
packages/next/dist/shared/browser.js 195 B 0 B
packages/next/dist/shared/config.js 2.23 kB 0 B
packages/next/dist/shared/constants.js 201 B 0 B
packages/next/dist/shared/cookie.js 540 B 0 B
packages/next/dist/shared/identity.js 2.56 kB 0 B
packages/next/dist/shared/tracing-headers.js 2.18 kB 0 B
packages/nextjs-config/dist/config.js 6.1 kB 0 B
packages/nextjs-config/dist/config.mjs 4.53 kB 0 B
packages/nextjs-config/dist/index.js 2.24 kB 0 B
packages/nextjs-config/dist/index.mjs 30 B 0 B
packages/nextjs-config/dist/strip-sourcemap-********.js 3.63 kB 0 B
packages/nextjs-config/dist/strip-sourcemap-********.mjs 1.77 kB 0 B
packages/nextjs-config/dist/utils.js 2.94 kB 0 B
packages/nextjs-config/dist/utils.mjs 826 B 0 B
packages/node/dist/ai-capture/batching.js 2.61 kB 0 B
packages/node/dist/ai-capture/batching.mjs 1.21 kB 0 B
packages/node/dist/ai-capture/routing.js 1.87 kB 0 B
packages/node/dist/ai-capture/routing.mjs 264 B 0 B
packages/node/dist/capture-v1/config.js 1.5 kB 0 B
packages/node/dist/capture-v1/config.mjs 292 B 0 B
packages/node/dist/capture-v1/errors.js 1.89 kB 0 B
packages/node/dist/capture-v1/errors.mjs 694 B 0 B
packages/node/dist/capture-v1/routing.js 1.68 kB 0 B
packages/node/dist/capture-v1/routing.mjs 279 B 0 B
packages/node/dist/capture-v1/sender.js 11.4 kB 0 B
packages/node/dist/capture-v1/sender.mjs 9.94 kB 0 B
packages/node/dist/capture-v1/transform.js 5.13 kB 0 B
packages/node/dist/capture-v1/transform.mjs 3.65 kB 0 B
packages/node/dist/capture-v1/types.js 603 B 0 B
packages/node/dist/capture-v1/types.mjs 0 B 0 B 🆕
packages/node/dist/client.js 59.4 kB 0 B
packages/node/dist/client.mjs 56 kB 0 B
packages/node/dist/entrypoints/index.edge.js 3.85 kB 0 B
packages/node/dist/entrypoints/index.edge.mjs 720 B 0 B
packages/node/dist/entrypoints/index.node.js 6.05 kB 0 B
packages/node/dist/entrypoints/index.node.mjs 1.43 kB 0 B
packages/node/dist/entrypoints/nestjs.js 2.31 kB 0 B
packages/node/dist/entrypoints/nestjs.mjs 42 B 0 B
packages/node/dist/experimental.js 870 B 0 B
packages/node/dist/experimental.mjs 267 B 0 B
packages/node/dist/exports.js 6.75 kB 0 B
packages/node/dist/exports.mjs 582 B 0 B
packages/node/dist/extensions/context/context.js 2.13 kB 0 B
packages/node/dist/extensions/context/context.mjs 863 B 0 B
packages/node/dist/extensions/context/types.js 603 B 0 B
packages/node/dist/extensions/context/types.mjs 0 B 0 B 🆕
packages/node/dist/extensions/error-tracking/autocapture.js 5.19 kB 0 B
packages/node/dist/extensions/error-tracking/autocapture.mjs 3.62 kB 0 B
packages/node/dist/extensions/error-tracking/index.js 4.38 kB 0 B
packages/node/dist/extensions/error-tracking/index.mjs 3.17 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/context-lines.node.js 11.6 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs 9.64 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/module.node.js 2.78 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/module.node.mjs 1.45 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/relative-path.node.js 1.97 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/relative-path.node.mjs 624 B 0 B
packages/node/dist/extensions/express.js 4.97 kB 0 B
packages/node/dist/extensions/express.mjs 2.78 kB 0 B
packages/node/dist/extensions/feature-flags/cache.js 603 B 0 B
packages/node/dist/extensions/feature-flags/cache.mjs 0 B 0 B 🆕
packages/node/dist/extensions/feature-flags/crypto.js 1.27 kB 0 B
packages/node/dist/extensions/feature-flags/crypto.mjs 63 B 0 B
packages/node/dist/extensions/feature-flags/feature-flags.js 31.2 kB 0 B
packages/node/dist/extensions/feature-flags/feature-flags.mjs 28.8 kB 0 B
packages/node/dist/extensions/nestjs.js 5.62 kB 0 B
packages/node/dist/extensions/nestjs.mjs 3.42 kB 0 B
packages/node/dist/extensions/sentry-integration.js 4.88 kB 0 B
packages/node/dist/extensions/sentry-integration.mjs 3.36 kB 0 B
packages/node/dist/extensions/tracing-headers.js 3.31 kB 0 B
packages/node/dist/extensions/tracing-headers.mjs 1.53 kB 0 B
packages/node/dist/extensions/url-utils.js 2.22 kB 0 B
packages/node/dist/extensions/url-utils.mjs 785 B 0 B
packages/node/dist/feature-flag-evaluations.js 6.12 kB 0 B
packages/node/dist/feature-flag-evaluations.mjs 4.77 kB 0 B
packages/node/dist/gzip.node.js 1.74 kB 0 B
packages/node/dist/gzip.node.mjs 416 B 0 B
packages/node/dist/storage-memory.js 1.52 kB 0 B
packages/node/dist/storage-memory.mjs 297 B 0 B
packages/node/dist/types.js 1.43 kB 0 B
packages/node/dist/types.mjs 224 B 0 B
packages/node/dist/version.js 1.21 kB 0 B
packages/node/dist/version.mjs 46 B 0 B
packages/nuxt/dist/module.mjs 5.92 kB 0 B
packages/nuxt/dist/runtime/composables/useFeatureFlagEnabled.js 566 B 0 B
packages/nuxt/dist/runtime/composables/useFeatureFlagPayload.js 690 B 0 B
packages/nuxt/dist/runtime/composables/useFeatureFlagVariantKey.js 591 B 0 B
packages/nuxt/dist/runtime/composables/usePostHog.js 128 B 0 B
packages/nuxt/dist/runtime/nitro-plugin-v2.js 480 B 0 B
packages/nuxt/dist/runtime/nitro-plugin-v3.js 574 B 0 B
packages/nuxt/dist/runtime/nitro-plugin.js 1.03 kB 0 B
packages/nuxt/dist/runtime/vue-plugin.js 1.13 kB 0 B
packages/openfeature-node-provider/dist/index.js 1.76 kB 0 B
packages/openfeature-node-provider/dist/index.mjs 190 B 0 B
packages/openfeature-node-provider/dist/mapping.js 5.32 kB 0 B
packages/openfeature-node-provider/dist/mapping.mjs 3.21 kB 0 B
packages/openfeature-node-provider/dist/provider.js 3.99 kB 0 B
packages/openfeature-node-provider/dist/provider.mjs 2.6 kB 0 B
packages/openfeature-web-provider/dist/index.js 1.75 kB 0 B
packages/openfeature-web-provider/dist/index.mjs 184 B 0 B
packages/openfeature-web-provider/dist/mapping.js 5.29 kB 0 B
packages/openfeature-web-provider/dist/mapping.mjs 3.18 kB 0 B
packages/openfeature-web-provider/dist/provider.js 4.41 kB 0 B
packages/openfeature-web-provider/dist/provider.mjs 3.06 kB 0 B
packages/plugin-utils/dist/chunk-ids.js 3.86 kB 0 B
packages/plugin-utils/dist/chunk-ids.mjs 2.05 kB 0 B
packages/plugin-utils/dist/cli.js 4.37 kB 0 B
packages/plugin-utils/dist/cli.mjs 2.72 kB 0 B
packages/plugin-utils/dist/config.js 3.5 kB 0 B
packages/plugin-utils/dist/config.mjs 2.26 kB 0 B
packages/plugin-utils/dist/index.js 4.98 kB 0 B
packages/plugin-utils/dist/index.mjs 250 B 0 B
packages/plugin-utils/dist/spawn-local.js 3.08 kB 0 B
packages/plugin-utils/dist/spawn-local.mjs 1.66 kB 0 B
packages/plugin-utils/dist/utils.js 3.27 kB 0 B
packages/plugin-utils/dist/utils.mjs 1.3 kB 0 B
packages/react-native/dist/autocapture.js 8.31 kB 0 B
packages/react-native/dist/error-tracking/index.js 9.97 kB 0 B
packages/react-native/dist/error-tracking/utils.js 2.58 kB 0 B
packages/react-native/dist/frameworks/wix-navigation.js 1.3 kB 0 B
packages/react-native/dist/hooks/useFeatureFlag.js 1.86 kB 0 B
packages/react-native/dist/hooks/useFeatureFlagResult.js 983 B 0 B
packages/react-native/dist/hooks/useFeatureFlags.js 941 B 0 B
packages/react-native/dist/hooks/useNavigationTracker.js 2.45 kB 0 B
packages/react-native/dist/hooks/usePostHog.js 544 B 0 B
packages/react-native/dist/hooks/utils.js 988 B 0 B
packages/react-native/dist/index.js 4.33 kB 0 B
packages/react-native/dist/logs-********.js 3.66 kB 0 B
packages/react-native/dist/native-deps.js 8.73 kB 0 B
packages/react-native/dist/optional/OptionalAsyncStorage.js 299 B 0 B
packages/react-native/dist/optional/OptionalExpoApplication.js 377 B 0 B
packages/react-native/dist/optional/OptionalExpoDevice.js 347 B 0 B
packages/react-native/dist/optional/OptionalExpoFileSystem.js 386 B 0 B
packages/react-native/dist/optional/OptionalExpoFileSystemLegacy.js 423 B 0 B
packages/react-native/dist/optional/OptionalExpoLocalization.js 383 B 0 B
packages/react-native/dist/optional/OptionalPlugin.js 891 B 0 B
packages/react-native/dist/optional/OptionalReactNativeDeviceInfo.js 415 B 0 B
packages/react-native/dist/optional/OptionalReactNativeLocalize.js 303 B 0 B
packages/react-native/dist/optional/OptionalReactNativeNavigation.js 415 B 0 B
packages/react-native/dist/optional/OptionalReactNativeNavigationWix.js 443 B 0 B
packages/react-native/dist/optional/OptionalReactNativeSafeArea.js 644 B 0 B
packages/react-native/dist/optional/OptionalReactNativeSvg.js 872 B 0 B
packages/react-native/dist/posthog-rn.js 67.4 kB 0 B
packages/react-native/dist/PostHogContext.js 329 B 0 B
packages/react-native/dist/PostHogErrorBoundary.js 3.19 kB 0 B
packages/react-native/dist/PostHogMaskView.js 1.68 kB 0 B
packages/react-native/dist/PostHogProvider.js 6 kB 0 B
packages/react-native/dist/storage.js 5.76 kB 0 B
packages/react-native/dist/surveys/components/BottomSection.js 1.51 kB 0 B
packages/react-native/dist/surveys/components/Cancel.js 968 B 0 B
packages/react-native/dist/surveys/components/ConfirmationMessage.js 1.71 kB 0 B
packages/react-native/dist/surveys/components/IntroMessage.js 1.6 kB 0 B
packages/react-native/dist/surveys/components/QuestionHeader.js 1.43 kB 0 B
packages/react-native/dist/surveys/components/QuestionTypes.js 14 kB 0 B
packages/react-native/dist/surveys/components/SurveyModal.js 7.24 kB 0 B
packages/react-native/dist/surveys/components/Surveys.js 6.58 kB 0 B
packages/react-native/dist/surveys/getActiveMatchingSurveys.js 2.69 kB 0 B
packages/react-native/dist/surveys/icons.js 10 kB 0 B
packages/react-native/dist/surveys/index.js 600 B 0 B
packages/react-native/dist/surveys/PostHogSurveyProvider.js 6.73 kB 0 B
packages/react-native/dist/surveys/safeStyleSheet.js 448 B 0 B
packages/react-native/dist/surveys/survey-translations.js 1.11 kB 0 B
packages/react-native/dist/surveys/surveys-utils.js 11.2 kB 0 B
packages/react-native/dist/surveys/useActivatedSurveys.js 3.68 kB 0 B
packages/react-native/dist/surveys/useSurveyStorage.js 2.48 kB 0 B
packages/react-native/dist/tooling/expoconfig.js 20.1 kB 0 B
packages/react-native/dist/tooling/metroconfig.js 2.32 kB 0 B
packages/react-native/dist/tooling/posthogMetroSerializer.js 7.74 kB 0 B
packages/react-native/dist/tooling/utils.js 4.2 kB 0 B
packages/react-native/dist/tooling/vendor/expo/expoconfig.js 70 B 0 B
packages/react-native/dist/tooling/vendor/metro/countLines.js 237 B 0 B
packages/react-native/dist/tooling/vendor/metro/utils.js 3.51 kB 0 B
packages/react-native/dist/types.js 70 B 0 B
packages/react-native/dist/utils.js 1.3 kB 0 B
packages/react-native/dist/version.js 130 B 0 B
packages/react/dist/esm/index.js 22.5 kB 0 B
packages/react/dist/esm/slim/index.js 18.9 kB 0 B
packages/react/dist/esm/surveys/index.js 4.75 kB 0 B
packages/react/dist/umd/index.js 25.9 kB 0 B
packages/react/dist/umd/slim/index.js 21.8 kB 0 B
packages/react/dist/umd/surveys/index.js 5.52 kB 0 B
packages/rollup-plugin/dist/index.js 7.6 kB 0 B
packages/rrweb/packer/dist/base-********.cjs 18.3 kB 0 B
packages/rrweb/packer/dist/base-********.js 18.2 kB 0 B
packages/rrweb/packer/dist/base-********.umd.cjs 18.7 kB 0 B
packages/rrweb/packer/dist/base-********.umd.min.cjs 9.5 kB 0 B
packages/rrweb/packer/dist/pack.cjs 347 B 0 B
packages/rrweb/packer/dist/pack.js 285 B 0 B
packages/rrweb/packer/dist/pack.umd.cjs 1.63 kB 0 B
packages/rrweb/packer/dist/pack.umd.min.cjs 1.11 kB 0 B
packages/rrweb/packer/dist/packer.cjs 257 B 0 B
packages/rrweb/packer/dist/packer.js 136 B 0 B
packages/rrweb/packer/dist/packer.umd.cjs 662 B 0 B
packages/rrweb/packer/dist/packer.umd.min.cjs 626 B 0 B
packages/rrweb/packer/dist/unpack.cjs 769 B 0 B
packages/rrweb/packer/dist/unpack.js 702 B 0 B
packages/rrweb/packer/dist/unpack.umd.cjs 1.17 kB 0 B
packages/rrweb/packer/dist/unpack.umd.min.cjs 955 B 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.cjs 37.6 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.js 37.5 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.umd.cjs 38 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.umd.min.cjs 22.2 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.cjs 34.3 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.js 34.2 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.umd.cjs 34.7 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.umd.min.cjs 20.5 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.cjs 15.6 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.js 15.5 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.umd.cjs 16.1 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.umd.min.cjs 7.61 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.cjs 5.01 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.js 4.9 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.umd.cjs 5.44 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.umd.min.cjs 2.64 kB 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.cjs 681 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.js 548 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.umd.cjs 1.12 kB 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.umd.min.cjs 829 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.cjs 933 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.js 820 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.umd.cjs 1.37 kB 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.umd.min.cjs 968 B 0 B
packages/rrweb/record/dist/rrweb-record.cjs 233 kB 0 B
packages/rrweb/record/dist/rrweb-record.js 233 kB 0 B
packages/rrweb/record/dist/rrweb-record.umd.cjs 234 kB 0 B
packages/rrweb/record/dist/rrweb-record.umd.min.cjs 107 kB 0 B
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.umd.min.cjs 74.9 kB 0 B
packages/rrweb/types/dist/rrweb-types.cjs 5.75 kB 0 B
packages/rrweb/types/dist/rrweb-types.js 5.46 kB 0 B
packages/rrweb/types/dist/rrweb-types.umd.cjs 6.16 kB 0 B
packages/rrweb/types/dist/rrweb-types.umd.min.cjs 2.86 kB 0 B
packages/rrweb/utils/dist/rrweb-utils.cjs 7.56 kB 0 B
packages/rrweb/utils/dist/rrweb-utils.js 7.1 kB 0 B
packages/rrweb/utils/dist/rrweb-utils.umd.cjs 7.97 kB 0 B
packages/rrweb/utils/dist/rrweb-utils.umd.min.cjs 4.04 kB 0 B
packages/types/dist/capture-log.js 603 B 0 B
packages/types/dist/capture-log.mjs 0 B 0 B 🆕
packages/types/dist/capture-metric.js 1.37 kB 0 B
packages/types/dist/capture-metric.mjs 93 B 0 B
packages/types/dist/capture.js 603 B 0 B
packages/types/dist/capture.mjs 0 B 0 B 🆕
packages/types/dist/common.js 603 B 0 B
packages/types/dist/common.mjs 0 B 0 B 🆕
packages/types/dist/feature-flags.js 603 B 0 B
packages/types/dist/feature-flags.mjs 0 B 0 B 🆕
packages/types/dist/index.js 1.45 kB 0 B
packages/types/dist/index.mjs 122 B 0 B
packages/types/dist/posthog-config.js 603 B 0 B
packages/types/dist/posthog-config.mjs 0 B 0 B 🆕
packages/types/dist/posthog.js 603 B 0 B
packages/types/dist/posthog.mjs 0 B 0 B 🆕
packages/types/dist/request.js 603 B 0 B
packages/types/dist/request.mjs 0 B 0 B 🆕
packages/types/dist/segment.js 603 B 0 B
packages/types/dist/segment.mjs 0 B 0 B 🆕
packages/types/dist/session-recording.js 603 B 0 B
packages/types/dist/session-recording.mjs 0 B 0 B 🆕
packages/types/dist/survey.js 603 B 0 B
packages/types/dist/survey.mjs 0 B 0 B 🆕
packages/types/dist/toolbar.js 603 B 0 B
packages/types/dist/toolbar.mjs 0 B 0 B 🆕
packages/types/dist/tree-shakeable.js 603 B 0 B
packages/types/dist/tree-shakeable.mjs 0 B 0 B 🆕
packages/web/dist/index.cjs 14 kB 0 B
packages/web/dist/index.mjs 14 kB 0 B
packages/webpack-plugin/dist/config.js 1.47 kB 0 B
packages/webpack-plugin/dist/config.mjs 480 B 0 B
packages/webpack-plugin/dist/index.js 7.39 kB 0 B
packages/webpack-plugin/dist/index.mjs 3.58 kB 0 B
tooling/changelog/dist/index.js 3.31 kB 0 B
tooling/rollup-utils/dist/index.js 1.17 kB 0 B

compressed-size-action

Declare the packages whose source actually changed. posthog-js bumps
automatically through its workspace:* dependency on @posthog/rrweb.

Generated-By: PostHog Desktop
Task-Id: 8948b193-aacc-4857-a0cf-3b37113c8158
@dustinbyrne
dustinbyrne requested a review from a team August 24, 2026 15:05
Guards the rrdom diff and buildFromNode paths, skips a shadow subtree whose host refused a shadow root instead of appending it to the light DOM where its styles would apply document-wide, and adds a lint rule so a new unguarded call site fails lint.
@turnipdabeets
turnipdabeets marked this pull request as ready for review August 25, 2026 13:31
@turnipdabeets
turnipdabeets requested a review from a team as a code owner August 25, 2026 13:31
@turnipdabeets
turnipdabeets requested review from a team, TueHaulund, arnohillen, fasyy612 and ksvat and removed request for a team August 25, 2026 13:31
@dustinbyrne

dustinbyrne commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Pull request risk assessment: REVIEW

I checked commit 81d906df2fab4455ba0b424f1fb608d04d6454f5 against main at 6322f09922270e9d1562bacf0e602e76d238d395.

The merge base is 6322f09922270e9d1562bacf0e602e76d238d395. The checkout was clean.

Snapshot

Repository: PostHog/posthog-js.

The merge-base diff changes these 11 files:

  • .changeset/replay-guard-attach-shadow.md
  • packages/rrweb/.eslintrc.js
  • packages/rrweb/rrdom/src/diff.ts
  • packages/rrweb/rrdom/src/index.ts
  • packages/rrweb/rrdom/test/diff.test.ts
  • packages/rrweb/rrweb-snapshot/src/rebuild.ts
  • packages/rrweb/rrweb-snapshot/src/utils.ts
  • packages/rrweb/rrweb-snapshot/test/rebuild.test.ts
  • packages/rrweb/rrweb/src/replay/index.ts
  • packages/rrweb/rrweb/test/events/shadow-dom-refused-host.ts
  • packages/rrweb/rrweb/test/replayer.test.ts
Check Result Evidence
The pull request fixes a real issue. CLEAR The base sandbox threw NotSupportedError and omitted the normal sibling. The head sandbox did not throw and rendered the sibling. The new guard handles the cause.
All non-bot authors are internal contributors. CLEAR GitHub identifies posthog[bot] as a bot. GitHub returned HTTP 204 for the PostHog membership of turnipdabeets. No commit has a co-author trailer.
The production change uses only private or internal logic. REVIEW The production helper is an export from utils.ts. The package exports all utility items.
The public API does not change. REVIEW The head build adds attachShadowRootSafely to dist/rrweb-snapshot.d.ts. The base declaration does not contain this export.
Default data capture does not change. CLEAR The base and head apps emitted the same six default rrweb events at 800 by 600 pixels. Both emitted a full snapshot, the target mutation, and the button click.
The example application works without an observed regression. CLEAR The head app handled the refused host. The normal replay and normal capture flows also passed. This result applies to the tested Chrome scenarios.
The changeset has the correct scope and release type. REVIEW The changeset names three rrweb packages. The release workflow states that PostHog does not publish these packages. The repository requires a posthog-js changeset for rrweb changes.
The change is not a major breaking change. CLEAR The supported replay and capture scenarios need no migration. The affected scenario changes from an exception to a skipped unsupported subtree.

One or more checks need human review. This result does not mean the change is incorrect or should be closed.

Sandbox

I used one isolated static HTML application for the base and head builds. The application SHA-256 was 97020517d795434de35f99f3353b5c182ce8a9db8e67e36206b4b3949baf15a9.

I built each rrweb.umd.cjs file from its exact commit. I used Node 24.13.0 and pnpm 11.7.0.

I ran the application in Headless Chrome 147 on macOS. I fixed the viewport at 800 by 600 pixels.

The application completed these steps:

  1. It started rrweb.record with default options.
  2. It added a target element and clicked its button.
  3. It replayed a supported custom-element shadow host.
  4. It replayed the refused nohyphen shadow host.

The base refused-host flow threw an exception. The head refused-host flow rendered the host and the normal sibling without an exception.

Both builds recorded six events. Both builds recorded the full snapshot, one target mutation, and one button click.

The linked inbox report required a PostHog login. I did not use that report as evidence.

Automated checks

  • pnpm turbo run build --filter=@posthog/core passed for the base and head.
  • pnpm turbo run prepublish --filter=@posthog/rrweb passed five affected build and type tasks for each commit.
  • The focused rrweb-snapshot, rrdom, and Chromium replayer regression tests passed at the head.
  • pnpm eslint 'packages/rrweb/*/src/**/*.ts' exited with status 0 at the head.

Required action

  • Keep attachShadowRootSafely inside internal code. Remove it from the package entry points.
  • Replace the changeset with a posthog-js patch changeset.

@dustinbyrne dustinbyrne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the fix is valid, though worth @PostHog/team-replay taking a look as this touches the playback engine

Comment thread .changeset/replay-guard-attach-shadow.md
Comment thread packages/rrweb/rrweb-snapshot/src/utils.ts
packages/rrweb/** is never published; AGENTS.md requires rrweb changes to ship under a posthog-js changeset.
@github-actions

Copy link
Copy Markdown
Contributor
⚠️ Possible changeset mismatch — 3 undeclared, 1 extra

This is informational — the PR is not blocked. Click the triangle above to collapse, or push a fix and this comment will auto-delete.

Modified in this PR but not in any changeset:

  • @posthog/rrdom
  • @posthog/rrweb
  • @posthog/rrweb-snapshot

If this package should ship the change, add it to the changeset frontmatter:

---
"@posthog/rrdom": patch
"@posthog/rrweb": patch
"@posthog/rrweb-snapshot": patch
---

Declared in a changeset but no source files modified:

  • posthog-js

Double-check this is intentional — for example, releasing a previously-merged change.

Changesets in this PR:

  • posthog-js — patch

… root

Gates the skip on the parent being a recorded shadow host, so a recording that never marked one keeps rendering those children in the light DOM.
@TueHaulund
TueHaulund enabled auto-merge (squash) August 26, 2026 09:07
@TueHaulund
TueHaulund merged commit 1d88b4e into main Aug 26, 2026
55 checks passed
@TueHaulund
TueHaulund deleted the posthog-self-driving/fixreplay-guard-attachshadow-when-2cb73d branch August 26, 2026 09:17
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.

3 participants