mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-11-02 14:31:14 +00:00
We own the ingestion server (hanzoai/insights: Django + rust/capture + nodejs plugin) AND this SDK, so there is no external wire contract to preserve. The server is already 100% posthog-free; this SDK was the last laggard. - $last_posthog_reset -> $last_insights_reset. This FIXES A LIVE MISMATCH: the server taxonomy (insights/taxonomy/taxonomy.py, insights/insightsql/ai.py) already expected the insights form while the SDK emitted the posthog form. - __PosthogExtensions__ -> __InsightsExtensions__; all PostHog/posthog/POSTHOG identifiers -> Insights/insights/INSIGHTS (src, tests, playground, playwright, scripts, rrweb subpackages, package.json keywords). - Hosts: DEFAULT_PLUGIN_HOST + DEFAULT_NUXT_HOST + the core host default pointed at PostHog's cloud (us.i.posthog.com) — a real bug. All -> insights.hanzo.ai. - Removed the us-assets/eu-assets CDN split in getRemoteConfig (PostHog-specific; Hanzo serves remote config from the same host) — it had degenerated to a no-op. - Fixed generate-docs writing to a stray references/@hanzo/ subdir. - Renamed the 3 posthog-named test files; dropped 58MB of stale reference snapshots named for upstream posthog versions we never shipped (they are generated output — references/ is now gitignored). Verified: typecheck errors 42 (HEAD) -> 18 (all pre-existing test-mock looseness); types package 0; every package.json valid with @hanzo/* names. Guard: grep -rioE 'posthog' packages ... | wc -l => 0
28 lines
2.3 KiB
HTML
28 lines
2.3 KiB
HTML
<html>
|
|
<head>
|
|
<title>Preload-as-style link listener leak repro</title>
|
|
<!-- The chunk-*.css URLs below intentionally point at non-existent files so the
|
|
browser cannot satisfy the preload and link.sheet stays null forever. That
|
|
is the exact condition that exercises the leak before the fix. -->
|
|
<link rel="preload" as="style" href="/preload-leak/chunk-a.css" />
|
|
<link rel="preload" as="style" href="/preload-leak/chunk-b.css" />
|
|
<link rel="preload" as="style" href="/preload-leak/chunk-c.css" />
|
|
<link rel="preload" as="style" href="/preload-leak/chunk-d.css" />
|
|
<link rel="preload" as="style" href="/preload-leak/chunk-e.css" />
|
|
</head>
|
|
<body>
|
|
<div class="content">
|
|
<h1>Preload-as-style link listener leak repro</h1>
|
|
<p>This page has five <link rel="preload" as="style"> elements that
|
|
never instantiate a CSSStyleSheet. Before the fix, the session
|
|
recorder polled them every 5 seconds and leaked load listeners on
|
|
every cycle.</p>
|
|
<input data-cy-input placeholder="Email" />
|
|
</div>
|
|
|
|
<script>
|
|
!function (t, e) { var o, n, p, r; e.__SV || (window.insights = e, e._i = [], e.init = function (i, s, a) { function g(t, e) { var o = e.split("."); 2 == o.length && (t = t[o[0]], e = o[1]), t[e] = function () { t.push([e].concat(Array.prototype.slice.call(arguments, 0))) } } (p = t.createElement("script")).type = "text/javascript", p.crossOrigin = "anonymous", p.async = !0, p.src = s.api_host + "/static/array.js", (r = t.getElementsByTagName("script")[0]).parentNode.insertBefore(p, r); var u = e; for (void 0 !== a ? u = e[a] = [] : a = "insights", u.people = u.people || [], u.toString = function (t) { var e = "insights"; return "insights" !== a && (e += "." + a), t || (e += " (stub)"), e }, u.people.toString = function () { return u.toString(1) + ".people (stub)" }, o = "capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getSurveys getActiveMatchingSurveys captureException".split(" "), n = 0; n < o.length; n++)g(u, o[n]); e._i.push([i, s, a]) }, e.__SV = 1) }(document, window.insights || []);
|
|
</script>
|
|
</body>
|
|
</html>
|