Repository navigation
Conversation
Product tours were sunset. Remove the lazy-loaded tours bundle, the element-inference and preview entrypoints, tours rendering and event handling, and related tests and playground pages. posthog.productTours, ProductToursExtensions, the disable_product_tours option and the ProductTour/ProductTourCallback types stay as deprecated no-ops so existing customer code keeps working. Persisted tours state is kept hidden from events and cleared on init. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replay incident risk checkThis 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 |
Coherence2 spec problems · 0 failing chokepoints · 2 spec gaps · 0 guard failures 43 components, 5 bullets (5 invariants, 0 requirements), 2 problems Spec problems (spec --check)
Chokepoints: none declared. Spec gaps: 2 entrances with outside or unknown trust and no traced control, and 10 more held by the adoption baseline
Close one with |
|
[Medium impact] The PR appears safe to merge with the explicitly acknowledged removal of product-tour exports and bundles. Reviews (1) · Last reviewed commit: "feat(browser): remove product tours" · Reviewed by Greptile |
|
Size Change: -245 kB (-1.02%) Total Size: 23.9 MB 📦 View Changed
ℹ️ View Unchanged
|
posthog-js Compliance ReportDate: 2026-10-13 14:17:10 UTC ✅ All Tests Passed!26/26 tests passed Capture Tests✅ 26/26 tests passed View Details
|
Node SDK compliance v2Commit: feea79f Capture v0 — acceptance✅ 5 passed / ❌ 0 non-passing / Drill-down: run artifacts → Harness exit: 0; report validation exit: 0. All selected cases passed and report validation succeeded. Capture v1 — acceptance✅ 5 passed / ❌ 0 non-passing / Drill-down: run artifacts → Harness exit: 0; report validation exit: 0. All selected cases passed and report validation succeeded. Capture v0 — migration✅ 55 passed / ❌ 1 non-passing / Drill-down: run artifacts → ❌ migration/yaml-parity-v1/remote-flags-v1.feature::Omitted GeoIP settings default to enabled in flag requests — failed_assertionFlags field differs Code: Failed step: migration/yaml-parity-v1/remote-flags-v1.feature:134 the first flags request field "geoip_disable" should equal JSON false Operation: Field: Expected: false Actual value: true Harness exit: 1; report validation exit: 1. Capture v1 — migration✅ 119 passed / ❌ 2 non-passing / Drill-down: run artifacts → ❌ migration/yaml-parity-v1/capture-amendment-v1.feature::Capture preserves an explicit product tour ID — unsupported_bindingNo binding for /capture/options/product_tour_id Code: Failed step: migration/yaml-parity-v1/capture-amendment-v1.feature:110 capture is called with JSON arguments: ❌ migration/yaml-parity-v1/remote-flags-v1.feature::Omitted GeoIP settings default to enabled in flag requests — failed_assertionFlags field differs Code: Failed step: migration/yaml-parity-v1/remote-flags-v1.feature:134 the first flags request field "geoip_disable" should equal JSON false Operation: Field: Expected: false Actual value: true Harness exit: 1; report validation exit: 1. |
Restore every public product tours export, type, entrypoint and config key as a deprecated no-op so existing imports keep compiling and resolving after upgrade. The dist/product-tours, product-tours-preview and element-inference entrypoints now ship stubs. Remove the capture v1 product_tour_id option from posthog-node, browser-next and the compliance adapters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Fix the unused catch bindings and the direct undefined check in the node compliance adapter, and keep only the rules that do not fit a CommonJS Node script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| coerce: (value: JsonType) => boolean | undefined | ||
| }> = [ | ||
| { property: '$cookieless_mode', optionKey: 'cookieless_mode', coerce: coerceBool }, | ||
| { property: '$ignore_sent_at', optionKey: 'disable_skew_correction', coerce: coerceBool }, | ||
| { property: '$process_person_profile', optionKey: 'process_person_profile', coerce: coerceBool }, |
There was a problem hiding this comment.
P1 · Preserve the Capture V1 product tour option mapping
With POSTHOG_CAPTURE_MODE=v1, capturing a survey event with $product_tour_id now leaves it in properties instead of lifting it into options. The backend's WrappedEvent.has_property checks only options.product_tour_id, so it classifies these events as standalone surveys and drops them when the survey quota is exhausted. Restore the sentinel mapping and its option type.
| export class PostHogProductTours { | ||
| /** @deprecated Product tours were removed from PostHog. Calls the callback with an empty list. */ | ||
| getProductTours(callback: ProductTourCallback, _forceReload: boolean = false): void { |
There was a problem hiding this comment.
P2 · Preserve the deprecated product tours constructor signature
TypeScript consumers constructing new ProductToursExtensions.productTours(posthog) now fail with “Expected 0 arguments, but got 1.” Removing constructor(instance: PostHog) changes the publicly exported bundle class's signature, even though its methods remain compatible no-ops. Retain an ignored constructor parameter so existing integrations still compile.
| export function generateProductTours(_posthog: PostHog, _isEnabled: boolean): undefined { | ||
| return undefined |
There was a problem hiding this comment.
P1 · Preserve the deprecated generator's manager return contract
TypeScript consumers importing the default export from posthog-js/dist/product-tours and calling generateProductTours(posthog, true)?.stop() now fail to compile: the return type changed from ProductTourManager | undefined to undefined. Existing manager calls also lose their runtime target. Return a compatible no-op manager and preserve its method signatures.
Problem
Product tours were sunset and the deprecation date (2026-09-26) has passed (PostHog/posthog.com#18479). The SDK still ships the tours bundle and code. A parallel PR removes tours from PostHog/posthog.
Tours must stop working, but no customer site or build may break on upgrade.
Changes
Removed:
product tour shown$setlogic incapture()query-selector-shadow-domdependency, which only tours usedproduct_tour_idoption in posthog-node, browser-next and the compliance adapters. A$product_tour_idproperty is now sent as an ordinary property.playwright/mocked/product-tours, and tours playground pagesKept as deprecated no-ops, with the same names and types as before, so existing imports compile and resolve:
posthog.productToursand all its methodsgetProductTours/getActiveProductTourscall back with[]. Other methods do nothing.disable_product_toursconfig optionProductToursExtensionsand__extensionClasses.productToursProductTourEventName,ProductTourEventProperties,DEFAULT_PRODUCT_TOUR_APPEARANCE@deprecatedSurveyEventProperties.PRODUCT_TOUR_ID,RemoteConfig.productTours@deprecateddist/product-tours,dist/product-tours-preview,dist/element-inferenceundefined,nullorfalse.Other behavior:
productToursis ignored.main, only doc changes.Array bundle (esbuild comparison against
main): -4.70 KiB minified, -1.11 KiB gzip.Release info Sub-libraries affected
Libraries affected
Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Written by Claude Code (Claude Opus 5.5,
claude-opus-5-5).compliance/node/adapter.jsgot an.oxlintrc.jsonoverride (Node CommonJS rules, likecompliance/node/v2). The pre-commit hook lints whole files, and this file already failed those rules.check:public-api.🤖 Generated with Claude Code