blocfeed 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/dist/chunk-VWILLYYY.js +884 -0
- package/dist/chunk-X4ON6DOW.cjs +884 -0
- package/dist/{controller-09cYt2qm.d.cts → controller-DrQ--KwA.d.cts} +13 -0
- package/dist/{controller-09cYt2qm.d.ts → controller-DrQ--KwA.d.ts} +13 -0
- package/dist/engine.cjs +1 -1
- package/dist/engine.d.cts +2 -2
- package/dist/engine.d.ts +2 -2
- package/dist/engine.js +1 -1
- package/dist/main.cjs +1 -884
- package/dist/main.d.cts +9 -3
- package/dist/main.d.ts +9 -3
- package/dist/main.js +1 -884
- package/package.json +1 -1
- package/dist/chunk-FBLTAHNW.cjs +0 -2
- package/dist/chunk-GNKDVHVD.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.20.0 — 2026-05-07
|
|
4
|
+
|
|
5
|
+
### Signal accuracy
|
|
6
|
+
|
|
7
|
+
- **rage-click now emits exactly one event per burst.** The previous behaviour fired an immediate `final: false` event at threshold-crossing and a follow-up `final: true` after the streak idled out, so a single rage produced two server-side rows the dashboard had to reconcile. The detector now emits a single event with `final: true` and the full `click_count` once the streak ends (`streakIdleMs`, default 1500). On `pagehide`, in-progress bursts that crossed the threshold are flushed via the same code path so we don't lose data when the user closes the tab mid-rage.
|
|
8
|
+
|
|
9
|
+
### New: stable element keys
|
|
10
|
+
|
|
11
|
+
- New `stable_key: string | null` field on every `BehavioralEvent`. Built by walking up to four ancestors and emitting the first of `data-blocfeed-component` (→ `bf:component:<value>`), a `data-testid` family attribute (→ `bf:testid:<value>`), or `id` (→ `bf:id:<value>`). Lets the backend dedupe and aggregate events for the "same logical element" across re-renders even when the CSS selector path shifts.
|
|
12
|
+
- The `rage_click` and `dead_click` detectors now key their internal grouping maps on `stable_key ?? selector`, so bursts and rate-limit budgets follow the logical element, not its current selector path.
|
|
13
|
+
- New exported helper `buildStableElementKey(el, maxDepth?)` from `blocfeed/shared/dom`.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 0.19.0 — 2026-05-07
|
|
18
|
+
|
|
19
|
+
### Signal accuracy fixes
|
|
20
|
+
|
|
21
|
+
- **rage-click** now emits a follow-up `final: true` event with the real total `click_count` after the click streak ends (default 1500 ms idle). Previously the count was capped at the threshold, so a 20-click rage looked identical to a 3-click rage. New `RageClickConfig.streakIdleMs` (default 1500).
|
|
22
|
+
- **dead-click** observation is now scoped to the click target's nearest interesting ancestor (button / a / form / [role=button]) instead of the entire document body. Unrelated re-renders elsewhere on the page no longer suppress real dead clicks.
|
|
23
|
+
- **httpFail** now catches fetch exceptions (network errors, CORS, abort) and emits with `event_data.http_status: 0` and `error_kind: "network" | "abort"`. Also adds `404, 408, 409, 429` to the default tracked status codes. New optional `treatJsonErrorAsFail` config to flag 2xx responses with `{ ok: false }` / `{ error }` / `{ success: false }` bodies.
|
|
24
|
+
- **formDataLoss** clears dirty state on `submit` and `reset` events, and suppresses bfcache emission for 60 s after a successful submit. Eliminates false "form abandonment" events on successful conversions.
|
|
25
|
+
|
|
26
|
+
### Reliability fixes
|
|
27
|
+
|
|
28
|
+
- **Sampling consistency.** Behavioral and replay sampling now both use the same deterministic `simpleHash(session_id) % 100` decision. A sampled session is in both cohorts or neither — no more "signal exists but no replay" or vice-versa.
|
|
29
|
+
- **Replay restart after inactivity.** The 30-min inactivity timer now triggers a soft pause (uninstalls rrweb, keeps the controller alive). A one-shot pointerdown/keydown listener resumes recording when the user returns. The 4-hour absolute cap still terminates fully. New `pause_count` field appears in chunk POST bodies.
|
|
30
|
+
|
|
31
|
+
### New: widget heartbeat
|
|
32
|
+
|
|
33
|
+
- New `installHeartbeat()` helper (auto-installed by `BehavioralTracker`) POSTs to `/api/heartbeat` every 5 minutes (and on pagehide) with `{ blocfeed_id, session_id, version, page_url, user_agent, sdk_features }`. Lets the dashboard surface a "last seen" indicator and detect silent SDK breakage.
|
|
34
|
+
- New exported constant `SDK_VERSION` from `blocfeed`.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
3
38
|
## 0.18.0 — 2026-04-30
|
|
4
39
|
|
|
5
40
|
- **feat:** new `track(name, properties?, options?)` API on `BlocFeedApi` and exported as `BlocFeed.track()` for non-React usage. Send custom events to BlocFeed for funnels, conversion tracking, and segment filters.
|